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
43b2dc61
Commit
43b2dc61
authored
Sep 29, 2005
by
jan@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/jan/mysql-5.0
parents
d426c109
6734ca6c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
3 deletions
+68
-3
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+28
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+39
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+1
-3
No files found.
mysql-test/r/innodb.result
View file @
43b2dc61
...
@@ -2644,3 +2644,31 @@ SET FOREIGN_KEY_CHECKS=1;
...
@@ -2644,3 +2644,31 @@ SET FOREIGN_KEY_CHECKS=1;
INSERT INTO t2 VALUES(3);
INSERT INTO t2 VALUES(3);
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test/t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test/t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
DROP TABLE t2;
DROP TABLE t2;
create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into test_checksum values (1),(2);
set autocommit=0;
checksum table test_checksum;
Table Checksum
test.test_checksum 1531596814
insert into test_checksum values(3);
checksum table test_checksum;
Table Checksum
test.test_checksum 1531596814
commit;
checksum table test_checksum;
Table Checksum
test.test_checksum 2050879373
commit;
drop table test_checksum;
create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into test_checksum values (1),(2);
set autocommit=1;
checksum table test_checksum;
Table Checksum
test.test_checksum 1531596814
set autocommit=1;
insert into test_checksum values(3);
checksum table test_checksum;
Table Checksum
test.test_checksum 2050879373
drop table test_checksum;
mysql-test/t/innodb.test
View file @
43b2dc61
...
@@ -1605,3 +1605,42 @@ SET FOREIGN_KEY_CHECKS=1;
...
@@ -1605,3 +1605,42 @@ SET FOREIGN_KEY_CHECKS=1;
INSERT
INTO
t2
VALUES
(
3
);
INSERT
INTO
t2
VALUES
(
3
);
DROP
TABLE
t2
;
DROP
TABLE
t2
;
#
# Test that checksum table uses a consistent read Bug #12669
#
connect
(
a
,
localhost
,
root
,,);
connect
(
b
,
localhost
,
root
,,);
connection
a
;
create
table
test_checksum
(
a
int
not
null
)
engine
=
innodb
DEFAULT
CHARSET
=
latin1
;
insert
into
test_checksum
values
(
1
),(
2
);
set
autocommit
=
0
;
checksum
table
test_checksum
;
connection
b
;
insert
into
test_checksum
values
(
3
);
connection
a
;
#
# Here checksum should not see insert
#
checksum
table
test_checksum
;
connection
a
;
commit
;
checksum
table
test_checksum
;
commit
;
drop
table
test_checksum
;
#
# autocommit = 1
#
connection
a
;
create
table
test_checksum
(
a
int
not
null
)
engine
=
innodb
DEFAULT
CHARSET
=
latin1
;
insert
into
test_checksum
values
(
1
),(
2
);
set
autocommit
=
1
;
checksum
table
test_checksum
;
connection
b
;
set
autocommit
=
1
;
insert
into
test_checksum
values
(
3
);
connection
a
;
#
# Here checksum sees insert
#
checksum
table
test_checksum
;
drop
table
test_checksum
;
sql/ha_innodb.cc
View file @
43b2dc61
...
@@ -6689,12 +6689,10 @@ ha_innobase::store_lock(
...
@@ -6689,12 +6689,10 @@ ha_innobase::store_lock(
prebuilt
->
select_lock_type
=
LOCK_NONE
;
prebuilt
->
select_lock_type
=
LOCK_NONE
;
prebuilt
->
stored_select_lock_type
=
LOCK_NONE
;
prebuilt
->
stored_select_lock_type
=
LOCK_NONE
;
}
else
if
(
thd
->
lex
->
sql_command
==
SQLCOM_CHECKSUM
)
{
}
else
if
(
thd
->
lex
->
sql_command
==
SQLCOM_CHECKSUM
)
{
/* Use consistent read for checksum table and
/* Use consistent read for checksum table */
convert lock type to the TL_READ */
prebuilt
->
select_lock_type
=
LOCK_NONE
;
prebuilt
->
select_lock_type
=
LOCK_NONE
;
prebuilt
->
stored_select_lock_type
=
LOCK_NONE
;
prebuilt
->
stored_select_lock_type
=
LOCK_NONE
;
lock
.
type
=
TL_READ
;
}
else
{
}
else
{
prebuilt
->
select_lock_type
=
LOCK_S
;
prebuilt
->
select_lock_type
=
LOCK_S
;
prebuilt
->
stored_select_lock_type
=
LOCK_S
;
prebuilt
->
stored_select_lock_type
=
LOCK_S
;
...
...
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