[Commits] Rev 3018: Fixed some mysql-test-run failures and compile warnings/errors in lp:maria/5.1

Michael Widenius monty at askmonty.org
Thu Jan 20 19:08:15 EET 2011


At lp:maria/5.1

------------------------------------------------------------
revno: 3018
revision-id: monty at askmonty.org-20110120170812-voi2f1wgknbrs9yf
parent: monty at askmonty.org-20110118130200-2rtb3v7vqe855h0j
committer: Michael Widenius <monty at askmonty.org>
branch nick: maria-5.1
timestamp: Thu 2011-01-20 19:08:12 +0200
message:
  Fixed some mysql-test-run failures and compile warnings/errors
  Added logging of all possible fatal table errors if --log-warnings set to > 1
-------------- next part --------------
=== modified file 'mysql-test/extra/rpl_tests/rpl_EE_err.test'
--- a/mysql-test/extra/rpl_tests/rpl_EE_err.test	2008-10-23 19:27:09 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_EE_err.test	2011-01-20 17:08:12 +0000
@@ -23,8 +23,7 @@ flush tables;
 let $MYSQLD_DATADIR= `select @@datadir`;
 remove_file $MYSQLD_DATADIR/test/t1.MYI ;
 drop table if exists t1;
-save_master_pos;
-connection slave;
-sync_with_master;
+
+--source include/master-slave-end.inc
 
 # End of 4.1 tests

=== modified file 'mysql-test/extra/rpl_tests/rpl_row_basic.test'
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test	2010-05-24 13:54:08 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test	2011-01-20 17:08:12 +0000
@@ -2,6 +2,13 @@
 # Basic tests of row-level logging
 #
 
+--disable_query_log
+--disable_result_log
+# Add suppression for expected warning(s) in error log
+call mtr.add_suppression("Can't find record in 't.'");
+--enable_query_log
+--enable_result_log
+
 #
 # First we test tables with only an index.
 #

=== modified file 'mysql-test/r/archive.result'
--- a/mysql-test/r/archive.result	2010-12-10 15:04:09 +0000
+++ b/mysql-test/r/archive.result	2011-01-20 17:08:12 +0000
@@ -1,3 +1,4 @@
+call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
 DROP TABLE if exists t1,t2,t3,t4,t5,t6;
 SET storage_engine=ARCHIVE;
 CREATE TABLE t1 (

=== modified file 'mysql-test/r/csv.result'
--- a/mysql-test/r/csv.result	2010-03-09 15:09:32 +0000
+++ b/mysql-test/r/csv.result	2011-01-20 17:08:12 +0000
@@ -1,3 +1,5 @@
+call mtr.add_suppression("Table 'test_repair_table2' is marked as crashed and should be repaired");
+call mtr.add_suppression("Table 'test_repair_table4' is marked as crashed and should be repaired");
 drop table if exists t1,t2,t3,t4;
 CREATE TABLE t1 (
 Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,

=== modified file 'mysql-test/suite/maria/r/maria-autozerofill.result'
--- a/mysql-test/suite/maria/r/maria-autozerofill.result	2008-10-01 12:13:39 +0000
+++ b/mysql-test/suite/maria/r/maria-autozerofill.result	2011-01-20 17:08:12 +0000
@@ -1,3 +1,4 @@
+call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
 drop database if exists mysqltest;
 create database mysqltest;
 use mysqltest;

=== modified file 'mysql-test/suite/maria/t/maria-autozerofill.test'
--- a/mysql-test/suite/maria/t/maria-autozerofill.test	2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-autozerofill.test	2011-01-20 17:08:12 +0000
@@ -5,6 +5,8 @@
 --source include/not_embedded.inc
 --source include/have_maria.inc
 
+call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
+
 let $MARIA_LOG=.;
 
 --disable_warnings

=== modified file 'mysql-test/suite/maria/t/maria-recover.test'
--- a/mysql-test/suite/maria/t/maria-recover.test	2010-01-27 17:41:05 +0000
+++ b/mysql-test/suite/maria/t/maria-recover.test	2011-01-20 17:08:12 +0000
@@ -8,6 +8,8 @@
 call mtr.add_suppression("Checking table:   '\\..mysqltest.t_corrupted2'");
 call mtr.add_suppression("Recovering table: '\\..mysqltest.t_corrupted2'");
 call mtr.add_suppression("Table '\\..mysqltest.t_corrupted2' is marked as crashed and should be repaired");
+call mtr.add_suppression("Table 't_corrupted2' is marked as crashed and should be repaired");
+
 --enable_query_log
 
 # Note: we're setting an environment variable (not prefixing it by $),

=== modified file 'mysql-test/suite/parts/t/partition_recover_myisam.test'
--- a/mysql-test/suite/parts/t/partition_recover_myisam.test	2010-01-27 17:41:05 +0000
+++ b/mysql-test/suite/parts/t/partition_recover_myisam.test	2011-01-20 17:08:12 +0000
@@ -3,6 +3,7 @@
 --disable_query_log
 call mtr.add_suppression("..test.t1_will_crash");
 call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc");
+call mtr.add_suppression("Table 't1_will_crash' is marked as crashed and should be repaired");
 --enable_query_log
 
 --source include/have_partition.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_bug38694.result'
--- a/mysql-test/suite/rpl/r/rpl_bug38694.result	2009-04-30 13:20:38 +0000
+++ b/mysql-test/suite/rpl/r/rpl_bug38694.result	2011-01-20 17:08:12 +0000
@@ -4,3 +4,4 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
+call mtr.add_suppression("Aborted connection");

=== modified file 'mysql-test/suite/rpl/r/rpl_idempotency.result'
--- a/mysql-test/suite/rpl/r/rpl_idempotency.result	2009-08-25 13:56:50 +0000
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result	2011-01-20 17:08:12 +0000
@@ -5,6 +5,7 @@ reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
+call mtr.add_suppression("Can't find record in 't.'");
 call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
 call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
 SET @old_slave_exec_mode= @@global.slave_exec_mode;

=== modified file 'mysql-test/suite/rpl/r/rpl_ignore_table.result'
--- a/mysql-test/suite/rpl/r/rpl_ignore_table.result	2008-11-13 19:19:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result	2011-01-20 17:08:12 +0000
@@ -4,6 +4,9 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
+call mtr.add_suppression("Can't find record in 't.'");
+call mtr.add_suppression("Can't find record in 'user'");
+call mtr.add_suppression("Can't find record in 'tables_priv'");
 **** Test case for BUG#16487 ****
 **** Master ****
 CREATE TABLE test.t4 (a int);

=== modified file 'mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result'
--- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result	2010-05-24 13:54:08 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result	2011-01-20 17:08:12 +0000
@@ -4,6 +4,7 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
+call mtr.add_suppression("Can't find record in 't.'");
 CREATE DATABASE test_ignore;
 **** On Master ****
 SHOW DATABASES;
@@ -27,6 +28,10 @@ t2
 INSERT INTO t2 VALUES (3,3), (4,4);
 show binlog events from <binlog_start>;
 Log_name        Pos     Event_type      Server_id       End_log_pos     Info
+master-bin.000001       #       Query   #       #       BEGIN
+master-bin.000001       #       Table_map       #       #       table_id: # (mtr.test_suppressions)
+master-bin.000001       #       Write_rows      #       #       table_id: # flags: STMT_END_F
+master-bin.000001       #       Query   #       #       COMMIT
 master-bin.000001       #       Query   #       #       use `test`; CREATE TABLE t1 (a INT, b INT)
 master-bin.000001       #       Query   #       #       BEGIN
 master-bin.000001       #       Table_map       #       #       table_id: # (test.t1)

=== modified file 'mysql-test/suite/rpl/r/rpl_row_conflicts.result'
--- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result	2009-01-09 14:12:31 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result	2011-01-20 17:08:12 +0000
@@ -5,6 +5,7 @@ reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*");
+call mtr.add_suppression("Can't find record in 't.'");
 [on slave]
 SET @old_slave_exec_mode= @@global.slave_exec_mode;
 ######## Run with slave_exec_mode=STRICT ########

=== modified file 'mysql-test/suite/rpl/r/rpl_temporary_errors.result'
--- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result	2010-08-02 09:01:24 +0000
+++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result	2011-01-20 17:08:12 +0000
@@ -5,6 +5,7 @@ reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 call mtr.add_suppression("Deadlock found");
+call mtr.add_suppression("Can't find record in 't.'");
 **** On Master ****
 SET SESSION BINLOG_FORMAT=ROW;
 CREATE TABLE t1 (a INT PRIMARY KEY, b INT);

=== modified file 'mysql-test/suite/rpl/t/rpl_bug38694.test'
--- a/mysql-test/suite/rpl/t/rpl_bug38694.test	2009-04-30 13:20:38 +0000
+++ b/mysql-test/suite/rpl/t/rpl_bug38694.test	2011-01-20 17:08:12 +0000
@@ -7,4 +7,6 @@
 
 source include/master-slave.inc;
 
+call mtr.add_suppression("Aborted connection");
+
 # End of tests

=== modified file 'mysql-test/suite/rpl/t/rpl_idempotency.test'
--- a/mysql-test/suite/rpl/t/rpl_idempotency.test	2009-08-25 13:56:50 +0000
+++ b/mysql-test/suite/rpl/t/rpl_idempotency.test	2011-01-20 17:08:12 +0000
@@ -9,6 +9,7 @@ source include/have_innodb.inc;
 
 # Add suppression for expected warning(s) in slaves error log
 call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
+call mtr.add_suppression("Can't find record in 't.'");
 call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
 call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
 

=== modified file 'mysql-test/suite/rpl/t/rpl_ignore_table.test'
--- a/mysql-test/suite/rpl/t/rpl_ignore_table.test	2009-12-27 13:54:41 +0000
+++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test	2011-01-20 17:08:12 +0000
@@ -2,6 +2,10 @@ source include/master-slave.inc;
 let collation=utf8_unicode_ci;
 --source include/have_collation.inc
 
+call mtr.add_suppression("Can't find record in 't.'");
+call mtr.add_suppression("Can't find record in 'user'");
+call mtr.add_suppression("Can't find record in 'tables_priv'");
+
 #
 # BUG#16487
 #  

=== modified file 'mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test'
--- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test	2010-08-02 09:01:24 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test	2011-01-20 17:08:12 +0000
@@ -4,10 +4,13 @@ let $SERVER_VERSION=`select version()`;
 
 #This test case is not written for NDB, the result files 
 #will not match when NDB is the default engine
--- source include/not_ndb_default.inc
+--source include/not_ndb_default.inc
 
 --source include/master-slave.inc
 
+# Add suppression for expected warning(s) in slaves error log
+call mtr.add_suppression("Can't find record in 't.'");
+
 # Bug#15942 (RBR ignores --binlog_ignore_db and tries to map to table
 # on slave for writes)
 

=== modified file 'mysql-test/suite/rpl/t/rpl_row_conflicts.test'
--- a/mysql-test/suite/rpl/t/rpl_row_conflicts.test	2009-01-09 14:12:31 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_conflicts.test	2011-01-20 17:08:12 +0000
@@ -9,6 +9,7 @@ source include/master-slave.inc;
 
 connection slave;
 call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*");
+call mtr.add_suppression("Can't find record in 't.'");
 
 --echo [on slave]
 connection slave;

=== modified file 'mysql-test/suite/rpl/t/rpl_temporary_errors.test'
--- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test	2010-08-02 16:39:45 +0000
+++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test	2011-01-20 17:08:12 +0000
@@ -2,6 +2,7 @@ source include/master-slave.inc;
 source include/have_innodb.inc;
 
 call mtr.add_suppression("Deadlock found");
+call mtr.add_suppression("Can't find record in 't.'");
 
 --echo **** On Master ****
 connection master;

=== modified file 'mysql-test/t/archive.test'
--- a/mysql-test/t/archive.test	2010-12-10 15:04:09 +0000
+++ b/mysql-test/t/archive.test	2011-01-20 17:08:12 +0000
@@ -5,6 +5,8 @@
 -- source include/have_archive.inc
 -- source include/have_binlog_format_mixed_or_statement.inc
 
+call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
+
 --disable_warnings
 DROP TABLE if exists t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/t/csv.test'
--- a/mysql-test/t/csv.test	2010-03-09 15:09:32 +0000
+++ b/mysql-test/t/csv.test	2011-01-20 17:08:12 +0000
@@ -4,6 +4,9 @@
 
 --source include/have_csv.inc
 
+call mtr.add_suppression("Table 'test_repair_table2' is marked as crashed and should be repaired");
+call mtr.add_suppression("Table 'test_repair_table4' is marked as crashed and should be repaired");
+
 #
 # Simple select test
 #

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2011-01-14 14:45:14 +0000
+++ b/sql/handler.cc	2011-01-20 17:08:12 +0000
@@ -2638,17 +2638,11 @@ void handler::print_keydup_error(uint ke
     - table->alias
 */
 
-#ifndef DBUG_OFF
 #define SET_FATAL_ERROR fatal_error=1
-#else
-#define SET_FATAL_ERROR
-#endif
 
 void handler::print_error(int error, myf errflag)
 {
-#ifndef DBUG_OFF
   bool fatal_error= 0;
-#endif
   DBUG_ENTER("handler::print_error");
   DBUG_PRINT("enter",("error: %d",error));
 
@@ -2855,6 +2849,15 @@ void handler::print_error(int error, myf
       DBUG_VOID_RETURN;
     }
   }
+  if (fatal_error && (debug_assert_if_crashed_table ||
+                      global_system_variables.log_warnings > 1))
+  {
+    /*
+      Log error to log before we crash or if extended warnings are requested
+    */
+    errflag|= ME_NOREFRESH;
+  }
+    
   my_error(textno, errflag, table_share->table_name.str, error);
   DBUG_ASSERT(!fatal_error || !debug_assert_if_crashed_table);
   DBUG_VOID_RETURN;

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-01-14 10:05:10 +0000
+++ b/sql/sql_select.cc	2011-01-20 17:08:12 +0000
@@ -11148,6 +11148,7 @@ create_internal_tmp_table_from_heap2(THD
   const char *save_proc_info;
   int write_err;
   DBUG_ENTER("create_internal_tmp_table_from_heap2");
+  LINT_INIT(write_err);
 
   if (table->s->db_type() != heap_hton || 
       error != HA_ERR_RECORD_FILE_FULL)

=== modified file 'strings/Makefile.am'
--- a/strings/Makefile.am	2010-11-17 12:24:20 +0000
+++ b/strings/Makefile.am	2011-01-20 17:08:12 +0000
@@ -22,7 +22,7 @@ noinst_LTLIBRARIES =	libmystrings.la
 # Exact one of ASSEMBLER_X
 if ASSEMBLER_x86
 ASRCS           = strings-x86.s longlong2str-x86.s my_strtoll10-x86.s
-CSRCS           = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c my_strchr.c strmov.c strmov_overlapp.c
+CSRCS           = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c my_strchr.c strmov_overlapp.c
 else
 if ASSEMBLER_sparc32
 # These file MUST all be on the same line!! Otherwise automake



More information about the commits mailing list