Bug #57739 | [ERROR] Invalid (old?) table or database name '-@' in error log for debug builds | ||
---|---|---|---|
Submitted: | 26 Oct 2010 14:50 | Modified: | 10 Jan 2011 23:07 |
Reporter: | Paul DuBois | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.5.7+ (debug builds) | OS: | Any |
Assigned to: | Vasil Dimov | CPU Architecture: | Any |
[26 Oct 2010 14:50]
Paul DuBois
[26 Oct 2010 16:11]
MySQL Verification Team
Thank you for the bug report. I couldn't repeat on Windows/Ubuntu X86_64 with current mysql-5.5 source tree. Is there specific steps to reproduce the issue?. Thanks in advance.
[26 Oct 2010 16:53]
Paul DuBois
Here what I use to configure (for cmake) VERSION=50508 PREFIX="/var/mysql/$VERSION" PORT="$VERSION" #PREFIX="/usr/local/mysql" #PORT="3306" HANDLERS=" -DWITH_ARCHIVE_STORAGE_ENGINE=ON -DWITH_BLACKHOLE_STORAGE_ENGINE=ON -DWITH_FEDERATED_STORAGE_ENGINE=ON -DWITH_INNOBASE_STORAGE_ENGINE=ON -DWITH_PARTITION_STORAGE_ENGINE=ON -DWITH_PERFSCHEMA_STORAGE_ENGINE=ON " OTHER=" -DENABLE_DEBUG_SYNC=ON -DENABLED_LOCAL_INFILE=ON -DENABLED_PROFILING=ON -DWITH_DEBUG=ON -DWITH_EMBEDDED_SERVER=ON -DWITH_EXTRA_CHARSETS=all -DWITH_READLINE=OFF -DWITH_SSL=bundled " OPTIONS=" -DCMAKE_INSTALL_PREFIX=$PREFIX -DINSTALL_SQLBENCHDIR= -DMYSQL_DATADIR=$PREFIX/data -DSYSCONFDIR=$PREFIX/etc -DMYSQL_TCP_PORT=$PORT $HANDLERS $DOCS $OTHER " cmake $OPTIONS . Elena suggested that the source of the UNIV_DEBUG message is that this macro is now enabled for debug builds. That might be. It's the less important of the two messages.
[26 Oct 2010 17:32]
Paul DuBois
If I omit -DWITH_DEBUG=ON, both messages go away.
[16 Nov 2010 11:17]
Sveta Smirnova
Thank you for the feedback. Do you start MySQL server with database created in previous version?
[16 Nov 2010 11:28]
John Embretsen
I see this "[ERROR] Invalid (old?) table or database name '-@'" as well. It happens even on clean installs/databases. One way to reproduce (unix): cd mysql-test perl mysql-test-run.pl 1st cat var/log/mysqld.1.err The UNIV_DEBUG change may be worth investigating, as this message started appearing around the same time (I think).
[16 Nov 2010 12:12]
Paul DuBois
re: "Do you start MySQL server with database created in previous version?" If you are referring to this message: 101026 9:39:01 [ERROR] Invalid (old?) table or database name '-@' There is no such database, as I indicated previously. If you're referring to something else, please clarify.
[16 Nov 2010 12:30]
MySQL Verification Team
No need for mysql-test-run etc. Build mysqld like this: ./BUILD/compile-pentium-valgrind-max-no-ndb When you start it up with clean datadir, you'll get: The "InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!" which is totally expected now. The only 'bug' might be this funny message in debug builds: "Invalid (old?) table or database name '-@'"
[16 Nov 2010 14:20]
Sveta Smirnova
Thank you for the feedback. Verified as described in John's comment.
[17 Nov 2010 18:47]
Vasil Dimov
The UNIV_DEBUG message is there to say that InnoDB is running in debug mode which is significantly slower than normal mode and should not be used in production. UNIV_DEBUG is now enabled when MySQL's WITH_DEBUG is enabled. I think someone opened a bug for the '-@' message but I cannot find it now...
[22 Nov 2010 13:02]
Vasil Dimov
Ok to commit this patch? diff --git i/include/mysql/innodb_priv.h w/include/mysql/innodb_priv.h index 993dad7..5406c29 100644 --- i/include/mysql/innodb_priv.h +++ w/include/mysql/innodb_priv.h @@ -22,7 +22,6 @@ class THD; -uint filename_to_tablename(const char *from, char *to, uint to_length); int get_quote_char_for_identifier(THD *thd, const char *name, uint length); bool schema_table_store_record(THD *thd, TABLE *table); void localtime_to_TIME(MYSQL_TIME *to, struct tm *from); diff --git i/sql/sql_table.cc w/sql/sql_table.cc index 772496a..ee5db25 100644 --- i/sql/sql_table.cc +++ w/sql/sql_table.cc @@ -371,7 +371,8 @@ uint explain_filename(THD* thd, Table name length. */ -uint filename_to_tablename(const char *from, char *to, uint to_length) +uint filename_to_tablename(const char *from, char *to, uint to_length, + bool stay_quiet) { uint errors; size_t res; @@ -391,7 +392,9 @@ uint filename_to_tablename(const char *from, char *to, uint to_length) { res= (strxnmov(to, to_length, MYSQL50_TABLE_NAME_PREFIX, from, NullS) - to); - sql_print_error("Invalid (old?) table or database name '%s'", from); + if (!stay_quiet) { + sql_print_error("Invalid (old?) table or database name '%s'", from); + } /* TODO: add a stored procedure for fix table and database names, and mention its name in error log. diff --git i/sql/sql_table.h w/sql/sql_table.h index aa5738f..93f854f 100644 --- i/sql/sql_table.h +++ w/sql/sql_table.h @@ -123,7 +123,8 @@ enum enum_explain_filename_mode #define NO_FRM_RENAME (1 << 2) #define FRM_ONLY (1 << 3) -uint filename_to_tablename(const char *from, char *to, uint to_length); +uint filename_to_tablename(const char *from, char *to, uint to_length, + bool stay_quiet = false); uint tablename_to_filename(const char *from, char *to, uint to_length); uint check_n_cut_mysql50_prefix(const char *from, char *to, uint to_length); bool check_mysql50_prefix(const char *name); diff --git i/storage/innobase/handler/ha_innodb.cc w/storage/innobase/handler/ha_innodb.cc index b0d620c..ffe331e 100644 --- i/storage/innobase/handler/ha_innodb.cc +++ w/storage/innobase/handler/ha_innodb.cc @@ -2170,7 +2170,7 @@ innobase_init( + sizeof srv_mysql50_table_name_prefix]; if ((sizeof test_tablename) - 1 != filename_to_tablename(test_filename, test_tablename, - sizeof test_tablename) + sizeof test_tablename, true) || strncmp(test_tablename, srv_mysql50_table_name_prefix, sizeof srv_mysql50_table_name_prefix)
[22 Nov 2010 13:08]
Marko Mäkelä
I believe that MySQL code (other than InnoDB code) is to be indented with spaces. I would only add the parameter to filename_to_tablename() in debug builds, in order not to unnecessarily slow down the regular builds. The register-starved x86 platform is still important.
[22 Nov 2010 15:02]
Vasil Dimov
Committed in mysql-5.5-innodb in vasil.dimov@oracle.com-20101122140851-pjjm9u0efcsj3fzf
[22 Dec 2010 21:30]
Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (version source revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (merge vers: 5.6.1) (pib:24)
[22 Dec 2010 22:35]
Paul DuBois
Bug does not appear in any released 5.6.x version. Setting report to Need Merge pending push to 5.5.x.
[8 Jan 2011 15:10]
Bugs System
Pushed into mysql-5.5 5.5.9 (revid:vasil.dimov@oracle.com-20110108150508-gpanhz48z8069qot) (version source revid:vasil.dimov@oracle.com-20110108150048-b1y9m8xe72hay0ch) (merge vers: 5.5.9) (pib:24)
[9 Jan 2011 22:38]
Roel Van de Paar
110110 9:31:23 [ERROR] Invalid (old?) table or database name '-@' mysql> select version()\G version(): 5.5.9-valgrind-max-debug (bzr pull from 5.5-security, so to be expected before merge, but just for the record)
[16 Jul 2012 13:42]
Vasil Dimov
Hi, The -@ error message was silenced in vasil.dimov@oracle.com-20101122140851-pjjm9u0efcsj3fzf and the fix is present in latest mysql-trunk so it did not get lost. mysql-trunk$ bzr revert -rtag:mysql-5.5.8 --> the fix is not there mysql-trunk$ bzr revert -rtag:mysql-5.5.9 --> the fix is there So MySQL 5.5.9 is the first official public release which got this bug fixed.