Bug #83114 | Assertion `strlen(db_name) <= (64*3) && strlen(table_name) <= (64*3)' failed. | ||
---|---|---|---|
Submitted: | 23 Sep 2016 4:20 | Modified: | 13 Jan 2017 17:56 |
Reporter: | Roel Van de Paar | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S1 (Critical) |
Version: | 8.0-dmr | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[23 Sep 2016 4:20]
Roel Van de Paar
[23 Sep 2016 8:54]
MySQL Verification Team
Hello Roel, Thank you for the report and test case. I'm not seeing any crash with release/debug builds, anything else required to trigger this issue? Please let us know. -- release/debug rm -rf 83114 bin/mysqld --initialize-insecure --basedir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0 --datadir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0/83114 -v bin/mysqld --no-defaults --basedir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0 --datadir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0/83114 --core-file --socket=/tmp/mysql_ushastry.sock --port=3306 --log-error=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0/83114/log.err 2>&1 & mysql> DROP DATABASE test; ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist mysql> explain aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ERROR 1046 (3D000): No database selected mysql> Thanks, Umesh
[26 Sep 2016 7:08]
Roel Van de Paar
I get this; mysql> DROP DATABASE test; ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist mysql> explain aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ERROR 2013 (HY000): Lost connection to MySQL server during query [roel@localhost MS130916-mysql-8.0.0-dmr-linux-x86_64-debug]$ cat start MYEXTRA=" --no-defaults" /sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug/bin/mysqld ${MYEXTRA} --core-file --basedir=/sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug --tmpdir=/sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug/data --datadir=/sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug/data --socket=/sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug/socket.sock --port=15348 --log-error=/sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug/log/master.err 2>&1 & echo 'Server socket: /sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug/socket.sock with datadir: /sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug/data' [roel@localhost MS130916-mysql-8.0.0-dmr-linux-x86_64-debug]$ cat cl /sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug/bin/mysql -A -uroot -S/sda/MS130916-mysql-8.0.0-dmr-linux-x86_64-debug/socket.sock --force --binary-mode test
[26 Sep 2016 7:09]
Roel Van de Paar
cmake . -DWITH_ZLIB=system -DCMAKE_BUILD_TYPE=Debug -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DDEBUG_EXTNAME=OFF -DWITH_EMBEDDED_SERVER=OFF -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp -DWITH_SSL=system -DWITH_PAM=ON make -j5
[28 Sep 2016 19:11]
Erlend Dahl
Umesh: it reproduces in my sandbox on latest trunk. Not reproducible on 5.7.
[29 Sep 2016 4:29]
MySQL Verification Team
Thank you Erlend for confirming. Regards, Umesh
[29 Sep 2016 5:25]
MySQL Verification Team
couldn't repeat when i dropped the database. I had to have it created and in use! mysql> use test; Database changed mysql> explain aaaaaaaaaaaaaaa <snip!> Version: '8.0.1-dmr-debug-log' (Built on 28 August 2016) [New Thread 0x7ffff7f8d700 (LWP 24783)] mysqld: ./sql/sql_base.cc:277: size_t create_table_def_key(THD *, char *, const char *, const char *, bool): Assertion `strlen(db_name) <= (64*3) && strlen(table_name) <= (64*3)' failed.
[29 Sep 2016 5:55]
Erlend Dahl
Shane: you are right, I also had to remove 'DROP DATABASE'.
[29 Sep 2016 7:22]
Roel Van de Paar
Hmm (as a second issue) this must be something in the scripts, and there is more to this I think. I saw; mysql> DROP DATABASE test; ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist Some of the scripts do things like mkdir test etc. - there have been some changes in different versions before and perhaps again now. This needs more testing.
[30 Sep 2016 11:35]
Erlend Dahl
Roel, please file separate issues as new bugs. We already have one report in this area: Bug#83140 "use db_name" and "select schema()" work for non-existing databases
[13 Jan 2017 17:56]
Paul DuBois
Posted by developer: Noted in 8.0.1 changelog. For debug builds, EXPLAIN or DESCRIBE for a table with a database or table name longer than the maximum permitted length raised an assertion rather than displaying an appropriate error.