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
dd7e8529
Commit
dd7e8529
authored
May 19, 2011
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#12429576 Assertion failure on purge of column prefix index
parent
edd511f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
4 deletions
+110
-4
mysql-test/suite/innodb_plugin/r/innodb-index.result
mysql-test/suite/innodb_plugin/r/innodb-index.result
+44
-0
mysql-test/suite/innodb_plugin/t/innodb-index.test
mysql-test/suite/innodb_plugin/t/innodb-index.test
+61
-2
storage/innodb_plugin/ChangeLog
storage/innodb_plugin/ChangeLog
+5
-0
storage/innodb_plugin/row/row0row.c
storage/innodb_plugin/row/row0row.c
+0
-2
No files found.
mysql-test/suite/innodb_plugin/r/innodb-index.result
View file @
dd7e8529
set global innodb_file_per_table=on;
set global innodb_file_format='Barracuda';
CREATE TABLE t1_purge (
A INT,
B BLOB, C BLOB, D BLOB, E BLOB,
F BLOB, G BLOB, H BLOB,
PRIMARY KEY (B(767), C(767), D(767), E(767), A),
INDEX (A)
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
INSERT INTO t1_purge VALUES (1,
REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766));
CREATE TABLE t2_purge (
A INT PRIMARY KEY,
B BLOB, C BLOB, D BLOB, E BLOB,
F BLOB, G BLOB, H BLOB, I BLOB,
J BLOB, K BLOB, L BLOB,
INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
INSERT INTO t2_purge VALUES (1,
REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766),
REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766));
CREATE TABLE t3_purge (
A INT,
B VARCHAR(800), C VARCHAR(800), D VARCHAR(800), E VARCHAR(800),
F VARCHAR(800), G VARCHAR(800), H VARCHAR(800),
PRIMARY KEY (B(767), C(767), D(767), E(767), A),
INDEX (A)
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
INSERT INTO t3_purge SELECT * FROM t1_purge;
CREATE TABLE t4_purge (
A INT PRIMARY KEY,
B VARCHAR(800), C VARCHAR(800), D VARCHAR(800), E VARCHAR(800),
F VARCHAR(800), G VARCHAR(800), H VARCHAR(800), I VARCHAR(800),
J VARCHAR(800), K VARCHAR(800), L VARCHAR(800),
INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
INSERT INTO t4_purge SELECT * FROM t2_purge;
DELETE FROM t1_purge;
DELETE FROM t2_purge;
DELETE FROM t3_purge;
DELETE FROM t4_purge;
set global innodb_file_per_table=0;
set global innodb_file_format=Antelope;
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
commit;
commit;
...
@@ -1170,3 +1213,4 @@ a b
...
@@ -1170,3 +1213,4 @@ a b
3 a
3 a
3 b
3 b
DROP TABLE t1;
DROP TABLE t1;
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
mysql-test/suite/innodb_plugin/t/innodb-index.test
View file @
dd7e8529
...
@@ -4,6 +4,65 @@ let $MYSQLD_DATADIR= `select @@datadir`;
...
@@ -4,6 +4,65 @@ let $MYSQLD_DATADIR= `select @@datadir`;
let
$innodb_file_format_check_orig
=
`select @@innodb_file_format_check`
;
let
$innodb_file_format_check_orig
=
`select @@innodb_file_format_check`
;
let
$per_table
=
`select @@innodb_file_per_table`
;
let
$format
=
`select @@innodb_file_format`
;
set
global
innodb_file_per_table
=
on
;
set
global
innodb_file_format
=
'Barracuda'
;
# Test an assertion failure on purge.
CREATE
TABLE
t1_purge
(
A
INT
,
B
BLOB
,
C
BLOB
,
D
BLOB
,
E
BLOB
,
F
BLOB
,
G
BLOB
,
H
BLOB
,
PRIMARY
KEY
(
B
(
767
),
C
(
767
),
D
(
767
),
E
(
767
),
A
),
INDEX
(
A
)
)
ENGINE
=
InnoDB
ROW_FORMAT
=
DYNAMIC
;
INSERT
INTO
t1_purge
VALUES
(
1
,
REPEAT
(
'b'
,
766
),
REPEAT
(
'c'
,
766
),
REPEAT
(
'd'
,
766
),
REPEAT
(
'e'
,
766
),
REPEAT
(
'f'
,
766
),
REPEAT
(
'g'
,
766
),
REPEAT
(
'h'
,
766
));
CREATE
TABLE
t2_purge
(
A
INT
PRIMARY
KEY
,
B
BLOB
,
C
BLOB
,
D
BLOB
,
E
BLOB
,
F
BLOB
,
G
BLOB
,
H
BLOB
,
I
BLOB
,
J
BLOB
,
K
BLOB
,
L
BLOB
,
INDEX
(
B
(
767
)))
ENGINE
=
InnoDB
ROW_FORMAT
=
DYNAMIC
;
INSERT
INTO
t2_purge
VALUES
(
1
,
REPEAT
(
'b'
,
766
),
REPEAT
(
'c'
,
766
),
REPEAT
(
'd'
,
766
),
REPEAT
(
'e'
,
766
),
REPEAT
(
'f'
,
766
),
REPEAT
(
'g'
,
766
),
REPEAT
(
'h'
,
766
),
REPEAT
(
'i'
,
766
),
REPEAT
(
'j'
,
766
),
REPEAT
(
'k'
,
766
),
REPEAT
(
'l'
,
766
));
CREATE
TABLE
t3_purge
(
A
INT
,
B
VARCHAR
(
800
),
C
VARCHAR
(
800
),
D
VARCHAR
(
800
),
E
VARCHAR
(
800
),
F
VARCHAR
(
800
),
G
VARCHAR
(
800
),
H
VARCHAR
(
800
),
PRIMARY
KEY
(
B
(
767
),
C
(
767
),
D
(
767
),
E
(
767
),
A
),
INDEX
(
A
)
)
ENGINE
=
InnoDB
ROW_FORMAT
=
DYNAMIC
;
INSERT
INTO
t3_purge
SELECT
*
FROM
t1_purge
;
CREATE
TABLE
t4_purge
(
A
INT
PRIMARY
KEY
,
B
VARCHAR
(
800
),
C
VARCHAR
(
800
),
D
VARCHAR
(
800
),
E
VARCHAR
(
800
),
F
VARCHAR
(
800
),
G
VARCHAR
(
800
),
H
VARCHAR
(
800
),
I
VARCHAR
(
800
),
J
VARCHAR
(
800
),
K
VARCHAR
(
800
),
L
VARCHAR
(
800
),
INDEX
(
B
(
767
)))
ENGINE
=
InnoDB
ROW_FORMAT
=
DYNAMIC
;
INSERT
INTO
t4_purge
SELECT
*
FROM
t2_purge
;
# This would trigger the failure (Bug #12429576)
# if purge gets a chance to run before DROP TABLE t1_purge, ....
DELETE
FROM
t1_purge
;
DELETE
FROM
t2_purge
;
DELETE
FROM
t3_purge
;
DELETE
FROM
t4_purge
;
eval
set
global
innodb_file_per_table
=
$per_table
;
eval
set
global
innodb_file_format
=
$format
;
create
table
t1
(
a
int
not
null
,
b
int
,
c
char
(
10
)
not
null
,
d
varchar
(
20
))
engine
=
innodb
;
create
table
t1
(
a
int
not
null
,
b
int
,
c
char
(
10
)
not
null
,
d
varchar
(
20
))
engine
=
innodb
;
insert
into
t1
values
(
5
,
5
,
'oo'
,
'oo'
),(
4
,
4
,
'tr'
,
'tr'
),(
3
,
4
,
'ad'
,
'ad'
),(
2
,
3
,
'ak'
,
'ak'
);
insert
into
t1
values
(
5
,
5
,
'oo'
,
'oo'
),(
4
,
4
,
'tr'
,
'tr'
),(
3
,
4
,
'ad'
,
'ad'
),(
2
,
3
,
'ak'
,
'ak'
);
commit
;
commit
;
...
@@ -360,8 +419,6 @@ disconnect b;
...
@@ -360,8 +419,6 @@ disconnect b;
drop
table
t1
;
drop
table
t1
;
let
$per_table
=
`select @@innodb_file_per_table`
;
let
$format
=
`select @@innodb_file_format`
;
set
global
innodb_file_per_table
=
on
;
set
global
innodb_file_per_table
=
on
;
set
global
innodb_file_format
=
'Barracuda'
;
set
global
innodb_file_format
=
'Barracuda'
;
# Test creating a table that could lead to undo log overflow.
# Test creating a table that could lead to undo log overflow.
...
@@ -404,6 +461,7 @@ alter table t1 row_format=compact;
...
@@ -404,6 +461,7 @@ alter table t1 row_format=compact;
create
index
t1u
on
t1
(
u
(
1
));
create
index
t1u
on
t1
(
u
(
1
));
drop
table
t1
;
drop
table
t1
;
eval
set
global
innodb_file_per_table
=
$per_table
;
eval
set
global
innodb_file_per_table
=
$per_table
;
eval
set
global
innodb_file_format
=
$format
;
eval
set
global
innodb_file_format
=
$format
;
eval
set
global
innodb_file_format_check
=
$format
;
eval
set
global
innodb_file_format_check
=
$format
;
...
@@ -541,6 +599,7 @@ disconnect a;
...
@@ -541,6 +599,7 @@ disconnect a;
disconnect
b
;
disconnect
b
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1_purge
,
t2_purge
,
t3_purge
,
t4_purge
;
#
#
# restore environment to the state it was before this test execution
# restore environment to the state it was before this test execution
...
...
storage/innodb_plugin/ChangeLog
View file @
dd7e8529
2011-05-19 The InnoDB Team
* row/row0row.c:
Fix Bug#12429576 Assertion failure on purge of column prefix index
2011-04-07 The InnoDB Team
2011-04-07 The InnoDB Team
* handler/ha_innodb.cc, handler/ha_innodb.h, handler/handler0alter.cc:
* handler/ha_innodb.cc, handler/ha_innodb.h, handler/handler0alter.cc:
...
...
storage/innodb_plugin/row/row0row.c
View file @
dd7e8529
...
@@ -151,8 +151,6 @@ row_build_index_entry(
...
@@ -151,8 +151,6 @@ row_build_index_entry(
}
else
if
(
dfield_is_ext
(
dfield
))
{
}
else
if
(
dfield_is_ext
(
dfield
))
{
ut_a
(
len
>=
BTR_EXTERN_FIELD_REF_SIZE
);
ut_a
(
len
>=
BTR_EXTERN_FIELD_REF_SIZE
);
len
-=
BTR_EXTERN_FIELD_REF_SIZE
;
len
-=
BTR_EXTERN_FIELD_REF_SIZE
;
ut_a
(
ind_field
->
prefix_len
<=
len
||
dict_index_is_clust
(
index
));
}
}
len
=
dtype_get_at_most_n_mbchars
(
len
=
dtype_get_at_most_n_mbchars
(
...
...
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