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
a1965b80
Commit
a1965b80
authored
3 years ago
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make testcase for MDEV-26585 stable.
parent
a710016d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
mysql-test/main/group_min_max.result
mysql-test/main/group_min_max.result
+3
-2
mysql-test/main/group_min_max.test
mysql-test/main/group_min_max.test
+3
-1
No files found.
mysql-test/main/group_min_max.result
View file @
a1965b80
...
...
@@ -4057,9 +4057,10 @@ KEY `index_t1_on_owner_id_and_foo` (`owner_id`,`foo`)
INSERT INTO t1 (owner_id, foo, whatever)
VALUES (1, TRUE, "yello"), (1, FALSE, "yello"), (2, TRUE, "yello"),
(2, TRUE, "yello"), (2, FALSE, "yello");
EXPLAIN SELECT DISTINCT owner_id FROM t1 WHERE foo = true GROUP BY owner_id HAVING (COUNT(*) = 1);
EXPLAIN
SELECT DISTINCT owner_id FROM t1 WHERE foo = true GROUP BY owner_id HAVING (COUNT(*) = 1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL index_t1_on_owner_id_and_foo 7 NULL
5
Using where; Using index
1 SIMPLE t1 index NULL index_t1_on_owner_id_and_foo 7 NULL
#
Using where; Using index
SELECT DISTINCT owner_id FROM t1 WHERE foo = true GROUP BY owner_id HAVING (COUNT(*) = 1);
owner_id
1
...
...
This diff is collapsed.
Click to expand it.
mysql-test/main/group_min_max.test
View file @
a1965b80
...
...
@@ -1717,6 +1717,8 @@ CREATE TABLE `t1` (
INSERT
INTO
t1
(
owner_id
,
foo
,
whatever
)
VALUES
(
1
,
TRUE
,
"yello"
),
(
1
,
FALSE
,
"yello"
),
(
2
,
TRUE
,
"yello"
),
(
2
,
TRUE
,
"yello"
),
(
2
,
FALSE
,
"yello"
);
EXPLAIN
SELECT
DISTINCT
owner_id
FROM
t1
WHERE
foo
=
true
GROUP
BY
owner_id
HAVING
(
COUNT
(
*
)
=
1
);
--
replace_column
9
#
EXPLAIN
SELECT
DISTINCT
owner_id
FROM
t1
WHERE
foo
=
true
GROUP
BY
owner_id
HAVING
(
COUNT
(
*
)
=
1
);
SELECT
DISTINCT
owner_id
FROM
t1
WHERE
foo
=
true
GROUP
BY
owner_id
HAVING
(
COUNT
(
*
)
=
1
);
DROP
TABLE
t1
;
This diff is collapsed.
Click to expand 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