-
Notifications
You must be signed in to change notification settings - Fork 345
-
I'm using mysqlconnector with Manticore which has a mySQL interface, however I see some queries failing with:
[@\uE001MySqlConnector\uE001Sleep;'"](sphinxql: syntax error, unexpected $undefined, expecting FROM or ',' near '@\uE001MySqlConnector\uE001Sleep;'")
Connection string is:
($"Server={config.Hostname};Port={config.Port};Database={config.Database};ConnectionReset=false; Default Command Timeout=6;UseCompression=false;ConnectionIdleTimeout=10;Connection Timeout=5"
is there a way to make it not run those sleep commands?
Beta Was this translation helpful? Give feedback.
All reactions
A workaround would be avoiding MySqlConnector's built-in query cancellation and reimplementing it with your own timer that executes KILL QUERY nnn
on a background thread after six seconds. (You can get the value for the query to kill by reading MySqlConnection.ServerThread
before the command is executed.)
Replies: 1 comment 6 replies
-
That command is coming from query cancellation. You have Default Command Timeout=6;
in your connection string. Does it need to be so low (resulting in frequent query cancellation)?
FWIW, the current syntax that MySqlConnector uses was chosen in #1115 to be more compatible with Xpand DB and Singlestore.
Beta Was this translation helpful? Give feedback.
All reactions
-
It does not:
SQL Error (1064): sphinxql: syntax error, unexpected @uservar, expecting FROM or ',' near '@dummy'
Fwiw we do this so that it gives up after 6 seconds, if it takes 6 seconds to do a query against manticore I'd rather it give up all together. (If there's a better way to do that I'm all for trying it)
Beta Was this translation helpful? Give feedback.
All reactions
-
The older version of the code used DO SLEEP(0);
to clear any pending cancellation: ccca234
I also get an error with Manticore using that syntax: error payload: 1064, 42000, P02: syntax error, unexpected identifier near 'DO SLEEP(0);'
That makes me think that this isn't a recent regression, but that query cancellation never worked with Manticore.
Beta Was this translation helpful? Give feedback.
All reactions
-
Using the latest Docker image, the server identifies itself as 6.2.0 45680f95d@230804 (columnar 2.2.0 dc33868@230804) (secondary 2.2.0 dc33868@230804)
. This doesn't include the word "Manticore", so auto-detecting the server type might be challenging.
Beta Was this translation helpful? Give feedback.
All reactions
-
A workaround would be avoiding MySqlConnector's built-in query cancellation and reimplementing it with your own timer that executes KILL QUERY nnn
on a background thread after six seconds. (You can get the value for the query to kill by reading MySqlConnection.ServerThread
before the command is executed.)
Beta Was this translation helpful? Give feedback.
All reactions
-
Yeah I'll try that. Thanks!
Beta Was this translation helpful? Give feedback.