Skip to content
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

DO SLEEP(0) is syntax error in xpand db #1115

Closed
ikpil opened this issue Jan 12, 2022 · 5 comments
Closed

DO SLEEP(0) is syntax error in xpand db #1115

ikpil opened this issue Jan 12, 2022 · 5 comments

Comments

@ikpil
Copy link

ikpil commented Jan 12, 2022

Software versions
MySqlConnector version: "MySqlConnector" Version="2.1.2"

Server type (MySQL, MariaDB, Aurora, etc.) and version: 5.0.45-Xpand-5.3.17
.NET version: LTS dotnet 6.0.10
(Optional) ORM NuGet packages and versions:

Describe the bug
DO SLEEP(0) is not working

Exception
exception message
MySqlConnector.MySqlException : [33792] syntax error: syntax error near "DO"
LINE: DO SLEEP(0);

Data:
  Server Error Code: 1064
  SqlState: HY000

call stack
ServerSession.FinishQuerying() Line 322
MySqlConnection.FinishQuerying(Boolean hasWarnings) Line 876
MySqlDataReader.DisposeAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) Line 609
MySqlDataReader.Dispose(Boolean disposing) Line 428
DbDataReader.Dispose()
SqlMapper.QueryImpl[T](IDbConnection cnn, CommandDefinition command, Type effectiveType)+<>m__Finally1() Line 1125
SqlMapper.QueryImpl[T](IDbConnection cnn, CommandDefinition command, Type effectiveType)+MoveNext() Line 1115
List1.ctor(IEnumerable1 collection)
Enumerable.ToList[TSource](IEnumerable1 source) SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable1 commandTimeout, Nullable`1 commandType) Line
 721

@bgrainger
Copy link
Member

Does SELECT SLEEP(0) INTO @dummy work for Xpand DB? That syntax suggestion came from gopigment@b548db4#diff-22f5eec5ea345b8f0fd8c96f47bb2a7e59d35071c7ad2525d6f251a5ece19d5cR319.

bgrainger referenced this issue in gopigment/MySqlConnector Jan 12, 2022
Those changes are workaround for issues when using this client on
SingleStore.
It is not meant to be production grade changes yet, but allows us to
continue testing our solution against S2.
@ikpil
Copy link
Author

ikpil commented Jan 13, 2022

Does SELECT SLEEP(0) INTO @dummy work for Xpand DB? That syntax suggestion came from gopigment@b548db4#diff-22f5eec5ea345b8f0fd8c96f47bb2a7e59d35071c7ad2525d6f251a5ece19d5cR319.

works fine!

If applied to library, when will it be released?

@bgrainger
Copy link
Member

The SELECT SLEEP(0) INTO @dummy syntax is also a necessary workaround for SingleStore (see memsql@d8f808e) so it seems reasonable to make it the default in MySqlConnector.

@bgrainger
Copy link
Member

Fixed in 2.1.5.

@bgrainger
Copy link
Member

This syntax may not be compatible with Manticore: #1356.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants