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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
aaf9fb0d
Commit
aaf9fb0d
authored
May 03, 2011
by
Igor Babaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed LP bug #776274,
The bug was introduced by the patch that fixed bug 717577.
parent
8ac88c88
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
9 deletions
+63
-9
mysql-test/r/select.result
mysql-test/r/select.result
+13
-0
mysql-test/r/select_jcl6.result
mysql-test/r/select_jcl6.result
+13
-0
mysql-test/r/select_pkeycache.result
mysql-test/r/select_pkeycache.result
+13
-0
mysql-test/t/select.test
mysql-test/t/select.test
+14
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+10
-9
No files found.
mysql-test/r/select.result
View file @
aaf9fb0d
...
@@ -5018,3 +5018,16 @@ WHERE t7.f71>0;
...
@@ -5018,3 +5018,16 @@ WHERE t7.f71>0;
f23
f23
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
End of 5.1 tests
End of 5.1 tests
#
# BUG#776274: substitution of a single row table
#
CREATE TABLE t1 (a int NOT NULL , b int);
INSERT INTO t1 VALUES (2,2);
SELECT * FROM t1 WHERE a = b;
a b
2 2
EXPLAIN
SELECT * FROM t1 WHERE a = b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
DROP TABLE t1;
mysql-test/r/select_jcl6.result
View file @
aaf9fb0d
...
@@ -5025,6 +5025,19 @@ WHERE t7.f71>0;
...
@@ -5025,6 +5025,19 @@ WHERE t7.f71>0;
f23
f23
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
End of 5.1 tests
End of 5.1 tests
#
# BUG#776274: substitution of a single row table
#
CREATE TABLE t1 (a int NOT NULL , b int);
INSERT INTO t1 VALUES (2,2);
SELECT * FROM t1 WHERE a = b;
a b
2 2
EXPLAIN
SELECT * FROM t1 WHERE a = b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
DROP TABLE t1;
set join_cache_level=default;
set join_cache_level=default;
show variables like 'join_cache_level';
show variables like 'join_cache_level';
Variable_name Value
Variable_name Value
...
...
mysql-test/r/select_pkeycache.result
View file @
aaf9fb0d
...
@@ -5018,3 +5018,16 @@ WHERE t7.f71>0;
...
@@ -5018,3 +5018,16 @@ WHERE t7.f71>0;
f23
f23
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
End of 5.1 tests
End of 5.1 tests
#
# BUG#776274: substitution of a single row table
#
CREATE TABLE t1 (a int NOT NULL , b int);
INSERT INTO t1 VALUES (2,2);
SELECT * FROM t1 WHERE a = b;
a b
2 2
EXPLAIN
SELECT * FROM t1 WHERE a = b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
DROP TABLE t1;
mysql-test/t/select.test
View file @
aaf9fb0d
...
@@ -4211,3 +4211,17 @@ SELECT t2.f23 FROM
...
@@ -4211,3 +4211,17 @@ SELECT t2.f23 FROM
DROP
TABLE
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
;
DROP
TABLE
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
--
echo
#
--
echo
# BUG#776274: substitution of a single row table
--
echo
#
CREATE
TABLE
t1
(
a
int
NOT
NULL
,
b
int
);
INSERT
INTO
t1
VALUES
(
2
,
2
);
SELECT
*
FROM
t1
WHERE
a
=
b
;
EXPLAIN
SELECT
*
FROM
t1
WHERE
a
=
b
;
DROP
TABLE
t1
;
sql/item_cmpfunc.cc
View file @
aaf9fb0d
...
@@ -5740,18 +5740,19 @@ void Item_equal::update_const()
...
@@ -5740,18 +5740,19 @@ void Item_equal::update_const()
List_iterator
<
Item
>
it
(
equal_items
);
List_iterator
<
Item
>
it
(
equal_items
);
if
(
with_const
)
if
(
with_const
)
it
++
;
it
++
;
Item
*
item
=
it
++
;
Item
*
item
;
while
(
item
)
while
(
(
item
=
it
++
)
)
{
{
if
(
item
->
const_item
())
if
(
item
->
const_item
())
{
if
(
item
==
equal_items
.
head
())
with_const
=
TRUE
;
else
{
{
it
.
remove
();
it
.
remove
();
Item
*
next_item
=
it
++
;
add_const
(
item
);
add_const
(
item
);
item
=
next_item
;
}
}
else
}
item
=
it
++
;
}
}
}
}
...
...
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