-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PoC for ARM64 support of LocalDB #1952
PoC for ARM64 support of LocalDB #1952
Conversation
@@ -103,6 +233,9 @@ internal static string MapLocalDBErrorStateToErrorMessage(LocalDBErrorState erro | |||
/// </summary> | |||
private bool LoadUserInstanceDll() | |||
{ | |||
_sqlUserInstanceLibraryHandle = null; | |||
throw new Exception(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not meant to be part of the change. I may have been playing around with it on my AMD64 dev box, so I wanted to make it fail artificially. Oops...
Any takers? Good? Bad? Horrible? :) |
|
||
// TODO: Are named pipes the only option for SqlLocaLDB? | ||
// TODO: Probably sensitive to move out of this method to avoid compiling it all the time | ||
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex("(np:.+)\r", System.Text.RegularExpressions.RegexOptions.Compiled | System.Text.RegularExpressions.RegexOptions.CultureInvariant); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a timeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup - keep in mind this is very crude PoC.
|
||
var lines = alllines.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); | ||
|
||
// TODO: Are named pipes the only option for SqlLocaLDB? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, LocalDB only uses named pipes (no networking)
// the connection string we are looking for! | ||
foreach (var line in lines) | ||
{ | ||
var foo = regex.Match(line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely!
Closing as this is a POC and work has been carried forward in a different PR. |
@DavoudEshtehari / @cheenamalhotra / @David-Engel - FYI, this the "Proof of Concept" I've been toying with in the last couple of days.
The logic is as follows:
SqlUserInstance.dll
that is AMD64):SqlLocalDB.exe s <instancename>
(to make sure the instance is started) - it's a no-op if it is already running, I believeSqlLocalDB.exe i <instancename>
to get the connection string, i.e. the named pipe to use - assumption: SqlLocalDB always exposed named pipesHere's my test app (built for net7.0):
It's output looks like this on my ARM64 box: