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
13f1ace3
Commit
13f1ace3
authored
Nov 05, 2009
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge from mysql-5.1.
parents
11083576
25a73325
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
3 deletions
+44
-3
mysql-test/r/explain.result
mysql-test/r/explain.result
+16
-0
mysql-test/t/explain.test
mysql-test/t/explain.test
+20
-0
sql/item_subselect.cc
sql/item_subselect.cc
+8
-3
No files found.
mysql-test/r/explain.result
View file @
13f1ace3
...
@@ -194,4 +194,20 @@ dt
...
@@ -194,4 +194,20 @@ dt
2001-01-01 01:01:01
2001-01-01 01:01:01
2001-01-01 01:01:01
2001-01-01 01:01:01
drop tables t1, t2;
drop tables t1, t2;
#
# Bug#48295:
# explain extended crash with subquery and ONLY_FULL_GROUP_BY sql_mode
#
CREATE TABLE t1 (f1 INT);
SELECT @@session.sql_mode INTO @old_sql_mode;
SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
EXPLAIN EXTENDED SELECT 1 FROM t1
WHERE f1 > ALL( SELECT t.f1 FROM t1,t1 AS t );
ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
SHOW WARNINGS;
Level Code Message
Error 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
Note 1003 select 1 AS `1` from `test`.`t1` where <not>(<exists>(...))
SET SESSION sql_mode=@old_sql_mode;
DROP TABLE t1;
End of 5.1 tests.
End of 5.1 tests.
mysql-test/t/explain.test
View file @
13f1ace3
...
@@ -167,4 +167,24 @@ flush tables;
...
@@ -167,4 +167,24 @@ flush tables;
SELECT
OUTR
.
dt
FROM
t1
AS
OUTR
WHERE
OUTR
.
dt
IN
(
SELECT
INNR
.
dt
FROM
t2
AS
INNR
WHERE
OUTR
.
t
<
'2005-11-13 7:41:31'
);
SELECT
OUTR
.
dt
FROM
t1
AS
OUTR
WHERE
OUTR
.
dt
IN
(
SELECT
INNR
.
dt
FROM
t2
AS
INNR
WHERE
OUTR
.
t
<
'2005-11-13 7:41:31'
);
drop
tables
t1
,
t2
;
drop
tables
t1
,
t2
;
--
echo
#
--
echo
# Bug#48295:
--
echo
# explain extended crash with subquery and ONLY_FULL_GROUP_BY sql_mode
--
echo
#
CREATE
TABLE
t1
(
f1
INT
);
SELECT
@@
session
.
sql_mode
INTO
@
old_sql_mode
;
SET
SESSION
sql_mode
=
'ONLY_FULL_GROUP_BY'
;
# EXPLAIN EXTENDED (with subselect). used to crash. should give NOTICE.
--
error
ER_MIX_OF_GROUP_FUNC_AND_FIELDS
EXPLAIN
EXTENDED
SELECT
1
FROM
t1
WHERE
f1
>
ALL
(
SELECT
t
.
f1
FROM
t1
,
t1
AS
t
);
SHOW
WARNINGS
;
SET
SESSION
sql_mode
=@
old_sql_mode
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
.
--
echo
End
of
5.1
tests
.
sql/item_subselect.cc
View file @
13f1ace3
...
@@ -311,9 +311,14 @@ void Item_subselect::update_used_tables()
...
@@ -311,9 +311,14 @@ void Item_subselect::update_used_tables()
void
Item_subselect
::
print
(
String
*
str
,
enum_query_type
query_type
)
void
Item_subselect
::
print
(
String
*
str
,
enum_query_type
query_type
)
{
{
str
->
append
(
'('
);
if
(
engine
)
engine
->
print
(
str
,
query_type
);
{
str
->
append
(
')'
);
str
->
append
(
'('
);
engine
->
print
(
str
,
query_type
);
str
->
append
(
')'
);
}
else
str
->
append
(
"(...)"
);
}
}
...
...
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