Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
17e85702
Commit
17e85702
authored
Dec 05, 2018
by
Varun Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a testcase for mdev-17734
parent
14f6b0cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
mysql-test/r/stat_tables.result
mysql-test/r/stat_tables.result
+19
-0
mysql-test/r/stat_tables_innodb.result
mysql-test/r/stat_tables_innodb.result
+19
-0
mysql-test/t/stat_tables.test
mysql-test/t/stat_tables.test
+17
-0
No files found.
mysql-test/r/stat_tables.result
View file @
17e85702
...
...
@@ -590,3 +590,22 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
#
# MDEV-17734: AddressSanitizer: use-after-poison in create_key_parts_for_pseudo_indexes
#
set @@use_stat_tables= PREFERABLY;
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @@optimizer_use_condition_selectivity=4;
set @save_use_stat_tables= @@use_stat_tables;
create table t1 (a int, b int);
insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
analyze table t1 persistent for columns (a) indexes ();
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select * from t1 where a=1 and b=3;
a b
1 3
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
drop table t1;
mysql-test/r/stat_tables_innodb.result
View file @
17e85702
...
...
@@ -617,5 +617,24 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
#
# MDEV-17734: AddressSanitizer: use-after-poison in create_key_parts_for_pseudo_indexes
#
set @@use_stat_tables= PREFERABLY;
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @@optimizer_use_condition_selectivity=4;
set @save_use_stat_tables= @@use_stat_tables;
create table t1 (a int, b int);
insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
analyze table t1 persistent for columns (a) indexes ();
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select * from t1 where a=1 and b=3;
a b
1 3
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
drop table t1;
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
SET SESSION STORAGE_ENGINE=DEFAULT;
mysql-test/t/stat_tables.test
View file @
17e85702
...
...
@@ -368,3 +368,20 @@ explain
SELECT
*
FROM
INFORMATION_SCHEMA
.
PROFILING
,
mysql
.
user
;
set
@@
optimizer_use_condition_selectivity
=@
save_optimizer_use_condition_selectivity
;
set
use_stat_tables
=@
save_use_stat_tables
;
--
echo
#
--
echo
# MDEV-17734: AddressSanitizer: use-after-poison in create_key_parts_for_pseudo_indexes
--
echo
#
set
@@
use_stat_tables
=
PREFERABLY
;
set
@
save_optimizer_use_condition_selectivity
=
@@
optimizer_use_condition_selectivity
;
set
@@
optimizer_use_condition_selectivity
=
4
;
set
@
save_use_stat_tables
=
@@
use_stat_tables
;
create
table
t1
(
a
int
,
b
int
);
insert
into
t1
(
a
,
b
)
values
(
1
,
2
),(
1
,
3
),(
1
,
4
),(
1
,
5
),(
2
,
6
),(
2
,
7
),(
3
,
8
),(
3
,
9
),(
3
,
9
),(
4
,
10
);
analyze
table
t1
persistent
for
columns
(
a
)
indexes
();
select
*
from
t1
where
a
=
1
and
b
=
3
;
set
@@
optimizer_use_condition_selectivity
=
@
save_optimizer_use_condition_selectivity
;
set
use_stat_tables
=@
save_use_stat_tables
;
drop
table
t1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment