1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-13 02:22:51 +03:00

BUG#20397: Crash at ALTER TABLE t1 engine = x; for partitioned table

mysql-test/r/partition_error.result:
  New test cases
mysql-test/t/partition_error.test:
  New test cases
sql/sql_table.cc:
  ALTER TABLE t1 engine = x;
  will behave exactly like
  ALTER TABLE t1;
  See no reason why one should change handler to something not specified in query when
  there is already something one is attached to.
This commit is contained in:
unknown
2006-06-13 22:46:38 -04:00
parent b19c1896ad
commit cb0f1641fe
3 changed files with 56 additions and 0 deletions

View File

@ -1,4 +1,28 @@
drop table if exists t1;
create table t1 (a int)
engine = x
partition by key (a);
Warnings:
Error 1286 Unknown table engine 'x'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a)
drop table t1;
create table t1 (a int)
engine = innodb
partition by list (a)
(partition p0 values in (0));
alter table t1 engine = x;
Warnings:
Error 1286 Unknown table engine 'x'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0) ENGINE = InnoDB)
drop table t1;
partition by list (a)
partitions 3
(partition x1 values in (1,2,9,4) tablespace ts1,

View File

@ -8,6 +8,24 @@
drop table if exists t1;
--enable_warnings
#
# Bug 20397: Partitions: Crash when using non-existing engine
#
create table t1 (a int)
engine = x
partition by key (a);
show create table t1;
drop table t1;
create table t1 (a int)
engine = innodb
partition by list (a)
(partition p0 values in (0));
alter table t1 engine = x;
show create table t1;
drop table t1;
#
# Partition by key stand-alone error
#
@ -775,3 +793,5 @@ partition by range (a + (select count(*) from t1))
-- error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR
create table t1 (a char(10))
partition by hash (extractvalue(a,'a'));