From 768bbae90eb116349940821a1fb48920291ddd97 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 10 Jun 2009 10:59:49 +0200 Subject: Backport WL#3653 to 5.1 to enable bundled innodb plugin. Remove custom DLL loader code from innodb plugin code, use symbols exported from mysqld. storage/innodb_plugin/handler/ha_innodb.cc: Remove a Win32 workaround for current_thd. The original problem that innodb plugin used value of TLS variable across DLL boundaries is solved in MySQL server (current_thd is a function not TLS variable now) storage/innodb_plugin/handler/handler0alter.cc: Remove custom delay loader storage/innodb_plugin/handler/handler0vars.h: Remove custom delay loader storage/innodb_plugin/handler/i_s.cc: Remove custom delay loader storage/innodb_plugin/handler/win_delay_loader.cc: Remove custom delay loader storage/innodb_plugin/plug.in: Remove commented out MYSQL_PLUGIN_STATIC, CMake would not parse that correctly --- storage/heap/CMakeLists.txt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'storage/heap') diff --git a/storage/heap/CMakeLists.txt b/storage/heap/CMakeLists.txt index f8f0aa91464..c2d2cd1290f 100755 --- a/storage/heap/CMakeLists.txt +++ b/storage/heap/CMakeLists.txt @@ -16,18 +16,10 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib - ${CMAKE_SOURCE_DIR}/sql - ${CMAKE_SOURCE_DIR}/regex - ${CMAKE_SOURCE_DIR}/extra/yassl/include) - +INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") SET(HEAP_SOURCES _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create.c ha_heap.cc hp_delete.c hp_extra.c hp_hash.c hp_info.c hp_open.c hp_panic.c hp_rename.c hp_rfirst.c hp_rkey.c hp_rlast.c hp_rnext.c hp_rprev.c hp_rrnd.c hp_rsame.c hp_scan.c hp_static.c hp_update.c hp_write.c) - -IF(NOT SOURCE_SUBLIBS) - ADD_LIBRARY(heap ${HEAP_SOURCES}) - ADD_DEPENDENCIES(heap GenError) -ENDIF(NOT SOURCE_SUBLIBS) +MYSQL_STORAGE_ENGINE(HEAP) -- cgit v1.2.1 From 02e70f1691bdbd9001e4d17b69606624f1f1fa39 Mon Sep 17 00:00:00 2001 From: Satya B Date: Wed, 8 Jul 2009 17:41:34 +0530 Subject: Bug#35111 - Truncate a MyISAM partitioned table does not reset the auto_increment value This is an alternative patch that instead of allowing RECREATE TABLE on TRUNCATE TABLE it implements reset_auto_increment that is called after delete_all_rows. Note: this bug was fixed by Mattias Jonsson: Pusing this patch: http://lists.mysql.com/commits/70370 mysql-test/suite/parts/r/partition_auto_increment_memory.result: Bug#35111: Truncate a MyISAM partitioned table does not reset the auto_increment value mysql-test/suite/parts/r/partition_auto_increment_myisam.result: Bug#35111: Truncate a MyISAM partitioned table does not reset the auto_increment value sql/ha_partition.cc: Bug#35111: Truncate a MyISAM partitioned table does not reset the auto_increment value Added reset_auto_increment, to be used after delete_all_rows to simulate truncate. storage/heap/ha_heap.cc: Bug#35111: Truncate a MyISAM partitioned table does not reset the auto_increment value Added reset_auto_increment, to be used after delete_all_rows to simulate truncate storage/heap/ha_heap.h: Bug#35111: Truncate a MyISAM partitioned table does not reset the auto_increment value Added reset_auto_increment, to be used after delete_all_rows to simulate truncate storage/myisam/ha_myisam.cc: Bug#35111: Truncate a MyISAM partitioned table does not reset the auto_increment value Added reset_auto_increment, to be used after delete_all_rows to simulate truncate. storage/myisam/ha_myisam.h: Bug#35111: Truncate a MyISAM partitioned table does not reset the auto_increment value Added reset_auto_increment, to be used after delete_all_rows to simulate truncate. --- storage/heap/ha_heap.cc | 8 ++++++++ storage/heap/ha_heap.h | 1 + 2 files changed, 9 insertions(+) (limited to 'storage/heap') diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index 19863d83874..fb7c13e4e41 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -419,6 +419,14 @@ int ha_heap::delete_all_rows() return 0; } + +int ha_heap::reset_auto_increment(ulonglong value) +{ + file->s->auto_increment= value; + return 0; +} + + int ha_heap::external_lock(THD *thd, int lock_type) { return 0; // No external locking diff --git a/storage/heap/ha_heap.h b/storage/heap/ha_heap.h index 5c5ad43658e..22722129f4c 100644 --- a/storage/heap/ha_heap.h +++ b/storage/heap/ha_heap.h @@ -98,6 +98,7 @@ public: int reset(); int external_lock(THD *thd, int lock_type); int delete_all_rows(void); + int reset_auto_increment(ulonglong value); int disable_indexes(uint mode); int enable_indexes(uint mode); int indexes_are_disabled(void); -- cgit v1.2.1