diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-11-02 15:18:50 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2022-01-19 18:10:11 +0300 |
commit | 106c785e2d3357a6f6711907f9e20b04c6ec7f96 (patch) | |
tree | 71cb2e9a0b568b096204acd969957ab3daf77f6f /mysql-test/main/statistics_json.test | |
parent | ac0194bd0e6c0d3a8320606461753e0648bd2596 (diff) | |
download | mariadb-git-106c785e2d3357a6f6711907f9e20b04c6ec7f96.tar.gz |
MDEV-26911: Unexpected ER_DUP_KEY, ASAN errors, double free detected in ...
When loading the histogram, use table->field[N], not table->s->field[N].
When we used the latter we would corrupt the fields's default value. One
of the consequences of that would be that AUTO_INCREMENT fields would
stop working correctly.
Diffstat (limited to 'mysql-test/main/statistics_json.test')
-rw-r--r-- | mysql-test/main/statistics_json.test | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mysql-test/main/statistics_json.test b/mysql-test/main/statistics_json.test index b0f54e08ff2..c0c88895f05 100644 --- a/mysql-test/main/statistics_json.test +++ b/mysql-test/main/statistics_json.test @@ -5,6 +5,7 @@ let $histogram_type_override='JSON_HB'; --source statistics.test +--source include/have_innodb.inc --source include/have_stat_tables.inc --source include/have_sequence.inc --source include/analyze-format.inc @@ -325,5 +326,17 @@ insert into t1 values ('foo'),(unhex('9C')); analyze table t1 persistent for all; select * from t1; - drop table t1; + +--echo # +--echo # MDEV-26911: Unexpected ER_DUP_KEY, ASAN errors, double free detected in tcache with JSON_HB histogram +--echo # + +SET histogram_type= JSON_HB; + +CREATE TABLE t1 (pk INT AUTO_INCREMENT, f VARCHAR(8), PRIMARY KEY (pk)); +INSERT INTO t1 (f) VALUES ('foo'); +ANALYZE TABLE t1 PERSISTENT FOR ALL; +ALTER TABLE t1 MODIFY f TEXT, ORDER BY pk; +INSERT INTO t1 (f) VALUES ('bar'); +DROP TABLE t1; |