diff options
author | Michael Widenius <monty@askmonty.org> | 2010-01-06 23:27:53 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-01-06 23:27:53 +0200 |
commit | b96f268acc3a693b673fceccc62311e169496731 (patch) | |
tree | 1722db723369249c1df40c7bf2a32885d8e4b174 /storage | |
parent | 1378aa0e8fb9c0a859fe10ef58e8db55078f935b (diff) | |
download | mariadb-git-b96f268acc3a693b673fceccc62311e169496731.tar.gz |
Removed compiler warnings
Fixed sporadic test failure for suit/pbxt/t/lock_multi.test
Fixed sporadic test faulure for suit/rpl/t/do_grant.test
OpenSolaris 5.11-x86 now compiles (tested with 32 bit)
BUILD/compile-solaris-amd64-debug-forte:
Added execute bit
BUILD/compile-solaris-x86-32:
Added execute bit
BUILD/compile-solaris-x86-32-debug:
Added execute bit
BUILD/compile-solaris-x86-32-debug-forte:
Added execute bit
BUILD/compile-solaris-x86-forte-32:
Added execute bit
extra/libevent/devpoll.c:
Removed compiler warning
extra/libevent/evbuffer.c:
Removed compiler warning
extra/libevent/select.c:
Removed compiler warning
mysql-test/mysql-test-run.pl:
Fixed sporadic test faulure for suit/rpl/t/do_grant.test (Seen on OpenSolaris)
mysql-test/suite/pbxt/r/lock_multi.result:
Fixed sporadic test failure for suit/pbxt/t/lock_multi.test (seen in buildbot)
This was done by merging the test with main/lock_multi.test
mysql-test/suite/pbxt/t/lock_multi.test:
Fixed sporadic test failure for suit/pbxt/t/lock_multi.test (seen in buildbot)
This was done by merging the test with main/lock_multi.test
mysys/my_sync.c:
Removed compiler warnings
sql/ha_ndbcluster.cc:
Fixed linking error on OpenSolaris when compiling without ndb
Bug #34866 Can't compile on Solaris 9/Sparc with gcc
storage/archive/azlib.h:
Removed compiler warning about redefined symbols
storage/maria/ma_blockrec.c:
Removed compiler warning
storage/maria/ma_loghandler.c:
Removed compiler warning
storage/maria/ma_test3.c:
Removed compiler warning
storage/myisam/mi_test3.c:
Removed compiler warning
storage/pbxt/src/ha_pbxt.cc:
Removed compiler warning
thr_main -> thr_main_pbxt
storage/pbxt/src/restart_xt.cc:
thr_main -> thr_main_pbxt
storage/pbxt/src/thread_xt.cc:
thr_main -> thr_main_pbxt
This was needed as thr_main() is an internal thread function on OpenSolaris()
storage/pbxt/src/thread_xt.h:
thr_main -> thr_main_pbxt
storage/xtradb/srv/srv0srv.c:
Use compatiblity macro to get code to work on OpenSolaris
support-files/compiler_warnings.supp:
Ignore compiler warning from yassl
Diffstat (limited to 'storage')
-rw-r--r-- | storage/archive/azlib.h | 3 | ||||
-rw-r--r-- | storage/maria/ma_blockrec.c | 4 | ||||
-rw-r--r-- | storage/maria/ma_loghandler.c | 4 | ||||
-rw-r--r-- | storage/maria/ma_test3.c | 4 | ||||
-rw-r--r-- | storage/myisam/mi_test3.c | 5 | ||||
-rw-r--r-- | storage/pbxt/src/ha_pbxt.cc | 4 | ||||
-rw-r--r-- | storage/pbxt/src/restart_xt.cc | 2 | ||||
-rw-r--r-- | storage/pbxt/src/thread_xt.cc | 6 | ||||
-rw-r--r-- | storage/pbxt/src/thread_xt.h | 2 | ||||
-rw-r--r-- | storage/xtradb/srv/srv0srv.c | 13 |
10 files changed, 24 insertions, 23 deletions
diff --git a/storage/archive/azlib.h b/storage/archive/azlib.h index d7abb40b2ae..29a6329fb0a 100644 --- a/storage/archive/azlib.h +++ b/storage/archive/azlib.h @@ -33,10 +33,9 @@ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). */ -#include <zlib.h> - #include "../../mysys/mysys_priv.h" #include <my_dir.h> +#include <zlib.h> #ifdef __cplusplus extern "C" { diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c index 694c8b7b5ff..e4e43bcfcfe 100644 --- a/storage/maria/ma_blockrec.c +++ b/storage/maria/ma_blockrec.c @@ -6094,7 +6094,7 @@ uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn, DBUG_RETURN(0); } - if (((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != page_type)) + if (((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != page_type)) { /* This is a page that has been freed before and now should be @@ -6241,7 +6241,7 @@ uint _ma_apply_redo_purge_row_head_or_tail(MARIA_HA *info, LSN lsn, Note that in case the page is not anymore a head or tail page a future redo will fix the bitmap. */ - if ((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type) + if ((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type) { empty_space= uint2korr(buff+EMPTY_SPACE_OFFSET); if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index c5efab506f1..536336d795d 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -2823,8 +2823,8 @@ static my_bool translog_page_validator(uchar *page, data->was_recovered= 0; - if (uint3korr(page) != page_no || - uint3korr(page + 3) != data->number) + if ((pgcache_page_no_t) uint3korr(page) != page_no || + (uint32) uint3korr(page + 3) != data->number) { DBUG_PRINT("error", ("Page (%lu,0x%lx): " "page address written in the page is incorrect: " diff --git a/storage/maria/ma_test3.c b/storage/maria/ma_test3.c index 8dd631380a0..040d6fa78c2 100644 --- a/storage/maria/ma_test3.c +++ b/storage/maria/ma_test3.c @@ -180,7 +180,7 @@ void start_test(int id) if (pagecacheing && rnd(2) == 0) init_pagecache(maria_pagecache, 65536L, 0, 0, MARIA_KEY_BLOCK_LENGTH, MY_WME); - printf("Process %d, pid: %d\n",id,getpid()); fflush(stdout); + printf("Process %d, pid: %ld\n",id,(long) getpid()); fflush(stdout); for (error=i=0 ; i < tests && !error; i++) { @@ -362,7 +362,7 @@ int test_write(MARIA_HA *file,int id,int lock_type) maria_extra(file,HA_EXTRA_WRITE_CACHE,0); } - sprintf((char*) record.id,"%7d",getpid()); + sprintf((char*) record.id,"%7ld", (long) getpid()); strnmov((char*) record.text,"Testing...", sizeof(record.text)); tries=(uint) rnd(100)+10; diff --git a/storage/myisam/mi_test3.c b/storage/myisam/mi_test3.c index 93f2b10fd3e..e792612a313 100644 --- a/storage/myisam/mi_test3.c +++ b/storage/myisam/mi_test3.c @@ -178,7 +178,8 @@ void start_test(int id) } if (key_cacheing && rnd(2) == 0) init_key_cache(dflt_key_cache, KEY_CACHE_BLOCK_SIZE, 65536L, 0, 0); - printf("Process %d, pid: %d\n",id,getpid()); fflush(stdout); + printf("Process %d, pid: %ld\n", id, (long) getpid()); + fflush(stdout); for (error=i=0 ; i < tests && !error; i++) { @@ -362,7 +363,7 @@ int test_write(MI_INFO *file,int id,int lock_type) mi_extra(file,HA_EXTRA_WRITE_CACHE,0); } - sprintf((char*) record.id,"%7d",getpid()); + sprintf((char*) record.id,"%7ld",(long) getpid()); strnmov((char*) record.text,"Testing...", sizeof(record.text)); tries=(uint) rnd(100)+10; diff --git a/storage/pbxt/src/ha_pbxt.cc b/storage/pbxt/src/ha_pbxt.cc index b088ad8daf2..3d4584e60b1 100644 --- a/storage/pbxt/src/ha_pbxt.cc +++ b/storage/pbxt/src/ha_pbxt.cc @@ -1294,7 +1294,7 @@ static int pbxt_init(void *p) #6 0x000debe1 in THD::THD at sql_class.cc:631 #7 0x00e207a4 in myxt_create_thread at myxt_xt.cc:2666 #8 0x00e3134b in tabc_fr_run_thread at tabcache_xt.cc:982 - #9 0x00e422ca in thr_main at thread_xt.cc:1006 + #9 0x00e422ca in thr_main_pbxt at thread_xt.cc:1006 #10 0x91ff7c55 in _pthread_start #11 0x91ff7b12 in thread_start * @@ -1557,7 +1557,7 @@ static int pbxt_prepare(handlerton *hton, THD *thd, bool all) return err; } -static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, char *thread_name, int *err) +static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, const char *thread_name, int *err) { THD *thd; XTThreadPtr self = NULL; diff --git a/storage/pbxt/src/restart_xt.cc b/storage/pbxt/src/restart_xt.cc index b34fdd76679..472c5ad0478 100644 --- a/storage/pbxt/src/restart_xt.cc +++ b/storage/pbxt/src/restart_xt.cc @@ -3314,7 +3314,7 @@ static void *xn_xres_run_recovery_thread(XTThreadPtr self) * #7 0x000c0db2 in THD::~THD at sql_class.cc:934 * #8 0x003b025b in myxt_destroy_thread at myxt_xt.cc:2999 * #9 0x003b66b5 in xn_xres_run_recovery_thread at restart_xt.cc:3196 - * #10 0x003cbfbb in thr_main at thread_xt.cc:1020 + * #10 0x003cbfbb in thr_main_pbxt at thread_xt.cc:1020 * myxt_destroy_thread(mysql_thread, TRUE); */ diff --git a/storage/pbxt/src/thread_xt.cc b/storage/pbxt/src/thread_xt.cc index 14c2a5e3b09..c31e23e69df 100644 --- a/storage/pbxt/src/thread_xt.cc +++ b/storage/pbxt/src/thread_xt.cc @@ -1013,7 +1013,7 @@ static xtBool thr_setup_signals(void) typedef void *(*ThreadMainFunc)(XTThreadPtr self); -extern "C" void *thr_main(void *data) +extern "C" void *thr_main_pbxt(void *data) { ThreadDataPtr td = (ThreadDataPtr) data; XTThreadPtr self = td->td_thr; @@ -1503,10 +1503,10 @@ xtPublic pthread_t xt_run_thread(XTThreadPtr self, XTThreadPtr child, void *(*st pthread_attr_t attr = { 0, 0, 0 }; attr.priority = THREAD_PRIORITY_NORMAL; - err = pthread_create(&child_thread, &attr, thr_main, &data); + err = pthread_create(&child_thread, &attr, thr_main_pbxt, &data); } #else - err = pthread_create(&child_thread, NULL, thr_main, &data); + err = pthread_create(&child_thread, NULL, thr_main_pbxt, &data); #endif if (err) { xt_free_thread(child); diff --git a/storage/pbxt/src/thread_xt.h b/storage/pbxt/src/thread_xt.h index 001f4adc33f..7fcf6105a59 100644 --- a/storage/pbxt/src/thread_xt.h +++ b/storage/pbxt/src/thread_xt.h @@ -536,7 +536,7 @@ extern struct XTThread **xt_thr_array; * Function prototypes */ -extern "C" void *thr_main(void *data); +extern "C" void *thr_main_pbxt(void *data); void xt_get_now(char *buffer, size_t len); xtBool xt_init_logging(void); diff --git a/storage/xtradb/srv/srv0srv.c b/storage/xtradb/srv/srv0srv.c index 5768249fc8d..acd3386d863 100644 --- a/storage/xtradb/srv/srv0srv.c +++ b/storage/xtradb/srv/srv0srv.c @@ -81,6 +81,7 @@ Created 10/8/1995 Heikki Tuuri #include "ut0mem.h" #include "ut0ut.h" #include "os0proc.h" +#include "os0sync.h" #include "mem0mem.h" #include "mem0pool.h" #include "sync0sync.h" @@ -1102,12 +1103,12 @@ srv_conc_enter_innodb_timer_based(trx_t* trx) } retry: if (srv_conc_n_threads < (lint) srv_thread_concurrency) { - conc_n_threads = __sync_add_and_fetch(&srv_conc_n_threads, 1); + conc_n_threads = os_atomic_increment_lint(&srv_conc_n_threads, 1); if (conc_n_threads <= (lint) srv_thread_concurrency) { enter_innodb_with_tickets(trx); return; } - __sync_add_and_fetch(&srv_conc_n_threads, -1); + os_atomic_increment_lint(&srv_conc_n_threads, -1); } if (!has_yielded) { @@ -1118,7 +1119,7 @@ retry: if (trx->has_search_latch || NULL != UT_LIST_GET_FIRST(trx->trx_locks)) { - conc_n_threads = __sync_add_and_fetch(&srv_conc_n_threads, 1); + conc_n_threads = os_atomic_increment_lint(&srv_conc_n_threads, 1); enter_innodb_with_tickets(trx); return; } @@ -1129,7 +1130,7 @@ retry: trx->op_info = ""; has_slept++; } - conc_n_threads = __sync_add_and_fetch(&srv_conc_n_threads, 1); + conc_n_threads = os_atomic_increment_lint(&srv_conc_n_threads, 1); enter_innodb_with_tickets(trx); return; } @@ -1137,7 +1138,7 @@ retry: static void srv_conc_exit_innodb_timer_based(trx_t* trx) { - __sync_add_and_fetch(&srv_conc_n_threads, -1); + os_atomic_increment_lint(&srv_conc_n_threads, -1); trx->declared_to_be_inside_innodb = FALSE; trx->n_tickets_to_enter_innodb = 0; return; @@ -1326,7 +1327,7 @@ srv_conc_force_enter_innodb( ut_ad(srv_conc_n_threads >= 0); #ifdef INNODB_RW_LOCKS_USE_ATOMICS if (srv_thread_concurrency_timer_based) { - __sync_add_and_fetch(&srv_conc_n_threads, 1); + os_atomic_increment_lint(&srv_conc_n_threads, 1); trx->declared_to_be_inside_innodb = TRUE; trx->n_tickets_to_enter_innodb = 1; return; |