db.mysql query
and real_query
do not wait until execution is complete.
#18063
Labels
Bug
This tag is applied to issues which reports bugs.
Describe the bug
query
andreal_query
do not wait until execution is complete. This allows functions to be invoked while the previous is still executing, causing error if the next operations rely on the previous incomplete operation.Expected Behavior
query
andreal_query
should wait for all the statements to be executed by the mysql server before allowing the next functions on the stack to be executed.Current Behavior
query
andreal_query
do not wait.Reproduction Steps
I have an sql file with ~130 tables.
I read this file and execute it with
real_query
(orquery
, same outcome) in one functionThe next function relies on the tables created with this sql file. It is run immediately after the function containing this code.
MySQL server only creates about 40 tables before the next function crashes the program because the tables required aren't found.
If I instead do other operations, by invoking other time-consuming functions instead of the function that crashes the program, I can see the MySQL server slowly creating tables while other operations are running. This shows that the
real_query
is still being executed, while the program is executing other tasks.This seems like concurrent behavior.
Possible Solution
No response
Additional Information/Context
No response
V version
Current V version: V 0.3.3 0a8a0fd, timestamp: 2023-03-25 14:38:47 +0200
Environment details (OS name and version, etc.)
The text was updated successfully, but these errors were encountered: