summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@mysql.com>2009-10-05 16:10:18 +0200
committerMikael Ronstrom <mikael@mysql.com>2009-10-05 16:10:18 +0200
commitbd807278330cff50d117fff414a72ecc35a230ee (patch)
tree747ede18cc4d20a67520182da1ad566757e9d698 /mysql-test
parent08b57e5387dfed356bc1f254e160c118a2174c2e (diff)
downloadmariadb-git-bd807278330cff50d117fff414a72ecc35a230ee.tar.gz
BUG#47776, Fixed character set handling, used wrong length, eventually also found that didn't need to convert to my_strnxfrm-format for column list partitioned tables, also column list partitioned tables can use multi-byte character sets in partition fields as well as where strxfrm multiplies the number of bytes in the string
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/partition_innodb.result24
-rw-r--r--mysql-test/t/partition_innodb.test30
2 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index af277e5ce40..fb991ef5fcc 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -1,4 +1,28 @@
drop table if exists t1;
+create table t1 (a varchar(5))
+engine=memory
+partition by range column_list(a)
+( partition p0 values less than (column_list('m')),
+partition p1 values less than (column_list('za')));
+insert into t1 values ('j');
+update t1 set a = 'z' where (a >= 'j');
+drop table t1;
+create table t1 (a varchar(5))
+engine=myisam
+partition by range column_list(a)
+( partition p0 values less than (column_list('m')),
+partition p1 values less than (column_list('za')));
+insert into t1 values ('j');
+update t1 set a = 'z' where (a >= 'j');
+drop table t1;
+create table t1 (a varchar(5))
+engine=innodb
+partition by range column_list(a)
+( partition p0 values less than (column_list('m')),
+partition p1 values less than (column_list('za')));
+insert into t1 values ('j');
+update t1 set a = 'z' where (a >= 'j');
+drop table t1;
CREATE TABLE t1 (id INT PRIMARY KEY, data INT) ENGINE = InnoDB
PARTITION BY RANGE(id) (
PARTITION p0 VALUES LESS THAN (5),
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index c6bf0af0b6f..a8758525342 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -6,6 +6,36 @@ drop table if exists t1;
--enable_warnings
#
+# BUG#47776, Failed to update for MEMORY engine, crash for InnoDB and success for MyISAM
+#
+create table t1 (a varchar(5))
+engine=memory
+partition by range column_list(a)
+( partition p0 values less than (column_list('m')),
+ partition p1 values less than (column_list('za')));
+insert into t1 values ('j');
+update t1 set a = 'z' where (a >= 'j');
+drop table t1;
+
+create table t1 (a varchar(5))
+engine=myisam
+partition by range column_list(a)
+( partition p0 values less than (column_list('m')),
+ partition p1 values less than (column_list('za')));
+insert into t1 values ('j');
+update t1 set a = 'z' where (a >= 'j');
+drop table t1;
+
+create table t1 (a varchar(5))
+engine=innodb
+partition by range column_list(a)
+( partition p0 values less than (column_list('m')),
+ partition p1 values less than (column_list('za')));
+insert into t1 values ('j');
+update t1 set a = 'z' where (a >= 'j');
+drop table t1;
+
+#
# Bug#40595: Non-matching rows not released with READ-COMMITTED on tables
# with partitions
CREATE TABLE t1 (id INT PRIMARY KEY, data INT) ENGINE = InnoDB