mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user