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
d2064806
Commit
d2064806
authored
Feb 24, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Plain Diff
Merge fix for BUG#934597
parents
c068b831
914245cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
mysql-test/r/subselect4.result
mysql-test/r/subselect4.result
+14
-0
mysql-test/t/subselect4.test
mysql-test/t/subselect4.test
+16
-0
sql/sql_select.cc
sql/sql_select.cc
+9
-0
No files found.
mysql-test/r/subselect4.result
View file @
d2064806
...
...
@@ -2141,6 +2141,20 @@ WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.a < ANY (SELECT t4.a FROM t4) and t3
c a b
10 7 0
drop table t2, t3, t4;
#
# BUG#934597: Assertion `! is_set()' failed in Diagnostics_area::set_ok_status(THD...
#
CREATE TABLE t1 ( a VARCHAR(1) );
INSERT INTO t1 VALUES ('u'),('k');
CREATE TABLE t2 AS
SELECT a AS field1 FROM t1
WHERE ( SELECT alias1.a
FROM t1 AS alias1
) IS NOT NULL;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t2;
ERROR 42S02: Unknown table 't2'
DROP TABLE t1;
set optimizer_switch=@subselect4_tmp;
SET optimizer_switch= @@global.optimizer_switch;
set @@tmp_table_size= @@global.tmp_table_size;
mysql-test/t/subselect4.test
View file @
d2064806
...
...
@@ -1779,6 +1779,22 @@ WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.a < ANY (SELECT t4.a FROM t4) and t3
drop
table
t2
,
t3
,
t4
;
--
echo
#
--
echo
# BUG#934597: Assertion `! is_set()' failed in Diagnostics_area::set_ok_status(THD...
--
echo
#
CREATE
TABLE
t1
(
a
VARCHAR
(
1
)
);
INSERT
INTO
t1
VALUES
(
'u'
),(
'k'
);
--
error
ER_SUBQUERY_NO_1_ROW
CREATE
TABLE
t2
AS
SELECT
a
AS
field1
FROM
t1
WHERE
(
SELECT
alias1
.
a
FROM
t1
AS
alias1
)
IS
NOT
NULL
;
--
error
ER_BAD_TABLE_ERROR
DROP
TABLE
t2
;
DROP
TABLE
t1
;
set
optimizer_switch
=@
subselect4_tmp
;
SET
optimizer_switch
=
@@
global
.
optimizer_switch
;
...
...
sql/sql_select.cc
View file @
d2064806
...
...
@@ -2161,6 +2161,15 @@ JOIN::exec()
!
exec_const_cond
->
val_int
())
zero_result_cause
=
"Impossible WHERE noticed after reading const tables"
;
/*
We've called exec_const_cond->val_int(). This may have caused an error.
*/
if
(
thd
->
is_error
())
{
error
=
thd
->
is_error
();
DBUG_VOID_RETURN
;
}
if
(
zero_result_cause
)
{
(
void
)
return_zero_rows
(
this
,
result
,
select_lex
->
leaf_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