3382 Georgi Kodinov 2011-08-18
Addendum to the fix for bug #11746029: 22615: MYSQL SERVER INCORRECTLY CATOGORIZES
THE LOST+FOUND DIRECTORY AS A DATABA
1. Made sure the system variable is null terminated when constructed from the individual options.
2. Fixed the order of the options in the --help output test file on windows.
modified:
mysql-test/r/mysqld--help-win.result
sql/sql_show.cc
3381 Vasil Dimov 2011-08-17
Blind attempt to fix BUG 12881278 - MAIN.MYISAM TEST FAILS ON LINUX
The printed text is truncated on char 63:
"MySQL thread id 1236, OS thread handle 0x7ff187b96700, query id"
still I do not understand how this truncation could have caused the
main.myisam failure but anyway - the buffer needs to be increased.
modified:
sql/sql_class.cc
=== modified file 'mysql-test/r/mysqld--help-win.result'
--- a/mysql-test/r/mysqld--help-win.result 2011-08-17 14:33:45 +0000
+++ b/mysql-test/r/mysqld--help-win.result 2011-08-18 08:14:24 +0000
@@ -192,11 +192,11 @@ The following options may be given as th
-?, --help Display this help and exit.
--ignore-builtin-innodb
Disable initialization of builtin InnoDB plugin
- --init-connect=name Command(s) that are executed for each new connection
--ignore-db-dir=name
Specifies a directory to add to the ignore list when
collecting database names from the datadir. Put a blank
argument to reset the list accumulated so far.
+ --init-connect=name Command(s) that are executed for each new connection
--init-file=name Read SQL commands from this file at startup
--init-slave=name Command(s) that are executed by a slave server each time
the SQL thread starts
=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc 2011-08-17 14:33:45 +0000
+++ b/sql/sql_show.cc 2011-08-18 08:14:24 +0000
@@ -552,7 +552,8 @@ ignore_db_dirs_process_additions()
if (len > 1)
len--;
- ptr= opt_ignore_db_dirs= (char *) my_malloc(len, MYF(0));
+ /* +1 the terminating zero */
+ ptr= opt_ignore_db_dirs= (char *) my_malloc(len + 1, MYF(0));
if (!ptr)
return true;
@@ -576,6 +577,10 @@ ignore_db_dirs_process_additions()
set_dynamic(&ignore_db_dirs_array, (uchar *) &dir, i);
}
+ /* make sure the string is terminated */
+ DBUG_ASSERT(ptr - opt_ignore_db_dirs <= (ptrdiff_t) len);
+ *ptr= 0;
+
/*
It's OK to empty the array here as the allocated elements are
referenced through the hash now.
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (Georgi.Kodinov:3381 to 3382) Bug#11746029 | Georgi Kodinov | 22 Aug |