From fa01e8845b6b75c0d5f1f564ff5705a2c3735468 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Jan 2008 12:06:20 +0100 Subject: Bug#30459 Partitioning across disks failing on Windows Problem was that there are no support for symlinked files on Windows for mysqld. So we fail when trying to create them. Solution: Ignore the DATA/INDEX DIRECTORY clause for partitions and push a warning. (Just like a MyISAM table) mysql-test/r/partition.result: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests to partition_symlink result file mysql-test/r/partition_symlink.result: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests from partition.test result file mysql-test/r/partition_windows.result: Bug#30459 Partitioning across disks failing on Windows result file mysql-test/t/partition.test: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests to partition_symlink test file mysql-test/t/partition_symlink.test: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests from partition.test test file mysql-test/t/partition_windows.test: Bug#30459 Partitioning across disks failing on Windows test file --- mysql-test/t/partition.test | 47 --------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'mysql-test/t/partition.test') diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 23d6c5f8865..183b348d473 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -78,24 +78,6 @@ create table t1 (a int) partition by key(a) partitions 1e+300; -# -# Bug 21350: Data Directory problems -# --- error ER_WRONG_TABLE_NAME -create table t1 (a int) -partition by key (a) -(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); - -# -# Insert a test that manages to create the first partition and fails with -# the second, ensure that we clean up afterwards in a proper manner. -# ---error ER_WRONG_TABLE_NAME -create table t1 (a int) -partition by key (a) -(partition p0, - partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); - # # Bug 19309 Partitions: Crash if double procedural alter # @@ -1398,35 +1380,6 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified' drop table t1, t2; -# -# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables -# - -disable_query_log; -eval create table t2 (i int ) -partition by range (i) -( - partition p01 values less than (1000) - data directory="$MYSQLTEST_VARDIR/master-data/test/" - index directory="$MYSQLTEST_VARDIR/master-data/test/" -); -enable_query_log; - -set @org_mode=@@sql_mode; -set @@sql_mode='NO_DIR_IN_CREATE'; -select @@sql_mode; -create table t1 (i int ) -partition by range (i) -( - partition p01 values less than (1000) - data directory='/not/existing' - index directory='/not/existing' -); - -show create table t2; -DROP TABLE t1, t2; -set @@sql_mode=@org_mode; - # # Bug #27123 partition + on duplicate key update + varchar = Can't find record in # -- cgit v1.2.1 From d84a0e5caa26602b282695b52417cf7d9b667e7e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Jan 2008 13:15:50 +0100 Subject: Bug#31931 Partitions: unjustified 'mix of handlers' error message Problem was that the mix of handlers was not consistent between CREATE and ALTER changed so that it works like: - All partitions must use the same engine AND it must be the same as the table. - if one does NOT specify an engine on the table level then one must either NOT specify any engine on any partition/subpartition OR for ALL partitions/subpartitions Note: that after a table have been created, the storage engine is specified for all parts of the table (table/partition/subpartition) and so when using alter, one does not need to specify it (unless one wants to change the storage engine, then one have to specify it on the table level) mysql-test/r/partition.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/r/partition_innodb.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/ndb/r/ndb_partition_key.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/ndb/t/ndb_partition_key.test: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case update mysql-test/suite/parts/inc/partition_engine.inc: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case updated mysql-test/suite/parts/r/ndb_partition_key.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/parts/r/partition_engine_innodb.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/parts/r/partition_engine_myisam.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/parts/t/ndb_partition_key.test: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case updated mysql-test/t/partition.test: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case updated mysql-test/t/partition_innodb.test: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case updated sql/partition_info.cc: Bug#31931 Partitions: unjustified 'mix of handlers' error message moved the check_engine_condition here from sql_partition.cc created a new check_engine_mix from check_native_partitioned in sql_partition.cc sql/partition_info.h: Bug#31931 Partitions: unjustified 'mix of handlers' error message non static function check_engine_mix (now used in sql_partition.cc) sql/sql_partition.cc: Bug#31931 Partitions: unjustified 'mix of handlers' error message moved check_engine_condition to partition_info.cc and moved out some common code in check_native_partitioned to check_engine_mix in partition_info.cc --- mysql-test/t/partition.test | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mysql-test/t/partition.test') diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 23d6c5f8865..1ba8402cdf0 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -49,6 +49,7 @@ create table t1 (id int auto_increment, s1 int, primary key (id)); insert into t1 values (null,1); insert into t1 values (null,6); +-- sorted_result select * from t1; alter table t1 partition by range (id) ( @@ -618,12 +619,14 @@ partition by key (a) (partition p0, partition p1); show create table t1; ---error ER_MIX_HANDLER_ERROR +# Since alter, it already have ENGINE=HEAP from before on table level +# -> OK alter table t1 partition by key(a) (partition p0, partition p1 engine=heap); ---error ER_MIX_HANDLER_ERROR +# Since alter, it already have ENGINE=HEAP from before on table level +# -> OK alter table t1 partition by key(a) (partition p0 engine=heap, partition p1); -- cgit v1.2.1 From bb091abb145f89e2332a5b49cbc221793bce3452 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jan 2008 22:05:25 +0100 Subject: BUG#33182: Disallow division due to div_precision_increment problems mysql-test/r/partition.result: New test case to validate that '/' is no longer allowed, only integer division is allowed mysql-test/t/partition.test: New test case to validate that '/' is no longer allowed, only integer division is allowed sql/item_func.h: +,-,*, mod is allowed / is disallowed --- mysql-test/t/partition.test | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/t/partition.test') diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 23d6c5f8865..7ca6f0f55d6 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -14,6 +14,10 @@ drop table if exists t1; --enable_warnings +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (a int) partition by list ((a/3)*10 div 1) +(partition p0 values in (0), partition p1 values in (1)); + # # Bug #30695: An apostrophe ' in the comment of the ADD PARTITION causes the Server to crash. # -- cgit v1.2.1 From 6a15453640b4d92797817aeb83bcc96957a12c51 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Feb 2008 11:32:46 +0100 Subject: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Problem was that it did not work with corrupted/crashed tables. Solution is to disable these commands until WL#4176 is completed mysql-test/r/partition.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/inc/partition_alter4.inc: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION copy-paste error, changed from REBUILT to REPAIR, as the heading says mysql-test/suite/parts/r/partition_alter1_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_alter1_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_alter2_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_alter2_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_basic_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_basic_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_engine_innodb.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/r/partition_engine_myisam.result: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Test result mysql-test/suite/parts/t/disabled.def: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Disabled test since the tested feature is not longer supported mysql-test/t/partition.test: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION OPTIMIZE PARTITION is not longer supported, waiting for WL#4176 sql/ha_partition.cc: Bug#20129: ALTER TABLE ... ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION Problem was that it did not work with corrupted/crashed tables. Solution is to disable these commands until WL#4176 is completed (returning HA_ADMIN_NOT_IMPLEMENTED and #ifdef'ed the non-reachable code) --- mysql-test/t/partition.test | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'mysql-test/t/partition.test') diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 23d6c5f8865..dc0f6cdcc2e 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -35,7 +35,7 @@ PARTITION `p5` VALUES LESS THAN (2010) COMMENT 'APSTART \' APEND' ); #--exec sed 's/APSTART \\/APSTART /' var/master-data/test/t1.frm > tmpt1.frm && mv tmpt1.frm var/master-data/test/t1.frm -#--error 1064 +#--error ER_PARSE_ERROR SELECT * FROM t1 LIMIT 1; DROP TABLE t1; @@ -1208,9 +1208,11 @@ SHOW TABLE STATUS; DELETE from t1 where a = 1; --replace_column 9 0 12 NULL 13 NULL 14 NULL SHOW TABLE STATUS; +# restore this after WL#4176 is completed +-- error ER_CHECK_NOT_IMPLEMENTED ALTER TABLE t1 OPTIMIZE PARTITION p0; ---replace_column 12 NULL 13 NULL 14 NULL -SHOW TABLE STATUS; +#--replace_column 12 NULL 13 NULL 14 NULL +#SHOW TABLE STATUS; DROP TABLE t1; # @@ -1568,9 +1570,9 @@ PARTITION BY RANGE (a) ( PARTITION p1 VALUES LESS THAN (10), PARTITION p2 VALUES LESS THAN (20) ); ---error 1064 +--error ER_PARSE_ERROR ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED; ---error 1064 +--error ER_PARSE_ERROR ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED; DROP TABLE t1; -- cgit v1.2.1 From db9b2bdc1b229e492d0e60761d7f62db1ee0f652 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2008 21:18:50 +0100 Subject: Post push fix Fixed a missed case in the patch for Bug#31931. Also makes Bug#33722 a duplicate of Bug#31931. Added tests for better coverage. Replaced some legacy function calls. mysql-test/r/partition.result: Added tests for better coverage mysql-test/r/partition_datatype.result: Added tests for better coverage mysql-test/r/partition_error.result: Added tests for better coverage mysql-test/suite/parts/inc/partition_engine.inc: Bug#31931: Mix of handlers error message Bug#33722 is fixed within this patch too mysql-test/suite/parts/r/partition_engine_innodb.result: Bug#31931: Mix of handlers error message Bug#33722 is fixed within this patch too mysql-test/suite/parts/r/partition_engine_myisam.result: Bug#31931: Mix of handlers error message Bug#33722 is fixed within this patch too mysql-test/t/partition.test: Added tests for better coverage mysql-test/t/partition_datatype.test: Added tests for better coverage mysql-test/t/partition_error.test: Added tests for Bug#31931 sql/partition_info.cc: Bug#31931: Mix of handlers error message Fixed case where given info->db_type not matched thd->lex->create_info.db_type And the check for inconsistent subpartition engines-clauses. sql/sql_partition.cc: Changed ha_legacy_type to ha_resolve_storage_engine_name sql/sql_table.cc: Changed ha_legacy_type to ha_resolve_storage_engine_name --- mysql-test/t/partition.test | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mysql-test/t/partition.test') diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 5adf21d53e8..c4e447988db 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1215,13 +1215,15 @@ DROP TABLE t1; # # Bug 17455 Partitions: Wrong message and error when using Repair/Optimize # table on partitioned table -# +# (added check/analyze for gcov of Bug#20129) create table t1 (a int) engine=MEMORY partition by key (a); REPAIR TABLE t1; OPTIMIZE TABLE t1; +CHECK TABLE t1; +ANALYZE TABLE t1; drop table t1; @@ -1524,7 +1526,7 @@ select c1 from t1 group by (select c0 from t1 limit 1); drop table t1; # Bug #30495: optimize table t1,t2,t3 extended errors -# +# (added more maintenace commands for Bug#20129 CREATE TABLE t1(a int) PARTITION BY RANGE (a) ( PARTITION p1 VALUES LESS THAN (10), @@ -1534,6 +1536,14 @@ PARTITION BY RANGE (a) ( ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED; --error ER_PARSE_ERROR ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 ANALYZE PARTITION p1; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 CHECK PARTITION p1; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 REPAIR PARTITION p1; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 OPTIMIZE PARTITION p1; DROP TABLE t1; # -- cgit v1.2.1