diff options
26 files changed, 164 insertions, 109 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index 1bbc47341c9..37dcd1fe836 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -39,7 +39,7 @@ if [ -z "$just_configure" -a -z "$just_clean" ] then commands="$commands -$make $AM_MAKEFLAGS" +$make $AM_MAKEFLAGS $AM_EXTRA_MAKEFLAGS $EXTRA_MAKEFLAGS" if [ "x$strip" = "xyes" ] then diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 9f552f1ca5e..de3cb4890a9 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -58,6 +58,8 @@ parse_options() EXTRA_CXXFLAGS=`get_key_value "$1"`;; --extra-configs=*) EXTRA_CONFIGS=`get_key_value "$1"`;; + --extra-makeflags=*) + EXTRA_MAKEFLAGS=`get_key_value "$1"`;; -c | --just-configure) just_configure=1;; -n | --just-print | --print) diff --git a/client/mysqldump.c b/client/mysqldump.c index 6834d16bde7..d248e8cc811 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1905,7 +1905,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name, const char *str_create) { uint i; - my_bool body_found= 0; + my_bool __attribute__((unused)) body_found= 0; char *create_stmt_ptr= NULL; ulong create_stmt_len= 0; MYSQL_FIELD *field; diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index d2e9f918d08..3fb190bf963 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -170,14 +170,14 @@ ERROR 1049 (42000) at line 1: Unknown database 'invalid' ERROR 1049 (42000) at line 1: Unknown database 'invalid' Test connect with dbname + hostname Test connect with dbname + _invalid_ hostname -ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (-2) -ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (-2) +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) The commands reported in the bug report -ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (-2) +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) Too long dbname ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' Too long hostname -ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (-2) +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) 1 1 ERROR at line 1: DELIMITER cannot contain a backslash character @@ -206,7 +206,7 @@ COUNT (*) 1 COUNT (*) 1 -ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (-2) +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) End of 5.0 tests WARNING: --server-arg option not supported in this configuration. *************************** 1. row *************************** diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index f86541e6246..247c2b80d62 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -110,7 +110,7 @@ OK DROP USER mysqltest1@'%'; Run mysql_upgrade with a non existing server socket Phase 1/3: Fixing table and database names -mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (-2) when trying to connect +mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect FATAL ERROR: Upgrade failed set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE'; Phase 1/3: Fixing table and database names diff --git a/mysql-test/r/partition_innodb_plugin.result b/mysql-test/r/partition_innodb_plugin.result index a24e7c9a6fa..28edd2a6118 100644 --- a/mysql-test/r/partition_innodb_plugin.result +++ b/mysql-test/r/partition_innodb_plugin.result @@ -67,7 +67,7 @@ LOCK TABLE t1 WRITE; # ALTER fails because COMPRESSED/KEY_BLOCK_SIZE # are incompatible with innodb_file_per_table = OFF; ALTER TABLE t1 ADD PARTITION PARTITIONS 1; -ERROR HY000: Got error 1478 - Unknown error 1478 from storage engine +ERROR HY000: Got error 1478 t1#P#p0.ibd t1.frm t1.par diff --git a/mysql-test/r/partition_open_files_limit.result b/mysql-test/r/partition_open_files_limit.result index 1441ba4e78e..90f61e3bcc2 100644 --- a/mysql-test/r/partition_open_files_limit.result +++ b/mysql-test/r/partition_open_files_limit.result @@ -5,7 +5,7 @@ ENGINE=MyISAM PARTITION BY KEY () PARTITIONS 1; INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11); # if the bug exists, then crash will happen here ALTER TABLE t1 ADD PARTITION PARTITIONS 511; -ERROR HY000: Out of resources when opening file '<partition file>' (Errcode: 24) +ERROR HY000: Out of resources when opening file '<partition file>' (Errcode: 24 - Too many open files) SELECT * FROM t1; a 1 diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 20736aec47f..0318299dd27 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -120,7 +120,7 @@ CREATE TABLE t2(a INT) DATA DIRECTORY='TEST_DIR/tmp' INDEX DIRECTORY='TEST_DIR/tmp'; RENAME TABLE t2 TO t1; -ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) +ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17 - File exists) DROP TABLE t2; create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 9 a; show create table t1; @@ -167,7 +167,7 @@ INDEX DIRECTORY='MYSQLD_DATADIR'; DROP TABLE IF EXISTS t1; CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/master-data_var'; -ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2) +ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2 - No such file or directory) SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE'; CREATE TABLE t1(a INT) DATA DIRECTORY='MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp'; Warnings: diff --git a/mysql-test/suite/innodb/r/innodb-create-options.result b/mysql-test/suite/innodb/r/innodb-create-options.result index 7417bb2478b..94c84fcf60f 100644 --- a/mysql-test/suite/innodb/r/innodb-create-options.result +++ b/mysql-test/suite/innodb/r/innodb-create-options.result @@ -46,11 +46,11 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME ROW_FORMAT CREATE_OPTIONS t1 Compact ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: invalid ROW_FORMAT specifier. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS t1 Compact @@ -104,29 +104,29 @@ t1 Compressed key_block_size=16 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ); ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: invalid ROW_FORMAT specifier. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; SHOW WARNINGS; Level Code Message @@ -146,11 +146,11 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME ROW_FORMAT CREATE_OPTIONS t1 Compact row_format=COMPACT ALTER TABLE t1 KEY_BLOCK_SIZE=2; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=REDUNDANT; SHOW WARNINGS; Level Code Message @@ -158,11 +158,11 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME ROW_FORMAT CREATE_OPTIONS t1 Redundant row_format=REDUNDANT ALTER TABLE t1 KEY_BLOCK_SIZE=4; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=DYNAMIC; SHOW WARNINGS; Level Code Message @@ -170,11 +170,11 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME ROW_FORMAT CREATE_OPTIONS t1 Dynamic row_format=DYNAMIC ALTER TABLE t1 KEY_BLOCK_SIZE=8; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=COMPRESSED; SHOW WARNINGS; Level Code Message @@ -212,23 +212,23 @@ t1 CREATE TABLE `t1` ( `f1` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 ALTER TABLE t1 ROW_FORMAT=COMPACT; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=COMPRESSED; SHOW WARNINGS; Level Code Message @@ -298,34 +298,34 @@ CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; SHOW WARNINGS; Level Code Message ALTER TABLE t1 KEY_BLOCK_SIZE=8; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) SET GLOBAL innodb_file_format=Barracuda; DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; SET GLOBAL innodb_file_format=Antelope; ALTER TABLE t1 ADD COLUMN f1 INT; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; SHOW WARNINGS; Level Code Message @@ -352,11 +352,11 @@ Level Code Message Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. Error 1005 Can't create table 'test.t1' (errno: 1478) CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table 'test.t1' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table 'test.t1' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Error 1005 Can't create table 'test.t1' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table 'test.t1' (errno: 1478) CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; SHOW WARNINGS; Level Code Message @@ -375,23 +375,23 @@ CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; SHOW WARNINGS; Level Code Message ALTER TABLE t1 KEY_BLOCK_SIZE=1; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=COMPACT; SHOW WARNINGS; Level Code Message @@ -415,12 +415,12 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; SET GLOBAL innodb_file_per_table=OFF; ALTER TABLE t1 ADD COLUMN f1 INT; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478 - Unknown error 1478) +Error 1005 Can't create table '#sql-temporary' (errno: 1478) ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; SHOW WARNINGS; Level Code Message diff --git a/mysql-test/suite/innodb/t/innodb-create-options.test b/mysql-test/suite/innodb/t/innodb-create-options.test index bbf8ab23b03..12c24820031 100644 --- a/mysql-test/suite/innodb/t/innodb-create-options.test +++ b/mysql-test/suite/innodb/t/innodb-create-options.test @@ -96,10 +96,10 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; SHOW WARNINGS; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; @@ -141,25 +141,25 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE --echo # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ); ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; SHOW WARNINGS; @@ -173,26 +173,26 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 KEY_BLOCK_SIZE=2; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ALTER TABLE t1 ROW_FORMAT=REDUNDANT; SHOW WARNINGS; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 KEY_BLOCK_SIZE=4; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ALTER TABLE t1 ROW_FORMAT=DYNAMIC; SHOW WARNINGS; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 KEY_BLOCK_SIZE=8; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ALTER TABLE t1 ROW_FORMAT=COMPRESSED; SHOW WARNINGS; @@ -213,20 +213,20 @@ CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2; SHOW CREATE TABLE t1; ALTER TABLE t1 ADD COLUMN f1 INT; SHOW CREATE TABLE t1; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=COMPACT; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=REDUNDANT; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ALTER TABLE t1 ROW_FORMAT=COMPRESSED; SHOW WARNINGS; @@ -276,29 +276,29 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 KEY_BLOCK_SIZE=8; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=COMPRESSED; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; SET GLOBAL innodb_file_format=Barracuda; DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; SET GLOBAL innodb_file_format=Antelope; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ADD COLUMN f1 INT; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; SHOW WARNINGS; @@ -322,8 +322,10 @@ SHOW WARNINGS; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; --replace_regex / - .*[0-9]*)/)/ SHOW WARNINGS; +--replace_regex / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +--replace_regex / - .*[0-9]*)/)/ SHOW WARNINGS; CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; SHOW WARNINGS; @@ -335,20 +337,20 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 KEY_BLOCK_SIZE=1; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=COMPRESSED; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ALTER TABLE t1 ROW_FORMAT=COMPACT; SHOW WARNINGS; @@ -363,10 +365,10 @@ SET GLOBAL innodb_file_per_table=ON; DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; SET GLOBAL innodb_file_per_table=OFF; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ --error ER_CANT_CREATE_TABLE ALTER TABLE t1 ADD COLUMN f1 INT; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ / - .*[0-9]*)/)/ SHOW WARNINGS; ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; SHOW WARNINGS; diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 069cf37c3e6..3269b88ca04 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -223,19 +223,19 @@ drop table t17583; --echo Test connect with dbname + _invalid_ hostname # Mask the errno of the error message ---replace_regex /\([0-9]*\)/(errno)/ +--replace_regex /\([0-9|-]*\)/(errno)/ --error 1 --exec $MYSQL test -e "\r test invalid_hostname" 2>&1 ---replace_regex /\([0-9]*\)/(errno)/ +--replace_regex /\([0-9|-]*\)/(errno)/ --error 1 --exec $MYSQL test -e "connect test invalid_hostname" 2>&1 --echo The commands reported in the bug report ---replace_regex /\([0-9]*\)/(errno)/ +--replace_regex /\([0-9|-]*\)/(errno)/ --error 1 --exec $MYSQL test -e "\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1 -#--replace_regex /\([0-9]*\)/(errno)/ +#--replace_regex /\([0-9|-]*\)/(errno)/ #--error 1 #--exec echo '\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | $MYSQL 2>&1 @@ -244,7 +244,7 @@ drop table t17583; --exec $MYSQL test -e "\r test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx localhost" 2>&1 --echo Too long hostname ---replace_regex /\([0-9]*\)/(errno)/ +--replace_regex /\([0-9|-]*\)/(errno)/ --error 1 --exec $MYSQL test -e "\r test cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1 @@ -360,7 +360,7 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql; # # Bug#37268 'binary' character set makes CLI-internal commands case sensitive # ---replace_regex /\([0-9]*\)/(errno)/ +--replace_regex /\([0-9|-]*\)/(errno)/ --error 1 --exec $MYSQL --default-character-set=binary test -e "CONNECT test invalid_hostname" 2>&1 --exec $MYSQL --default-character-set=binary test -e "DELIMITER //" 2>&1 diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test index f200bce551f..78d439d5d52 100644 --- a/mysql-test/t/mysql_upgrade.test +++ b/mysql-test/t/mysql_upgrade.test @@ -47,7 +47,7 @@ DROP USER mysqltest1@'%'; --echo Run mysql_upgrade with a non existing server socket --replace_result $MYSQLTEST_VARDIR var ---replace_regex /.*mysqlcheck.*: Got/mysqlcheck: Got/ /\([0-9]*\)/(errno)/ +--replace_regex /.*mysqlcheck.*: Got/mysqlcheck: Got/ /\([0-9|-]*\)/(errno)/ --error 1 --exec $MYSQL_UPGRADE --force --host=not_existing_host 2>&1 diff --git a/mysql-test/t/partition_innodb_plugin.test b/mysql-test/t/partition_innodb_plugin.test index 4693288a4dd..2eb9a2fa2a0 100644 --- a/mysql-test/t/partition_innodb_plugin.test +++ b/mysql-test/t/partition_innodb_plugin.test @@ -66,6 +66,7 @@ LOCK TABLE t1 WRITE; --echo # ALTER fails because COMPRESSED/KEY_BLOCK_SIZE --echo # are incompatible with innodb_file_per_table = OFF; +--replace_regex / - .*// --error ER_GET_ERRNO ALTER TABLE t1 ADD PARTITION PARTITIONS 1; diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc index 9e857f83d39..36d1bf70a89 100644 --- a/plugin/semisync/semisync_master.cc +++ b/plugin/semisync/semisync_master.cc @@ -1050,6 +1050,7 @@ int ReplSemiSyncMaster::readSlaveReply(NET *net, uint32 server_id, struct timespec start_ts; ulong trc_level = trace_level_; + LINT_INIT_STRUCT(start_ts); function_enter(kWho); diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index b4181fc6d7f..5118818fa54 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3710,7 +3710,7 @@ int ha_partition::truncate_partition(Alter_info *alter_info, bool *binlog_stmt) { List_iterator<partition_element> subpart_it(part_elem->subpartitions); - partition_element *sub_elem; + partition_element __attribute__((unused)) *sub_elem; uint j= 0, part; do { diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index d7687c70134..49586ecc2b0 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -5071,7 +5071,8 @@ int Ordered_key::cmp_keys_by_row_data(ha_rows a, ha_rows b) { uchar *rowid_a, *rowid_b; - int error, cmp_res; + int __attribute__((unused)) error; + int cmp_res; /* The length in bytes of the rowids (positions) of tmp_table. */ uint rowid_length= tbl->file->ref_length; @@ -5157,7 +5158,8 @@ int Ordered_key::cmp_key_with_search_key(rownum_t row_num) /* The length in bytes of the rowids (positions) of tmp_table. */ uint rowid_length= tbl->file->ref_length; uchar *cur_rowid= row_num_to_rowid + row_num * rowid_length; - int error, cmp_res; + int __attribute__((unused)) error; + int cmp_res; error= tbl->file->ha_rnd_pos(tbl->record[0], cur_rowid); DBUG_ASSERT(!error); diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc index 7268491c0f4..5b040c1fce3 100644 --- a/sql/multi_range_read.cc +++ b/sql/multi_range_read.cc @@ -1404,7 +1404,7 @@ ha_rows DsMrr_impl::dsmrr_info(uint keyno, uint n_ranges, uint rows, uint key_parts, uint *bufsz, uint *flags, COST_VECT *cost) { - ha_rows res; + ha_rows __attribute__((unused)) res; uint def_flags= *flags; uint def_bufsz= *bufsz; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 70258629197..122d9289d36 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1325,7 +1325,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, { STATUS_VAR *current_global_status_var; // Big; Don't allocate on stack ulong uptime; - uint length; + uint __attribute__((unused)) length; ulonglong queries_per_second1000; char buff[250]; uint buff_len= sizeof(buff); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index f88a14c3312..2bdf897a85f 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6372,7 +6372,8 @@ greedy_search(JOIN *join, uint size_remain; // cardinality of remaining_tables POSITION best_pos; JOIN_TAB *best_table; // the next plan node to be added to the curr QEP - uint n_tables; // ==join->tables or # tables in the sj-mat nest we're optimizing + // ==join->tables or # tables in the sj-mat nest we're optimizing + uint __attribute__((unused)) n_tables; DBUG_ENTER("greedy_search"); diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 164406d1adc..df3ceaf2909 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -11678,7 +11678,7 @@ static MYSQL_SYSVAR_ULONG(read_ahead_threshold, srv_read_ahead_threshold, "trigger a readahead.", NULL, NULL, 56, 0, 64, 0); -#ifdef UNIV_DEBUG +#ifdef UNIV_DEBUG_never static MYSQL_SYSVAR_UINT(trx_rseg_n_slots_debug, trx_rseg_n_slots_debug, PLUGIN_VAR_RQCMDARG, "Debug flags for InnoDB to limit TRX_RSEG_N_SLOTS for trx_rsegf_undo_find_free()", diff --git a/storage/maria/ma_delete.c b/storage/maria/ma_delete.c index 069d73b553c..5b8d0e01677 100644 --- a/storage/maria/ma_delete.c +++ b/storage/maria/ma_delete.c @@ -163,6 +163,8 @@ my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key) MARIA_KEY org_key; DBUG_ENTER("_ma_ck_delete"); + LINT_INIT_STRUCT(org_key); + save_key_data= key->data; if (share->now_transactional) { diff --git a/storage/maria/ma_key_recover.c b/storage/maria/ma_key_recover.c index 9ff2d954a60..8b2dc4a1e07 100644 --- a/storage/maria/ma_key_recover.c +++ b/storage/maria/ma_key_recover.c @@ -945,7 +945,8 @@ uint _ma_apply_redo_index(MARIA_HA *info, const uchar *header_end= header + head_length; uint page_offset= 0, org_page_length; uint page_length, keypage_header, keynr; - uint max_page_size= share->max_index_block_size, new_page_length= 0; + uint max_page_size= share->max_index_block_size; + uint __attribute__((unused)) new_page_length= 0; int result; MARIA_PAGE page; DBUG_ENTER("_ma_apply_redo_index"); diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c index 74c1a106df2..f1649083105 100644 --- a/storage/maria/ma_write.c +++ b/storage/maria/ma_write.c @@ -478,6 +478,8 @@ static my_bool _ma_ck_write_btree_with_log(MARIA_HA *info, MARIA_KEY *key, my_bool transactional= share->now_transactional; DBUG_ENTER("_ma_ck_write_btree_with_log"); + LINT_INIT_STRUCT(org_key); + if (transactional) { /* Save original value as the key may change */ diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index 83ea3739f4c..f4ae1306c2e 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -2317,7 +2317,7 @@ void my_fill_utf32(CHARSET_INFO *cs, char *s, size_t slen, int fill) { char buf[10]; - uint buflen; + uint __attribute__((unused)) buflen; char *e= s + slen; DBUG_ASSERT((slen % 4) == 0); diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp index 1168770d624..46384fbe48d 100644 --- a/support-files/compiler_warnings.supp +++ b/support-files/compiler_warnings.supp @@ -28,7 +28,6 @@ pars0grm.c: 'yyerrorlab' : unreferenced label _flex_tmp.c: .*not enough actual parameters for macro 'yywrap'.* lexyy.c : not enough actual parameters for macro 'yywrap' pars0lex.l: .*conversion from 'ulint' to 'int', possible loss of data.* -btr/btr0cur\.c: .*value computed is not used.*: 3175-3375 include/buf0buf\.ic: unused parameter .*mtr.* fil/fil0fil\.c: pointer targets in passing argument.*differ in signedness fil/fil0fil\.c: comparison between signed and unsigned : 3100-3199 @@ -45,6 +44,8 @@ srv/srv0srv\.c: value computed is not used buf/buf0buf\.c: .*block_mutex.* might be used uninitialized btr/btr0cur\.c: null argument where non-null required: 1800-3000 btr/btr0btr\.c: null argument where non-null required: 2500-3000 +btr/btr0cur\.c: .*value computed is not used.*: 3175-3375 +btr/btr0sea\.c: passing argument 2 .* discards qualifiers from pointer target type ibuf/ibuf0ibuf.c: null argument where non-null required: 700-1000 fsp0fsp\.c: result of 32-bit shift implicitly converted to 64 bits @@ -128,6 +129,10 @@ signal\.c : .*unused parameter.* # Aria warning that is ok in debug builds # storage/maria/ma_pagecache.c: .*'info_check_pin' defined but not used +# +# This warning is strange; We should not get it with -DFORCE_INIT_OF_VARS +# I added the suprression as I was not able to remove this warning :( +storage/maria/ma_check.c: may be used uninitialized in this function : 1300-1500 # # Pbxt @@ -154,6 +159,13 @@ include/runtime.hpp: .*pure_error.* mySTL/algorithm\.hpp: is used uninitialized in this function # +# OpenSSL +# +# The following comes because of different prototype between yassl and openssl. +# Save as the argument is a function withing the library. +vio/viosslfactories\.c: discards ~const~ qualifier from pointer target type + +# # Groff warnings on OpenSUSE. # .*/dbug/.*(groff|<standard input>) : .* diff --git a/unittest/mysys/my_vsnprintf-t.c b/unittest/mysys/my_vsnprintf-t.c index 3131068b4c3..db0139945f4 100644 --- a/unittest/mysys/my_vsnprintf-t.c +++ b/unittest/mysys/my_vsnprintf-t.c @@ -19,7 +19,7 @@ char buf[1024]; /* let's hope that's enough */ -void test1(const char *res, const char *fmt, ...) +static void test1(const char *res, const char *fmt, ...) { va_list args; size_t len; @@ -29,6 +29,26 @@ void test1(const char *res, const char *fmt, ...) ok(strlen(res) == len && strcmp(buf, res) == 0, "\"%s\"", buf); } +static void test_many(const char **res, const char *fmt, ...) +{ + va_list args; + size_t len; + va_start(args,fmt); + len= my_vsnprintf(buf, sizeof(buf)-1, fmt, args); + va_end(args); + + for (; *res ; res++) + { + if (strlen(*res) == len && strcmp(buf, *res) == 0) + { + ok(1, "\"%s\"", buf); + return; + } + } + ok(0, "\"%s\"", buf); +} + + int main(void) { plan(59); @@ -177,7 +197,16 @@ int main(void) test1("My `DDDD` test CCCC, `DDD`", "My %1$`s test %2$s, %1$`-.3s", "DDDD", "CCCC"); - test1("Error 1 - Operation not permitted", "Error %M", 1); + { + /* Test that %M works */ + const char *results[]= + { + "Error 1 - Operation not permitted", /* Linux */ + "Error 1 - Not Owner", /* Solaris */ + NullS + }; + test_many(results, "Error %M", 1); + } return exit_status(); } |