From 33c78e328f4d8238b7b53c246e28bb44a97ee3c0 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Wed, 12 Jan 2011 17:02:41 +0400 Subject: Bug #57321 crashes and valgrind errors from spatial types Item_func_spatial_collection::fix_length_and_dec didn't call parent's method, so the maybe_null was set to '0' after it. But in this case the result was just NULL, that caused wrong behaviour. per-file comments: mysql-test/r/gis.result Bug #57321 crashes and valgrind errors from spatial types test result updated. mysql-test/t/gis.test Bug #57321 crashes and valgrind errors from spatial types test case added. sql/item_geofunc.h Bug #57321 crashes and valgrind errors from spatial types Item_func_geometry::fix_length_and_dec() called in Item_func_spatial_collection::fix_length_and_dec(). --- mysql-test/r/gis.result | 8 ++++++++ mysql-test/t/gis.test | 10 ++++++++++ sql/item_geofunc.h | 1 + 3 files changed, 19 insertions(+) diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 3b18ee61336..f4aa361ffcf 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -1014,4 +1014,12 @@ SET @a=0x00000000030000000100000000000000000000000000144000000000000014400000000 SET @a=POLYFROMWKB(@a); SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440; SET @a=POLYFROMWKB(@a); +create table t1(a polygon NOT NULL)engine=myisam; +insert into t1 values (geomfromtext("point(0 1)")); +insert into t1 values (geomfromtext("point(1 0)")); +select * from (select polygon(t1.a) as p from t1 order by t1.a) d; +p +NULL +NULL +drop table t1; End of 5.1 tests diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index fd0a18ab4dd..97fc6f94b6a 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -744,4 +744,14 @@ SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000 SET @a=POLYFROMWKB(@a); +# +# Bug #57321 crashes and valgrind errors from spatial types +# + +create table t1(a polygon NOT NULL)engine=myisam; +insert into t1 values (geomfromtext("point(0 1)")); +insert into t1 values (geomfromtext("point(1 0)")); +select * from (select polygon(t1.a) as p from t1 order by t1.a) d; +drop table t1; + --echo End of 5.1 tests diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index b3ecbc39933..08161badfd3 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -177,6 +177,7 @@ public: String *val_str(String *); void fix_length_and_dec() { + Item_geometry_func::fix_length_and_dec(); for (unsigned int i= 0; i < arg_count; ++i) { if (args[i]->fixed && args[i]->field_type() != MYSQL_TYPE_GEOMETRY) -- cgit v1.2.1 From 5e9cb07b66cb3ac8db9daec5f55c736db2a33990 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Wed, 12 Jan 2011 19:32:45 +0000 Subject: BUG#59177: mysqlbinlog_row_big fails on Windows with out of memory The test case fails with out of memory while updating a table with several multi-megabytes sized rows. This can probably be too exhausting for PB2 env. The quick fix here is to reduce the size of the biggest row (256MB) so that it becomes a little smaller (64MB). --- mysql-test/r/mysqlbinlog_row_big.result | 8 ++++---- mysql-test/t/mysqlbinlog_row_big.test | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/mysqlbinlog_row_big.result b/mysql-test/r/mysqlbinlog_row_big.result index 46fa0dc79cd..0bdbfdcee3a 100644 --- a/mysql-test/r/mysqlbinlog_row_big.result +++ b/mysql-test/r/mysqlbinlog_row_big.result @@ -36,8 +36,8 @@ c1 LONGTEXT # # Insert some big rows. # -256MB -INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 16777216)); +64MB +INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 4194304)); affected rows: 1 32MB INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152)); @@ -53,7 +53,7 @@ affected rows: 1 # Do not display the column value itself, just its length. # SELECT LENGTH(c1) FROM t1; -LENGTH(c1) 268435456 +LENGTH(c1) 67108864 LENGTH(c1) 33554432 LENGTH(c1) 4194304 LENGTH(c1) 524288 @@ -69,7 +69,7 @@ info: Rows matched: 4 Changed: 4 Warnings: 0 # Do not display the column value itself, just its length. # SELECT LENGTH(c1) FROM t1; -LENGTH(c1) 536870912 +LENGTH(c1) 134217728 LENGTH(c1) 1048576 LENGTH(c1) 67108864 LENGTH(c1) 8388608 diff --git a/mysql-test/t/mysqlbinlog_row_big.test b/mysql-test/t/mysqlbinlog_row_big.test index 75f3b90269f..ffd1b79af34 100644 --- a/mysql-test/t/mysqlbinlog_row_big.test +++ b/mysql-test/t/mysqlbinlog_row_big.test @@ -79,8 +79,8 @@ eval CREATE TABLE t1 ( --echo # Insert some big rows. --echo # ---echo 256MB -INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 16777216)); +--echo 64MB +INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 4194304)); --echo 32MB INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152)); -- cgit v1.2.1 From 716b64cdb050ff9a22457990f336ef20a7b3663a Mon Sep 17 00:00:00 2001 From: Martin Hansson Date: Thu, 13 Jan 2011 08:57:15 +0100 Subject: Bug#58165: "my_empty_string" gets modified and causes LOAD DATA to fail and other crashes Some string manipulating SQL functions use a shared string object intended to contain an immutable empty string. This object was used by the SQL function SUBSTRING_INDEX() to return an empty string when one argument was of the wrong datatype. If the string object was then modified by the sql function INSERT(), undefined behavior ensued. Fixed by instead modifying the string object representing the function's result value whenever string manipulating SQL functions return an empty string. Relevant code has also been documented. --- mysql-test/r/func_str.result | 16 ++++++++++++++++ mysql-test/t/func_str.test | 11 +++++++++++ sql/item_strfunc.cc | 45 ++++++++++++++++++++++---------------------- sql/item_strfunc.h | 10 ++++++++++ sql/sql_string.cc | 41 ++++++++++++++++++++++++++++++++++++---- sql/sql_string.h | 10 ++++++++++ 6 files changed, 107 insertions(+), 26 deletions(-) diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 0321b2d85ad..8f4038e1239 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2612,4 +2612,20 @@ CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3)) 1 Warnings: Warning 1292 Truncated incorrect DECIMAL value: '' +# +# Bug#58165: "my_empty_string" gets modified and causes LOAD DATA to fail +# and other crashes +# +CREATE TABLE t1 ( a TEXT ); +SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE 'bug58165.txt'; +SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' ); +insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' ) +x +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'b' +LOAD DATA INFILE 'bug58165.txt' INTO TABLE t1; +SELECT * FROM t1; +a +aaaaaaaaaaaaaa +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index fdcfbcf519e..92c4bae5327 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1369,4 +1369,15 @@ DROP TABLE t1; SELECT '1' IN ('1', SUBSTRING(-9223372036854775809, 1)); SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3)); +--echo # +--echo # Bug#58165: "my_empty_string" gets modified and causes LOAD DATA to fail +--echo # and other crashes +--echo # +CREATE TABLE t1 ( a TEXT ); +SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE 'bug58165.txt'; +SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' ); +LOAD DATA INFILE 'bug58165.txt' INTO TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index fd5c47d25cb..204a2dfc663 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -39,6 +39,9 @@ C_MODE_START #include "../mysys/my_static.h" // For soundex_map C_MODE_END +/** + @todo Remove this. It is not safe to use a shared String object. + */ String my_empty_string("",default_charset_info); @@ -461,7 +464,7 @@ String *Item_func_des_encrypt::val_str(String *str) if ((null_value= args[0]->null_value)) return 0; // ENCRYPT(NULL) == NULL if ((res_length=res->length()) == 0) - return &my_empty_string; + return make_empty_result(); if (arg_count == 1) { @@ -652,7 +655,7 @@ String *Item_func_concat_ws::val_str(String *str) } if (i == arg_count) - return &my_empty_string; + return make_empty_result(); for (i++; i < arg_count ; i++) { @@ -803,7 +806,7 @@ String *Item_func_reverse::val_str(String *str) return 0; /* An empty string is a special case as the string pointer may be null */ if (!res->length()) - return &my_empty_string; + return make_empty_result(); if (tmp_value.alloced_length() < res->length() && tmp_value.realloc(res->length())) { @@ -1143,8 +1146,7 @@ String *Item_func_left::val_str(String *str) /* if "unsigned_flag" is set, we have a *huge* positive number. */ if ((length <= 0) && (!args[1]->unsigned_flag)) - return &my_empty_string; - + return make_empty_result(); if ((res->length() <= (ulonglong) length) || (res->length() <= (char_pos= res->charpos((int) length)))) return res; @@ -1187,7 +1189,7 @@ String *Item_func_right::val_str(String *str) /* if "unsigned_flag" is set, we have a *huge* positive number. */ if ((length <= 0) && (!args[1]->unsigned_flag)) - return &my_empty_string; /* purecov: inspected */ + return make_empty_result(); /* purecov: inspected */ if (res->length() <= (ulonglong) length) return res; /* purecov: inspected */ @@ -1226,7 +1228,7 @@ String *Item_func_substr::val_str(String *str) /* Negative or zero length, will return empty string. */ if ((arg_count == 3) && (length <= 0) && (length == 0 || !args[2]->unsigned_flag)) - return &my_empty_string; + return make_empty_result(); /* Assumes that the maximum length of a String is < INT_MAX32. */ /* Set here so that rest of code sees out-of-bound value as such. */ @@ -1237,12 +1239,12 @@ String *Item_func_substr::val_str(String *str) /* Assumes that the maximum length of a String is < INT_MAX32. */ if ((!args[1]->unsigned_flag && (start < INT_MIN32 || start > INT_MAX32)) || (args[1]->unsigned_flag && ((ulonglong) start > INT_MAX32))) - return &my_empty_string; + return make_empty_result(); start= ((start < 0) ? res->numchars() + start : start - 1); start= res->charpos((int) start); if ((start < 0) || ((uint) start + 1 > res->length())) - return &my_empty_string; + return make_empty_result(); length= res->charpos((int) length, (uint32) start); tmp_length= res->length() - start; @@ -1305,7 +1307,7 @@ String *Item_func_substr_index::val_str(String *str) null_value=0; uint delimiter_length= delimiter->length(); if (!res->length() || !delimiter_length || !count) - return &my_empty_string; // Wrong parameters + return make_empty_result(); // Wrong parameters res->set_charset(collation.collation); @@ -1654,7 +1656,7 @@ String *Item_func_password::val_str(String *str) if ((null_value=args[0]->null_value)) return 0; if (res->length() == 0) - return &my_empty_string; + return make_empty_result(); my_make_scrambled_password(tmp_value, res->ptr(), res->length()); str->set(tmp_value, SCRAMBLED_PASSWORD_CHAR_LENGTH, res->charset()); return str; @@ -1678,7 +1680,7 @@ String *Item_func_old_password::val_str(String *str) if ((null_value=args[0]->null_value)) return 0; if (res->length() == 0) - return &my_empty_string; + return make_empty_result(); my_make_scrambled_password_323(tmp_value, res->ptr(), res->length()); str->set(tmp_value, SCRAMBLED_PASSWORD_CHAR_LENGTH_323, res->charset()); return str; @@ -1706,8 +1708,7 @@ String *Item_func_encrypt::val_str(String *str) if ((null_value=args[0]->null_value)) return 0; if (res->length() == 0) - return &my_empty_string; - + return make_empty_result(); if (arg_count == 1) { // generate random salt time_t timestamp=current_thd->query_start(); @@ -1967,7 +1968,7 @@ String *Item_func_soundex::val_str(String *str) for ( ; ; ) /* Skip pre-space */ { if ((rc= cs->cset->mb_wc(cs, &wc, (uchar*) from, (uchar*) end)) <= 0) - return &my_empty_string; /* EOL or invalid byte sequence */ + return make_empty_result(); /* EOL or invalid byte sequence */ if (rc == 1 && cs->ctype) { @@ -1992,7 +1993,7 @@ String *Item_func_soundex::val_str(String *str) { /* Extra safety - should not really happen */ DBUG_ASSERT(false); - return &my_empty_string; + return make_empty_result(); } to+= rc; break; @@ -2289,7 +2290,7 @@ String *Item_func_make_set::val_str(String *str) else { if (tmp_str.copy(*res)) // Don't use 'str' - return &my_empty_string; + return make_empty_result(); result= &tmp_str; } } @@ -2299,11 +2300,11 @@ String *Item_func_make_set::val_str(String *str) { // Copy data to tmp_str if (tmp_str.alloc(result->length()+res->length()+1) || tmp_str.copy(*result)) - return &my_empty_string; + return make_empty_result(); result= &tmp_str; } if (tmp_str.append(STRING_WITH_LEN(","), &my_charset_bin) || tmp_str.append(*res)) - return &my_empty_string; + return make_empty_result(); } } } @@ -2442,7 +2443,7 @@ String *Item_func_repeat::val_str(String *str) null_value= 0; if (count <= 0 && (count == 0 || !args[1]->unsigned_flag)) - return &my_empty_string; + return make_empty_result(); /* Assumes that the maximum length of a String is < INT_MAX32. */ /* Bounds check on count: If this is triggered, we will error. */ @@ -2750,7 +2751,7 @@ String *Item_func_conv::val_str(String *str) ptr= longlong2str(dec, ans, to_base); if (str->copy(ans, (uint32) (ptr-ans), default_charset())) - return &my_empty_string; + return make_empty_result(); return str; } @@ -2917,7 +2918,7 @@ String *Item_func_hex::val_str(String *str) return 0; ptr= longlong2str(dec,ans,16); if (str->copy(ans,(uint32) (ptr-ans),default_charset())) - return &my_empty_string; // End of memory + return make_empty_result(); // End of memory return str; } diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index ab2bf006032..6645a4c637a 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -22,6 +22,16 @@ class Item_str_func :public Item_func { +protected: + /** + Sets the result value of the function an empty string, using the current + character set. No memory is allocated. + @retval A pointer to the str_value member. + */ + String *make_empty_result() { + str_value.set("", 0, collation.collation); + return &str_value; + } public: Item_str_func() :Item_func() { decimals=NOT_FIXED_DEC; } Item_str_func(Item *a) :Item_func(a) {decimals=NOT_FIXED_DEC; } diff --git a/sql/sql_string.cc b/sql/sql_string.cc index a41f4d52101..4f76943bde7 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -58,11 +58,33 @@ bool String::real_alloc(uint32 arg_length) } -/* -** Check that string is big enough. Set string[alloc_length] to 0 -** (for C functions) -*/ +/** + Allocates a new buffer on the heap for this String. + + - If the String's internal buffer is privately owned and heap allocated, + one of the following is performed. + + - If the requested length is greater than what fits in the buffer, a new + buffer is allocated, data moved and the old buffer freed. + + - If the requested length is less or equal to what fits in the buffer, a + null character is inserted at the appropriate position. + - If the String does not keep a private buffer on the heap, such a buffer + will be allocated and the string copied accoring to its length, as found + in String::length(). + + For C compatibility, the new string buffer is null terminated. + + @param alloc_length The requested string size in characters, excluding any + null terminator. + + @retval false Either the copy operation is complete or, if the size of the + new buffer is smaller than the currently allocated buffer (if one exists), + no allocation occured. + + @retval true An error occured when attempting to allocate memory. +*/ bool String::realloc(uint32 alloc_length) { uint32 len=ALIGN_SIZE(alloc_length+1); @@ -196,6 +218,17 @@ bool String::copy() return FALSE; } +/** + Copies the internal buffer from str. If this String has a private heap + allocated buffer where new data does not fit, a new buffer is allocated + before copying and the old buffer freed. Character set information is also + copied. + + @param str The string whose internal buffer is to be copied. + + @retval false Success. + @retval true Memory allocation failed. +*/ bool String::copy(const String &str) { if (alloc(str.str_length)) diff --git a/sql/sql_string.h b/sql/sql_string.h index b15179bcbe5..092e194646f 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -136,6 +136,16 @@ public: Alloced_length=0; str_charset=str.str_charset; } + + + /** + Points the internal buffer to the supplied one. The old buffer is freed. + @param str Pointer to the new buffer. + @param arg_length Length of the new buffer in characters, excluding any + null character. + @param cs Character set to use for interpreting string data. + @note The new buffer will not be null terminated. + */ inline void set(char *str,uint32 arg_length, CHARSET_INFO *cs) { free(); -- cgit v1.2.1 From f949ac55f73c32dbbfc90e24cdcfdec0058d6234 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 13 Jan 2011 10:57:19 +0200 Subject: bumped up the version to 5.0.93 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 21386494bda..fda56554879 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 5.0.92) +AM_INIT_AUTOMAKE(mysql, 5.0.93) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 @@ -23,7 +23,7 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 -NDB_VERSION_BUILD=92 +NDB_VERSION_BUILD=93 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? -- cgit v1.2.1 From db36f63984154a223d5eeeeb51e9a1db4c2fb937 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Thu, 13 Jan 2011 15:56:42 +0530 Subject: Bug#59109 : mysqlslap crashes on mysql_fetch_row after ignoring null from mysql_store_result. mysqlslap segfaults at a point when it tries to fetch rows from the result set. Under some circumstances, mysql_store_result can return 'NULL', even after query execution (mysql_query) succeeds, and eventually a segfault might occur if same unchecked return value is passed to mysql_fetch_row. Fixed by adding a check on mysql_store_result's return value. client/mysqlslap.c: Bug#59109 : mysqlslap crashes on mysql_fetch_row after ignoring null from mysql_store_result. Added a check on mysql_store_result's return value. A 'NULL' return value here shows an erroneous situation as mysql_field_count has already reported a non-zero value. --- client/mysqlslap.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/client/mysqlslap.c b/client/mysqlslap.c index b1eafe0082c..3b5c14dd74b 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -1519,7 +1519,12 @@ generate_primary_key_list(MYSQL *mysql, option_string *engine_stmt) exit(1); } - result= mysql_store_result(mysql); + if (!(result= mysql_store_result(mysql))) + { + fprintf(stderr, "%s: Error when storing result: %d %s\n", + my_progname, mysql_errno(mysql), mysql_error(mysql)); + exit(1); + } primary_keys_number_of= mysql_num_rows(result); /* So why check this? Blackhole :) */ @@ -1891,10 +1896,15 @@ limit_not_met: { if (mysql_field_count(mysql)) { - result= mysql_store_result(mysql); - while ((row = mysql_fetch_row(result))) - counter++; - mysql_free_result(result); + if (!(result= mysql_store_result(mysql))) + fprintf(stderr, "%s: Error when storing result: %d %s\n", + my_progname, mysql_errno(mysql), mysql_error(mysql)); + else + { + while ((row= mysql_fetch_row(result))) + counter++; + mysql_free_result(result); + } } } while(mysql_next_result(mysql) == 0); queries++; -- cgit v1.2.1 From faafae781adc87d80dc0e7c5e631996ed015f8ed Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Fri, 14 Jan 2011 11:33:12 +0100 Subject: BUG#59063: rpl_migration_crash_safe fails on Windows Backported the fix to 5.1. Problem: the auxiliary test files rpl_start_server.inc and rpl_stop_server.inc write a file that is later read by mtr. The bug was that the file was written with platform-dependent newline terminators, i.e., \r\n on windows, whereas mtr only understands \n. Fix: write the file so that it uses \n on all platforms. mysql-test/include/rpl_start_server.inc: Force test to use \n instead of platform-dependent newline terminator. mysql-test/include/rpl_stop_server.inc: Force test to use \n instead of platform-dependent newline terminator. --- mysql-test/include/rpl_start_server.inc | 10 +++++++++- mysql-test/include/rpl_stop_server.inc | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mysql-test/include/rpl_start_server.inc b/mysql-test/include/rpl_start_server.inc index c59c7759910..ac8106f141c 100644 --- a/mysql-test/include/rpl_start_server.inc +++ b/mysql-test/include/rpl_start_server.inc @@ -45,7 +45,15 @@ if ($rpl_server_parameters) --source include/rpl_connection.inc # Write file to make mysql-test-run.pl start up the server again ---exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect +--let WRITE_TO_FILE= $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect +--let WRITE_TO_VAR= $_rpl_start_server_command +perl; +my $file= $ENV{'WRITE_TO_FILE'}; +my $var= $ENV{'WRITE_TO_VAR'}; +open WRITE_FILE, ">> $file" or die "Error opening $file: $!"; +print WRITE_FILE $var, "\n" or die "Error appending to $file: $!"; +close WRITE_FILE or die "Error closing $file: $!"; +EOF --source include/rpl_reconnect.inc diff --git a/mysql-test/include/rpl_stop_server.inc b/mysql-test/include/rpl_stop_server.inc index e1f8839dd69..a90981d6de8 100644 --- a/mysql-test/include/rpl_stop_server.inc +++ b/mysql-test/include/rpl_stop_server.inc @@ -44,7 +44,9 @@ if ($rpl_debug) # Write file to make mysql-test-run.pl expect the "crash", but don't start # it until it's told to ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect +wait +EOF # Send shutdown to the connected server and give # it 10 seconds to die before zapping it -- cgit v1.2.1 From ab2d29ec6b84eb4531d2d63887ac29f7d9617e60 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Fri, 14 Jan 2011 19:50:34 +0530 Subject: Bug#13618 : mysqldump --xml omits comment on table field When mysqldump tries to dump information in xml format, the result does not contain field level comments. In order to retrieve various informations for a field/column, mysqldump currently uses 'show fields from ' statement. The attributes returned by the statement lacks the information regarding field comments. Fixed by changing the query to one that probes I_S to retrieve required field informations, including the field comment. client/mysqldump.c: Bug#13618 : mysqldump --xml omits comment on table field. Replaced the 'show fields' command by a statement that queries I_S, in order to retrieve information on all the attributes that 'show fields' returns along-with an additional column_comment information. mysql-test/r/client_xml.result: Result modifications for bug#13618. mysql-test/r/mysqldump.result: Result modifications for bug#13618. mysql-test/t/mysqldump.test: Added a testcase for bug#13618. --- client/mysqldump.c | 13 +++++++++++-- mysql-test/r/client_xml.result | 6 +++--- mysql-test/r/mysqldump.result | 37 ++++++++++++++++++++++++++----------- mysql-test/t/mysqldump.test | 9 +++++++++ 4 files changed, 49 insertions(+), 16 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index e35672c2a2c..57e3f5b0349 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -2247,6 +2247,15 @@ static uint get_table_structure(char *table, char *db, char *table_type, const char *insert_option; char name_buff[NAME_LEN+3],table_buff[NAME_LEN*2+3]; char table_buff2[NAME_LEN*2+3], query_buff[QUERY_LENGTH]; + const char *show_fields_stmt= "SELECT `COLUMN_NAME` AS `Field`, " + "`COLUMN_TYPE` AS `Type`, " + "`IS_NULLABLE` AS `Null`, " + "`COLUMN_KEY` AS `Key`, " + "`COLUMN_DEFAULT` AS `Default`, " + "`EXTRA` AS `Extra`, " + "`COLUMN_COMMENT` AS `Comment` " + "FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE " + "TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'"; FILE *sql_file= md_result_file; int len; MYSQL_RES *result; @@ -2514,8 +2523,8 @@ static uint get_table_structure(char *table, char *db, char *table_type, verbose_msg("%s: Warning: Can't set SQL_QUOTE_SHOW_CREATE option (%s)\n", my_progname, mysql_error(mysql)); - my_snprintf(query_buff, sizeof(query_buff), "show fields from %s", - result_table); + my_snprintf(query_buff, sizeof(query_buff), show_fields_stmt, db, table); + if (mysql_query_with_error_report(mysql, &result, query_buff)) DBUG_RETURN(0); diff --git a/mysql-test/r/client_xml.result b/mysql-test/r/client_xml.result index aa4bdb2bd61..7f74a092af7 100644 --- a/mysql-test/r/client_xml.result +++ b/mysql-test/r/client_xml.result @@ -21,9 +21,9 @@ insert into t1 values (1, 2, 'a&b ab'); - - - + + + diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index d26eaac7a93..289e7f66406 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -14,7 +14,7 @@ INSERT INTO t1 VALUES (1), (2); - + @@ -150,9 +150,9 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES"); - - - + + + @@ -178,7 +178,7 @@ INSERT INTO t1 VALUES ("1\""), ("\"2"); - + @@ -1612,10 +1612,10 @@ CREATE TABLE `t2` ( - + - + @@ -1623,10 +1623,10 @@ CREATE TABLE `t2` ( - + - + @@ -3644,8 +3644,8 @@ INSERT INTO t1 VALUES(1,0xff00fef0); - - + + @@ -4576,5 +4576,20 @@ LENGTH(a) 800 DROP TABLE t1, t2; # +# Bug #13618 : mysqldump --xml ommit comment on table field +# +CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT'; + + + + + + + + + + +DROP TABLE `comment_table`; +# # End of 5.1 tests # diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 9246d488dd8..fe0b05dbb42 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -2164,6 +2164,15 @@ SELECT LENGTH(a) FROM t2; DROP TABLE t1, t2; ########################################################################### + +--echo # +--echo # Bug #13618 : mysqldump --xml ommit comment on table field +--echo # + +CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT'; +--exec $MYSQL_DUMP --compact --skip-create --xml test +DROP TABLE `comment_table`; + --echo # --echo # End of 5.1 tests --echo # -- cgit v1.2.1 From 335fcd91b300f1670eb57378b5391a52be152add Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Sat, 15 Jan 2011 00:56:09 +0400 Subject: Bug#52208 gis fails on some platforms (Solaris, HP-UX, Linux) IA64 and some other arcitectures use different float rounding mode and i find no decent way to make it consistent. So the test changed to be insensitive to this. per-file messages: mysql-test/t/gis.test Bug#52208 gis fails on some platforms (Solaris, HP-UX, Linux) --replace_result added --- mysql-test/t/gis.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 97fc6f94b6a..bdbbfc7c064 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -358,7 +358,7 @@ t1 where object_id=85998; # Expected result is 36.3310176346905, but IA64 returns 36.3310176346904 # due to fused multiply-add instructions. ---replace_result 36.3310176346904 36.3310176346905 +--replace_result 36.3310176346904 36.3310176346905 -114.87787186923326 -114.87787186923313 36.33101763469053 36.33101763469059 36.33101763469043 36.33101763469059 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85984; -- cgit v1.2.1 From 12c6d1f355c45d00421862837a1810a5d0b28049 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 15 Jan 2011 13:48:16 +0800 Subject: BUG#49124 Security issue with /*!-versioned */ SQL statements on Slave Backport to 5.0. /*![:version:] Query Code */, where [:version:] is a sequence of 5 digits representing the mysql server version(e.g /*!50200 ... */), is a special comment that the query in it can be executed on those servers whose versions are larger than the version appearing in the comment. It leads to a security issue when slave's version is larger than master's. A malicious user can improve his privileges on slaves. Because slave SQL thread is running with SUPER privileges, so it can execute queries that he/she does not have privileges on master. This bug is fixed with the logic below: - To replace '!' with ' ' in the magic comments which are not applied on master. So they become common comments and will not be applied on slave. - Example: 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /*!99999 ,(3)*/ will be binlogged as 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/ --- mysql-test/r/rpl_conditional_comments.result | 57 ++++++++++++++++++++++ mysql-test/t/rpl_conditional_comments.test | 73 ++++++++++++++++++++++++++++ sql/mysql_priv.h | 2 +- sql/sql_lex.cc | 25 ++++++++-- sql/sql_lex.h | 8 +-- sql/sql_parse.cc | 12 ++--- 6 files changed, 163 insertions(+), 14 deletions(-) create mode 100644 mysql-test/r/rpl_conditional_comments.result create mode 100644 mysql-test/t/rpl_conditional_comments.test diff --git a/mysql-test/r/rpl_conditional_comments.result b/mysql-test/r/rpl_conditional_comments.result new file mode 100644 index 00000000000..105d3bc59f3 --- /dev/null +++ b/mysql-test/r/rpl_conditional_comments.result @@ -0,0 +1,57 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1(c1 INT); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) + +# Case 1: +# ------------------------------------------------------------------ +# In a statement, some CCs are applied while others are not. The CCs +# which are not applied on master will be binlogged as common comments. +/*!99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /*!99999 ,(11)*/; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; /* 99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 99999 ,(11)*/ +Comparing tables master:test.t1 and slave:test.t1 + +# Case 2: +# ----------------------------------------------------------------- +# Verify whether it can be binlogged correctly when executing prepared +# statement. +PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/'; +EXECUTE stmt; +DROP TABLE t1; +CREATE TABLE t1(c1 INT); +EXECUTE stmt; +Comparing tables master:test.t1 and slave:test.t1 + +SET @value=62; +PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; +EXECUTE stmt USING @value; +DROP TABLE t1; +CREATE TABLE t1(c1 INT); +EXECUTE stmt USING @value; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla*/ t1 VALUES(60) /* 99999 ,(61)*/ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) +master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla*/ t1 VALUES(60) /* 99999 ,(61)*/ +master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) +master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/ +Comparing tables master:test.t1 and slave:test.t1 + +# Case 3: +# ----------------------------------------------------------------- +# Verify it can restore the '!', if the it is an uncomplete conditional +# comments +SELECT c1 FROM /*!99999 t1 WHEREN; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*!99999 t1 WHEREN' at line 1 +DROP TABLE t1; diff --git a/mysql-test/t/rpl_conditional_comments.test b/mysql-test/t/rpl_conditional_comments.test new file mode 100644 index 00000000000..f1f46b8fc41 --- /dev/null +++ b/mysql-test/t/rpl_conditional_comments.test @@ -0,0 +1,73 @@ +############################################################################### +# After the patch for BUG#49124: +# - Use ' ' instead of '!' in the conditional comments which are not applied on +# master. So they become common comments and will not be applied on slave. +# +# - Example: +# 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /*!99999 ,(3)*/ +# will be binlogged as +# 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/'. +############################################################################### +source include/master-slave.inc; + +CREATE TABLE t1(c1 INT); +source include/show_binlog_events.inc; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); + +--echo +--echo # Case 1: +--echo # ------------------------------------------------------------------ +--echo # In a statement, some CCs are applied while others are not. The CCs +--echo # which are not applied on master will be binlogged as common comments. + +/*!99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /*!99999 ,(11)*/; + +source include/show_binlog_events.inc; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +sync_slave_with_master; +let $diff_table_1=master:test.t1; +let $diff_table_2=slave:test.t1; +source include/diff_tables.inc; + +--echo +--echo # Case 2: +--echo # ----------------------------------------------------------------- +--echo # Verify whether it can be binlogged correctly when executing prepared +--echo # statement. +PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/'; +EXECUTE stmt; +DROP TABLE t1; +CREATE TABLE t1(c1 INT); +EXECUTE stmt; + +sync_slave_with_master; +let $diff_table_1=master:test.t1; +let $diff_table_2=slave:test.t1; +source include/diff_tables.inc; + +--echo +SET @value=62; +PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; +EXECUTE stmt USING @value; +DROP TABLE t1; +CREATE TABLE t1(c1 INT); +EXECUTE stmt USING @value; + +source include/show_binlog_events.inc; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); + +sync_slave_with_master; +let $diff_table_1=master:test.t1; +let $diff_table_2=slave:test.t1; +source include/diff_tables.inc; + +--echo +--echo # Case 3: +--echo # ----------------------------------------------------------------- +--echo # Verify it can restore the '!', if the it is an uncomplete conditional +--echo # comments +--error 1064 +SELECT c1 FROM /*!99999 t1 WHEREN; + +DROP TABLE t1; +source include/master-slave-end.inc; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 55bcd30999d..5f8458f4f1e 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -751,7 +751,7 @@ bool do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch); -void mysql_parse(THD *thd, const char *inBuf, uint length, +void mysql_parse(THD *thd, char *rawbuf, uint length, const char ** semicolon); bool mysql_test_parse_for_slave(THD *thd,char *inBuf,uint length); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 17ee53d446b..a013d5466c1 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -109,7 +109,7 @@ st_parsing_options::reset() } Lex_input_stream::Lex_input_stream(THD *thd, - const char* buffer, + char* buffer, unsigned int length) : m_thd(thd), yylineno(1), @@ -580,7 +580,7 @@ int MYSQLlex(void *arg, void *yythd) state=MY_LEX_COMMENT; break; } - yylval->lex_str.str=(char*) (lip->ptr=lip->tok_start);// Set to first chr + yylval->lex_str.str=lip->ptr=(char*)lip->tok_start;// Set to first chr yylval->lex_str.length=1; c=yyGet(); if (c != ')') @@ -946,6 +946,9 @@ int MYSQLlex(void *arg, void *yythd) state = MY_LEX_START; // Try again break; case MY_LEX_LONG_COMMENT: /* Long C comment? */ + { + char *version_mark= NULL; + if (yyPeek() != '*') { state=MY_LEX_CHAR; // Probable division @@ -956,6 +959,8 @@ int MYSQLlex(void *arg, void *yythd) if (yyPeek() == '!') // MySQL command in comment { ulong version=MYSQL_VERSION_ID; + version_mark= lip->ptr; + yySkip(); state=MY_LEX_START; if (my_isdigit(cs,yyPeek())) @@ -964,9 +969,18 @@ int MYSQLlex(void *arg, void *yythd) } if (version <= MYSQL_VERSION_ID) { - lex->in_comment=1; + lex->in_comment=1; + version_mark= NULL; break; } + else + { + /* + Patch and skip the conditional comment to avoid it + being propagated infinitely (eg. to a slave). + */ + *version_mark= ' '; + } } /* Discard: @@ -995,8 +1009,13 @@ int MYSQLlex(void *arg, void *yythd) } /* Unbalanced comments with a missing '*' '/' are a syntax error */ if (! comment_closed) + { + if (version_mark != NULL) + *version_mark= '!'; return (ABORT_SYM); + } break; + } case MY_LEX_END_LONG_COMMENT: if (lex->in_comment && yyPeek() == '/') { diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 5c0367632e1..7a315d81aa5 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -935,7 +935,7 @@ struct st_parsing_options class Lex_input_stream { public: - Lex_input_stream(THD *thd, const char* buff, unsigned int length); + Lex_input_stream(THD *thd, char* buff, unsigned int length); ~Lex_input_stream(); /** Current thread. */ @@ -951,7 +951,7 @@ public: LEX_YYSTYPE yylval; /** Pointer to the current position in the input stream. */ - const char* ptr; + char* ptr; /** Starting position of the last token parsed. */ const char* tok_start; @@ -966,7 +966,7 @@ public: const char* tok_start_prev; /** Begining of the query text in the input stream. */ - const char* buf; + char* buf; /** Current state of the lexical analyser. */ enum my_lex_states next_state; @@ -1355,7 +1355,7 @@ public: class Parser_state { public: - Parser_state(THD *thd, const char* buff, unsigned int length) + Parser_state(THD *thd, char* buff, unsigned int length) : m_lip(thd, buff, length), m_yacc() {} diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 1bd68e5424f..0f75b835315 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6414,13 +6414,13 @@ void mysql_init_multi_delete(LEX *lex) /** Parse a query. @param thd Current thread - @param inBuf Begining of the query text + @param rawbuf Begining of the query text @param length Length of the query text @param [out] semicolon For multi queries, position of the character of the next query in the query text. */ -void mysql_parse(THD *thd, const char *inBuf, uint length, +void mysql_parse(THD *thd, char *rawbuf, uint length, const char ** found_semicolon) { DBUG_ENTER("mysql_parse"); @@ -6446,14 +6446,14 @@ void mysql_parse(THD *thd, const char *inBuf, uint length, lex_start(thd); mysql_reset_thd_for_next_command(thd); - if (query_cache_send_result_to_client(thd, (char*) inBuf, length) <= 0) + if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0) { LEX *lex= thd->lex; sp_cache_flush_obsolete(&thd->sp_proc_cache); sp_cache_flush_obsolete(&thd->sp_func_cache); - Parser_state parser_state(thd, inBuf, length); + Parser_state parser_state(thd, rawbuf, length); thd->m_parser_state= &parser_state; int err= MYSQLparse(thd); @@ -6538,13 +6538,13 @@ void mysql_parse(THD *thd, const char *inBuf, uint length, 1 can be ignored */ -bool mysql_test_parse_for_slave(THD *thd, char *inBuf, uint length) +bool mysql_test_parse_for_slave(THD *thd, char *rawbuf, uint length) { LEX *lex= thd->lex; bool error= 0; DBUG_ENTER("mysql_test_parse_for_slave"); - Parser_state parser_state(thd, inBuf, length); + Parser_state parser_state(thd, rawbuf, length); thd->m_parser_state= &parser_state; lex_start(thd); -- cgit v1.2.1 From 208b677637ef9d140c1629a0de4d4963c02ea533 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Sun, 16 Jan 2011 02:04:08 +0530 Subject: Bug#58221 : mysqladmin --sleep=x --count=x keeps looping When mysqldadmin is run with sleep and count options, it goes into an infinite loop and keeps executing the specified command. This happened because the statement, responsible for decrementing the count value, was missing. Fixed by adding a statement which will decrement the count value for each iteration. client/mysqladmin.cc: Bug#58221 : mysqladmin --sleep=x --count=x keeps looping Added a condition to check and decrement the count value stored in nr_iterations per iteration. mysql-test/r/mysqladmin.result: Added a testcase for Bug#58221. mysql-test/t/mysqladmin.test: Added a testcase for Bug#58221. --- client/mysqladmin.cc | 3 +++ mysql-test/r/mysqladmin.result | 8 ++++++++ mysql-test/t/mysqladmin.test | 12 ++++++++++++ 3 files changed, 23 insertions(+) diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index fe3e51a4d61..18ee8fae400 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -416,6 +416,9 @@ int main(int argc,char *argv[]) if (interval) /* --sleep=interval given */ { + if (opt_count_iterations && --nr_iterations == 0) + break; + /* If connection was dropped (unintentionally, or due to SHUTDOWN), re-establish it if --wait ("retry-connect") was given and user diff --git a/mysql-test/r/mysqladmin.result b/mysql-test/r/mysqladmin.result index 57927f8aa67..748152bffcc 100644 --- a/mysql-test/r/mysqladmin.result +++ b/mysql-test/r/mysqladmin.result @@ -2,3 +2,11 @@ mysqld is alive mysqladmin: unknown variable 'database=db1' Warning: mysqladmin: unknown variable 'loose-database=db2' mysqld is alive +# +# Bug#58221 : mysqladmin --sleep=x --count=x keeps looping +# +# Executing mysqladmin with --sleep=1 and --count=2. +# Done. +# Displaying the output : +mysqld is alive +mysqld is alive diff --git a/mysql-test/t/mysqladmin.test b/mysql-test/t/mysqladmin.test index 839ecf00b60..a2b12dbc9b6 100644 --- a/mysql-test/t/mysqladmin.test +++ b/mysql-test/t/mysqladmin.test @@ -33,3 +33,15 @@ EOF --exec $MYSQLADMIN --defaults-file=$MYSQLTEST_VARDIR/tmp/bug10608.cnf -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping 2>&1 remove_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf; + +--echo # +--echo # Bug#58221 : mysqladmin --sleep=x --count=x keeps looping +--echo # + +--echo # Executing mysqladmin with --sleep=1 and --count=2. +--exec $MYSQLADMIN -u root -S $MASTER_MYSOCK -P $MASTER_MYPORT --sleep=1 --count=2 ping > $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp +--echo # Done. +--echo # Displaying the output : +--cat_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp + +--remove_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp -- cgit v1.2.1