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
a5fcced7
Commit
a5fcced7
authored
Jan 29, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 5.5 into 10.0
parents
706ed855
547ec8ce
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
8 deletions
+57
-8
mysql-test/suite/innodb/r/innodb-replace-debug.result
mysql-test/suite/innodb/r/innodb-replace-debug.result
+3
-2
mysql-test/suite/innodb/r/innodb_corrupt_bit.result
mysql-test/suite/innodb/r/innodb_corrupt_bit.result
+45
-0
mysql-test/suite/innodb/t/innodb-replace-debug.test
mysql-test/suite/innodb/t/innodb-replace-debug.test
+3
-2
mysql-test/suite/innodb/t/innodb_corrupt_bit.test
mysql-test/suite/innodb/t/innodb_corrupt_bit.test
+5
-3
sql/sql_prepare.cc
sql/sql_prepare.cc
+1
-1
No files found.
mysql-test/suite/innodb/r/innodb-replace-debug.result
View file @
a5fcced7
...
...
@@ -4,10 +4,11 @@
create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2),
key k2(f3)) engine=innodb;
insert into t1 values (14, 24, 34);
set @@debug_dbug = '+d,row_ins_sec_index_entry_timeout';
set @old_dbug= @@session.debug_dbug;
set debug_dbug = '+d,row_ins_sec_index_entry_timeout';
replace into t1 values (14, 25, 34);
select * from t1;
f1 f2 f3
14 25 34
drop table t1;
set
@@debug_dbug = '-d,row_ins_sec_index_entry_timeout'
;
set
debug_dbug = @old_dbug
;
mysql-test/suite/innodb/r/innodb_corrupt_bit.result
View file @
a5fcced7
set names utf8;
SET UNIQUE_CHECKS=0;
CREATE TABLE corrupt_bit_test_ā(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR(100),
c INT,
z INT,
INDEX idx(b))
ENGINE=InnoDB;
INSERT INTO corrupt_bit_test_ā VALUES(0,'x',1, 1);
CREATE UNIQUE INDEX idxā ON corrupt_bit_test_ā(c, b);
CREATE UNIQUE INDEX idxē ON corrupt_bit_test_ā(z, b);
SELECT * FROM corrupt_bit_test_ā;
a b c z
1 x 1 1
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1,z+1 FROM corrupt_bit_test_ā;
select count(*) from corrupt_bit_test_ā;
count(*)
2
SET @save_dbug = @@SESSION.debug_dbug;
SET debug_dbug = '+d,dict_set_index_corrupted';
check table corrupt_bit_test_ā;
Table Op Msg_type Msg_text
test.corrupt_bit_test_ā check Warning InnoDB: Index "idx" is marked as corrupted
test.corrupt_bit_test_ā check Warning InnoDB: Index "idxā" is marked as corrupted
test.corrupt_bit_test_ā check Warning InnoDB: Index "idxē" is marked as corrupted
test.corrupt_bit_test_ā check error Corrupt
SET debug_dbug = @save_dbug;
CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c);
ERROR HY000: Index "idx" is corrupted
CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z);
ERROR HY000: Index "idx" is corrupted
select c from corrupt_bit_test_ā;
ERROR HY000: Index corrupt_bit_test_ā is corrupted
select z from corrupt_bit_test_ā;
ERROR HY000: Index corrupt_bit_test_ā is corrupted
show warnings;
Level Code Message
Warning 180 InnoDB: Index "idxē" for table "test"."corrupt_bit_test_ā" is marked as corrupted
Error 1712 Index corrupt_bit_test_ā is corrupted
insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001);
select * from corrupt_bit_test_ā use index(primary) where a = 10001;
a b c z
10001 a 20001 20001
begin;
insert into corrupt_bit_test_ā values (10002, "a", 20002, 20002);
delete from corrupt_bit_test_ā where a = 10001;
insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001);
rollback;
drop index idxā on corrupt_bit_test_ā;
check table corrupt_bit_test_ā;
Table Op Msg_type Msg_text
test.corrupt_bit_test_ā check Warning InnoDB: Index "idx" is marked as corrupted
test.corrupt_bit_test_ā check Warning InnoDB: Index "idxē" is marked as corrupted
test.corrupt_bit_test_ā check error Corrupt
set names utf8;
select z from corrupt_bit_test_ā;
ERROR HY000: Index corrupt_bit_test_ā is corrupted
show create table corrupt_bit_test_ā;
Table Create Table
corrupt_bit_test_ā CREATE TABLE `corrupt_bit_test_ā` (
`a` int(11) NOT NULL AUTO_INCREMENT,
...
...
@@ -31,8 +67,12 @@ corrupt_bit_test_ā CREATE TABLE `corrupt_bit_test_ā` (
UNIQUE KEY `idxē` (`z`,`b`),
KEY `idx` (`b`)
) ENGINE=InnoDB AUTO_INCREMENT=10003 DEFAULT CHARSET=latin1
drop index idxē on corrupt_bit_test_ā;
CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c);
ERROR HY000: Index "idx" is corrupted
CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z);
ERROR HY000: Index "idx" is corrupted
show create table corrupt_bit_test_ā;
Table Create Table
corrupt_bit_test_ā CREATE TABLE `corrupt_bit_test_ā` (
`a` int(11) NOT NULL AUTO_INCREMENT,
...
...
@@ -42,7 +82,12 @@ corrupt_bit_test_ā CREATE TABLE `corrupt_bit_test_ā` (
PRIMARY KEY (`a`),
KEY `idx` (`b`)
) ENGINE=InnoDB AUTO_INCREMENT=10003 DEFAULT CHARSET=latin1
drop index idx on corrupt_bit_test_ā;
CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c);
CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z);
select z from corrupt_bit_test_ā limit 10;
z
20001
1
2
drop table corrupt_bit_test_ā;
mysql-test/suite/innodb/t/innodb-replace-debug.test
View file @
a5fcced7
...
...
@@ -8,8 +8,9 @@
create
table
t1
(
f1
int
primary
key
,
f2
int
,
f3
int
,
unique
key
k1
(
f2
),
key
k2
(
f3
))
engine
=
innodb
;
insert
into
t1
values
(
14
,
24
,
34
);
set
@@
debug_dbug
=
'+d,row_ins_sec_index_entry_timeout'
;
set
@
old_dbug
=
@@
session
.
debug_dbug
;
set
debug_dbug
=
'+d,row_ins_sec_index_entry_timeout'
;
replace
into
t1
values
(
14
,
25
,
34
);
select
*
from
t1
;
drop
table
t1
;
set
@@
debug_dbug
=
'-d,row_ins_sec_index_entry_timeout'
;
set
debug_dbug
=
@
old_dbug
;
mysql-test/suite/innodb/t/innodb_corrupt_bit.test
View file @
a5fcced7
...
...
@@ -8,7 +8,8 @@
--
source
include
/
have_debug
.
inc
--
disable_query_log
call
mtr
.
add_suppression
(
"Flagged corruption of idx.*in"
);
call
mtr
.
add_suppression
(
"Flagged corruption of idx.*in "
);
--
enable_query_log
set
names
utf8
;
...
...
@@ -37,9 +38,10 @@ INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1,z+1 FROM corrupt_bit_test_ā;
select
count
(
*
)
from
corrupt_bit_test_ā
;
# This will flag all secondary indexes corrupted
SET
SESSION
debug_dbug
=
"+d,dict_set_index_corrupted"
;
SET
@
save_dbug
=
@@
SESSION
.
debug_dbug
;
SET
debug_dbug
=
'+d,dict_set_index_corrupted'
;
check
table
corrupt_bit_test_ā
;
SET
SESSION
debug_dbug
=
""
;
SET
debug_dbug
=
@
save_dbug
;
# Cannot create new indexes while corrupted indexes exist
--
error
ER_INDEX_CORRUPT
...
...
sql/sql_prepare.cc
View file @
a5fcced7
...
...
@@ -3269,9 +3269,9 @@ void Prepared_statement::cleanup_stmt()
DBUG_ENTER
(
"Prepared_statement::cleanup_stmt"
);
DBUG_PRINT
(
"enter"
,(
"stmt: 0x%lx"
,
(
long
)
this
));
thd
->
rollback_item_tree_changes
();
cleanup_items
(
free_list
);
thd
->
cleanup_after_query
();
thd
->
rollback_item_tree_changes
();
DBUG_VOID_RETURN
;
}
...
...
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