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
0a8595df
Commit
0a8595df
authored
Feb 06, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
parents
8c508c25
1853c2fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
26 deletions
+26
-26
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+0
-12
mysql-test/r/subselect_innodb.result
mysql-test/r/subselect_innodb.result
+12
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+0
-14
mysql-test/t/subselect_innodb.test
mysql-test/t/subselect_innodb.test
+14
-0
No files found.
mysql-test/r/subselect.result
View file @
0a8595df
...
...
@@ -2204,15 +2204,3 @@ ERROR 42S22: Reference 'xx' not supported (forward reference in item list)
select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx from DUAL;
ERROR 42S22: Reference 'xx' not supported (forward reference in item list)
drop table t1;
CREATE TABLE `t1` ( `a` char(3) NOT NULL default '', `b` char(3) NOT NULL default '', `c` char(3) NOT NULL default '', PRIMARY KEY (`a`,`b`,`c`)) ENGINE=InnoDB;
CREATE TABLE t2 LIKE t1;
INSERT INTO t1 VALUES (1,1,1);
INSERT INTO t2 VALUES (1,1,1);
PREPARE my_stmt FROM "SELECT t1.b, count(*) FROM t1 group by t1.b having
count(*) > ALL (SELECT COUNT(*) FROM t2 WHERE t2.a=1 GROUP By t2.b)";
EXECUTE my_stmt;
b count(*)
EXECUTE my_stmt;
b count(*)
deallocate prepare my_stmt;
drop table t1,t2;
mysql-test/r/subselect_innodb.result
View file @
0a8595df
...
...
@@ -140,3 +140,15 @@ id date1 coworkerid description sum_used sum_remaining comments
6 2004-01-01 1 test 22 33 comment
7 2004-01-01 1 test 22 33 comment
drop table t1;
CREATE TABLE `t1` ( `a` char(3) NOT NULL default '', `b` char(3) NOT NULL default '', `c` char(3) NOT NULL default '', PRIMARY KEY (`a`,`b`,`c`)) ENGINE=InnoDB;
CREATE TABLE t2 LIKE t1;
INSERT INTO t1 VALUES (1,1,1);
INSERT INTO t2 VALUES (1,1,1);
PREPARE my_stmt FROM "SELECT t1.b, count(*) FROM t1 group by t1.b having
count(*) > ALL (SELECT COUNT(*) FROM t2 WHERE t2.a=1 GROUP By t2.b)";
EXECUTE my_stmt;
b count(*)
EXECUTE my_stmt;
b count(*)
deallocate prepare my_stmt;
drop table t1,t2;
mysql-test/t/subselect.test
View file @
0a8595df
...
...
@@ -1470,17 +1470,3 @@ select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx;
--
error
1247
select
1
=
ALL
(
select
1
from
t1
where
1
=
xx
),
1
as
xx
from
DUAL
;
drop
table
t1
;
#
# cleaning up of results of subselects (BUG#8125)
#
CREATE
TABLE
`t1`
(
`a`
char
(
3
)
NOT
NULL
default
''
,
`b`
char
(
3
)
NOT
NULL
default
''
,
`c`
char
(
3
)
NOT
NULL
default
''
,
PRIMARY
KEY
(
`a`
,
`b`
,
`c`
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
LIKE
t1
;
INSERT
INTO
t1
VALUES
(
1
,
1
,
1
);
INSERT
INTO
t2
VALUES
(
1
,
1
,
1
);
PREPARE
my_stmt
FROM
"SELECT t1.b, count(*) FROM t1 group by t1.b having
count(*) > ALL (SELECT COUNT(*) FROM t2 WHERE t2.a=1 GROUP By t2.b)"
;
EXECUTE
my_stmt
;
EXECUTE
my_stmt
;
deallocate
prepare
my_stmt
;
drop
table
t1
,
t2
;
mysql-test/t/subselect_innodb.test
View file @
0a8595df
...
...
@@ -145,3 +145,17 @@ SELECT DISTINCT
FROM
t1
;
select
*
from
t1
;
drop
table
t1
;
#
# cleaning up of results of subselects (BUG#8125)
#
CREATE
TABLE
`t1`
(
`a`
char
(
3
)
NOT
NULL
default
''
,
`b`
char
(
3
)
NOT
NULL
default
''
,
`c`
char
(
3
)
NOT
NULL
default
''
,
PRIMARY
KEY
(
`a`
,
`b`
,
`c`
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
LIKE
t1
;
INSERT
INTO
t1
VALUES
(
1
,
1
,
1
);
INSERT
INTO
t2
VALUES
(
1
,
1
,
1
);
PREPARE
my_stmt
FROM
"SELECT t1.b, count(*) FROM t1 group by t1.b having
count(*) > ALL (SELECT COUNT(*) FROM t2 WHERE t2.a=1 GROUP By t2.b)"
;
EXECUTE
my_stmt
;
EXECUTE
my_stmt
;
deallocate
prepare
my_stmt
;
drop
table
t1
,
t2
;
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