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
41bd6aa4
Commit
41bd6aa4
authored
Jul 04, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not assign values of left expression of IN/ANN/ANY subquery in case of PS preparation (BUG#4403)
parent
fb7f1518
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
37 deletions
+44
-37
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+6
-6
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+12
-12
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+12
-12
mysql-test/r/ps_6bdb.result
mysql-test/r/ps_6bdb.result
+6
-6
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+8
-1
No files found.
mysql-test/r/ps_2myisam.result
View file @
41bd6aa4
...
...
@@ -389,12 +389,12 @@ where @arg01 = first.b or first.a = second.a or second.b = @arg02;
a @arg00 a
1 ABC 1
2 ABC 1
3 ABC 1
4 ABC 1
2 ABC 2
2 ABC 3
2 ABC 4
3 ABC 1
3 ABC 3
4 ABC 1
2 ABC 4
4 ABC 4
prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second
where ? = first.b or first.a = second.a or second.b = ? ';
...
...
@@ -402,12 +402,12 @@ execute stmt1 using @arg00, @arg01, @arg02;
a ? a
1 ABC 1
2 ABC 1
3 ABC 1
4 ABC 1
2 ABC 2
2 ABC 3
2 ABC 4
3 ABC 1
3 ABC 3
4 ABC 1
2 ABC 4
4 ABC 4
test_sequence
------ subquery tests ------
...
...
mysql-test/r/ps_3innodb.result
View file @
41bd6aa4
...
...
@@ -548,14 +548,14 @@ def in_s 8 21 1 Y 32768 0 8
def in_row_s 8 21 1 Y 32768 0 8
scalar_s exists_s in_s in_row_s
2.0000 0 1 0
2.0000 0 1 0
18.0000 1 0 1
2.0000 0 1 0
18.0000 1 0 1
execute stmt1 ;
scalar_s exists_s in_s in_row_s
2.0000 0 1 0
2.0000 0 1 0
18.0000 1 0 1
2.0000 0 1 0
18.0000 1 0 1
set @stmt= concat('explain ',@stmt);
prepare stmt1 from @stmt ;
...
...
@@ -572,8 +572,8 @@ def ref 253 1024 0 Y 0 31 63
def rows 8 10 1 N 32801 0 8
def Extra 253 255 44 N 1 31 63
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY
<derived6> ALL NULL NULL NULL NULL 2
1 PRIMARY
t_many_col_types ALL NULL NULL NULL NULL 3
Using where
1 PRIMARY
t_many_col_types ALL NULL NULL NULL NULL 3
1 PRIMARY
<derived6> ALL NULL NULL NULL NULL 2
Using where
6 DERIVED t2 ALL NULL NULL NULL NULL 2
5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
...
...
@@ -581,8 +581,8 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using temporary; Using filesort
execute stmt1 ;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY
<derived6> ALL NULL NULL NULL NULL 2
1 PRIMARY
t_many_col_types ALL NULL NULL NULL NULL 3
Using where
1 PRIMARY
t_many_col_types ALL NULL NULL NULL NULL 3
1 PRIMARY
<derived6> ALL NULL NULL NULL NULL 2
Using where
6 DERIVED t2 ALL NULL NULL NULL NULL 2
5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
...
...
@@ -617,15 +617,15 @@ def in_s 8 21 1 Y 32768 0 8
def in_row_s 8 21 1 Y 32768 0 8
scalar_s exists_s in_s in_row_s
2 0 1 0
2 0 1 0
18 1 0 1
2 0 1 0
18 1 0 1
execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
@arg07, @arg08, @arg09 ;
scalar_s exists_s in_s in_row_s
2 0 1 0
2 0 1 0
18 1 0 1
2 0 1 0
18 1 0 1
set @stmt= concat('explain ',@stmt);
prepare stmt1 from @stmt ;
...
...
@@ -643,8 +643,8 @@ def ref 253 1024 0 Y 0 31 63
def rows 8 10 1 N 32801 0 8
def Extra 253 255 44 N 1 31 63
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY
<derived6> ALL NULL NULL NULL NULL 2
1 PRIMARY
t_many_col_types ALL NULL NULL NULL NULL 3
Using where
1 PRIMARY
t_many_col_types ALL NULL NULL NULL NULL 3
1 PRIMARY
<derived6> ALL NULL NULL NULL NULL 2
Using where
6 DERIVED t2 ALL NULL NULL NULL NULL 2
5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
...
...
@@ -653,8 +653,8 @@ id select_type table type possible_keys key key_len ref rows Extra
execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
@arg07, @arg08, @arg09 ;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY
<derived6> ALL NULL NULL NULL NULL 2
1 PRIMARY
t_many_col_types ALL NULL NULL NULL NULL 3
Using where
1 PRIMARY
t_many_col_types ALL NULL NULL NULL NULL 3
1 PRIMARY
<derived6> ALL NULL NULL NULL NULL 2
Using where
6 DERIVED t2 ALL NULL NULL NULL NULL 2
5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
...
...
mysql-test/r/ps_5merge.result
View file @
41bd6aa4
...
...
@@ -432,12 +432,12 @@ where @arg01 = first.b or first.a = second.a or second.b = @arg02;
a @arg00 a
1 ABC 1
2 ABC 1
3 ABC 1
4 ABC 1
2 ABC 2
2 ABC 3
2 ABC 4
3 ABC 1
3 ABC 3
4 ABC 1
2 ABC 4
4 ABC 4
prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second
where ? = first.b or first.a = second.a or second.b = ? ';
...
...
@@ -445,12 +445,12 @@ execute stmt1 using @arg00, @arg01, @arg02;
a ? a
1 ABC 1
2 ABC 1
3 ABC 1
4 ABC 1
2 ABC 2
2 ABC 3
2 ABC 4
3 ABC 1
3 ABC 3
4 ABC 1
2 ABC 4
4 ABC 4
test_sequence
------ subquery tests ------
...
...
@@ -1615,12 +1615,12 @@ where @arg01 = first.b or first.a = second.a or second.b = @arg02;
a @arg00 a
1 ABC 1
2 ABC 1
3 ABC 1
4 ABC 1
2 ABC 2
2 ABC 3
2 ABC 4
3 ABC 1
3 ABC 3
4 ABC 1
2 ABC 4
4 ABC 4
prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second
where ? = first.b or first.a = second.a or second.b = ? ';
...
...
@@ -1628,12 +1628,12 @@ execute stmt1 using @arg00, @arg01, @arg02;
a ? a
1 ABC 1
2 ABC 1
3 ABC 1
4 ABC 1
2 ABC 2
2 ABC 3
2 ABC 4
3 ABC 1
3 ABC 3
4 ABC 1
2 ABC 4
4 ABC 4
test_sequence
------ subquery tests ------
...
...
mysql-test/r/ps_6bdb.result
View file @
41bd6aa4
...
...
@@ -389,12 +389,12 @@ where @arg01 = first.b or first.a = second.a or second.b = @arg02;
a @arg00 a
1 ABC 1
2 ABC 1
3 ABC 1
4 ABC 1
2 ABC 2
2 ABC 3
2 ABC 4
3 ABC 1
3 ABC 3
4 ABC 1
2 ABC 4
4 ABC 4
prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second
where ? = first.b or first.a = second.a or second.b = ? ';
...
...
@@ -402,12 +402,12 @@ execute stmt1 using @arg00, @arg01, @arg02;
a ? a
1 ABC 1
2 ABC 1
3 ABC 1
4 ABC 1
2 ABC 2
2 ABC 3
2 ABC 4
3 ABC 1
3 ABC 3
4 ABC 1
2 ABC 4
4 ABC 4
test_sequence
------ subquery tests ------
...
...
sql/item_cmpfunc.cc
View file @
41bd6aa4
...
...
@@ -483,7 +483,14 @@ bool Item_in_optimizer::fix_left(THD *thd,
return
1
;
cache
->
setup
(
args
[
0
]);
cache
->
store
(
args
[
0
]);
/*
If it is preparation PS only then we do not know values of parameters =>
cant't get there values and do not need that values.
TODO: during merge with 5.0 it should be changed on !thd->only_prepare()
*/
if
(
!
thd
->
current_statement
)
cache
->
store
(
args
[
0
]);
if
(
cache
->
cols
()
==
1
)
{
if
((
used_tables_cache
=
args
[
0
]
->
used_tables
()))
...
...
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