[Commits] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2901)

#At lp:maria based on revid:monty@mysql.com-20100810215808-hij6wvrv0urtpvra 2901 Michael Widenius 2010-08-11 Fixed compiler warnings from Windows compiler modified: client/mysqlcheck.c client/mysqldump.c client/mysqlimport.c extra/my_print_defaults.c mysql-test/mysql-test-run.pl storage/maria/maria_pack.c storage/xtradb/buf/buf0lru.c storage/xtradb/fil/fil0fil.c storage/xtradb/handler/i_s.cc storage/xtradb/srv/srv0srv.c support-files/compiler_warnings.supp unittest/mytap/tap.h per-file messages: client/mysqlcheck.c Added missing casts client/mysqldump.c Added missing casts client/mysqlimport.c Added missing casts extra/my_print_defaults.c Added missing casts mysql-test/mysql-test-run.pl Added suppression for non-critical warning on windows storage/maria/maria_pack.c Added missing casts storage/xtradb/buf/buf0lru.c Added missing casts storage/xtradb/fil/fil0fil.c Added missing casts storage/xtradb/handler/i_s.cc Added extra argument to call store() function for longlong. storage/xtradb/srv/srv0srv.c Added cast to suppress compiler warning support-files/compiler_warnings.supp Added suppression for some non critical compiler warnings on Windows unittest/mytap/tap.h Fixed prototypes to be same as the actual functions === modified file 'client/mysqlcheck.c' --- a/client/mysqlcheck.c 2010-08-02 09:01:24 +0000 +++ b/client/mysqlcheck.c 2010-08-11 10:55:54 +0000 @@ -71,8 +71,8 @@ static struct my_option my_long_options[ &opt_auto_repair, &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"character-sets-dir", OPT_CHARSETS_DIR, - "Directory for character set files.", &charsets_dir, - &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + "Directory for character set files.", (char**) &charsets_dir, + (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"check-only-changed", 'C', === modified file 'client/mysqldump.c' --- a/client/mysqldump.c 2010-08-02 09:01:24 +0000 +++ b/client/mysqldump.c 2010-08-11 10:55:54 +0000 @@ -211,8 +211,8 @@ static struct my_option my_long_options[ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif {"character-sets-dir", OPT_CHARSETS_DIR, - "Directory for character set files.", &charsets_dir, - &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + "Directory for character set files.", (char**) &charsets_dir, + (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"comments", 'i', "Write additional information.", &opt_comments, &opt_comments, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, @@ -242,8 +242,8 @@ static struct my_option my_long_options[ {"debug", '#', "This is a non-debug version. Catch this and exit.", 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, #else - {"debug", '#', "Output debug log.", &default_dbug_option, - &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"debug", '#', "Output debug log.", (char**) &default_dbug_option, + (char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, 0, === modified file 'client/mysqlimport.c' --- a/client/mysqlimport.c 2010-06-10 20:16:43 +0000 +++ b/client/mysqlimport.c 2010-08-11 10:55:54 +0000 @@ -73,8 +73,8 @@ static struct my_option my_long_options[ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif {"character-sets-dir", OPT_CHARSETS_DIR, - "Directory for character set files.", &charsets_dir, - &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + "Directory for character set files.", (char**) &charsets_dir, + (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"default-character-set", OPT_DEFAULT_CHARSET, "Set the default character set.", &default_charset, &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, === modified file 'extra/my_print_defaults.c' --- a/extra/my_print_defaults.c 2010-08-04 18:36:11 +0000 +++ b/extra/my_print_defaults.c 2010-08-11 10:55:54 +0000 @@ -55,8 +55,8 @@ static struct my_option my_long_options[ {"debug", '#', "This is a non-debug version. Catch this and exit", 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, #else - {"debug", '#', "Output debug log", &default_dbug_option, - &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"debug", '#', "Output debug log", (char**) &default_dbug_option, + (char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif {"defaults-file", 'c', "Like --config-file, except: if first option, " "then read this file only, do not read global or per-user config " === modified file 'mysql-test/mysql-test-run.pl' --- a/mysql-test/mysql-test-run.pl 2010-08-09 17:05:42 +0000 +++ b/mysql-test/mysql-test-run.pl 2010-08-11 10:55:54 +0000 @@ -4038,6 +4038,7 @@ sub extract_warning_lines ($) { qr/unknown variable 'loose-/, qr/Now setting lower_case_table_names to [02]/, qr/Setting lower_case_table_names=2/, + qr/You have forced lower_case_table_names to 0/, qr/deprecated/, qr/Slave SQL thread retried transaction/, qr/Slave \(additional info\)/, === modified file 'storage/maria/maria_pack.c' --- a/storage/maria/maria_pack.c 2010-08-02 09:01:24 +0000 +++ b/storage/maria/maria_pack.c 2010-08-11 10:55:54 +0000 @@ -261,8 +261,8 @@ static struct my_option my_long_options[ {"backup", 'b', "Make a backup of the table as table_name.OLD.", &backup, &backup, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"character-sets-dir", OPT_CHARSETS_DIR_MP, - "Directory where character sets are.", &charsets_dir, - &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + "Directory where character sets are.", (char**) &charsets_dir, + (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"force", 'f', === modified file 'storage/xtradb/buf/buf0lru.c' --- a/storage/xtradb/buf/buf0lru.c 2010-08-04 08:39:53 +0000 +++ b/storage/xtradb/buf/buf0lru.c 2010-08-11 10:55:54 +0000 @@ -2131,7 +2131,7 @@ ibool buf_LRU_file_dump(void) /*===================*/ { - os_file_t dump_file = -1; + os_file_t dump_file = (os_file_t) -1; ibool success; byte* buffer_base = NULL; byte* buffer = NULL; @@ -2221,7 +2221,7 @@ buf_LRU_file_dump(void) ret = TRUE; end: - if (dump_file != -1) + if (dump_file != (os_file_t) -1) os_file_close(dump_file); if (buffer_base) ut_free(buffer_base); @@ -2235,7 +2235,7 @@ ibool buf_LRU_file_restore(void) /*======================*/ { - os_file_t dump_file = -1; + os_file_t dump_file = (os_file_t) -1; ibool success; byte* buffer_base = NULL; byte* buffer = NULL; @@ -2326,7 +2326,7 @@ buf_LRU_file_restore(void) " (requested: %lu, read: %lu)\n", req, reads); ret = TRUE; end: - if (dump_file != -1) + if (dump_file != (os_file_t) -1) os_file_close(dump_file); if (buffer_base) ut_free(buffer_base); === modified file 'storage/xtradb/fil/fil0fil.c' --- a/storage/xtradb/fil/fil0fil.c 2010-08-04 08:39:53 +0000 +++ b/storage/xtradb/fil/fil0fil.c 2010-08-11 10:55:54 +0000 @@ -3044,7 +3044,7 @@ fil_open_single_table_tablespace( dulint new_id[31]; ulint root_page[31]; ulint n_index; - os_file_t info_file = -1; + os_file_t info_file = (os_file_t) -1; char* info_file_path; ulint i; int len; @@ -3130,7 +3130,7 @@ fil_open_single_table_tablespace( } skip_info: - if (info_file != -1) + if (info_file != (os_file_t) -1) os_file_close(info_file); /* === modified file 'storage/xtradb/handler/i_s.cc' --- a/storage/xtradb/handler/i_s.cc 2010-08-04 08:39:53 +0000 +++ b/storage/xtradb/handler/i_s.cc 2010-08-11 10:55:54 +0000 @@ -2821,7 +2821,7 @@ i_s_innodb_table_stats_fill( field_store_string(i_s_table->field[0], buf); field_store_string(i_s_table->field[1], ptr); - i_s_table->field[2]->store(table->stat_n_rows); + i_s_table->field[2]->store(table->stat_n_rows, 1); i_s_table->field[3]->store(table->stat_clustered_index_size); i_s_table->field[4]->store(table->stat_sum_of_other_index_sizes); i_s_table->field[5]->store(table->stat_modified_counter); === modified file 'storage/xtradb/srv/srv0srv.c' --- a/storage/xtradb/srv/srv0srv.c 2010-08-04 08:39:53 +0000 +++ b/storage/xtradb/srv/srv0srv.c 2010-08-11 10:55:54 +0000 @@ -2897,7 +2897,7 @@ loop: if (bpl) { retry_flush_batch: n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, - bpl, + (ulint) bpl, oldest_lsn + (lsn - lsn_old)); if (n_pages_flushed == ULINT_UNDEFINED) { os_thread_sleep(5000); === modified file 'support-files/compiler_warnings.supp' --- a/support-files/compiler_warnings.supp 2010-08-06 06:36:09 +0000 +++ b/support-files/compiler_warnings.supp 2010-08-11 10:55:54 +0000 @@ -44,6 +44,7 @@ buf/buf0buf\.c: .*block_mutex.* might be btr/btr0cur\.c: null argument where non-null required: 1800-3000 btr/btr0btr\.c: null argument where non-null required: 2500-3000 ibuf/ibuf0ibuf.c: null argument where non-null required: 700-1000 +fsp/fsp0fsp\.c: result of 32-bit shift implicitly converted to 64 bits # # bdb is not critical to keep up to date @@ -108,6 +109,7 @@ signal\.c : .*unused parameter.* .* : conversion from '.*size_t' to 'UINT'.* .* : conversion from '.*size_t' to 'uInt'.* .* : conversion from '.*size_t' to 'uint16'.* +.* : The following environment variables were not found.* # # The following should be fixed by the ndb team === modified file 'unittest/mytap/tap.h' --- a/unittest/mytap/tap.h 2010-08-02 09:01:24 +0000 +++ b/unittest/mytap/tap.h 2010-08-11 10:55:54 +0000 @@ -106,7 +106,7 @@ extern int skip_big_tests; @param count The planned number of tests to run. */ -void plan(int const count); +void plan(int count); /** @@ -125,7 +125,7 @@ void plan(int const count); which case nothing is printed. */ -void ok(int const pass, char const *fmt, ...) +void ok(int pass, char const *fmt, ...) __attribute__((format(printf,2,3)));
participants (1)
-
Michael Widenius