1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#48276: can't add column if subpartition exists

Bug when setting up default partitioning,
used an uninitialized variabe.

mysql-test/r/partition.result:
  Bug#48276: can't add column if subpartition exists
  
  Added result
mysql-test/t/partition.test:
  Bug#48276: can't add column if subpartition exists
  
  Added test
sql/sql_partition.cc:
  Bug#48276: can't add column if subpartition exists
  
  even if is_create_table_ind was set, one tried to set no_subparts
  with the unitialized no_parts local variable.
  
  Fixed by rearrange the code to be to only execute
  the statements when is_create_table_ind was not set.
This commit is contained in:
Mattias Jonsson
2009-11-09 11:26:01 +01:00
parent 5594215c58
commit 785b5c4e7a
3 changed files with 31 additions and 15 deletions

View File

@ -1,4 +1,10 @@
drop table if exists t1, t2;
CREATE TABLE t1 (a INT, b INT)
PARTITION BY LIST (a)
SUBPARTITION BY HASH (b)
(PARTITION p1 VALUES IN (1));
ALTER TABLE t1 ADD COLUMN c INT;
DROP TABLE t1;
CREATE TABLE t1 (
a int NOT NULL,
b int NOT NULL);