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
639f411a
Commit
639f411a
authored
Mar 13, 2004
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multi_update.result:
Fix for a bug in the result multi_update.test: Fix for a bug in the test
parent
37817f60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
mysql-test/r/multi_update.result
mysql-test/r/multi_update.result
+6
-6
mysql-test/t/multi_update.test
mysql-test/t/multi_update.test
+3
-3
No files found.
mysql-test/r/multi_update.result
View file @
639f411a
...
...
@@ -388,15 +388,15 @@ a
DROP TABLE t1,t2;
create table `t1` ( `p_id` int(10) unsigned NOT NULL auto_increment, `p_code` varchar(20) NOT NULL default '', `p_created` datetime NOT NULL default '0000-00-00 00:00:00', `p_active` tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY (`p_id`) );
create table `t2` ( `c2_id` int(10) unsigned NULL auto_increment, `c2_p_id` int(10) unsigned NOT NULL default '0', `c2_note` text NOT NULL, `c2_created` datetime NOT NULL default '0000-00-00 00:00:00', `c2_active` tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY (`c2_id`), KEY `c2_p_id` (`c2_p_id`) );
insert into t1 values (0,'A01-Comp',
now()
,1);
insert into t1 values (0,'B01-Comp',
now()
,1);
insert into t2 values (0,1,'A Note',
now()
,1);
insert into t1 values (0,'A01-Comp',
"2004-01-05 12:12:12"
,1);
insert into t1 values (0,'B01-Comp',
"2004-01-05 12:12:13"
,1);
insert into t2 values (0,1,'A Note',
"2004-01-05 12:12:14"
,1);
update t1 left join t2 on p_id = c2_p_id set c2_note = 'asdf-1' where p_id = 2;
select * from t1;
p_id p_code p_created p_active
1 A01-Comp 2004-0
3-11 23:21:29
1
2 B01-Comp 2004-0
3-11 23:21:29
1
1 A01-Comp 2004-0
1-05 12:12:12
1
2 B01-Comp 2004-0
1-05 12:12:13
1
select * from t2;
c2_id c2_p_id c2_note c2_created c2_active
1 1 A Note 2004-0
3-11 23:21:29
1
1 1 A Note 2004-0
1-05 12:12:14
1
drop table t1, t2;
mysql-test/t/multi_update.test
View file @
639f411a
...
...
@@ -332,9 +332,9 @@ DROP TABLE t1,t2;
create
table
`t1`
(
`p_id`
int
(
10
)
unsigned
NOT
NULL
auto_increment
,
`p_code`
varchar
(
20
)
NOT
NULL
default
''
,
`p_created`
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
`p_active`
tinyint
(
1
)
unsigned
NOT
NULL
default
'1'
,
PRIMARY
KEY
(
`p_id`
)
);
create
table
`t2`
(
`c2_id`
int
(
10
)
unsigned
NULL
auto_increment
,
`c2_p_id`
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
`c2_note`
text
NOT
NULL
,
`c2_created`
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
`c2_active`
tinyint
(
1
)
unsigned
NOT
NULL
default
'1'
,
PRIMARY
KEY
(
`c2_id`
),
KEY
`c2_p_id`
(
`c2_p_id`
)
);
insert
into
t1
values
(
0
,
'A01-Comp'
,
now
()
,
1
);
insert
into
t1
values
(
0
,
'B01-Comp'
,
now
()
,
1
);
insert
into
t2
values
(
0
,
1
,
'A Note'
,
now
()
,
1
);
insert
into
t1
values
(
0
,
'A01-Comp'
,
"2004-01-05 12:12:12"
,
1
);
insert
into
t1
values
(
0
,
'B01-Comp'
,
"2004-01-05 12:12:13"
,
1
);
insert
into
t2
values
(
0
,
1
,
'A Note'
,
"2004-01-05 12:12:14"
,
1
);
update
t1
left
join
t2
on
p_id
=
c2_p_id
set
c2_note
=
'asdf-1'
where
p_id
=
2
;
select
*
from
t1
;
select
*
from
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