diff options
author | Jan Lindström <jplindst@mariadb.org> | 2015-01-19 12:39:17 +0200 |
---|---|---|
committer | Jan Lindström <jplindst@mariadb.org> | 2015-01-19 12:39:17 +0200 |
commit | 2877c5ecc22ab0323ab86ce548a81909d7c865c8 (patch) | |
tree | 57dc4082002845ddc14b7bc01d4eb336f6ed11cf /extra/CMakeLists.txt | |
parent | 7cb4a1c61f3327dbb86b6160ec2421bf827cea20 (diff) | |
download | mariadb-git-2877c5ecc22ab0323ab86ce548a81909d7c865c8.tar.gz |
MDEV-7477: Make innochecksum work on compressed tables
This patch ports the work that facebook has performed
to make innochecksum handle compressed tables.
the basic idea is to use actual innodb-code to perform
checksum verification rather than duplicating in innochecksum.cc.
to make this work, innodb code has been annotated with
lots of #ifndef UNIV_INNOCHECKSUM so that it can be
compiled outside of storage/innobase.
A new testcase is also added that verifies that innochecksum
works on compressed/non-compressed tables.
Merged from commit fabc79d2ea976c4ff5b79bfe913e6bc03ef69d42
from https://code.google.com/p/google-mysql/
The actual steps to produce this patch are:
take innochecksum from 5.6.14
apply changes in innodb from facebook patches needed to make innochecksum compile
apply changes in innochecksum from facebook patches
add handcrafted testcase
The referenced facebook patches used are:
https://github.com/facebook/mysql-5.6/commit/91e25120e75272db4cdbc07d0e45877d9dea5715
https://github.com/facebook/mysql-5.6/commit/847fe76ea5239b09fa361b023c56e6be76d32046
https://github.com/facebook/mysql-5.6/commit/1135628a5a9b3412621b93233478f3804bcef51a
https://github.com/facebook/mysql-5.6/commit/4dbf7c240ce2f08b7d6572d9452c9779ce90641c
Diffstat (limited to 'extra/CMakeLists.txt')
-rw-r--r-- | extra/CMakeLists.txt | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index f8f71b00743..585b5aef6f6 100644 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -75,11 +75,29 @@ ENDIF() MYSQL_ADD_EXECUTABLE(replace replace.c COMPONENT Server) TARGET_LINK_LIBRARIES(replace mysys) IF(UNIX) - MYSQL_ADD_EXECUTABLE(innochecksum innochecksum.c) - MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c) TARGET_LINK_LIBRARIES(resolve_stack_dump mysys) MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c COMPONENT Client) TARGET_LINK_LIBRARIES(mysql_waitpid mysys) ENDIF() + + + # Add path to the InnoDB headers + INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR}/storage/innobase/include + ${CMAKE_SOURCE_DIR}/sql) + + # We use the InnoDB code directly in case the code changes. + ADD_DEFINITIONS("-DUNIV_INNOCHECKSUM") + SET(INNOBASE_SOURCES + ../storage/innobase/buf/buf0checksum.cc + ../storage/innobase/ut/ut0crc32.cc + ../storage/innobase/ut/ut0ut.cc + ../storage/innobase/page/page0zip.cc + ) + + MYSQL_ADD_EXECUTABLE(innochecksum innochecksum.cc ${INNOBASE_SOURCES}) + TARGET_LINK_LIBRARIES(innochecksum mysys mysys_ssl) + ADD_DEPENDENCIES(innochecksum GenError) + |