Commit e3f44d8d authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-19085: Remove a bogus debug assertion

MariaDB does support InnoDB tables with no stored columns.
(They are necessarily empty.)
parent 5633f83c
...@@ -1485,3 +1485,13 @@ SELECT * FROM t1; ...@@ -1485,3 +1485,13 @@ SELECT * FROM t1;
a b a b
f1 f1
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a INT GENERATED ALWAYS AS(1) VIRTUAL) ENGINE=InnoDB;
ALTER TABLE t1 ADD b INT GENERATED ALWAYS AS (2) VIRTUAL;
ALTER TABLE t1 ADD c INT;
SELECT * FROM t1;
a b c
INSERT INTO t1 SET c=3;
SELECT * FROM t1;
a b c
1 2 3
DROP TABLE t1;
...@@ -1429,3 +1429,11 @@ INSERT INTO t1(a) VALUES (''); ...@@ -1429,3 +1429,11 @@ INSERT INTO t1(a) VALUES ('');
ALTER TABLE t1 CHANGE COLUMN a a VARCHAR(85); ALTER TABLE t1 CHANGE COLUMN a a VARCHAR(85);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a INT GENERATED ALWAYS AS(1) VIRTUAL) ENGINE=InnoDB;
ALTER TABLE t1 ADD b INT GENERATED ALWAYS AS (2) VIRTUAL;
ALTER TABLE t1 ADD c INT;
SELECT * FROM t1;
INSERT INTO t1 SET c=3;
SELECT * FROM t1;
DROP TABLE t1;
...@@ -3022,7 +3022,6 @@ innobase_build_col_map( ...@@ -3022,7 +3022,6 @@ innobase_build_col_map(
& Alter_inplace_info::ADD_COLUMN)); & Alter_inplace_info::ADD_COLUMN));
DBUG_ASSERT(!add_cols || dtuple_get_n_fields(add_cols) DBUG_ASSERT(!add_cols || dtuple_get_n_fields(add_cols)
== dict_table_get_n_cols(new_table)); == dict_table_get_n_cols(new_table));
DBUG_ASSERT(table->s->stored_fields > 0);
const uint old_n_v_cols = uint(table->s->fields const uint old_n_v_cols = uint(table->s->fields
- table->s->stored_fields); - table->s->stored_fields);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment