mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
MDEV-17778: Alter table leads to a truncation warning with ANALYZE command
Alter statement changed the THD structure by setting the value to FIELD_CHECK_WARN and then not resetting it back. This led ANALYZE to throw a warning which previously it didn't.
This commit is contained in:
parent
a72516348b
commit
8aef7f2bb9
6 changed files with 47 additions and 18 deletions
|
|
@ -2469,3 +2469,24 @@ DROP TABLE t1;
|
|||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-17778: Alter table leads to a truncation warning with ANALYZE command
|
||||
#
|
||||
set @save_use_stat_tables= @@use_stat_tables;
|
||||
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
|
||||
set @@optimizer_use_condition_selectivity=4;
|
||||
set @@use_stat_tables=PREFERABLY;
|
||||
create table t1 (a int)engine=InnoDB;
|
||||
insert into t1 values (1),(1),(2),(3);
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
alter table t1 change a b int;
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
set @@use_stat_tables= @save_use_stat_tables;
|
||||
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
|
||||
drop table t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue