1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge branch '10.3' into 10.4

This commit is contained in:
Oleksandr Byelkin
2019-05-19 20:55:37 +02:00
3893 changed files with 11766 additions and 6460 deletions

View File

@ -457,6 +457,53 @@ delete from mysql.table_stats;
delete from mysql.column_stats;
delete from mysql.index_stats;
--echo #
--echo # MDEV-19352: Server crash in alloc_histograms_for_table_share upon query from information schema
--echo #
use test;
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);
CREATE TABLE t2 (b INT);
CREATE VIEW v AS SELECT * FROM t1 JOIN t2;
--error ER_NO_SUCH_TABLE
INSERT INTO t2 SELECT * FROM x;
select * from information_schema.tables where table_name='v';
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1,t2;
drop view v;
--echo #
--echo # MDEV-19407: Assertion `field->table->stats_is_read' failed in is_eits_usable
--echo #
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @@optimizer_use_condition_selectivity= 1;
set @@use_stat_tables='never';
create table t1(pk int);
insert into t1 values (4),(3);
set @@optimizer_use_condition_selectivity= 4;
set use_stat_tables='preferably';
--error ER_NO_SUCH_TABLE
INSERT INTO t1 SELECT * FROM x;
CREATE TABLE t2 SELECT pk FROM t1 WHERE pk>2;
select * from t2;
drop table t1,t2;
create table t1(a int,b int, key k1(a) );
insert into t1 values(1,1),(2,2),(3,3);
analyze table t1;
select * from mysql.index_stats, t1 where index_name='k1' and t1.a > 1 and t1.b > 1;
drop table t1;
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set @save_optimizer_switch=@@optimizer_switch;
set use_stat_tables=@save_use_stat_tables;