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
2cca1991
Commit
2cca1991
authored
Feb 26, 2009
by
Bernt M. Johnsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepared for push (BUG#42567)
parent
cd5744db
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
mysql-test/r/group_by.result
mysql-test/r/group_by.result
+12
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+2
-0
mysql-test/t/group_by.test
mysql-test/t/group_by.test
+18
-0
No files found.
mysql-test/r/group_by.result
View file @
2cca1991
...
...
@@ -1691,3 +1691,15 @@ FROM t1;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1;
SET @@sql_mode = @old_sql_mode;
SET @old_sql_mode = @@sql_mode;
SET @@sql_mode='ONLY_FULL_GROUP_BY';
CREATE TABLE t1(i INT);
INSERT INTO t1 VALUES (1), (10);
SELECT COUNT(i) FROM t1;
COUNT(i)
2
SELECT COUNT(i) FROM t1 WHERE i > 1;
COUNT(i)
1
DROP TABLE t1;
SET @@sql_mode = @old_sql_mode;
mysql-test/t/func_group.test
View file @
2cca1991
...
...
@@ -18,6 +18,8 @@ insert into t1 values (3,5,"C");
insert
into
t1
values
(
3
,
6
,
"D"
);
# Test of MySQL field extension with and without matching records.
#### Note: The two following statements may fail if the execution plan
#### or optimizer is changed. The result for column c is undefined.
select
a
,
c
,
sum
(
a
)
from
t1
group
by
a
;
select
a
,
c
,
sum
(
a
)
from
t1
where
a
>
10
group
by
a
;
select
sum
(
a
)
from
t1
where
a
>
10
;
...
...
mysql-test/t/group_by.test
View file @
2cca1991
...
...
@@ -1139,4 +1139,22 @@ DROP TABLE t1;
SET
@@
sql_mode
=
@
old_sql_mode
;
#
# Bug#42567 Invalid GROUP BY error
#
# Setup of the subtest
SET
@
old_sql_mode
=
@@
sql_mode
;
SET
@@
sql_mode
=
'ONLY_FULL_GROUP_BY'
;
CREATE
TABLE
t1
(
i
INT
);
INSERT
INTO
t1
VALUES
(
1
),
(
10
);
# The actual test
SELECT
COUNT
(
i
)
FROM
t1
;
SELECT
COUNT
(
i
)
FROM
t1
WHERE
i
>
1
;
# Cleanup of subtest
DROP
TABLE
t1
;
SET
@@
sql_mode
=
@
old_sql_mode
;
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