Description:
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON -DMYSQL_MAINTAINER_MODE=ON -DWITH_SYSTEM_LIBS=ON -DWITH_NDBCLUSTER_STORAGE_ENGINE=OFF -DDOWNLOAD_BOOST=ON -DWITH_BOOST=path -DCMAKE_CXX_FLAGS=-g -DCMAKE_CXX_FLAGS_DEBUG=-g -DCMAKE_CXX_FLAGS_RELEASE=-g -O2 -DNDEBUG -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm@14/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm@14/bin/clang++ -DCMAKE_AR=/opt/homebrew/opt/llvm@14/bin/llvm-ar
... build ...
$ ./mtr main.mysqldump-tablespace-escape
...
[ 50%] main.mysqldump-tablespace-escape [ fail ]
Test ended at 2025-05-12 15:45:47
CURRENT_TEST: main.mysqldump-tablespace-escape
mysqltest: At line 87: Command "$MYSQL_DUMP bug37607195 --init-command="SET @@sql_mode='ANSI_QUOTES,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'" --result-file=$grep_file 2>&1" failed.
Output from before failure:
mysqldump: [ERROR] unknown variable 'init-command=SET @@sql_mode='ANSI_QUOTES,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION''.
exec of '/Users/laurynas/vilniusdb/mysql-8.0.42/_build-llvm-14-debug/runtime_output_directory//mysqldump --defaults-file=/Users/laurynas/vilniusdb/mysql-8.0.42/_build-llvm-14-debug/mysql-test/var/my.cnf --defaults-group-suffix=.1 bug37607195 --init-command="SET @@sql_mode='ANSI_QUOTES,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'" --result-file=/Users/laurynas/vilniusdb/mysql-8.0.42/_build-llvm-14-debug/mysql-test/var/tmp/bug37607195.sql 2>&1' failed, error: 1792, status: 7, errno: 22.
The result from queries just before the failure was:
"order_id" INT AUTO_INCREMENT PRIMARY KEY,
"customer_id" INT NOT NULL,
"order_date" TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
"status" ENUM('Pending', 'Completed', 'Cancelled') NOT NULL,
"total\n" DECIMAL(10, 2) NOT NULL CHECK ("total\n" >= 0),
FOREIGN KEY (customer_id) REFERENCES "custo`mers"("customer'_id") ON DELETE CASCADE,
INDEX (order_date)
);
CREATE TABLE `'order'_'items'` (
`order'_'item_id` INT AUTO_INCREMENT PRIMARY KEY,
`'order'_'id'` INT NOT NULL,
`product'_'id` INT NOT NULL,
`qua\ntity` INT NOT NULL CHECK (`qua\ntity` > 0),
`p'rice` DECIMAL(10,2) NOT NULL CHECK (`p'rice` >= 0),
FOREIGN KEY (`'order'_'id'`) REFERENCES "orders"(order_id) ON DELETE CASCADE,
FOREIGN KEY (`product'_'id`) REFERENCES "prod'ucts"("product`_`id") ON DELETE CASCADE,
UNIQUE KEY (`'order'_'id'`, `product'_'id`)
);
mysqldump: [ERROR] unknown variable 'init-command=SET @@sql_mode='ANSI_QUOTES,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION''.
exec of '/Users/laurynas/vilniusdb/mysql-8.0.42/_build-llvm-14-debug/runtime_output_directory//mysqldump --defaults-file=/Users/laurynas/vilniusdb/mysql-8.0.42/_build-llvm-14-debug/mysql-test/var/my.cnf --defaults-group-suffix=.1 bug37607195 --init-command="SET @@sql_mode='ANSI_QUOTES,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'" --result-file=/Users/laurynas/vilniusdb/mysql-8.0.42/_build-llvm-14-debug/mysql-test/var/tmp/bug37607195.sql 2>&1' failed, error: 1792, status: 7, errno: 22.
safe_process[89161]: Child process: 89162, exit: 1
How to repeat:
See above