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
d4d09768
Commit
d4d09768
authored
Jan 30, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
bd1f8a92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+7
-7
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+7
-7
No files found.
mysql-test/r/subselect.result
View file @
d4d09768
...
...
@@ -1578,7 +1578,7 @@ select * from t1;
a b
1 0.123
drop table t1;
CREATE TABLE t
ab_0
1 (
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
ts timestamp NOT NULL,
id_cns tinyint(3) unsigned NOT NULL default '0',
...
...
@@ -1596,7 +1596,7 @@ PRIMARY KEY(id),
UNIQUE KEY idx_cns_gen_anno (anno_dep,id_cns,generale,particolare),
UNIQUE KEY idx_cns_par_anno (id_cns,anno_dep,tipo,particolare,bis)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PACK_KEYS=1;
INSERT INTO t
ab_0
1 (id, ts, id_cns, id_desc_nota, id_publ_uff, tipo, f_aggiunte,
INSERT INTO t1 (id, ts, id_cns, id_desc_nota, id_publ_uff, tipo, f_aggiunte,
anno_dep, data_dep, particolare, generale, bis) VALUES
(NULL, NULL, 16, 29, 622, 'UNO', '', 1987, 1218, 2048, 9681, 0),
(NULL, NULL, 50, 23, 1717, 'UNO', '', 1987, 1126, 1536, 13987, 0),
...
...
@@ -1604,7 +1604,7 @@ anno_dep, data_dep, particolare, generale, bis) VALUES
(NULL, NULL, 16, 124, 124, 'UNO', '', 1987, 1201, 1792, 13422, 0),
(NULL, NULL, 16, 125, 125, 'UNO', '', 1987, 0723, 1025, 10240, 0),
(NULL, NULL, 16, 126, 126, 'UNO', '', 1987, 1204, 1026, 7089, 0);
CREATE TABLE t
ab_0
2 (
CREATE TABLE t2 (
id tinyint(3) unsigned NOT NULL auto_increment,
descr varchar(40) NOT NULL default '',
f_servizi set('UNO','DUE') NOT NULL default '',
...
...
@@ -1614,14 +1614,14 @@ max_anno_dep smallint(6) unsigned NOT NULL default '0',
data_agg int(8) unsigned NOT NULL default '0',
PRIMARY KEY (id)
);
INSERT INTO t
ab_0
2 (id, descr, f_servizi, data_uno_min, data_due_min,
INSERT INTO t2 (id, descr, f_servizi, data_uno_min, data_due_min,
max_anno_dep, data_agg) VALUES
(16, 'C_UNO', 'UNO,DUE', 19000000, 30000000, 1987, 0),
(50, 'C_TRE', 'UNO', 19000000, 30000000, 1990, 0);
SELECT cns.max_anno_dep = (SELECT s.anno_dep FROM t
ab_0
1 AS s WHERE
SELECT cns.max_anno_dep = (SELECT s.anno_dep FROM t1 AS s WHERE
s.id_cns = cns.id ORDER BY s.anno_dep DESC LIMIT 1) AS PIPPO FROM
t
ab_0
2 AS cns;
t2 AS cns;
PIPPO
1
NULL
DROP TABLE t
ab_01, tab_0
2;
DROP TABLE t
1, t
2;
mysql-test/t/subselect.test
View file @
d4d09768
...
...
@@ -1026,7 +1026,7 @@ drop table t1;
# Bug 2479
#
CREATE
TABLE
t
ab_0
1
(
CREATE
TABLE
t1
(
id
int
(
11
)
NOT
NULL
auto_increment
,
ts
timestamp
NOT
NULL
,
id_cns
tinyint
(
3
)
unsigned
NOT
NULL
default
'0'
,
...
...
@@ -1045,7 +1045,7 @@ UNIQUE KEY idx_cns_gen_anno (anno_dep,id_cns,generale,particolare),
UNIQUE
KEY
idx_cns_par_anno
(
id_cns
,
anno_dep
,
tipo
,
particolare
,
bis
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
PACK_KEYS
=
1
;
INSERT
INTO
t
ab_0
1
(
id
,
ts
,
id_cns
,
id_desc_nota
,
id_publ_uff
,
tipo
,
f_aggiunte
,
INSERT
INTO
t1
(
id
,
ts
,
id_cns
,
id_desc_nota
,
id_publ_uff
,
tipo
,
f_aggiunte
,
anno_dep
,
data_dep
,
particolare
,
generale
,
bis
)
VALUES
(
NULL
,
NULL
,
16
,
29
,
622
,
'UNO'
,
''
,
1987
,
1218
,
2048
,
9681
,
0
),
(
NULL
,
NULL
,
50
,
23
,
1717
,
'UNO'
,
''
,
1987
,
1126
,
1536
,
13987
,
0
),
...
...
@@ -1054,7 +1054,7 @@ anno_dep, data_dep, particolare, generale, bis) VALUES
(
NULL
,
NULL
,
16
,
125
,
125
,
'UNO'
,
''
,
1987
,
0723
,
1025
,
10240
,
0
),
(
NULL
,
NULL
,
16
,
126
,
126
,
'UNO'
,
''
,
1987
,
1204
,
1026
,
7089
,
0
);
CREATE
TABLE
t
ab_0
2
(
CREATE
TABLE
t2
(
id
tinyint
(
3
)
unsigned
NOT
NULL
auto_increment
,
descr
varchar
(
40
)
NOT
NULL
default
''
,
f_servizi
set
(
'UNO'
,
'DUE'
)
NOT
NULL
default
''
,
...
...
@@ -1065,13 +1065,13 @@ data_agg int(8) unsigned NOT NULL default '0',
PRIMARY
KEY
(
id
)
);
INSERT
INTO
t
ab_0
2
(
id
,
descr
,
f_servizi
,
data_uno_min
,
data_due_min
,
INSERT
INTO
t2
(
id
,
descr
,
f_servizi
,
data_uno_min
,
data_due_min
,
max_anno_dep
,
data_agg
)
VALUES
(
16
,
'C_UNO'
,
'UNO,DUE'
,
19000000
,
30000000
,
1987
,
0
),
(
50
,
'C_TRE'
,
'UNO'
,
19000000
,
30000000
,
1990
,
0
);
SELECT
cns
.
max_anno_dep
=
(
SELECT
s
.
anno_dep
FROM
t
ab_0
1
AS
s
WHERE
SELECT
cns
.
max_anno_dep
=
(
SELECT
s
.
anno_dep
FROM
t1
AS
s
WHERE
s
.
id_cns
=
cns
.
id
ORDER
BY
s
.
anno_dep
DESC
LIMIT
1
)
AS
PIPPO
FROM
t
ab_0
2
AS
cns
;
t2
AS
cns
;
DROP
TABLE
t
ab_01
,
tab_0
2
;
DROP
TABLE
t
1
,
t
2
;
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