diff options
Diffstat (limited to 'storage/xtradb')
-rw-r--r-- | storage/xtradb/Makefile.am | 13 | ||||
-rw-r--r-- | storage/xtradb/include/srv0srv.h | 4 | ||||
-rw-r--r-- | storage/xtradb/log/log0log.c | 2 | ||||
-rw-r--r-- | storage/xtradb/plug.in | 2 | ||||
-rw-r--r-- | storage/xtradb/srv/srv0srv.c | 18 |
5 files changed, 19 insertions, 20 deletions
diff --git a/storage/xtradb/Makefile.am b/storage/xtradb/Makefile.am index 0a6d7ddefb6..cb1e20436f4 100644 --- a/storage/xtradb/Makefile.am +++ b/storage/xtradb/Makefile.am @@ -229,9 +229,8 @@ noinst_HEADERS= \ handler/innodb_patch_info.h \ mem/mem0dbg.c -EXTRA_LIBRARIES= libxtradb.a -noinst_LIBRARIES= @plugin_xtradb_static_target@ -libxtradb_a_SOURCES= \ +noinst_LTLIBRARIES= @plugin_xtradb_static_target@ +libxtradb_la_SOURCES= \ btr/btr0btr.c \ btr/btr0cur.c \ btr/btr0pcur.c \ @@ -326,16 +325,16 @@ libxtradb_a_SOURCES= \ ut/ut0vec.c \ ut/ut0wqueue.c -libxtradb_a_CXXFLAGS= $(AM_CXXFLAGS) -libxtradb_a_CFLAGS= $(AM_CFLAGS) +libxtradb_la_CXXFLAGS= $(AM_CXXFLAGS) +libxtradb_la_CFLAGS= $(AM_CFLAGS) -EXTRA_LTLIBRARIES= ha_xtradb.la +EXTRA_LTLIBRARIES= libxtradb.la ha_xtradb.la pkgplugin_LTLIBRARIES= @plugin_xtradb_shared_target@ ha_xtradb_la_LDFLAGS= -module -rpath $(pkgplugindir) -L$(top_builddir)/libservices -lmysqlservices ha_xtradb_la_CXXFLAGS= -shared $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS) ha_xtradb_la_CFLAGS= -shared $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS) -ha_xtradb_la_SOURCES= $(libxtradb_a_SOURCES) +ha_xtradb_la_SOURCES= $(libxtradb_la_SOURCES) EXTRA_DIST= CMakeLists.txt plug.in \ pars/make_bison.sh pars/make_flex.sh \ diff --git a/storage/xtradb/include/srv0srv.h b/storage/xtradb/include/srv0srv.h index 8c64d5cee71..f4c9704741c 100644 --- a/storage/xtradb/include/srv0srv.h +++ b/storage/xtradb/include/srv0srv.h @@ -57,8 +57,8 @@ extern const char srv_mysql50_table_name_prefix[9]; thread starts running */ extern os_event_t srv_lock_timeout_thread_event; -/* This event is set to tell the purge thread to shut down */ -extern os_event_t srv_purge_thread_event; +/* This event is set at shutdown to wakeup threads from sleep */ +extern os_event_t srv_shutdown_event; /* If the last data file is auto-extended, we add this many pages to it at a time */ diff --git a/storage/xtradb/log/log0log.c b/storage/xtradb/log/log0log.c index b9f19aeff31..3f14d84ac72 100644 --- a/storage/xtradb/log/log0log.c +++ b/storage/xtradb/log/log0log.c @@ -3102,7 +3102,7 @@ logs_empty_and_mark_files_at_shutdown(void) algorithm only works if the server is idle at shutdown */ srv_shutdown_state = SRV_SHUTDOWN_CLEANUP; - os_event_set(srv_purge_thread_event); + os_event_set(srv_shutdown_event); loop: os_thread_sleep(100000); diff --git a/storage/xtradb/plug.in b/storage/xtradb/plug.in index 37c895fb520..67f25755762 100644 --- a/storage/xtradb/plug.in +++ b/storage/xtradb/plug.in @@ -17,7 +17,7 @@ MYSQL_STORAGE_ENGINE(xtradb, xtradb, [XtraDB Storage Engine], [XtraDB - a drop-in replacement for InnoDB], [max,max-no-ndb]) MYSQL_PLUGIN_DIRECTORY(xtradb, [storage/xtradb]) -MYSQL_PLUGIN_STATIC(xtradb, [libxtradb.a]) +MYSQL_PLUGIN_STATIC(xtradb, [libxtradb.la]) MYSQL_PLUGIN_DYNAMIC(xtradb, [ha_xtradb.la]) MYSQL_PLUGIN_ACTIONS(xtradb, [ with_plugin_innobase=$with_plugin_xtradb # for legacy code in configure.in diff --git a/storage/xtradb/srv/srv0srv.c b/storage/xtradb/srv/srv0srv.c index 43799aab196..35745072445 100644 --- a/storage/xtradb/srv/srv0srv.c +++ b/storage/xtradb/srv/srv0srv.c @@ -704,7 +704,7 @@ UNIV_INTERN srv_slot_t* srv_mysql_table = NULL; UNIV_INTERN os_event_t srv_lock_timeout_thread_event; -UNIV_INTERN os_event_t srv_purge_thread_event; +UNIV_INTERN os_event_t srv_shutdown_event; UNIV_INTERN srv_sys_t* srv_sys = NULL; @@ -1011,7 +1011,7 @@ srv_init(void) } srv_lock_timeout_thread_event = os_event_create(NULL); - srv_purge_thread_event = os_event_create(NULL); + srv_shutdown_event = os_event_create(NULL); for (i = 0; i < SRV_MASTER + 1; i++) { srv_n_threads_active[i] = 0; @@ -2239,7 +2239,7 @@ loop: /* Wake up every 5 seconds to see if we need to print monitor information. */ - os_thread_sleep(5000000); + os_event_wait_time(srv_shutdown_event, 5000000); current_time = time(NULL); @@ -2381,7 +2381,7 @@ loop: /* When someone is waiting for a lock, we wake up every second and check if a timeout has passed for a lock wait */ - os_thread_sleep(1000000); + os_event_wait_time(srv_shutdown_event, 1000000); srv_lock_timeout_active = TRUE; @@ -2546,7 +2546,7 @@ loop: fflush(stderr); - os_thread_sleep(1000000); + os_event_wait_time(srv_shutdown_event, 1000000); if (srv_shutdown_state < SRV_SHUTDOWN_CLEANUP) { @@ -2590,7 +2590,7 @@ srv_LRU_dump_restore_thread( last_dump_time = time(NULL); loop: - os_thread_sleep(5000000); + os_event_wait_time(srv_shutdown_event, 5000000); if (srv_shutdown_state >= SRV_SHUTDOWN_CLEANUP) { goto exit_func; @@ -2754,7 +2754,7 @@ loop: if (!skip_sleep) { - os_thread_sleep(1000000); + os_event_wait_time(srv_shutdown_event, 1000000); srv_main_sleeps++; /* @@ -3340,10 +3340,10 @@ loop: mutex_exit(&kernel_mutex); sleep_ms = 10; - os_event_reset(srv_purge_thread_event); + os_event_reset(srv_shutdown_event); } - os_event_wait_time(srv_purge_thread_event, sleep_ms * 1000); + os_event_wait_time(srv_shutdown_event, sleep_ms * 1000); history_len = trx_sys->rseg_history_len; if (history_len > 1000) |