1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-34406 Enhance mariadb_upgrade to print failing query in case of error

To make this possible, it was also necessary to enhance the mariadb
client with the option --print-query-on-error.
This option can also be very useful when running a batch of queries
through the mariadb client and one wants to find out where things goes
wrong.

TODO: It would be good to enhance mariadb_upgrade to not call the mariadb
client for executing queries but instead do this internally.  This
would have made this patch much easier!

Reviewed by: Sergei Golubchik <serg@mariadb.com>
This commit is contained in:
Monty
2024-06-15 14:26:07 +03:00
parent 4b4c371fe7
commit fef32fd9ad
3 changed files with 101 additions and 33 deletions

View File

@ -6413,9 +6413,13 @@ j integer
INSERT INTO t VALUES (1,1),(2,2),(3,3),(4,4);
# Dump database 1
# Restore from database 1 to database 2
ERROR 1100 (HY000) at line 46: Table 'seq_t_i' was not locked with LOCK TABLES
SETVAL(`seq_t_i`, 1, 0)
1
--------------
INSERT INTO `t` VALUES (1,1),(2,2),(3,3),(4,4)
--------------
ERROR 1100 (HY000) at line 46: Table 'seq_t_i' was not locked with LOCK TABLES
DROP DATABASE IF EXISTS test1;
DROP DATABASE IF EXISTS test2;
#