Open hkdsun opened 1 year ago
Thank you, @hkdsun!
I'm able to repeat the problem this way on my laptop:
brew install percona-server@8.0
brew services start percona-server
mysql -u root -e "create database dumptest; create table dumptest.t1 (id int); insert into dumptest.t1 values (1), (2), (3)"
/opt/homebrew/opt/percona-server/bin/mysqldump -u root dumptest > /tmp/percona-dump.sql
brew services stop percona-server
git checkout main && make build
cd examples/local && ./101_initial_cluster.sh
command mysql --no-defaults -h 127.0.0.1 -P 15306 commerce < /tmp/percona-dump.sql
With the final output being:
❯ command mysql --no-defaults -h 127.0.0.1 -P 15306 commerce < /tmp/percona-dump.sql
ERROR 1105 (HY000) at line 17: syntax error at position 178 near 'rocksdb_has_p_s_session_variables'
From the percona-server's mysqldump
source, it prints this whether the MyRocks storage engine is installed and enabled or not: https://github.com/percona/percona-server/blob/8.0/client/mysqldump.cc#L888-L913
/cc @vitessio/query-serving and @vitessio/cluster-management
Overview of the Issue
When dumping a database structure file with
mysqldump
provided by Percona Server's client and then later loading it into the database, I seem to be running into incompatible queries.There are some version-dependent MySQL comments that throw a "Query was empty" error:
Line 12 is as follows:
I ran into this when running Ruby-on-Rails schema dump operations. Specifially:
SCHEMA_FORMAT=sql rails db:schema:dump
SCHEMA_FORMAT=sql rails db:schema:load
:Reproduction Steps
percona-server-client
tarball binary and extract it:mysqldump
from the percona package:mysqldump
and not the plain/oracle package):Binary Version
Version information:
Rails 7.0.4.3:
Vitess 15.0.3:
MySQL 5.7.31:
Percona Server Client 5.7.42-46:
Operating System and Environment details
Log Fragments
No response