Debian Codegraph @

mysql-test/suite/archive/archive_eits.test

raw
1 -- source include/have_archive.inc
2
3 --disable_warnings
4 drop table if exists t1;
5 --enable_warnings
6
7 --echo #
8 --echo # MDEV-17297: stats.records=0 for a table of Archive engine when it has rows, when we run ANALYZE command
9 --echo #
10
11 CREATE TABLE t1 (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT)engine=archive;
12 INSERT INTO t1 VALUES
13 (101, PointFromText('POINT(10 10)')),
14 (102, PointFromText('POINT(20 10)')),
15 (103, PointFromText('POINT(20 20)')),
16 (104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
17
18 set @tmp1= @@optimizer_use_condition_selectivity;
19 set @tmp2= @@use_stat_tables;
20
21 set optimizer_use_condition_selectivity=4;
22 set use_stat_tables=PREFERABLY;
23 ANALYZE TABLE t1;
24
25 select * from mysql.table_stats where table_name='t1' and db_name=database();
26
27 drop table t1;
28
29 set optimizer_use_condition_selectivity=@tmp1;
30 set use_stat_tables=@tmp2;
31
32