diff options
-rw-r--r-- | mysql-test/suite/gcol/inc/gcol_keys.inc | 8 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_keys_innodb.result | 5 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_keys_myisam.result | 5 | ||||
-rw-r--r-- | storage/myisam/ha_myisam.cc | 3 |
4 files changed, 20 insertions, 1 deletions
diff --git a/mysql-test/suite/gcol/inc/gcol_keys.inc b/mysql-test/suite/gcol/inc/gcol_keys.inc index 475ab96e56f..e5f7f976120 100644 --- a/mysql-test/suite/gcol/inc/gcol_keys.inc +++ b/mysql-test/suite/gcol/inc/gcol_keys.inc @@ -809,4 +809,12 @@ eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/load.data' REPLACE INTO TABLE t1 (p --remove_file $MYSQLTEST_VARDIR/tmp/load.data DROP TABLE t1; + +--echo # MDEV-19011 Assertion `file->s->base.reclength < file->s->vreclength' +--echo # failed in ha_myisam::setup_vcols_for_repair +CREATE TABLE t1 (a INT GENERATED ALWAYS AS (1) VIRTUAL) ENGINE=MyISAM; +ALTER TABLE t1 ADD KEY (a); + +DROP TABLE t1; + } diff --git a/mysql-test/suite/gcol/r/gcol_keys_innodb.result b/mysql-test/suite/gcol/r/gcol_keys_innodb.result index ae2843dd2ec..5a29c64bc20 100644 --- a/mysql-test/suite/gcol/r/gcol_keys_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_keys_innodb.result @@ -875,6 +875,11 @@ Warning 1264 Out of range value for column 'vi' at row 1 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/load.data' REPLACE INTO TABLE t1 (pk,i,ts); ERROR 22003: Out of range value for column 'vi' at row 1 DROP TABLE t1; +# MDEV-19011 Assertion `file->s->base.reclength < file->s->vreclength' +# failed in ha_myisam::setup_vcols_for_repair +CREATE TABLE t1 (a INT GENERATED ALWAYS AS (1) VIRTUAL) ENGINE=MyISAM; +ALTER TABLE t1 ADD KEY (a); +DROP TABLE t1; # # BUG#21365158 WL8149:ASSERTION `!TABLE || (!TABLE->WRITE_SET # diff --git a/mysql-test/suite/gcol/r/gcol_keys_myisam.result b/mysql-test/suite/gcol/r/gcol_keys_myisam.result index a91a77aedf3..643c4a304a3 100644 --- a/mysql-test/suite/gcol/r/gcol_keys_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_keys_myisam.result @@ -877,6 +877,11 @@ Warning 1264 Out of range value for column 'vi' at row 1 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/load.data' REPLACE INTO TABLE t1 (pk,i,ts); ERROR 22003: Out of range value for column 'vi' at row 1 DROP TABLE t1; +# MDEV-19011 Assertion `file->s->base.reclength < file->s->vreclength' +# failed in ha_myisam::setup_vcols_for_repair +CREATE TABLE t1 (a INT GENERATED ALWAYS AS (1) VIRTUAL) ENGINE=MyISAM; +ALTER TABLE t1 ADD KEY (a); +DROP TABLE t1; DROP VIEW IF EXISTS v1,v2; DROP TABLE IF EXISTS t1,t2,t3; DROP PROCEDURE IF EXISTS p1; diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index ce52f1af828..9a11a55ecab 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -945,7 +945,8 @@ void ha_myisam::setup_vcols_for_repair(HA_CHECK *param) return; file->s->vreclength= new_vreclength; } - DBUG_ASSERT(file->s->base.reclength < file->s->vreclength); + DBUG_ASSERT(file->s->base.reclength < file->s->vreclength || + !table->s->stored_fields); param->fix_record= compute_vcols; table->use_all_columns(); table->vcol_set= &table->s->all_set; |