You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1380 lines
33 KiB

WL #2604: Partition Management Optimised version of ADD/DROP/REORGANIZE partitions for non-NDB storage engines. New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions Quite a few bug fixes include/thr_lock.h: New method to downgrade locks from TL_WRITE_ONLY Possibility to upgrade lock while aborting locks mysql-test/r/ndb_autodiscover.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_bitfield.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_gis.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_partition_key.result: New test case mysql-test/r/partition.result: New test case mysql-test/r/partition_error.result: New test case mysql-test/r/partition_mgm_err.result: Fix of test case results mysql-test/t/disabled.def: partition_03ndb still has bug mysql-test/t/ndb_partition_key.test: New test cases for new functionality and bugs mysql-test/t/partition.test: New test cases for new functionality and bugs mysql-test/t/partition_error.test: New test cases for new functionality and bugs mysql-test/t/partition_mgm_err.test: New test cases for new functionality and bugs mysys/thr_lock.c: New method to downgrade TL_WRITE_ONLY locks Possibility to specify if locks are to be upgraded at abort locks sql/ha_archive.cc: New handlerton methods sql/ha_berkeley.cc: New handlerton methods sql/ha_blackhole.cc: New handlerton methods sql/ha_federated.cc: New handlerton methods sql/ha_heap.cc: New handlerton methods sql/ha_innodb.cc: New handlerton methods sql/ha_myisam.cc: New handlerton methods sql/ha_myisammrg.cc: New handlerton methods sql/ha_ndbcluster.cc: New handlerton methods Moved out packfrm and unpackfrm methods Adapted many parts to use table_share instead of table->s Ensured that .ndb file uses filename and not tablename according to new encoding of names (WL 1324) All NDB tables are partitioned and set up partition info Fixed such that tablenames use tablenames and not filenames in NDB NDB uses auto partitioning for ENGINE=NDB tables Warning for very large tables Set RANGE data Set LIST data New method to set-up partition info Set Default number of partitions flag Set linear hash flag Set node group array Set number of fragments Set max rows Set tablespace names New method to get number of partitions of table to use at open table sql/ha_ndbcluster.h: Removed partition_flags and alter_table_flags from handler class A couple of new and changed method headers sql/ha_ndbcluster_binlog.cc: Use new method headers sql/ha_partition.cc: New handlerton methods Lots of new function headers Use #P# as separator between table name and partition name and #SP# as separator between partition name and subpartition name Use filename encoding for files both of table name part and of partition name parts New method to drop partitions based on partition state New method to rename partitions based on partition state New methods to optimize, analyze, check and repair partitions New methods to optimize, analyze, check and repair table Helper method to create new partition, open it and external lock it, not needed to lock it internally since no one else knows about it yet. Cleanup method at error for new partitions New methods to perform bulk of work at ADD/REORGANIZE partitions (change_partitions, copy_partitions) sql/ha_partition.h: New methods and variables A few dropped ones and a few changed ones sql/handler.cc: Handlerton interface changes New flag to open_table_from_share sql/handler.h: New alter_table_flags New partition flags New partition states More states for default handling Lots of new, dropped and changed interfaces sql/lex.h: Added REBUILD and changed name of REORGANISE to REORGANIZE sql/lock.cc: Method to downgrade locks Able to specify if locks upgraded on abort locks sql/log.cc: New handlerton methods sql/mysql_priv.h: Lots of new interfaces sql/share/errmsg.txt: Lots of new, dropped and changed error messages sql/sql_base.cc: Adapted to new method headers New method to abort and upgrade lock New method to close open tables and downgrade lock New method to wait for completed table sql/sql_lex.h: New flags sql/sql_partition.cc: Return int instead of bool in get_partition_id More defaults handling Make use of new mem_alloc_error method More work on function headers Changes to generate partition syntax to cater for intermediate partition states Lots of new code with large comments describing new features for Partition Management: ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions sql/sql_show.cc: Minors sql/sql_table.cc: Moved a couple of methods New methods to copy create lists and key lists for use with mysql_prepare_table New method to write frm file New handling of handlers with auto partitioning Fix CREATE TABLE LIKE Moved code for ADD/DROP/REORGANIZE partitions Use handlerton method for alter_table_flags sql/sql_yacc.yy: More memory alloc error checks New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions sql/table.cc: Fix length of extra part to be 4 bytes Partition state introduced in frm file sql/table.h: Partition state introduced sql/unireg.cc: Partition state introduced Default partition storage/csv/ha_tina.cc: New handlerton methods storage/example/ha_example.cc: New handlerton methods storage/ndb/include/kernel/ndb_limits.h: RANGE DATA storage/ndb/include/kernel/signaldata/AlterTable.hpp: New interfaces in ALTER TABLE towards NDB kernel storage/ndb/include/kernel/signaldata/DiAddTab.hpp: New section storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Lots of new parts of table description storage/ndb/include/kernel/signaldata/LqhFrag.hpp: tablespace id specified in LQHFRAGREQ storage/ndb/include/ndbapi/NdbDictionary.hpp: Lots of new methods in NDB dictionary storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: New error insertion storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: a few extra jam's storage/ndb/src/ndbapi/NdbBlob.cpp: Changes to definition of blob tables storage/ndb/src/ndbapi/NdbDictionary.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Lots of new stuff in NDB dictionary storage/ndb/test/ndbapi/test_event.cpp: removed use of methods no longer in existence storage/ndb/tools/restore/Restore.cpp: Renamed variable
20 years ago
20 years ago
BUG#16002: Make partition functions that are unsigned work properly mysql-test/r/partition.result: A number of new test cases for unsigned partition functions mysql-test/r/partition_error.result: A number of new test cases for unsigned partition functions mysql-test/r/partition_range.result: A number of new test cases for unsigned partition functions mysql-test/t/partition.test: A number of new test cases for unsigned partition functions mysql-test/t/partition_error.test: A number of new test cases for unsigned partition functions mysql-test/t/partition_range.test: A number of new test cases for unsigned partition functions sql/ha_partition.cc: Error message for no partition found needs to take signed/unsigned into account when printing erroneus value sql/partition_element.h: Introduced signed_flag and max_value flag on partition elements Also list is now a list of a struct rather than simply longlong values Small rearranges of order sql/partition_info.cc: Introduced signed_flag and max_value flag on partition elements Also list is now a list of a struct rather than simply longlong values Small rearranges of order Lots of new code to handle checks of proper definition of table when partition function is unsigned sql/partition_info.h: Mostly rearrangement of code and some addition of a THD object in check_partition_info call plus a new method for comparing unsigned values sql/share/errmsg.txt: Negative values not ok for unsigned partition functions sql/sql_partition.cc: Fixed a multi-thread bug (when defining several partitioned tables in parallel) New code to generate partition syntax that takes into account sign of constants. Made function fix_fields_part_func more reusable. Fixed a number of get_partition_id functions for range and list and similar functions for partition pruning code. Unfortunately fairly much duplication of code with just small changes. sql/sql_partition.h: New function headers sql/sql_show.cc: Changed list of values for LIST partitioned tables Also fixed printing of unsigned values in INFORMATION SCHEMA for partitioned table sql/sql_table.cc: Fixed for new interface sql/sql_yacc.yy: Moved definition of struct to partition_element.h Added code to keep track of sign of constants in RANGE and LIST partitions sql/table.cc: Fixed for new interface
20 years ago
WL #2604: Partition Management Optimised version of ADD/DROP/REORGANIZE partitions for non-NDB storage engines. New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions Quite a few bug fixes include/thr_lock.h: New method to downgrade locks from TL_WRITE_ONLY Possibility to upgrade lock while aborting locks mysql-test/r/ndb_autodiscover.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_bitfield.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_gis.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_partition_key.result: New test case mysql-test/r/partition.result: New test case mysql-test/r/partition_error.result: New test case mysql-test/r/partition_mgm_err.result: Fix of test case results mysql-test/t/disabled.def: partition_03ndb still has bug mysql-test/t/ndb_partition_key.test: New test cases for new functionality and bugs mysql-test/t/partition.test: New test cases for new functionality and bugs mysql-test/t/partition_error.test: New test cases for new functionality and bugs mysql-test/t/partition_mgm_err.test: New test cases for new functionality and bugs mysys/thr_lock.c: New method to downgrade TL_WRITE_ONLY locks Possibility to specify if locks are to be upgraded at abort locks sql/ha_archive.cc: New handlerton methods sql/ha_berkeley.cc: New handlerton methods sql/ha_blackhole.cc: New handlerton methods sql/ha_federated.cc: New handlerton methods sql/ha_heap.cc: New handlerton methods sql/ha_innodb.cc: New handlerton methods sql/ha_myisam.cc: New handlerton methods sql/ha_myisammrg.cc: New handlerton methods sql/ha_ndbcluster.cc: New handlerton methods Moved out packfrm and unpackfrm methods Adapted many parts to use table_share instead of table->s Ensured that .ndb file uses filename and not tablename according to new encoding of names (WL 1324) All NDB tables are partitioned and set up partition info Fixed such that tablenames use tablenames and not filenames in NDB NDB uses auto partitioning for ENGINE=NDB tables Warning for very large tables Set RANGE data Set LIST data New method to set-up partition info Set Default number of partitions flag Set linear hash flag Set node group array Set number of fragments Set max rows Set tablespace names New method to get number of partitions of table to use at open table sql/ha_ndbcluster.h: Removed partition_flags and alter_table_flags from handler class A couple of new and changed method headers sql/ha_ndbcluster_binlog.cc: Use new method headers sql/ha_partition.cc: New handlerton methods Lots of new function headers Use #P# as separator between table name and partition name and #SP# as separator between partition name and subpartition name Use filename encoding for files both of table name part and of partition name parts New method to drop partitions based on partition state New method to rename partitions based on partition state New methods to optimize, analyze, check and repair partitions New methods to optimize, analyze, check and repair table Helper method to create new partition, open it and external lock it, not needed to lock it internally since no one else knows about it yet. Cleanup method at error for new partitions New methods to perform bulk of work at ADD/REORGANIZE partitions (change_partitions, copy_partitions) sql/ha_partition.h: New methods and variables A few dropped ones and a few changed ones sql/handler.cc: Handlerton interface changes New flag to open_table_from_share sql/handler.h: New alter_table_flags New partition flags New partition states More states for default handling Lots of new, dropped and changed interfaces sql/lex.h: Added REBUILD and changed name of REORGANISE to REORGANIZE sql/lock.cc: Method to downgrade locks Able to specify if locks upgraded on abort locks sql/log.cc: New handlerton methods sql/mysql_priv.h: Lots of new interfaces sql/share/errmsg.txt: Lots of new, dropped and changed error messages sql/sql_base.cc: Adapted to new method headers New method to abort and upgrade lock New method to close open tables and downgrade lock New method to wait for completed table sql/sql_lex.h: New flags sql/sql_partition.cc: Return int instead of bool in get_partition_id More defaults handling Make use of new mem_alloc_error method More work on function headers Changes to generate partition syntax to cater for intermediate partition states Lots of new code with large comments describing new features for Partition Management: ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions sql/sql_show.cc: Minors sql/sql_table.cc: Moved a couple of methods New methods to copy create lists and key lists for use with mysql_prepare_table New method to write frm file New handling of handlers with auto partitioning Fix CREATE TABLE LIKE Moved code for ADD/DROP/REORGANIZE partitions Use handlerton method for alter_table_flags sql/sql_yacc.yy: More memory alloc error checks New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions sql/table.cc: Fix length of extra part to be 4 bytes Partition state introduced in frm file sql/table.h: Partition state introduced sql/unireg.cc: Partition state introduced Default partition storage/csv/ha_tina.cc: New handlerton methods storage/example/ha_example.cc: New handlerton methods storage/ndb/include/kernel/ndb_limits.h: RANGE DATA storage/ndb/include/kernel/signaldata/AlterTable.hpp: New interfaces in ALTER TABLE towards NDB kernel storage/ndb/include/kernel/signaldata/DiAddTab.hpp: New section storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Lots of new parts of table description storage/ndb/include/kernel/signaldata/LqhFrag.hpp: tablespace id specified in LQHFRAGREQ storage/ndb/include/ndbapi/NdbDictionary.hpp: Lots of new methods in NDB dictionary storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: New error insertion storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: a few extra jam's storage/ndb/src/ndbapi/NdbBlob.cpp: Changes to definition of blob tables storage/ndb/src/ndbapi/NdbDictionary.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Lots of new stuff in NDB dictionary storage/ndb/test/ndbapi/test_event.cpp: removed use of methods no longer in existence storage/ndb/tools/restore/Restore.cpp: Renamed variable
20 years ago
WL #2604: Partition Management Optimised version of ADD/DROP/REORGANIZE partitions for non-NDB storage engines. New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions Quite a few bug fixes include/thr_lock.h: New method to downgrade locks from TL_WRITE_ONLY Possibility to upgrade lock while aborting locks mysql-test/r/ndb_autodiscover.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_bitfield.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_gis.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_partition_key.result: New test case mysql-test/r/partition.result: New test case mysql-test/r/partition_error.result: New test case mysql-test/r/partition_mgm_err.result: Fix of test case results mysql-test/t/disabled.def: partition_03ndb still has bug mysql-test/t/ndb_partition_key.test: New test cases for new functionality and bugs mysql-test/t/partition.test: New test cases for new functionality and bugs mysql-test/t/partition_error.test: New test cases for new functionality and bugs mysql-test/t/partition_mgm_err.test: New test cases for new functionality and bugs mysys/thr_lock.c: New method to downgrade TL_WRITE_ONLY locks Possibility to specify if locks are to be upgraded at abort locks sql/ha_archive.cc: New handlerton methods sql/ha_berkeley.cc: New handlerton methods sql/ha_blackhole.cc: New handlerton methods sql/ha_federated.cc: New handlerton methods sql/ha_heap.cc: New handlerton methods sql/ha_innodb.cc: New handlerton methods sql/ha_myisam.cc: New handlerton methods sql/ha_myisammrg.cc: New handlerton methods sql/ha_ndbcluster.cc: New handlerton methods Moved out packfrm and unpackfrm methods Adapted many parts to use table_share instead of table->s Ensured that .ndb file uses filename and not tablename according to new encoding of names (WL 1324) All NDB tables are partitioned and set up partition info Fixed such that tablenames use tablenames and not filenames in NDB NDB uses auto partitioning for ENGINE=NDB tables Warning for very large tables Set RANGE data Set LIST data New method to set-up partition info Set Default number of partitions flag Set linear hash flag Set node group array Set number of fragments Set max rows Set tablespace names New method to get number of partitions of table to use at open table sql/ha_ndbcluster.h: Removed partition_flags and alter_table_flags from handler class A couple of new and changed method headers sql/ha_ndbcluster_binlog.cc: Use new method headers sql/ha_partition.cc: New handlerton methods Lots of new function headers Use #P# as separator between table name and partition name and #SP# as separator between partition name and subpartition name Use filename encoding for files both of table name part and of partition name parts New method to drop partitions based on partition state New method to rename partitions based on partition state New methods to optimize, analyze, check and repair partitions New methods to optimize, analyze, check and repair table Helper method to create new partition, open it and external lock it, not needed to lock it internally since no one else knows about it yet. Cleanup method at error for new partitions New methods to perform bulk of work at ADD/REORGANIZE partitions (change_partitions, copy_partitions) sql/ha_partition.h: New methods and variables A few dropped ones and a few changed ones sql/handler.cc: Handlerton interface changes New flag to open_table_from_share sql/handler.h: New alter_table_flags New partition flags New partition states More states for default handling Lots of new, dropped and changed interfaces sql/lex.h: Added REBUILD and changed name of REORGANISE to REORGANIZE sql/lock.cc: Method to downgrade locks Able to specify if locks upgraded on abort locks sql/log.cc: New handlerton methods sql/mysql_priv.h: Lots of new interfaces sql/share/errmsg.txt: Lots of new, dropped and changed error messages sql/sql_base.cc: Adapted to new method headers New method to abort and upgrade lock New method to close open tables and downgrade lock New method to wait for completed table sql/sql_lex.h: New flags sql/sql_partition.cc: Return int instead of bool in get_partition_id More defaults handling Make use of new mem_alloc_error method More work on function headers Changes to generate partition syntax to cater for intermediate partition states Lots of new code with large comments describing new features for Partition Management: ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions sql/sql_show.cc: Minors sql/sql_table.cc: Moved a couple of methods New methods to copy create lists and key lists for use with mysql_prepare_table New method to write frm file New handling of handlers with auto partitioning Fix CREATE TABLE LIKE Moved code for ADD/DROP/REORGANIZE partitions Use handlerton method for alter_table_flags sql/sql_yacc.yy: More memory alloc error checks New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions sql/table.cc: Fix length of extra part to be 4 bytes Partition state introduced in frm file sql/table.h: Partition state introduced sql/unireg.cc: Partition state introduced Default partition storage/csv/ha_tina.cc: New handlerton methods storage/example/ha_example.cc: New handlerton methods storage/ndb/include/kernel/ndb_limits.h: RANGE DATA storage/ndb/include/kernel/signaldata/AlterTable.hpp: New interfaces in ALTER TABLE towards NDB kernel storage/ndb/include/kernel/signaldata/DiAddTab.hpp: New section storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Lots of new parts of table description storage/ndb/include/kernel/signaldata/LqhFrag.hpp: tablespace id specified in LQHFRAGREQ storage/ndb/include/ndbapi/NdbDictionary.hpp: Lots of new methods in NDB dictionary storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: New error insertion storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: a few extra jam's storage/ndb/src/ndbapi/NdbBlob.cpp: Changes to definition of blob tables storage/ndb/src/ndbapi/NdbDictionary.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Lots of new stuff in NDB dictionary storage/ndb/test/ndbapi/test_event.cpp: removed use of methods no longer in existence storage/ndb/tools/restore/Restore.cpp: Renamed variable
20 years ago
WL #2604: Partition Management Optimised version of ADD/DROP/REORGANIZE partitions for non-NDB storage engines. New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions Quite a few bug fixes include/thr_lock.h: New method to downgrade locks from TL_WRITE_ONLY Possibility to upgrade lock while aborting locks mysql-test/r/ndb_autodiscover.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_bitfield.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_gis.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_partition_key.result: New test case mysql-test/r/partition.result: New test case mysql-test/r/partition_error.result: New test case mysql-test/r/partition_mgm_err.result: Fix of test case results mysql-test/t/disabled.def: partition_03ndb still has bug mysql-test/t/ndb_partition_key.test: New test cases for new functionality and bugs mysql-test/t/partition.test: New test cases for new functionality and bugs mysql-test/t/partition_error.test: New test cases for new functionality and bugs mysql-test/t/partition_mgm_err.test: New test cases for new functionality and bugs mysys/thr_lock.c: New method to downgrade TL_WRITE_ONLY locks Possibility to specify if locks are to be upgraded at abort locks sql/ha_archive.cc: New handlerton methods sql/ha_berkeley.cc: New handlerton methods sql/ha_blackhole.cc: New handlerton methods sql/ha_federated.cc: New handlerton methods sql/ha_heap.cc: New handlerton methods sql/ha_innodb.cc: New handlerton methods sql/ha_myisam.cc: New handlerton methods sql/ha_myisammrg.cc: New handlerton methods sql/ha_ndbcluster.cc: New handlerton methods Moved out packfrm and unpackfrm methods Adapted many parts to use table_share instead of table->s Ensured that .ndb file uses filename and not tablename according to new encoding of names (WL 1324) All NDB tables are partitioned and set up partition info Fixed such that tablenames use tablenames and not filenames in NDB NDB uses auto partitioning for ENGINE=NDB tables Warning for very large tables Set RANGE data Set LIST data New method to set-up partition info Set Default number of partitions flag Set linear hash flag Set node group array Set number of fragments Set max rows Set tablespace names New method to get number of partitions of table to use at open table sql/ha_ndbcluster.h: Removed partition_flags and alter_table_flags from handler class A couple of new and changed method headers sql/ha_ndbcluster_binlog.cc: Use new method headers sql/ha_partition.cc: New handlerton methods Lots of new function headers Use #P# as separator between table name and partition name and #SP# as separator between partition name and subpartition name Use filename encoding for files both of table name part and of partition name parts New method to drop partitions based on partition state New method to rename partitions based on partition state New methods to optimize, analyze, check and repair partitions New methods to optimize, analyze, check and repair table Helper method to create new partition, open it and external lock it, not needed to lock it internally since no one else knows about it yet. Cleanup method at error for new partitions New methods to perform bulk of work at ADD/REORGANIZE partitions (change_partitions, copy_partitions) sql/ha_partition.h: New methods and variables A few dropped ones and a few changed ones sql/handler.cc: Handlerton interface changes New flag to open_table_from_share sql/handler.h: New alter_table_flags New partition flags New partition states More states for default handling Lots of new, dropped and changed interfaces sql/lex.h: Added REBUILD and changed name of REORGANISE to REORGANIZE sql/lock.cc: Method to downgrade locks Able to specify if locks upgraded on abort locks sql/log.cc: New handlerton methods sql/mysql_priv.h: Lots of new interfaces sql/share/errmsg.txt: Lots of new, dropped and changed error messages sql/sql_base.cc: Adapted to new method headers New method to abort and upgrade lock New method to close open tables and downgrade lock New method to wait for completed table sql/sql_lex.h: New flags sql/sql_partition.cc: Return int instead of bool in get_partition_id More defaults handling Make use of new mem_alloc_error method More work on function headers Changes to generate partition syntax to cater for intermediate partition states Lots of new code with large comments describing new features for Partition Management: ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions sql/sql_show.cc: Minors sql/sql_table.cc: Moved a couple of methods New methods to copy create lists and key lists for use with mysql_prepare_table New method to write frm file New handling of handlers with auto partitioning Fix CREATE TABLE LIKE Moved code for ADD/DROP/REORGANIZE partitions Use handlerton method for alter_table_flags sql/sql_yacc.yy: More memory alloc error checks New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions sql/table.cc: Fix length of extra part to be 4 bytes Partition state introduced in frm file sql/table.h: Partition state introduced sql/unireg.cc: Partition state introduced Default partition storage/csv/ha_tina.cc: New handlerton methods storage/example/ha_example.cc: New handlerton methods storage/ndb/include/kernel/ndb_limits.h: RANGE DATA storage/ndb/include/kernel/signaldata/AlterTable.hpp: New interfaces in ALTER TABLE towards NDB kernel storage/ndb/include/kernel/signaldata/DiAddTab.hpp: New section storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Lots of new parts of table description storage/ndb/include/kernel/signaldata/LqhFrag.hpp: tablespace id specified in LQHFRAGREQ storage/ndb/include/ndbapi/NdbDictionary.hpp: Lots of new methods in NDB dictionary storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: New error insertion storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: a few extra jam's storage/ndb/src/ndbapi/NdbBlob.cpp: Changes to definition of blob tables storage/ndb/src/ndbapi/NdbDictionary.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Lots of new stuff in NDB dictionary storage/ndb/test/ndbapi/test_event.cpp: removed use of methods no longer in existence storage/ndb/tools/restore/Restore.cpp: Renamed variable
20 years ago
WL #2604: Partition Management Optimised version of ADD/DROP/REORGANIZE partitions for non-NDB storage engines. New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions Quite a few bug fixes include/thr_lock.h: New method to downgrade locks from TL_WRITE_ONLY Possibility to upgrade lock while aborting locks mysql-test/r/ndb_autodiscover.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_bitfield.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_gis.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_partition_key.result: New test case mysql-test/r/partition.result: New test case mysql-test/r/partition_error.result: New test case mysql-test/r/partition_mgm_err.result: Fix of test case results mysql-test/t/disabled.def: partition_03ndb still has bug mysql-test/t/ndb_partition_key.test: New test cases for new functionality and bugs mysql-test/t/partition.test: New test cases for new functionality and bugs mysql-test/t/partition_error.test: New test cases for new functionality and bugs mysql-test/t/partition_mgm_err.test: New test cases for new functionality and bugs mysys/thr_lock.c: New method to downgrade TL_WRITE_ONLY locks Possibility to specify if locks are to be upgraded at abort locks sql/ha_archive.cc: New handlerton methods sql/ha_berkeley.cc: New handlerton methods sql/ha_blackhole.cc: New handlerton methods sql/ha_federated.cc: New handlerton methods sql/ha_heap.cc: New handlerton methods sql/ha_innodb.cc: New handlerton methods sql/ha_myisam.cc: New handlerton methods sql/ha_myisammrg.cc: New handlerton methods sql/ha_ndbcluster.cc: New handlerton methods Moved out packfrm and unpackfrm methods Adapted many parts to use table_share instead of table->s Ensured that .ndb file uses filename and not tablename according to new encoding of names (WL 1324) All NDB tables are partitioned and set up partition info Fixed such that tablenames use tablenames and not filenames in NDB NDB uses auto partitioning for ENGINE=NDB tables Warning for very large tables Set RANGE data Set LIST data New method to set-up partition info Set Default number of partitions flag Set linear hash flag Set node group array Set number of fragments Set max rows Set tablespace names New method to get number of partitions of table to use at open table sql/ha_ndbcluster.h: Removed partition_flags and alter_table_flags from handler class A couple of new and changed method headers sql/ha_ndbcluster_binlog.cc: Use new method headers sql/ha_partition.cc: New handlerton methods Lots of new function headers Use #P# as separator between table name and partition name and #SP# as separator between partition name and subpartition name Use filename encoding for files both of table name part and of partition name parts New method to drop partitions based on partition state New method to rename partitions based on partition state New methods to optimize, analyze, check and repair partitions New methods to optimize, analyze, check and repair table Helper method to create new partition, open it and external lock it, not needed to lock it internally since no one else knows about it yet. Cleanup method at error for new partitions New methods to perform bulk of work at ADD/REORGANIZE partitions (change_partitions, copy_partitions) sql/ha_partition.h: New methods and variables A few dropped ones and a few changed ones sql/handler.cc: Handlerton interface changes New flag to open_table_from_share sql/handler.h: New alter_table_flags New partition flags New partition states More states for default handling Lots of new, dropped and changed interfaces sql/lex.h: Added REBUILD and changed name of REORGANISE to REORGANIZE sql/lock.cc: Method to downgrade locks Able to specify if locks upgraded on abort locks sql/log.cc: New handlerton methods sql/mysql_priv.h: Lots of new interfaces sql/share/errmsg.txt: Lots of new, dropped and changed error messages sql/sql_base.cc: Adapted to new method headers New method to abort and upgrade lock New method to close open tables and downgrade lock New method to wait for completed table sql/sql_lex.h: New flags sql/sql_partition.cc: Return int instead of bool in get_partition_id More defaults handling Make use of new mem_alloc_error method More work on function headers Changes to generate partition syntax to cater for intermediate partition states Lots of new code with large comments describing new features for Partition Management: ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions sql/sql_show.cc: Minors sql/sql_table.cc: Moved a couple of methods New methods to copy create lists and key lists for use with mysql_prepare_table New method to write frm file New handling of handlers with auto partitioning Fix CREATE TABLE LIKE Moved code for ADD/DROP/REORGANIZE partitions Use handlerton method for alter_table_flags sql/sql_yacc.yy: More memory alloc error checks New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions sql/table.cc: Fix length of extra part to be 4 bytes Partition state introduced in frm file sql/table.h: Partition state introduced sql/unireg.cc: Partition state introduced Default partition storage/csv/ha_tina.cc: New handlerton methods storage/example/ha_example.cc: New handlerton methods storage/ndb/include/kernel/ndb_limits.h: RANGE DATA storage/ndb/include/kernel/signaldata/AlterTable.hpp: New interfaces in ALTER TABLE towards NDB kernel storage/ndb/include/kernel/signaldata/DiAddTab.hpp: New section storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Lots of new parts of table description storage/ndb/include/kernel/signaldata/LqhFrag.hpp: tablespace id specified in LQHFRAGREQ storage/ndb/include/ndbapi/NdbDictionary.hpp: Lots of new methods in NDB dictionary storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: New error insertion storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: a few extra jam's storage/ndb/src/ndbapi/NdbBlob.cpp: Changes to definition of blob tables storage/ndb/src/ndbapi/NdbDictionary.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Lots of new stuff in NDB dictionary storage/ndb/test/ndbapi/test_event.cpp: removed use of methods no longer in existence storage/ndb/tools/restore/Restore.cpp: Renamed variable
20 years ago
WL #2604: Partition Management Optimised version of ADD/DROP/REORGANIZE partitions for non-NDB storage engines. New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions Quite a few bug fixes include/thr_lock.h: New method to downgrade locks from TL_WRITE_ONLY Possibility to upgrade lock while aborting locks mysql-test/r/ndb_autodiscover.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_bitfield.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_gis.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_partition_key.result: New test case mysql-test/r/partition.result: New test case mysql-test/r/partition_error.result: New test case mysql-test/r/partition_mgm_err.result: Fix of test case results mysql-test/t/disabled.def: partition_03ndb still has bug mysql-test/t/ndb_partition_key.test: New test cases for new functionality and bugs mysql-test/t/partition.test: New test cases for new functionality and bugs mysql-test/t/partition_error.test: New test cases for new functionality and bugs mysql-test/t/partition_mgm_err.test: New test cases for new functionality and bugs mysys/thr_lock.c: New method to downgrade TL_WRITE_ONLY locks Possibility to specify if locks are to be upgraded at abort locks sql/ha_archive.cc: New handlerton methods sql/ha_berkeley.cc: New handlerton methods sql/ha_blackhole.cc: New handlerton methods sql/ha_federated.cc: New handlerton methods sql/ha_heap.cc: New handlerton methods sql/ha_innodb.cc: New handlerton methods sql/ha_myisam.cc: New handlerton methods sql/ha_myisammrg.cc: New handlerton methods sql/ha_ndbcluster.cc: New handlerton methods Moved out packfrm and unpackfrm methods Adapted many parts to use table_share instead of table->s Ensured that .ndb file uses filename and not tablename according to new encoding of names (WL 1324) All NDB tables are partitioned and set up partition info Fixed such that tablenames use tablenames and not filenames in NDB NDB uses auto partitioning for ENGINE=NDB tables Warning for very large tables Set RANGE data Set LIST data New method to set-up partition info Set Default number of partitions flag Set linear hash flag Set node group array Set number of fragments Set max rows Set tablespace names New method to get number of partitions of table to use at open table sql/ha_ndbcluster.h: Removed partition_flags and alter_table_flags from handler class A couple of new and changed method headers sql/ha_ndbcluster_binlog.cc: Use new method headers sql/ha_partition.cc: New handlerton methods Lots of new function headers Use #P# as separator between table name and partition name and #SP# as separator between partition name and subpartition name Use filename encoding for files both of table name part and of partition name parts New method to drop partitions based on partition state New method to rename partitions based on partition state New methods to optimize, analyze, check and repair partitions New methods to optimize, analyze, check and repair table Helper method to create new partition, open it and external lock it, not needed to lock it internally since no one else knows about it yet. Cleanup method at error for new partitions New methods to perform bulk of work at ADD/REORGANIZE partitions (change_partitions, copy_partitions) sql/ha_partition.h: New methods and variables A few dropped ones and a few changed ones sql/handler.cc: Handlerton interface changes New flag to open_table_from_share sql/handler.h: New alter_table_flags New partition flags New partition states More states for default handling Lots of new, dropped and changed interfaces sql/lex.h: Added REBUILD and changed name of REORGANISE to REORGANIZE sql/lock.cc: Method to downgrade locks Able to specify if locks upgraded on abort locks sql/log.cc: New handlerton methods sql/mysql_priv.h: Lots of new interfaces sql/share/errmsg.txt: Lots of new, dropped and changed error messages sql/sql_base.cc: Adapted to new method headers New method to abort and upgrade lock New method to close open tables and downgrade lock New method to wait for completed table sql/sql_lex.h: New flags sql/sql_partition.cc: Return int instead of bool in get_partition_id More defaults handling Make use of new mem_alloc_error method More work on function headers Changes to generate partition syntax to cater for intermediate partition states Lots of new code with large comments describing new features for Partition Management: ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions sql/sql_show.cc: Minors sql/sql_table.cc: Moved a couple of methods New methods to copy create lists and key lists for use with mysql_prepare_table New method to write frm file New handling of handlers with auto partitioning Fix CREATE TABLE LIKE Moved code for ADD/DROP/REORGANIZE partitions Use handlerton method for alter_table_flags sql/sql_yacc.yy: More memory alloc error checks New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions sql/table.cc: Fix length of extra part to be 4 bytes Partition state introduced in frm file sql/table.h: Partition state introduced sql/unireg.cc: Partition state introduced Default partition storage/csv/ha_tina.cc: New handlerton methods storage/example/ha_example.cc: New handlerton methods storage/ndb/include/kernel/ndb_limits.h: RANGE DATA storage/ndb/include/kernel/signaldata/AlterTable.hpp: New interfaces in ALTER TABLE towards NDB kernel storage/ndb/include/kernel/signaldata/DiAddTab.hpp: New section storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Lots of new parts of table description storage/ndb/include/kernel/signaldata/LqhFrag.hpp: tablespace id specified in LQHFRAGREQ storage/ndb/include/ndbapi/NdbDictionary.hpp: Lots of new methods in NDB dictionary storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: New error insertion storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: a few extra jam's storage/ndb/src/ndbapi/NdbBlob.cpp: Changes to definition of blob tables storage/ndb/src/ndbapi/NdbDictionary.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Lots of new stuff in NDB dictionary storage/ndb/test/ndbapi/test_event.cpp: removed use of methods no longer in existence storage/ndb/tools/restore/Restore.cpp: Renamed variable
20 years ago
WL #2604: Partition Management Optimised version of ADD/DROP/REORGANIZE partitions for non-NDB storage engines. New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions Quite a few bug fixes include/thr_lock.h: New method to downgrade locks from TL_WRITE_ONLY Possibility to upgrade lock while aborting locks mysql-test/r/ndb_autodiscover.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_bitfield.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_gis.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_partition_key.result: New test case mysql-test/r/partition.result: New test case mysql-test/r/partition_error.result: New test case mysql-test/r/partition_mgm_err.result: Fix of test case results mysql-test/t/disabled.def: partition_03ndb still has bug mysql-test/t/ndb_partition_key.test: New test cases for new functionality and bugs mysql-test/t/partition.test: New test cases for new functionality and bugs mysql-test/t/partition_error.test: New test cases for new functionality and bugs mysql-test/t/partition_mgm_err.test: New test cases for new functionality and bugs mysys/thr_lock.c: New method to downgrade TL_WRITE_ONLY locks Possibility to specify if locks are to be upgraded at abort locks sql/ha_archive.cc: New handlerton methods sql/ha_berkeley.cc: New handlerton methods sql/ha_blackhole.cc: New handlerton methods sql/ha_federated.cc: New handlerton methods sql/ha_heap.cc: New handlerton methods sql/ha_innodb.cc: New handlerton methods sql/ha_myisam.cc: New handlerton methods sql/ha_myisammrg.cc: New handlerton methods sql/ha_ndbcluster.cc: New handlerton methods Moved out packfrm and unpackfrm methods Adapted many parts to use table_share instead of table->s Ensured that .ndb file uses filename and not tablename according to new encoding of names (WL 1324) All NDB tables are partitioned and set up partition info Fixed such that tablenames use tablenames and not filenames in NDB NDB uses auto partitioning for ENGINE=NDB tables Warning for very large tables Set RANGE data Set LIST data New method to set-up partition info Set Default number of partitions flag Set linear hash flag Set node group array Set number of fragments Set max rows Set tablespace names New method to get number of partitions of table to use at open table sql/ha_ndbcluster.h: Removed partition_flags and alter_table_flags from handler class A couple of new and changed method headers sql/ha_ndbcluster_binlog.cc: Use new method headers sql/ha_partition.cc: New handlerton methods Lots of new function headers Use #P# as separator between table name and partition name and #SP# as separator between partition name and subpartition name Use filename encoding for files both of table name part and of partition name parts New method to drop partitions based on partition state New method to rename partitions based on partition state New methods to optimize, analyze, check and repair partitions New methods to optimize, analyze, check and repair table Helper method to create new partition, open it and external lock it, not needed to lock it internally since no one else knows about it yet. Cleanup method at error for new partitions New methods to perform bulk of work at ADD/REORGANIZE partitions (change_partitions, copy_partitions) sql/ha_partition.h: New methods and variables A few dropped ones and a few changed ones sql/handler.cc: Handlerton interface changes New flag to open_table_from_share sql/handler.h: New alter_table_flags New partition flags New partition states More states for default handling Lots of new, dropped and changed interfaces sql/lex.h: Added REBUILD and changed name of REORGANISE to REORGANIZE sql/lock.cc: Method to downgrade locks Able to specify if locks upgraded on abort locks sql/log.cc: New handlerton methods sql/mysql_priv.h: Lots of new interfaces sql/share/errmsg.txt: Lots of new, dropped and changed error messages sql/sql_base.cc: Adapted to new method headers New method to abort and upgrade lock New method to close open tables and downgrade lock New method to wait for completed table sql/sql_lex.h: New flags sql/sql_partition.cc: Return int instead of bool in get_partition_id More defaults handling Make use of new mem_alloc_error method More work on function headers Changes to generate partition syntax to cater for intermediate partition states Lots of new code with large comments describing new features for Partition Management: ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions sql/sql_show.cc: Minors sql/sql_table.cc: Moved a couple of methods New methods to copy create lists and key lists for use with mysql_prepare_table New method to write frm file New handling of handlers with auto partitioning Fix CREATE TABLE LIKE Moved code for ADD/DROP/REORGANIZE partitions Use handlerton method for alter_table_flags sql/sql_yacc.yy: More memory alloc error checks New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions sql/table.cc: Fix length of extra part to be 4 bytes Partition state introduced in frm file sql/table.h: Partition state introduced sql/unireg.cc: Partition state introduced Default partition storage/csv/ha_tina.cc: New handlerton methods storage/example/ha_example.cc: New handlerton methods storage/ndb/include/kernel/ndb_limits.h: RANGE DATA storage/ndb/include/kernel/signaldata/AlterTable.hpp: New interfaces in ALTER TABLE towards NDB kernel storage/ndb/include/kernel/signaldata/DiAddTab.hpp: New section storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Lots of new parts of table description storage/ndb/include/kernel/signaldata/LqhFrag.hpp: tablespace id specified in LQHFRAGREQ storage/ndb/include/ndbapi/NdbDictionary.hpp: Lots of new methods in NDB dictionary storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: New error insertion storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: a few extra jam's storage/ndb/src/ndbapi/NdbBlob.cpp: Changes to definition of blob tables storage/ndb/src/ndbapi/NdbDictionary.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Lots of new stuff in NDB dictionary storage/ndb/test/ndbapi/test_event.cpp: removed use of methods no longer in existence storage/ndb/tools/restore/Restore.cpp: Renamed variable
20 years ago
20 years ago
20 years ago
20 years ago
Cleanup testcases - Add missing drop(s) - Reset changed variables NOTE! These kind of problems are easily found with --check-testcases options to mysql-test-run.pl mysql-test/extra/rpl_tests/rpl_insert_id_pk.test: Add missing drop table mysql-test/extra/rpl_tests/rpl_loaddata.test: Add missing drop table mysql-test/extra/rpl_tests/rpl_log.test: Tables where only dropped on slave, switch to master connection before dropping them mysql-test/extra/rpl_tests/rpl_multi_update3.test: Add missing drop table mysql-test/extra/rpl_tests/rpl_row_sp006.test: Add missing drop database mysql-test/include/check-testcase.test: Add option "--skip-lock-tables" when dumping tables, as noone else is using the tables anyway mysql-test/r/ndb_cache_multi.result: Reset query_cache_size after test on both master and "second" master mysqld mysql-test/r/partition.result: Add missing drop procedure mysql-test/r/rpl_drop_db.result: Add missing drop table mysql-test/r/rpl_multi_update3.result: Add missing drop table mysql-test/r/rpl_ndb_multi_update3.result: Add missing drop table mysql-test/r/rpl_ndb_sp006.result: Add missing drop database mysql-test/r/rpl_stm_no_op.result: Add missing drop table mysql-test/r/rpl_variables.result: Reset slave_net_timeout to it's default value after test mysql-test/t/ndb_cache_multi.test: Reset query_cahche_size after test mysql-test/t/partition.test: Add missing drop procedure mysql-test/t/rpl_drop_db.test: Add missing drop table mysql-test/t/rpl_stm_no_op.test: Add missing drop table mysql-test/t/rpl_variables.test: Reset slave_net_timeout to it's default value after test
20 years ago
BUG#16002: Make partition functions that are unsigned work properly mysql-test/r/partition.result: A number of new test cases for unsigned partition functions mysql-test/r/partition_error.result: A number of new test cases for unsigned partition functions mysql-test/r/partition_range.result: A number of new test cases for unsigned partition functions mysql-test/t/partition.test: A number of new test cases for unsigned partition functions mysql-test/t/partition_error.test: A number of new test cases for unsigned partition functions mysql-test/t/partition_range.test: A number of new test cases for unsigned partition functions sql/ha_partition.cc: Error message for no partition found needs to take signed/unsigned into account when printing erroneus value sql/partition_element.h: Introduced signed_flag and max_value flag on partition elements Also list is now a list of a struct rather than simply longlong values Small rearranges of order sql/partition_info.cc: Introduced signed_flag and max_value flag on partition elements Also list is now a list of a struct rather than simply longlong values Small rearranges of order Lots of new code to handle checks of proper definition of table when partition function is unsigned sql/partition_info.h: Mostly rearrangement of code and some addition of a THD object in check_partition_info call plus a new method for comparing unsigned values sql/share/errmsg.txt: Negative values not ok for unsigned partition functions sql/sql_partition.cc: Fixed a multi-thread bug (when defining several partitioned tables in parallel) New code to generate partition syntax that takes into account sign of constants. Made function fix_fields_part_func more reusable. Fixed a number of get_partition_id functions for range and list and similar functions for partition pruning code. Unfortunately fairly much duplication of code with just small changes. sql/sql_partition.h: New function headers sql/sql_show.cc: Changed list of values for LIST partitioned tables Also fixed printing of unsigned values in INFORMATION SCHEMA for partitioned table sql/sql_table.cc: Fixed for new interface sql/sql_yacc.yy: Moved definition of struct to partition_element.h Added code to keep track of sign of constants in RANGE and LIST partitions sql/table.cc: Fixed for new interface
20 years ago
BUG#16002: Make partition functions that are unsigned work properly mysql-test/r/partition.result: A number of new test cases for unsigned partition functions mysql-test/r/partition_error.result: A number of new test cases for unsigned partition functions mysql-test/r/partition_range.result: A number of new test cases for unsigned partition functions mysql-test/t/partition.test: A number of new test cases for unsigned partition functions mysql-test/t/partition_error.test: A number of new test cases for unsigned partition functions mysql-test/t/partition_range.test: A number of new test cases for unsigned partition functions sql/ha_partition.cc: Error message for no partition found needs to take signed/unsigned into account when printing erroneus value sql/partition_element.h: Introduced signed_flag and max_value flag on partition elements Also list is now a list of a struct rather than simply longlong values Small rearranges of order sql/partition_info.cc: Introduced signed_flag and max_value flag on partition elements Also list is now a list of a struct rather than simply longlong values Small rearranges of order Lots of new code to handle checks of proper definition of table when partition function is unsigned sql/partition_info.h: Mostly rearrangement of code and some addition of a THD object in check_partition_info call plus a new method for comparing unsigned values sql/share/errmsg.txt: Negative values not ok for unsigned partition functions sql/sql_partition.cc: Fixed a multi-thread bug (when defining several partitioned tables in parallel) New code to generate partition syntax that takes into account sign of constants. Made function fix_fields_part_func more reusable. Fixed a number of get_partition_id functions for range and list and similar functions for partition pruning code. Unfortunately fairly much duplication of code with just small changes. sql/sql_partition.h: New function headers sql/sql_show.cc: Changed list of values for LIST partitioned tables Also fixed printing of unsigned values in INFORMATION SCHEMA for partitioned table sql/sql_table.cc: Fixed for new interface sql/sql_yacc.yy: Moved definition of struct to partition_element.h Added code to keep track of sign of constants in RANGE and LIST partitions sql/table.cc: Fixed for new interface
20 years ago
20 years ago
20 years ago
  1. #--disable_abort_on_error
  2. #
  3. # Simple test for the partition storage engine
  4. # Taken fromm the select test
  5. #
  6. -- source include/have_partition.inc
  7. --disable_warnings
  8. drop table if exists t1;
  9. --enable_warnings
  10. #
  11. # Bug#14367: Partitions: crash if utf8 column
  12. #
  13. create table t1 (s1 char(2) character set utf8)
  14. partition by list (case when s1 > 'cz' then 1 else 2 end)
  15. (partition p1 values in (1),
  16. partition p2 values in (2));
  17. drop table t1;
  18. #
  19. # Bug 15890: Strange number of partitions accepted
  20. #
  21. -- error 1064
  22. create table t1 (a int)
  23. partition by key(a)
  24. partitions 0.2+e1;
  25. -- error 1064
  26. create table t1 (a int)
  27. partition by key(a)
  28. partitions -1;
  29. -- error 1064
  30. create table t1 (a int)
  31. partition by key(a)
  32. partitions 1.5;
  33. -- error 1064
  34. create table t1 (a int)
  35. partition by key(a)
  36. partitions 1e+300;
  37. #
  38. # Bug 21173: SHOW TABLE STATUS crashes server in InnoDB
  39. #
  40. create table t1 (a int)
  41. engine = innodb
  42. partition by key (a);
  43. show table status;
  44. insert into t1 values (0), (1), (2), (3);
  45. show table status;
  46. drop table t1;
  47. create table t1 (a int auto_increment primary key)
  48. engine = innodb
  49. partition by key (a);
  50. show table status;
  51. insert into t1 values (NULL), (NULL), (NULL), (NULL);
  52. show table status;
  53. insert into t1 values (NULL), (NULL), (NULL), (NULL);
  54. show table status;
  55. drop table t1;
  56. #
  57. # Bug 21350: Data Directory problems
  58. #
  59. -- error 1103
  60. create table t1 (a int)
  61. partition by key (a)
  62. (partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
  63. #
  64. # Insert a test that manages to create the first partition and fails with
  65. # the second, ensure that we clean up afterwards in a proper manner.
  66. #
  67. --error 1103
  68. create table t1 (a int)
  69. partition by key (a)
  70. (partition p0,
  71. partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
  72. #
  73. # Bug 19309 Partitions: Crash if double procedural alter
  74. #
  75. create table t1 (a int)
  76. partition by list (a)
  77. (partition p0 values in (1));
  78. create procedure pz()
  79. alter table t1 engine = myisam;
  80. call pz();
  81. call pz();
  82. drop procedure pz;
  83. drop table t1;
  84. #
  85. # Bug 19307: CSV engine crashes
  86. #
  87. --error ER_PARTITION_MERGE_ERROR
  88. create table t1 (a int)
  89. engine = csv
  90. partition by list (a)
  91. (partition p0 values in (null));
  92. #
  93. # BUG 16002: Handle unsigned integer functions properly
  94. #
  95. --error 1064
  96. create table t1 (a bigint)
  97. partition by range (a)
  98. (partition p0 values less than (0xFFFFFFFFFFFFFFFF),
  99. partition p1 values less than (10));
  100. --error 1064
  101. create table t1 (a bigint)
  102. partition by list (a)
  103. (partition p0 values in (0xFFFFFFFFFFFFFFFF),
  104. partition p1 values in (10));
  105. create table t1 (a bigint unsigned)
  106. partition by range (a)
  107. (partition p0 values less than (100),
  108. partition p1 values less than MAXVALUE);
  109. insert into t1 values (1);
  110. drop table t1;
  111. create table t1 (a bigint unsigned)
  112. partition by hash (a);
  113. insert into t1 values (0xFFFFFFFFFFFFFFFD);
  114. insert into t1 values (0xFFFFFFFFFFFFFFFE);
  115. select * from t1 where (a + 1) < 10;
  116. select * from t1 where (a + 1) > 10;
  117. drop table t1;
  118. #
  119. # Bug 19307: CSV engine crashes
  120. #
  121. --error ER_PARTITION_MERGE_ERROR
  122. create table t1 (a int)
  123. engine = csv
  124. partition by list (a)
  125. (partition p0 values in (null));
  126. #
  127. # Added test case
  128. #
  129. create table t1 (a int)
  130. partition by key(a)
  131. (partition p0 engine = MEMORY);
  132. drop table t1;
  133. #
  134. # BUG 19067 ALTER TABLE .. ADD PARTITION for subpartitioned table crashes
  135. #
  136. create table t1 (a int)
  137. partition by range (a)
  138. subpartition by key (a)
  139. (partition p0 values less than (1));
  140. alter table t1 add partition (partition p1 values less than (2));
  141. show create table t1;
  142. alter table t1 reorganize partition p1 into (partition p1 values less than (3));
  143. show create table t1;
  144. drop table t1;
  145. #
  146. # Partition by key no partition defined => OK
  147. #
  148. CREATE TABLE t1 (
  149. a int not null,
  150. b int not null,
  151. c int not null,
  152. primary key(a,b))
  153. partition by key (a);
  154. #
  155. # Bug 13323: Select count(*) on empty table returns 2
  156. #
  157. select count(*) from t1;
  158. #
  159. # Test SHOW CREATE TABLE
  160. #
  161. show create table t1;
  162. drop table t1;
  163. #
  164. # Partition by key no partition, list of fields
  165. #
  166. CREATE TABLE t1 (
  167. a int not null,
  168. b int not null,
  169. c int not null,
  170. primary key(a,b))
  171. partition by key (a, b);
  172. drop table t1;
  173. #
  174. # Partition by key specified 3 partitions and defined 3 => ok
  175. #
  176. CREATE TABLE t1 (
  177. a int not null,
  178. b int not null,
  179. c int not null,
  180. primary key(a,b))
  181. partition by key (a)
  182. partitions 3
  183. (partition x1, partition x2, partition x3);
  184. drop table t1;
  185. #
  186. # Partition by key specifying nodegroup
  187. #
  188. CREATE TABLE t1 (
  189. a int not null,
  190. b int not null,
  191. c int not null,
  192. primary key(a,b))
  193. partition by key (a)
  194. partitions 3
  195. (partition x1 nodegroup 0,
  196. partition x2 nodegroup 1,
  197. partition x3 nodegroup 2);
  198. drop table t1;
  199. #
  200. # Partition by key specifying engine
  201. #
  202. CREATE TABLE t1 (
  203. a int not null,
  204. b int not null,
  205. c int not null,
  206. primary key(a,b))
  207. partition by key (a)
  208. partitions 3
  209. (partition x1 engine myisam,
  210. partition x2 engine myisam,
  211. partition x3 engine myisam);
  212. drop table t1;
  213. #
  214. # Partition by key specifying tablespace
  215. #
  216. CREATE TABLE t1 (
  217. a int not null,
  218. b int not null,
  219. c int not null,
  220. primary key(a,b))
  221. partition by key (a)
  222. partitions 3
  223. (partition x1 tablespace ts1,
  224. partition x2 tablespace ts2,
  225. partition x3 tablespace ts3);
  226. CREATE TABLE t2 LIKE t1;
  227. drop table t2;
  228. drop table t1;
  229. #
  230. # Partition by key list, basic
  231. #
  232. CREATE TABLE t1 (
  233. a int not null,
  234. b int not null,
  235. c int not null,
  236. primary key(a,b))
  237. partition by list (a)
  238. partitions 3
  239. (partition x1 values in (1,2,9,4) tablespace ts1,
  240. partition x2 values in (3, 11, 5, 7) tablespace ts2,
  241. partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3);
  242. drop table t1;
  243. #
  244. # Partition by key list, list function
  245. #
  246. CREATE TABLE t1 (
  247. a int not null,
  248. b int not null,
  249. c int not null,
  250. primary key(a,b))
  251. partition by list (b*a)
  252. partitions 3
  253. (partition x1 values in (1,2,9,4) tablespace ts1,
  254. partition x2 values in (3, 11, 5, 7) tablespace ts2,
  255. partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3);
  256. drop table t1;
  257. #
  258. # Partition by key list, list function, no spec of #partitions
  259. #
  260. CREATE TABLE t1 (
  261. a int not null,
  262. b int not null,
  263. c int not null,
  264. primary key(a,b))
  265. partition by list (b*a)
  266. (partition x1 values in (1) tablespace ts1,
  267. partition x2 values in (3, 11, 5, 7) tablespace ts2,
  268. partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3);
  269. drop table t1;
  270. #
  271. # Bug 13154: Insert crashes due to bad calculation of partition id
  272. # for PARTITION BY KEY and SUBPARTITION BY KEY
  273. #
  274. CREATE TABLE t1 (
  275. a int not null)
  276. partition by key(a);
  277. LOCK TABLES t1 WRITE;
  278. insert into t1 values (1);
  279. insert into t1 values (2);
  280. insert into t1 values (3);
  281. insert into t1 values (4);
  282. UNLOCK TABLES;
  283. drop table t1;
  284. #
  285. # Bug #13644 DROP PARTITION NULL's DATE column
  286. #
  287. CREATE TABLE t1 (a int, name VARCHAR(50), purchased DATE)
  288. PARTITION BY RANGE (a)
  289. (PARTITION p0 VALUES LESS THAN (3),
  290. PARTITION p1 VALUES LESS THAN (7),
  291. PARTITION p2 VALUES LESS THAN (9),
  292. PARTITION p3 VALUES LESS THAN (11));
  293. INSERT INTO t1 VALUES
  294. (1, 'desk organiser', '2003-10-15'),
  295. (2, 'CD player', '1993-11-05'),
  296. (3, 'TV set', '1996-03-10'),
  297. (4, 'bookcase', '1982-01-10'),
  298. (5, 'exercise bike', '2004-05-09'),
  299. (6, 'sofa', '1987-06-05'),
  300. (7, 'popcorn maker', '2001-11-22'),
  301. (8, 'acquarium', '1992-08-04'),
  302. (9, 'study desk', '1984-09-16'),
  303. (10, 'lava lamp', '1998-12-25');
  304. SELECT * from t1 ORDER BY a;
  305. ALTER TABLE t1 DROP PARTITION p0;
  306. SELECT * from t1 ORDER BY a;
  307. drop table t1;
  308. #
  309. # Bug #13442; Truncate Partitioned table doesn't work
  310. #
  311. CREATE TABLE t1 (a int)
  312. PARTITION BY LIST (a)
  313. (PARTITION p0 VALUES IN (1,2,3), PARTITION p1 VALUES IN (4,5,6));
  314. insert into t1 values (1),(2),(3),(4),(5),(6);
  315. select * from t1;
  316. truncate t1;
  317. select * from t1;
  318. truncate t1;
  319. select * from t1;
  320. drop table t1;
  321. #
  322. # Bug #13445 Partition by KEY method crashes server
  323. #
  324. CREATE TABLE t1 (a int, b int, primary key(a,b))
  325. PARTITION BY KEY(b,a) PARTITIONS 4;
  326. insert into t1 values (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
  327. select * from t1 where a = 4;
  328. drop table t1;
  329. #
  330. # Bug #13438: Engine clause in PARTITION clause causes crash
  331. #
  332. CREATE TABLE t1 (a int)
  333. PARTITION BY LIST (a)
  334. PARTITIONS 1
  335. (PARTITION x1 VALUES IN (1) ENGINE=MEMORY);
  336. show create table t1;
  337. drop table t1;
  338. #
  339. # Bug #13440: REPLACE causes crash in partitioned table
  340. #
  341. CREATE TABLE t1 (a int, unique(a))
  342. PARTITION BY LIST (a)
  343. (PARTITION x1 VALUES IN (10), PARTITION x2 VALUES IN (20));
  344. --error ER_NO_PARTITION_FOR_GIVEN_VALUE
  345. REPLACE t1 SET a = 4;
  346. drop table t1;
  347. #
  348. # Bug #14365: Crash if value too small in list partitioned table
  349. #
  350. CREATE TABLE t1 (a int)
  351. PARTITION BY LIST (a)
  352. (PARTITION x1 VALUES IN (2), PARTITION x2 VALUES IN (3));
  353. insert into t1 values (2), (3);
  354. --error ER_NO_PARTITION_FOR_GIVEN_VALUE
  355. insert into t1 values (4);
  356. --error ER_NO_PARTITION_FOR_GIVEN_VALUE
  357. insert into t1 values (1);
  358. drop table t1;
  359. #
  360. # Bug 14327: PARTITIONS clause gets lost in SHOW CREATE TABLE
  361. #
  362. CREATE TABLE t1 (a int)
  363. PARTITION BY HASH(a)
  364. PARTITIONS 5;
  365. SHOW CREATE TABLE t1;
  366. drop table t1;
  367. #
  368. # Bug #13446: Update to value outside of list values doesn't give error
  369. #
  370. CREATE TABLE t1 (a int)
  371. PARTITION BY RANGE (a)
  372. (PARTITION x1 VALUES LESS THAN (2));
  373. insert into t1 values (1);
  374. --error ER_NO_PARTITION_FOR_GIVEN_VALUE
  375. update t1 set a = 5;
  376. drop table t1;
  377. #
  378. # Bug #13441: Analyze on partitioned table didn't work
  379. #
  380. CREATE TABLE t1 (a int)
  381. PARTITION BY LIST (a)
  382. (PARTITION x1 VALUES IN (10), PARTITION x2 VALUES IN (20));
  383. analyze table t1;
  384. drop table t1;
  385. #
  386. # BUG 14524
  387. #
  388. CREATE TABLE `t1` (
  389. `id` int(11) default NULL
  390. ) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
  391. SELECT * FROM t1;
  392. drop table t1;
  393. #
  394. # BUG 14524
  395. #
  396. CREATE TABLE `t1` (
  397. `id` int(11) default NULL
  398. ) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
  399. SELECT * FROM t1;
  400. drop table t1;
  401. #
  402. # BUG 15221 (Cannot reorganize with the same name)
  403. #
  404. create table t1
  405. (a int)
  406. partition by range (a)
  407. ( partition p0 values less than(10),
  408. partition p1 values less than (20),
  409. partition p2 values less than (25));
  410. alter table t1 reorganize partition p2 into (partition p2 values less than (30));
  411. show create table t1;
  412. drop table t1;
  413. CREATE TABLE t1 (a int, b int)
  414. PARTITION BY RANGE (a)
  415. (PARTITION x0 VALUES LESS THAN (2),
  416. PARTITION x1 VALUES LESS THAN (4),
  417. PARTITION x2 VALUES LESS THAN (6),
  418. PARTITION x3 VALUES LESS THAN (8),
  419. PARTITION x4 VALUES LESS THAN (10),
  420. PARTITION x5 VALUES LESS THAN (12),
  421. PARTITION x6 VALUES LESS THAN (14),
  422. PARTITION x7 VALUES LESS THAN (16),
  423. PARTITION x8 VALUES LESS THAN (18),
  424. PARTITION x9 VALUES LESS THAN (20));
  425. ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO
  426. (PARTITION x1 VALUES LESS THAN (6));
  427. show create table t1;
  428. drop table t1;
  429. # Testcase for BUG#15819
  430. create table t1 (a int not null, b int not null) partition by LIST (a+b) (
  431. partition p0 values in (12),
  432. partition p1 values in (14)
  433. );
  434. --error ER_NO_PARTITION_FOR_GIVEN_VALUE
  435. insert into t1 values (10,1);
  436. drop table t1;
  437. #
  438. # Bug#16901 Partitions: crash, SELECT, column of part.
  439. # function=first column of primary key
  440. #
  441. create table t1 (f1 integer,f2 integer, f3 varchar(10), primary key(f1,f2))
  442. partition by range(f1) subpartition by hash(f2) subpartitions 2
  443. (partition p1 values less than (0),
  444. partition p2 values less than (2),
  445. partition p3 values less than (2147483647));
  446. insert into t1 values(10,10,'10');
  447. insert into t1 values(2,2,'2');
  448. select * from t1 where f1 = 2;
  449. drop table t1;
  450. #
  451. # Bug #16907 Partitions: crash, SELECT goes into last partition, UNIQUE INDEX
  452. #
  453. create table t1 (f1 integer,f2 integer, unique index(f1))
  454. partition by range(f1 div 2)
  455. subpartition by hash(f1) subpartitions 2
  456. (partition partb values less than (2),
  457. partition parte values less than (4),
  458. partition partf values less than (10000));
  459. insert into t1 values(10,1);
  460. select * from t1 where f1 = 10;
  461. drop table t1;
  462. #
  463. # Bug #16775: Wrong engine type stored for subpartition
  464. #
  465. set session storage_engine= 'memory';
  466. create table t1 (f_int1 int(11) default null) engine = memory
  467. partition by range (f_int1) subpartition by hash (f_int1)
  468. (partition part1 values less than (1000)
  469. (subpartition subpart11 engine = memory));
  470. drop table t1;
  471. set session storage_engine='myisam';
  472. #
  473. # Bug #16782: Crash using REPLACE on table with primary key
  474. #
  475. create table t1 (f_int1 integer, f_int2 integer, primary key (f_int1))
  476. partition by hash(f_int1) partitions 2;
  477. insert into t1 values (1,1),(2,2);
  478. replace into t1 values (1,1),(2,2);
  479. drop table t1;
  480. #
  481. # Bug #17169: Partitions: out of memory if add partition and unique
  482. #
  483. create table t1 (s1 int, unique (s1)) partition by list (s1) (partition x1 VALUES in (10), partition x2 values in (20));
  484. alter table t1 add partition (partition x3 values in (30));
  485. drop table t1;
  486. #
  487. # Bug #17754 Change to explicit removal of partitioning scheme
  488. # Also added a number of tests to ensure that proper engine is
  489. # choosen in all kinds of scenarios.
  490. #
  491. create table t1 (a int)
  492. partition by key(a)
  493. partitions 2
  494. (partition p0 engine=myisam, partition p1 engine=myisam);
  495. show create table t1;
  496. alter table t1;
  497. show create table t1;
  498. alter table t1 engine=myisam;
  499. show create table t1;
  500. alter table t1 engine=heap;
  501. show create table t1;
  502. alter table t1 remove partitioning;
  503. show create table t1;
  504. drop table t1;
  505. create table t1 (a int)
  506. engine=myisam
  507. partition by key(a)
  508. partitions 2
  509. (partition p0 engine=myisam, partition p1 engine=myisam);
  510. show create table t1;
  511. alter table t1 add column b int remove partitioning;
  512. show create table t1;
  513. alter table t1
  514. engine=myisam
  515. partition by key(a)
  516. (partition p0 engine=myisam, partition p1);
  517. show create table t1;
  518. alter table t1
  519. engine=heap
  520. partition by key(a)
  521. (partition p0, partition p1 engine=heap);
  522. show create table t1;
  523. alter table t1 engine=myisam, add column c int remove partitioning;
  524. show create table t1;
  525. alter table t1
  526. engine=heap
  527. partition by key (a)
  528. (partition p0, partition p1);
  529. show create table t1;
  530. alter table t1
  531. partition by key (a)
  532. (partition p0, partition p1);
  533. show create table t1;
  534. alter table t1
  535. engine=heap
  536. partition by key (a)
  537. (partition p0, partition p1);
  538. show create table t1;
  539. --error ER_MIX_HANDLER_ERROR
  540. alter table t1
  541. partition by key(a)
  542. (partition p0, partition p1 engine=heap);
  543. --error ER_MIX_HANDLER_ERROR
  544. alter table t1
  545. partition by key(a)
  546. (partition p0 engine=heap, partition p1);
  547. --error ER_MIX_HANDLER_ERROR
  548. alter table t1
  549. engine=heap
  550. partition by key (a)
  551. (partition p0 engine=heap, partition p1 engine=myisam);
  552. --error ER_MIX_HANDLER_ERROR
  553. alter table t1
  554. partition by key (a)
  555. (partition p0 engine=heap, partition p1 engine=myisam);
  556. drop table t1;
  557. # Bug #17432: Partition functions containing NULL values should return
  558. # LONGLONG_MIN
  559. #
  560. CREATE TABLE t1 (
  561. f_int1 INTEGER, f_int2 INTEGER,
  562. f_char1 CHAR(10), f_char2 CHAR(10), f_charbig VARCHAR(1000)
  563. )
  564. PARTITION BY RANGE(f_int1 DIV 2)
  565. SUBPARTITION BY HASH(f_int1)
  566. SUBPARTITIONS 2
  567. (PARTITION parta VALUES LESS THAN (0),
  568. PARTITION partb VALUES LESS THAN (5),
  569. PARTITION parte VALUES LESS THAN (10),
  570. PARTITION partf VALUES LESS THAN (2147483647));
  571. INSERT INTO t1 SET f_int1 = NULL , f_int2 = -20, f_char1 = CAST(-20 AS CHAR),
  572. f_char2 = CAST(-20 AS CHAR), f_charbig = '#NULL#';
  573. SELECT * FROM t1 WHERE f_int1 IS NULL;
  574. SELECT * FROM t1;
  575. drop table t1;
  576. #
  577. # Bug 17430: Crash when SELECT * from t1 where field IS NULL
  578. #
  579. CREATE TABLE t1 (
  580. f_int1 INTEGER, f_int2 INTEGER,
  581. f_char1 CHAR(10), f_char2 CHAR(10), f_charbig VARCHAR(1000) )
  582. PARTITION BY LIST(MOD(f_int1,2))
  583. SUBPARTITION BY KEY(f_int1)
  584. (PARTITION part1 VALUES IN (-1) (SUBPARTITION sp1, SUBPARTITION sp2),
  585. PARTITION part2 VALUES IN (0) (SUBPARTITION sp3, SUBPARTITION sp5),
  586. PARTITION part3 VALUES IN (1) (SUBPARTITION sp4, SUBPARTITION sp6));
  587. INSERT INTO t1 SET f_int1 = 2, f_int2 = 2, f_char1 = '2', f_char2 = '2', f_charbig = '===2===';
  588. INSERT INTO t1 SET f_int1 = 2, f_int2 = 2, f_char1 = '2', f_char2 = '2', f_charbig = '===2===';
  589. SELECT * FROM t1 WHERE f_int1 IS NULL;
  590. drop table t1;
  591. #
  592. # Bug#14363 Partitions: failure if create in stored procedure
  593. #
  594. delimiter //;
  595. create procedure p ()
  596. begin
  597. create table t1 (s1 mediumint,s2 mediumint)
  598. partition by list (s2)
  599. (partition p1 values in (0),
  600. partition p2 values in (1));
  601. end//
  602. call p()//
  603. drop procedure p//
  604. drop table t1;
  605. create procedure p ()
  606. begin
  607. create table t1 (a int not null,b int not null,c int not null,primary key (a,b))
  608. partition by range (a)
  609. subpartition by hash (a+b)
  610. (partition x1 values less than (1)
  611. (subpartition x11,
  612. subpartition x12),
  613. partition x2 values less than (5)
  614. (subpartition x21,
  615. subpartition x22));
  616. end//
  617. call p()//
  618. drop procedure p//
  619. drop table t1//
  620. delimiter ;//
  621. #
  622. # Bug #15447 Partitions: NULL is treated as zero
  623. #
  624. # NULL for RANGE partition
  625. create table t1 (a int,b int,c int,key(a,b))
  626. partition by range (a)
  627. partitions 3
  628. (partition x1 values less than (0) tablespace ts1,
  629. partition x2 values less than (10) tablespace ts2,
  630. partition x3 values less than maxvalue tablespace ts3);
  631. insert into t1 values (NULL, 1, 1);
  632. insert into t1 values (0, 1, 1);
  633. insert into t1 values (12, 1, 1);
  634. select partition_name, partition_description, table_rows
  635. from information_schema.partitions where table_schema ='test';
  636. drop table t1;
  637. # NULL for LIST partition
  638. --error ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR
  639. create table t1 (a int,b int, c int)
  640. partition by list(a)
  641. partitions 2
  642. (partition x123 values in (11,12),
  643. partition x234 values in (1 ,NULL, NULL));
  644. --error ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR
  645. create table t1 (a int,b int, c int)
  646. partition by list(a)
  647. partitions 2
  648. (partition x123 values in (11, NULL),
  649. partition x234 values in (1 ,NULL));
  650. create table t1 (a int,b int, c int)
  651. partition by list(a)
  652. partitions 2
  653. (partition x123 values in (11, 12),
  654. partition x234 values in (5, 1));
  655. --error ER_NO_PARTITION_FOR_GIVEN_VALUE
  656. insert into t1 values (NULL,1,1);
  657. drop table t1;
  658. create table t1 (a int,b int, c int)
  659. partition by list(a)
  660. partitions 2
  661. (partition x123 values in (11, 12),
  662. partition x234 values in (NULL, 1));
  663. insert into t1 values (11,1,6);
  664. insert into t1 values (NULL,1,1);
  665. select partition_name, partition_description, table_rows
  666. from information_schema.partitions where table_schema ='test';
  667. drop table t1;
  668. #
  669. # BUG 17947 Crash with REBUILD PARTITION
  670. #
  671. create table t1 (a int)
  672. partition by list (a)
  673. (partition p0 values in (1));
  674. --error 1064
  675. alter table t1 rebuild partition;
  676. drop table t1;
  677. #
  678. # BUG 15253 Insert that should fail doesn't
  679. #
  680. create table t1 (a int)
  681. partition by list (a)
  682. (partition p0 values in (5));
  683. --error ER_NO_PARTITION_FOR_GIVEN_VALUE
  684. insert into t1 values (0);
  685. drop table t1;
  686. #
  687. # BUG #16370 Subpartitions names not shown in SHOW CREATE TABLE output
  688. #
  689. create table t1 (a int)
  690. partition by range (a) subpartition by hash (a)
  691. (partition p0 values less than (100));
  692. show create table t1;
  693. alter table t1 add partition (partition p1 values less than (200)
  694. (subpartition subpart21));
  695. show create table t1;
  696. drop table t1;
  697. create table t1 (a int)
  698. partition by key (a);
  699. show create table t1;
  700. alter table t1 add partition (partition p1);
  701. show create table t1;
  702. drop table t1;
  703. #
  704. # BUG 15407 Crash with subpartition
  705. #
  706. --error 1064
  707. create table t1 (a int, b int)
  708. partition by range (a)
  709. subpartition by hash(a)
  710. (partition p0 values less than (0) (subpartition sp0),
  711. partition p1 values less than (1));
  712. --error 1064
  713. create table t1 (a int, b int)
  714. partition by range (a)
  715. subpartition by hash(a)
  716. (partition p0 values less than (0),
  717. partition p1 values less than (1) (subpartition sp0));
  718. #
  719. # BUG 15961 No error when subpartition defined without subpartition by clause
  720. #
  721. --error ER_SUBPARTITION_ERROR
  722. create table t1 (a int)
  723. partition by hash (a)
  724. (partition p0 (subpartition sp0));
  725. #
  726. # Bug 17127
  727. #
  728. create table t1 (a int)
  729. partition by range (a)
  730. (partition p0 values less than (1));
  731. --error ER_PARTITION_WRONG_VALUES_ERROR
  732. alter table t1 add partition (partition p1 values in (2));
  733. --error ER_PARTITION_REQUIRES_VALUES_ERROR
  734. alter table t1 add partition (partition p1);
  735. drop table t1;
  736. create table t1 (a int)
  737. partition by list (a)
  738. (partition p0 values in (1));
  739. --error ER_PARTITION_WRONG_VALUES_ERROR
  740. alter table t1 add partition (partition p1 values less than (2));
  741. --error ER_PARTITION_REQUIRES_VALUES_ERROR
  742. alter table t1 add partition (partition p1);
  743. drop table t1;
  744. create table t1 (a int)
  745. partition by hash (a)
  746. (partition p0);
  747. --error ER_PARTITION_WRONG_VALUES_ERROR
  748. alter table t1 add partition (partition p1 values less than (2));
  749. --error ER_PARTITION_WRONG_VALUES_ERROR
  750. alter table t1 add partition (partition p1 values in (2));
  751. drop table t1;
  752. #
  753. # BUG 17947 Crash with REBUILD PARTITION
  754. #
  755. create table t1 (a int)
  756. partition by list (a)
  757. (partition p0 values in (1));
  758. --error 1064
  759. alter table t1 rebuild partition;
  760. drop table t1;
  761. #
  762. # Bug #14526: Partitions: indexed searches fail
  763. #
  764. create table t2 (s1 int not null auto_increment, primary key (s1)) partition by list (s1) (partition p1 values in (1),partition p2 values in (2),partition p3 values in (3),partition p4 values in (4));
  765. insert into t2 values (null),(null),(null);
  766. select * from t2;
  767. select * from t2 where s1 < 2;
  768. update t2 set s1 = s1 + 1 order by s1 desc;
  769. select * from t2 where s1 < 3;
  770. select * from t2 where s1 = 2;
  771. drop table t2;
  772. #
  773. # Bug #17497: Partitions: crash if add partition on temporary table
  774. #
  775. --error ER_PARTITION_NO_TEMPORARY
  776. create temporary table t1 (a int) partition by hash(a);
  777. #
  778. # Bug #17097: Partitions: failing ADD PRIMARY KEY leads to temporary rotten
  779. # metadata,crash
  780. #
  781. create table t1 (a int, b int) partition by list (a)
  782. (partition p1 values in (1), partition p2 values in (2));
  783. --error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
  784. alter table t1 add primary key (b);
  785. show create table t1;
  786. drop table t1;
  787. ############################################
  788. #
  789. # Author: Mikael Ronstrom
  790. # Date: 2006-03-01
  791. # Purpose
  792. # Bug 17772: Crash at ALTER TABLE with rename
  793. # and add column + comment on
  794. # partitioned table
  795. #
  796. ############################################
  797. create table t1 (a int unsigned not null auto_increment primary key)
  798. partition by key(a);
  799. alter table t1 rename t2, add c char(10), comment "no comment";
  800. show create table t2;
  801. drop table t2;
  802. #
  803. # Bug#15336 Partitions: crash if create table as select
  804. #
  805. create table t1 (f1 int) partition by hash (f1) as select 1;
  806. drop table t1;
  807. #
  808. # bug #14350 Partitions: crash if prepared statement
  809. #
  810. prepare stmt1 from 'create table t1 (s1 int) partition by hash (s1)';
  811. execute stmt1;
  812. --error 1050
  813. execute stmt1;
  814. drop table t1;
  815. #
  816. # bug 17290 SP with delete, create and rollback to save point causes MySQLD core
  817. #
  818. delimiter |;
  819. eval CREATE PROCEDURE test.p1(IN i INT)
  820. BEGIN
  821. DECLARE CONTINUE HANDLER FOR sqlexception BEGIN END;
  822. DROP TABLE IF EXISTS t1;
  823. CREATE TABLE t1 (num INT,PRIMARY KEY(num));
  824. START TRANSACTION;
  825. INSERT INTO t1 VALUES(i);
  826. savepoint t1_save;
  827. INSERT INTO t1 VALUES (14);
  828. ROLLBACK to savepoint t1_save;
  829. COMMIT;
  830. END|
  831. delimiter ;|
  832. CALL test.p1(12);
  833. CALL test.p1(13);
  834. drop table t1;
  835. drop procedure test.p1;
  836. #
  837. # Bug 13520: Problem with delimiters in COMMENT DATA DIRECTORY ..
  838. #
  839. CREATE TABLE t1 (a int not null)
  840. partition by key(a)
  841. (partition p0 COMMENT='first partition');
  842. drop table t1;
  843. #
  844. # Bug 13433: Problem with delimited identifiers
  845. #
  846. CREATE TABLE t1 (`a b` int not null)
  847. partition by key(`a b`);
  848. drop table t1;
  849. CREATE TABLE t1 (`a b` int not null)
  850. partition by hash(`a b`);
  851. drop table t1;
  852. #
  853. # Bug#18053 Partitions: crash if null
  854. # Bug#18070 Partitions: wrong result on WHERE ... IS NULL
  855. #
  856. create table t1 (f1 integer) partition by range(f1)
  857. (partition p1 values less than (0), partition p2 values less than (10));
  858. insert into t1 set f1 = null;
  859. select * from t1 where f1 is null;
  860. explain partitions select * from t1 where f1 is null;
  861. drop table t1;
  862. create table t1 (f1 integer) partition by list(f1)
  863. (partition p1 values in (1), partition p2 values in (null));
  864. insert into t1 set f1 = null;
  865. insert into t1 set f1 = 1;
  866. select * from t1 where f1 is null or f1 = 1;
  867. drop table t1;
  868. create table t1 (f1 smallint)
  869. partition by list (f1) (partition p0 values in (null));
  870. insert into t1 values (null);
  871. select * from t1 where f1 is null;
  872. select * from t1 where f1 < 1;
  873. select * from t1 where f1 <= NULL;
  874. select * from t1 where f1 < NULL;
  875. select * from t1 where f1 >= NULL;
  876. select * from t1 where f1 > NULL;
  877. select * from t1 where f1 > 1;
  878. drop table t1;
  879. create table t1 (f1 smallint)
  880. partition by range (f1) (partition p0 values less than (0));
  881. insert into t1 values (null);
  882. select * from t1 where f1 is null;
  883. drop table t1;
  884. create table t1 (f1 integer) partition by list(f1)
  885. (
  886. partition p1 values in (1),
  887. partition p2 values in (NULL),
  888. partition p3 values in (2),
  889. partition p4 values in (3),
  890. partition p5 values in (4)
  891. );
  892. insert into t1 values (1),(2),(3),(4),(null);
  893. select * from t1 where f1 < 3;
  894. explain partitions select * from t1 where f1 < 3;
  895. select * from t1 where f1 is null;
  896. explain partitions select * from t1 where f1 is null;
  897. drop table t1;
  898. create table t1 (f1 int) partition by list(f1 div 2)
  899. (
  900. partition p1 values in (1),
  901. partition p2 values in (NULL),
  902. partition p3 values in (2),
  903. partition p4 values in (3),
  904. partition p5 values in (4)
  905. );
  906. insert into t1 values (2),(4),(6),(8),(null);
  907. select * from t1 where f1 < 3;
  908. explain partitions select * from t1 where f1 < 3;
  909. select * from t1 where f1 is null;
  910. explain partitions select * from t1 where f1 is null;
  911. drop table t1;
  912. create table t1 (a int) partition by LIST(a) (
  913. partition pn values in (NULL),
  914. partition p0 values in (0),
  915. partition p1 values in (1),
  916. partition p2 values in (2)
  917. );
  918. insert into t1 values (NULL),(0),(1),(2);
  919. select * from t1 where a is null or a < 2;
  920. explain partitions select * from t1 where a is null or a < 2;
  921. select * from t1 where a is null or a < 0 or a > 1;
  922. explain partitions select * from t1 where a is null or a < 0 or a > 1;
  923. drop table t1;
  924. #
  925. #Bug# 17631 SHOW TABLE STATUS reports wrong engine
  926. #
  927. CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, name VARCHAR(20))
  928. ENGINE=MyISAM DEFAULT CHARSET=latin1
  929. PARTITION BY RANGE(id)
  930. (PARTITION p0 VALUES LESS THAN (10) ENGINE = MyISAM,
  931. PARTITION p1 VALUES LESS THAN (20) ENGINE = MyISAM,
  932. PARTITION p2 VALUES LESS THAN (30) ENGINE = MyISAM);
  933. --replace_column 6 0 7 0 8 0 9 0 12 NULL 13 NULL 14 NULL
  934. SHOW TABLE STATUS;
  935. DROP TABLE t1;
  936. #
  937. #BUG 16002 Erroneus handling of unsigned partition functions
  938. #
  939. --error ER_PARTITION_CONST_DOMAIN_ERROR
  940. create table t1 (a bigint unsigned)
  941. partition by list (a)
  942. (partition p0 values in (0-1));
  943. create table t1 (a bigint unsigned)
  944. partition by range (a)
  945. (partition p0 values less than (10));
  946. --error ER_NO_PARTITION_FOR_GIVEN_VALUE
  947. insert into t1 values (0xFFFFFFFFFFFFFFFF);
  948. drop table t1;
  949. #
  950. #BUG 18750 Problems with partition names
  951. #
  952. create table t1 (a int)
  953. partition by list (a)
  954. (partition `s1 s2` values in (0));
  955. drop table t1;
  956. create table t1 (a int)
  957. partition by list (a)
  958. (partition `7` values in (0));
  959. drop table t1;
  960. --error ER_WRONG_PARTITION_NAME
  961. create table t1 (a int)
  962. partition by list (a)
  963. (partition `s1 s2 ` values in (0));
  964. --error ER_WRONG_PARTITION_NAME
  965. create table t1 (a int)
  966. partition by list (a)
  967. subpartition by hash (a)
  968. (partition p1 values in (0) (subpartition `p1 p2 `));
  969. #
  970. # BUG 18752 SHOW CREATE TABLE doesn't show NULL value in SHOW CREATE TABLE
  971. #
  972. CREATE TABLE t1 (a int)
  973. PARTITION BY LIST (a)
  974. (PARTITION p0 VALUES IN (NULL));
  975. SHOW CREATE TABLE t1;
  976. DROP TABLE t1;
  977. --error 1064
  978. CREATE TABLE t1 (a int)
  979. PARTITION BY RANGE(a)
  980. (PARTITION p0 VALUES LESS THAN (NULL));
  981. #
  982. # Bug#18753 Partitions: auto_increment fails
  983. #
  984. create table t1 (s1 int auto_increment primary key)
  985. partition by list (s1)
  986. (partition p1 values in (1),
  987. partition p2 values in (2),
  988. partition p3 values in (3));
  989. insert into t1 values (null);
  990. insert into t1 values (null);
  991. insert into t1 values (null);
  992. select auto_increment from information_schema.tables where table_name='t1';
  993. select * from t1;
  994. drop table t1;
  995. #
  996. # BUG 19140 Partitions: Create index for partitioned table crashes
  997. #
  998. create table t1 (a int) engine=memory
  999. partition by key(a);
  1000. insert into t1 values (1);
  1001. create index inx1 on t1(a);
  1002. drop table t1;
  1003. #
  1004. # Bug 19695 Partitions: SHOW CREATE TABLE shows table options even when it
  1005. # shouldn't
  1006. #
  1007. create table t1 (a int)
  1008. PARTITION BY KEY (a)
  1009. (PARTITION p0);
  1010. set session sql_mode='no_table_options';
  1011. show create table t1;
  1012. set session sql_mode='';
  1013. drop table t1;
  1014. #
  1015. # BUG 19122 Crash after ALTER TABLE t1 REBUILD PARTITION p1
  1016. #
  1017. create table t1 (a int)
  1018. partition by key (a)
  1019. (partition p1 engine = innodb);
  1020. alter table t1 rebuild partition p1;
  1021. alter table t1 rebuild partition p1;
  1022. alter table t1 rebuild partition p1;
  1023. alter table t1 rebuild partition p1;
  1024. alter table t1 rebuild partition p1;
  1025. alter table t1 rebuild partition p1;
  1026. alter table t1 rebuild partition p1;
  1027. drop table t1;
  1028. #
  1029. # BUG 19304 Partitions: MERGE handler not allowed in partitioned tables
  1030. #
  1031. --error ER_PARTITION_MERGE_ERROR
  1032. create table t1 (a int)
  1033. partition by key (a)
  1034. (partition p0 engine = MERGE);
  1035. #
  1036. # BUG 19062 Partition clause ignored if CREATE TABLE ... AS SELECT ...;
  1037. #
  1038. create table t1 (a varchar(1))
  1039. partition by key (a)
  1040. as select 'a';
  1041. show create table t1;
  1042. drop table t1;
  1043. #
  1044. # BUG 19501 Partitions: SHOW TABLE STATUS shows wrong Data_free
  1045. #
  1046. CREATE TABLE t1 (a int) ENGINE = MYISAM PARTITION BY KEY(a);
  1047. INSERT into t1 values (1), (2);
  1048. --replace_column 9 0 12 NULL 13 NULL 14 NULL
  1049. SHOW TABLE STATUS;
  1050. DELETE from t1 where a = 1;
  1051. --replace_column 9 0 12 NULL 13 NULL 14 NULL
  1052. SHOW TABLE STATUS;
  1053. ALTER TABLE t1 OPTIMIZE PARTITION p0;
  1054. --replace_column 12 NULL 13 NULL 14 NULL
  1055. SHOW TABLE STATUS;
  1056. DROP TABLE t1;
  1057. #
  1058. # BUG 19502: ENABLE/DISABLE Keys don't work for partitioned tables
  1059. #
  1060. CREATE TABLE t1 (a int, index(a)) PARTITION BY KEY(a);
  1061. ALTER TABLE t1 DISABLE KEYS;
  1062. ALTER TABLE t1 ENABLE KEYS;
  1063. DROP TABLE t1;
  1064. #
  1065. # Bug 17455 Partitions: Wrong message and error when using Repair/Optimize
  1066. # table on partitioned table
  1067. #
  1068. create table t1 (a int)
  1069. engine=MEMORY
  1070. partition by key (a);
  1071. REPAIR TABLE t1;
  1072. OPTIMIZE TABLE t1;
  1073. drop table t1;
  1074. #
  1075. # Bug 17310 Partitions: Bugs with archived partitioned tables
  1076. #
  1077. create database db99;
  1078. use db99;
  1079. create table t1 (a int not null)
  1080. engine=archive
  1081. partition by list (a)
  1082. (partition p0 values in (1), partition p1 values in (2));
  1083. insert into t1 values (1), (2);
  1084. --error 0, 1005
  1085. create index inx on t1 (a);
  1086. alter table t1 add partition (partition p2 values in (3));
  1087. alter table t1 drop partition p2;
  1088. use test;
  1089. drop database db99;
  1090. #
  1091. #BUG 17138 Problem with stored procedure and analyze partition
  1092. #
  1093. --disable_warnings
  1094. drop procedure if exists mysqltest_1;
  1095. --enable_warnings
  1096. create table t1 (a int)
  1097. partition by list (a)
  1098. (partition p0 values in (0));
  1099. insert into t1 values (0);
  1100. delimiter //;
  1101. create procedure mysqltest_1 ()
  1102. begin
  1103. begin
  1104. declare continue handler for sqlexception begin end;
  1105. update ignore t1 set a = 1 where a = 0;
  1106. end;
  1107. prepare stmt1 from 'alter table t1';
  1108. execute stmt1;
  1109. end//
  1110. call mysqltest_1()//
  1111. delimiter ;//
  1112. drop table t1;
  1113. drop procedure mysqltest_1;
  1114. #
  1115. # Bug 20583 Partitions: Crash using index_last
  1116. #
  1117. create table t1 (a int, index(a))
  1118. partition by hash(a);
  1119. insert into t1 values (1),(2);
  1120. select * from t1 ORDER BY a DESC;
  1121. drop table t1;
  1122. #
  1123. # Bug 20770 Partitions: DATA DIRECTORY clause change in reorganize
  1124. # doesn't remove old directory
  1125. #
  1126. --disable_query_log
  1127. --exec mkdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
  1128. eval SET @data_dir = 'DATA DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpdata''';
  1129. let $data_directory = `select @data_dir`;
  1130. --exec mkdir $MYSQLTEST_VARDIR/master-data/tmpinx || true
  1131. eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpinx''';
  1132. let $inx_directory = `select @inx_dir`;
  1133. --enable_query_log
  1134. --replace_result $MYSQLTEST_VARDIR "hello"
  1135. eval create table t1 (a int) engine myisam
  1136. partition by range (a)
  1137. subpartition by hash (a)
  1138. (partition p0 VALUES LESS THAN (1) $data_directory $inx_directory
  1139. (SUBPARTITION subpart00, SUBPARTITION subpart01));
  1140. --replace_result $MYSQLTEST_VARDIR "hello"
  1141. --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* || true
  1142. --replace_result $MYSQLTEST_VARDIR "hello"
  1143. --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1* || true
  1144. --replace_result $MYSQLTEST_VARDIR "hello"
  1145. --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1* || true
  1146. --replace_result $MYSQLTEST_VARDIR "hello"
  1147. eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
  1148. (partition p1 VALUES LESS THAN (1) $data_directory $inx_directory
  1149. (SUBPARTITION subpart10, SUBPARTITION subpart11),
  1150. partition p2 VALUES LESS THAN (2) $data_directory $inx_directory
  1151. (SUBPARTITION subpart20, SUBPARTITION subpart21));
  1152. --replace_result $MYSQLTEST_VARDIR "hello"
  1153. --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* || true
  1154. --replace_result $MYSQLTEST_VARDIR "hello"
  1155. --exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1* || true
  1156. --replace_result $MYSQLTEST_VARDIR "hello"
  1157. --exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1* || true
  1158. drop table t1;
  1159. --exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
  1160. --exec rmdir $MYSQLTEST_VARDIR/master-data/tmpinx || true
  1161. #
  1162. # Bug 21388: Bigint fails to find record
  1163. #
  1164. create table t1 (a bigint unsigned not null, primary key(a))
  1165. engine = myisam
  1166. partition by key (a)
  1167. partitions 10;
  1168. show create table t1;
  1169. insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE),
  1170. (18446744073709551613), (18446744073709551612);
  1171. select * from t1;
  1172. select * from t1 where a = 18446744073709551615;
  1173. delete from t1 where a = 18446744073709551615;
  1174. select * from t1;
  1175. drop table t1;
  1176. --echo End of 5.1 tests