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
59d3ba0b
Commit
59d3ba0b
authored
Oct 18, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust the instrumentation and test
parent
7c9651a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
41 deletions
+38
-41
mysql-test/suite/innodb/t/alter_table.test
mysql-test/suite/innodb/t/alter_table.test
+7
-9
mysql-test/suite/innodb_fts/r/truncate.result
mysql-test/suite/innodb_fts/r/truncate.result
+4
-4
mysql-test/suite/innodb_fts/t/truncate.test
mysql-test/suite/innodb_fts/t/truncate.test
+5
-5
storage/innobase/buf/buf0rea.cc
storage/innobase/buf/buf0rea.cc
+22
-23
No files found.
mysql-test/suite/innodb/t/alter_table.test
View file @
59d3ba0b
--
source
include
/
have_innodb
.
inc
#
# MDEV-11995 ALTER TABLE proceeds despite reporting ER_TOO_LONG_KEY error
#
set
@@
sql_mode
=
strict_trans_tables
;
create
table
t1
(
a
text
not
null
)
row_format
=
dynamic
engine
=
innodb
;
create
index
idx1
on
t1
(
a
(
3073
));
show
create
table
t1
;
drop
table
t1
;
set
@@
sql_mode
=
default
;
CREATE
TABLE
t1
(
id1
INT
AUTO_INCREMENT
PRIMARY
KEY
,
id2
VARCHAR
(
30
)
NOT
NULL
UNIQUE
,
id3
DATETIME
)
ENGINE
=
InnoDB
;
ALTER
TABLE
t1
CHANGE
COLUMN
id2
id4
VARCHAR
(
40
)
NOT
NULL
;
SELECT
*
FROM
t1
WHERE
id4
LIKE
'a'
;
DROP
TABLE
t1
;
mysql-test/suite/innodb_fts/r/truncate.result
View file @
59d3ba0b
...
...
@@ -20,12 +20,12 @@ set i = i + 1;
end while;
end|
CALL insert_t2(15);
SET SESSION debug="+d,innodb_invalid_read_after_truncate";
SET @save_dbug = @@SESSION.DEBUG_DBUG;
SET DEBUG_DBUG = '+d,innodb_invalid_read_after_truncate';
INSERT INTO t1 (a,d,b,c) VALUES (
'7795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'),
repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc
cuullucocraloracurooulrooauuar','1'));
SET
SESSION debug="-d,innodb_invalid_read_after_truncate"
;
SET
DEBUG_DBUG = @save_dbug
;
DROP PROCEDURE insert_t2;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t1,t2;
mysql-test/suite/innodb_fts/t/truncate.test
View file @
59d3ba0b
--
source
include
/
have_innodb
_64k
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_debug
.
inc
--
echo
#
...
...
@@ -35,16 +35,16 @@ delimiter ;|
CALL
insert_t2
(
15
);
SET
SESSION
debug
=
"+d,innodb_invalid_read_after_truncate"
;
SET
@
save_dbug
=
@@
SESSION
.
DEBUG_DBUG
;
SET
DEBUG_DBUG
=
'+d,innodb_invalid_read_after_truncate'
;
INSERT
INTO
t1
(
a
,
d
,
b
,
c
)
VALUES
(
'7795'
,
'6'
,
repeat
(
'uololoaroolccaaruolraloouuoocorrcorurlu'
,
'1'
),
repeat
(
'orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc
cuullucocraloracurooulrooauuar'
,
'1'
));
SET
SESSION
debug
=
"-d,innodb_invalid_read_after_truncate"
;
SET
DEBUG_DBUG
=
@
save_dbug
;
DROP
PROCEDURE
insert_t2
;
DROP
TABLE
t1
;
DROP
TABLE
t2
;
DROP
TABLE
t1
,
t2
;
storage/innobase/buf/buf0rea.cc
View file @
59d3ba0b
...
...
@@ -176,17 +176,16 @@ buf_read_page_low(
dst
=
((
buf_block_t
*
)
bpage
)
->
frame
;
}
/* This debug code is only for 5.7. In trunk, with newDD,
the space->name is no longer same as table name. */
DBUG_EXECUTE_IF
(
"innodb_invalid_read_after_truncate"
,
fil_space_t
*
space
=
fil_space_get
(
page_id
.
space
());
if
(
space
!=
NULL
&&
strcmp
(
space
->
name
,
"test/t1"
)
==
0
&&
page_id
.
page_no
()
==
space
->
size
-
1
)
{
type
=
IORequest
::
READ
;
sync
=
true
;
}
);
DBUG_EXECUTE_IF
(
"innodb_invalid_read_after_truncate"
,
if
(
fil_space_t
*
space
=
fil_space_acquire
(
page_id
.
space
()))
{
if
(
!
strcmp
(
space
->
name
,
"test/t1"
)
&&
page_id
.
page_no
()
==
space
->
size
-
1
)
{
type
=
0
;
sync
=
true
;
}
fil_space_release
(
space
);
});
IORequest
request
(
type
|
IORequest
::
READ
);
...
...
@@ -333,18 +332,18 @@ buf_read_ahead_random(
that is, reside near the start of the LRU list. */
for
(
i
=
low
;
i
<
high
;
i
++
)
{
/* This debug code is only for 5.7. In trunk, with newDD,
the space->name is no longer same as table name. */
DBUG_EXECUTE_IF
(
"innodb_invalid_read_after_truncate"
,
fil_space_t
*
space
=
fil_space_get
(
page_id
.
space
());
if
(
space
!=
NULL
&&
strcmp
(
space
->
name
,
"test/t1"
)
==
0
)
{
high
=
space
->
size
;
buf_pool_mutex_exit
(
buf_pool
);
goto
read_ahead
;
}
);
DBUG_EXECUTE_IF
(
"innodb_invalid_read_after_truncate"
,
if
(
fil_space_t
*
space
=
fil_space_acquire
(
page_id
.
space
()))
{
bool
skip
=
!
strcmp
(
space
->
name
,
"test/t1"
);
fil_space_release
(
space
);
if
(
skip
)
{
high
=
space
->
size
;
buf_pool_mutex_exit
(
buf_pool
);
goto
read_ahead
;
}
}
);
const
buf_page_t
*
bpage
=
buf_page_hash_get
(
buf_pool
,
page_id_t
(
page_id
.
space
(),
i
));
...
...
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