From fc17efc29714b73a7b0bf806a354fa6fb294b35b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 14 Apr 2013 16:48:16 +0200 Subject: [PATCH 1/4] compiler warnings --- storage/innobase/os/os0file.c | 3 +-- storage/maria/ma_check.c | 14 ++++---------- storage/maria/ma_checkpoint.c | 4 +--- storage/maria/ma_rt_split.c | 12 ++++-------- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c index 0a1d3b41d0c..0d036f6f032 100644 --- a/storage/innobase/os/os0file.c +++ b/storage/innobase/os/os0file.c @@ -1369,7 +1369,6 @@ os_file_set_nocache( #endif static int os_file_set_atomic_writes(os_file_t file, const char *name) { - static int first_time = 1; int atomic_option = 1; int ret = ioctl (file, DFS_IOCTL_ATOMIC_WRITE_SET, &atomic_option); @@ -2027,7 +2026,7 @@ os_file_set_size( "InnoDB: Error: preallocating data for" " file %s failed at\n" "InnoDB: offset 0 size %lld %lld. Operating system" - " error number %llu.\n" + " error number %d.\n" "InnoDB: Check that the disk is not full" " or a disk quota exceeded.\n" "InnoDB: Some operating system error numbers" diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index 1feb2ae5df2..883261d5057 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -1246,17 +1246,13 @@ static int check_dynamic_record(HA_CHECK *param, MARIA_HA *info, int extend, { MARIA_BLOCK_INFO block_info; MARIA_SHARE *share= info->s; - my_off_t start_recpos, start_block, pos; - uchar *to; - ulong left_length; + my_off_t UNINIT_VAR(start_recpos), start_block, pos; + uchar *UNINIT_VAR(to); + ulong UNINIT_VAR(left_length); uint b_type; char llbuff[22],llbuff2[22],llbuff3[22]; DBUG_ENTER("check_dynamic_record"); - LINT_INIT(left_length); - LINT_INIT(start_recpos); - LINT_INIT(to); - pos= 0; while (pos < share->state.state.data_file_length) { @@ -1847,10 +1843,8 @@ static int check_block_record(HA_CHECK *param, MARIA_HA *info, int extend, pos < share->state.state.data_file_length; pos+= block_size, page++) { - uint row_count, real_row_count, empty_space, page_type, bitmap_pattern; + uint UNINIT_VAR(row_count), real_row_count, empty_space, page_type, bitmap_pattern; uint bitmap_for_page; - LINT_INIT(row_count); - LINT_INIT(empty_space); if (_ma_killed_ptr(param)) { diff --git a/storage/maria/ma_checkpoint.c b/storage/maria/ma_checkpoint.c index 30124b2205d..1e8adb64981 100644 --- a/storage/maria/ma_checkpoint.c +++ b/storage/maria/ma_checkpoint.c @@ -758,13 +758,11 @@ static int collect_tables(LEX_STRING *str, LSN checkpoint_start_log_horizon) struct st_state_copy *state_copies= NULL, /**< fixed-size cache of states */ *state_copies_end, /**< cache ends here */ *state_copy; /**< iterator in cache */ - TRANSLOG_ADDRESS state_copies_horizon; /**< horizon of states' _copies_ */ + TRANSLOG_ADDRESS UNINIT_VAR(state_copies_horizon); /**< horizon of states' _copies_ */ struct st_filter_param filter_param; PAGECACHE_FLUSH_FILTER filter; DBUG_ENTER("collect_tables"); - LINT_INIT(state_copies_horizon); - /* let's make a list of distinct shares */ mysql_mutex_lock(&THR_LOCK_maria); for (nb= 0, pos= maria_open_list; pos; pos= pos->next) diff --git a/storage/maria/ma_rt_split.c b/storage/maria/ma_rt_split.c index ea90b60ce12..d14422a21d2 100644 --- a/storage/maria/ma_rt_split.c +++ b/storage/maria/ma_rt_split.c @@ -185,18 +185,14 @@ static int split_maria_rtree_node(SplitStruct *node, int n_entries, double **d_buffer, int n_dim) { SplitStruct *cur; - SplitStruct *a; - SplitStruct *b; + SplitStruct *UNINIT_VAR(a); + SplitStruct *UNINIT_VAR(b); double *g1= reserve_coords(d_buffer, n_dim); double *g2= reserve_coords(d_buffer, n_dim); - SplitStruct *next; - int next_node; + SplitStruct *UNINIT_VAR(next); + int UNINIT_VAR(next_node); int i; SplitStruct *end= node + n_entries; - LINT_INIT(a); - LINT_INIT(b); - LINT_INIT(next); - LINT_INIT(next_node); if (all_size < min_size * 2) { From 58a77aafab52bfc3d25bfd7680f8c27ca031e403 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2013 09:42:09 +0200 Subject: [PATCH 2/4] MDEV-3882: .deb versions lower than upstream repo, causing install failure The official Debian Wheezy MySQL packages have versions like 5.5.30+dfsg-xxx. Such version is larger than 5.5.30-yyy, so apt prefers it. So use instead 5.5.30+maria-yyy, which is larger and can be pulled in automatically by apt. Also included are a couple of fixes for test failures in buildbot. --- debian/autobake-deb.sh | 4 ++-- mysql-test/mysql-test-run.pl | 3 +++ mysql-test/suite/innodb/t/innodb_bug51920.test | 2 +- mysql-test/t/myisam-metadata.test | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index 339d27bff00..5376ed58974 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -21,8 +21,8 @@ source ./VERSION UPSTREAM="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}${MYSQL_VERSION_EXTRA}" RELEASE_EXTRA="" -RELEASE_NAME=mariadb -PATCHLEVEL="" +RELEASE_NAME="" +PATCHLEVEL="+maria" LOGSTRING="MariaDB build" # Look up distro-version specific stuff. diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 1001769e4e2..67f3a3163d8 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4772,6 +4772,9 @@ sub extract_warning_lines ($$) { qr|Warning: io_setup\(\) failed|, qr|Warning: io_setup\(\) attempt|, qr|setrlimit could not change the size of core files to 'infinity';|, + qr|feedback plugin: failed to retrieve the MAC address|, + qr|Plugin 'FEEDBACK' init function returned error|, + qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|, ); my $matched_lines= []; diff --git a/mysql-test/suite/innodb/t/innodb_bug51920.test b/mysql-test/suite/innodb/t/innodb_bug51920.test index 0d4715712b0..c83e00db22a 100644 --- a/mysql-test/suite/innodb/t/innodb_bug51920.test +++ b/mysql-test/suite/innodb/t/innodb_bug51920.test @@ -36,7 +36,7 @@ let $wait_condition = # depending on platform. # connection con1; --- error 1317, 2006, 2013 +-- error 1317, 2006, 2013, ER_CONNECTION_KILLED reap; connection default; DROP TABLE bug51920; diff --git a/mysql-test/t/myisam-metadata.test b/mysql-test/t/myisam-metadata.test index c5327aa3a71..e80332eaa57 100644 --- a/mysql-test/t/myisam-metadata.test +++ b/mysql-test/t/myisam-metadata.test @@ -33,7 +33,7 @@ while ($1) ALTER TABLE t1 ENABLE KEYS; --connection default ---let $wait_timeout=10 +--let $wait_timeout=60 --let $show_statement= SHOW PROCESSLIST --let $field= State --let $condition= = 'Repair by sorting' From eb95ebf9174228376b4de272deb1c7eac947168e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2013 17:33:47 +0200 Subject: [PATCH 3/4] Fix race in test case. --- mysql-test/r/myisam-metadata.result | 3 +++ mysql-test/t/myisam-metadata.test | 5 ++++- storage/myisam/ha_myisam.cc | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/myisam-metadata.result b/mysql-test/r/myisam-metadata.result index 5192253d5d1..4d49bac9436 100644 --- a/mysql-test/r/myisam-metadata.result +++ b/mysql-test/r/myisam-metadata.result @@ -5,7 +5,10 @@ a VARCHAR(100), INDEX(a) ) ENGINE=MyISAM; ALTER TABLE t1 DISABLE KEYS; +SET debug_sync= 'myisam_after_repair_by_sort SIGNAL waiting WAIT_FOR go'; ALTER TABLE t1 ENABLE KEYS; +SET debug_sync= 'now WAIT_FOR waiting'; +SET debug_sync= 'now SIGNAL go'; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment t1 MyISAM 10 Dynamic 100000 27 # # # 0 NULL # # # latin1_swedish_ci NULL diff --git a/mysql-test/t/myisam-metadata.test b/mysql-test/t/myisam-metadata.test index e80332eaa57..df596b69b37 100644 --- a/mysql-test/t/myisam-metadata.test +++ b/mysql-test/t/myisam-metadata.test @@ -29,7 +29,8 @@ while ($1) --enable_query_log --connect(con1,localhost,root,,) ---send +SET debug_sync= 'myisam_after_repair_by_sort SIGNAL waiting WAIT_FOR go'; +send ALTER TABLE t1 ENABLE KEYS; --connection default @@ -38,6 +39,8 @@ while ($1) --let $field= State --let $condition= = 'Repair by sorting' --source include/wait_show_condition.inc +SET debug_sync= 'now WAIT_FOR waiting'; +SET debug_sync= 'now SIGNAL go'; --replace_column 7 # 8 # 9 # 12 # 13 # 14 # SHOW TABLE STATUS LIKE 't1'; diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 770c7d660b2..e455b00418c 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -30,6 +30,7 @@ #include "rt_index.h" #include "sql_table.h" // tablename_to_filename #include "sql_class.h" // THD +#include "debug_sync.h" ulonglong myisam_recover_options; static ulong opt_myisam_block_size; @@ -1131,6 +1132,7 @@ int ha_myisam::repair(THD *thd, HA_CHECK ¶m, bool do_optimize) thd_proc_info(thd, "Repair by sorting"); error = mi_repair_by_sort(¶m, file, fixed_name, test(param.testflag & T_QUICK)); + DEBUG_SYNC(thd, "myisam_after_repair_by_sort"); } } else From 4656060f118caba30912cca2557d72fcea307283 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2013 18:52:23 +0200 Subject: [PATCH 4/4] debug_sync is only available in debug build. --- mysql-test/t/myisam-metadata.test | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/t/myisam-metadata.test b/mysql-test/t/myisam-metadata.test index df596b69b37..2bbcc89a702 100644 --- a/mysql-test/t/myisam-metadata.test +++ b/mysql-test/t/myisam-metadata.test @@ -3,6 +3,7 @@ # --source include/big_test.inc +--source include/have_debug_sync.inc --disable_warnings DROP TABLE IF EXISTS t1;