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
7dede8d3
Commit
7dede8d3
authored
Nov 24, 2002
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated results after merge from 3.23
parent
a9761016
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
0 deletions
+74
-0
mysql-test/r/innodb-deadlock.result
mysql-test/r/innodb-deadlock.result
+20
-0
mysql-test/r/null_key.result
mysql-test/r/null_key.result
+16
-0
mysql-test/t/innodb-deadlock.test
mysql-test/t/innodb-deadlock.test
+38
-0
No files found.
mysql-test/r/innodb-deadlock.result
0 → 100644
View file @
7dede8d3
drop table if exists t1;
create table t1 (id integer, x integer) type=INNODB;
insert into t1 values(0, 0);
set autocommit=0;
SELECT * from t1 where id = 0 FOR UPDATE;
id x
0 0
set autocommit=0;
update t1 set x=2 where id = 0;
update t1 set x=1 where id = 0;
select * from t1;
id x
0 1
commit;
commit;
select * from t1;
id x
0 2
commit;
drop table t1;
mysql-test/r/null_key.result
View file @
7dede8d3
...
...
@@ -228,20 +228,36 @@ alter table t1 add key id (id);
select * from t1, t2 where t1.id = t2.id;
id id
drop table t1,t2;
create table t1 (
id integer,
id2 integer not null,
index (id),
index (id2)
);
insert into t1 values(null,null),(1,1);
select * from t1;
id id2
NULL 0
1 1
select * from t1 where id <=> null;
id id2
NULL 0
select * from t1 where id <=> null or id > 0;
id id2
NULL 0
1 1
select * from t1 where id is null or id > 0;
id id2
NULL 0
1 1
select * from t1 where id2 <=> null or id2 > 0;
id id2
1 1
select * from t1 where id2 is null or id2 > 0;
id id2
1 1
delete from t1 where id <=> NULL;
select * from t1;
id id2
1 1
drop table t1;
mysql-test/t/innodb-deadlock.test
0 → 100644
View file @
7dede8d3
--
source
include
/
have_innodb
.
inc
connect
(
con1
,
localhost
,
root
,,);
connect
(
con2
,
localhost
,
root
,,);
drop
table
if
exists
t1
;
#
# Testing of FOR UPDATE
#
connection
con1
;
create
table
t1
(
id
integer
,
x
integer
)
type
=
INNODB
;
insert
into
t1
values
(
0
,
0
);
set
autocommit
=
0
;
SELECT
*
from
t1
where
id
=
0
FOR
UPDATE
;
connection
con2
;
set
autocommit
=
0
;
# The following query should hang because con1 is locking the page
--
send
update
t1
set
x
=
2
where
id
=
0
;
--
sleep
2
;
connection
con1
;
update
t1
set
x
=
1
where
id
=
0
;
select
*
from
t1
;
commit
;
connection
con2
;
reap
;
commit
;
connection
con1
;
select
*
from
t1
;
commit
;
drop
table
t1
;
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