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
187a5bbf
Commit
187a5bbf
authored
Nov 23, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust the tests for MariaDB, and optimize them
parent
f8bc799a
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
240 additions
and
412 deletions
+240
-412
mysql-test/suite/innodb/r/update_time.result
mysql-test/suite/innodb/r/update_time.result
+6
-5
mysql-test/suite/innodb/r/update_time_wl6658.result
mysql-test/suite/innodb/r/update_time_wl6658.result
+122
-195
mysql-test/suite/innodb/t/update_time.test
mysql-test/suite/innodb/t/update_time.test
+5
-6
mysql-test/suite/innodb/t/update_time_wl6658.test
mysql-test/suite/innodb/t/update_time_wl6658.test
+107
-206
No files found.
mysql-test/suite/innodb/r/update_time.result
View file @
187a5bbf
...
@@ -19,7 +19,7 @@ SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
...
@@ -19,7 +19,7 @@ SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
COUNT(*)
COUNT(*)
1
1
CREATE TABLE big (a TEXT) ENGINE=INNODB;
CREATE T
EMPORARY T
ABLE big (a TEXT) ENGINE=INNODB;
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
WHERE table_name = '`test`.`t`';
WHERE table_name = '`test`.`t`';
COUNT(*)
COUNT(*)
...
@@ -34,20 +34,21 @@ SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
...
@@ -34,20 +34,21 @@ SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
AND update_time IS NOT NULL;
AND update_time IS NOT NULL;
COUNT(*)
COUNT(*)
1
1
DROP TABLE big;
DROP T
EMPORARY T
ABLE big;
# Test the behavior after restart with a prepared XA transaction
# Test the behavior after restart with a prepared XA transaction
XA START 'xatrx';
XA START 'xatrx';
INSERT INTO t VALUES (5);
INSERT INTO t VALUES (5);
XA END 'xatrx';
XA END 'xatrx';
XA PREPARE 'xatrx';
XA PREPARE 'xatrx';
CONNECT con1,localhost,root,,;
call mtr.add_suppression("Found 1 prepared XA transactions");
call mtr.add_suppression("Found 1 prepared XA transactions");
FLUSH TABLES;
# Kill and restart
# Kill and restart
SELECT update_time FROM information_schema.tables WHERE table_name = 't';
SELECT update_time FROM information_schema.tables WHERE table_name = 't';
update_time
update_time
NULL
NULL
XA COMMIT 'xatrx';
XA COMMIT 'xatrx';
SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
SELECT COUNT(update_time) FROM information_schema.tables WHERE table_name='t';
AND update_time IS NOT NULL;
COUNT(update_time)
COUNT(*)
1
1
DROP TABLE t;
DROP TABLE t;
mysql-test/suite/innodb/r/update_time_wl6658.result
View file @
187a5bbf
This diff is collapsed.
Click to expand it.
mysql-test/suite/innodb/t/update_time.test
View file @
187a5bbf
...
@@ -25,7 +25,7 @@ AND update_time IS NOT NULL;
...
@@ -25,7 +25,7 @@ AND update_time IS NOT NULL;
SELECT
COUNT
(
*
)
FROM
information_schema
.
tables
WHERE
table_name
=
't'
SELECT
COUNT
(
*
)
FROM
information_schema
.
tables
WHERE
table_name
=
't'
AND
TIMESTAMPDIFF
(
SECOND
,
update_time
,
NOW
())
<
120
;
AND
TIMESTAMPDIFF
(
SECOND
,
update_time
,
NOW
())
<
120
;
CREATE
TABLE
big
(
a
TEXT
)
ENGINE
=
INNODB
;
CREATE
T
EMPORARY
T
ABLE
big
(
a
TEXT
)
ENGINE
=
INNODB
;
SELECT
COUNT
(
*
)
FROM
information_schema
.
innodb_buffer_page
SELECT
COUNT
(
*
)
FROM
information_schema
.
innodb_buffer_page
WHERE
table_name
=
'`test`.`t`'
;
WHERE
table_name
=
'`test`.`t`'
;
...
@@ -44,7 +44,7 @@ COMMIT;
...
@@ -44,7 +44,7 @@ COMMIT;
--
enable_query_log
--
enable_query_log
--
echo
# INSERT lots of data in table 'big': end
--
echo
# INSERT lots of data in table 'big': end
# confirm that
table 't' has
been evicted
# confirm that
all pages for table 't' have
been evicted
SELECT
COUNT
(
*
)
FROM
information_schema
.
innodb_buffer_page
SELECT
COUNT
(
*
)
FROM
information_schema
.
innodb_buffer_page
WHERE
table_name
=
'`test`.`t`'
;
WHERE
table_name
=
'`test`.`t`'
;
...
@@ -53,7 +53,7 @@ WHERE table_name = '`test`.`t`';
...
@@ -53,7 +53,7 @@ WHERE table_name = '`test`.`t`';
SELECT
COUNT
(
*
)
FROM
information_schema
.
tables
WHERE
table_name
=
't'
SELECT
COUNT
(
*
)
FROM
information_schema
.
tables
WHERE
table_name
=
't'
AND
update_time
IS
NOT
NULL
;
AND
update_time
IS
NOT
NULL
;
DROP
TABLE
big
;
DROP
T
EMPORARY
T
ABLE
big
;
--
echo
# Test the behavior after restart with a prepared XA transaction
--
echo
# Test the behavior after restart with a prepared XA transaction
...
@@ -63,9 +63,9 @@ XA END 'xatrx';
...
@@ -63,9 +63,9 @@ XA END 'xatrx';
XA
PREPARE
'xatrx'
;
XA
PREPARE
'xatrx'
;
CONNECT
(
con1
,
localhost
,
root
,,);
CONNECT
(
con1
,
localhost
,
root
,,);
CONNECTION
con1
;
call
mtr
.
add_suppression
(
"Found 1 prepared XA transactions"
);
call
mtr
.
add_suppression
(
"Found 1 prepared XA transactions"
);
FLUSH
TABLES
;
--
source
include
/
kill_and_restart_mysqld
.
inc
--
source
include
/
kill_and_restart_mysqld
.
inc
...
@@ -73,7 +73,6 @@ SELECT update_time FROM information_schema.tables WHERE table_name = 't';
...
@@ -73,7 +73,6 @@ SELECT update_time FROM information_schema.tables WHERE table_name = 't';
XA
COMMIT
'xatrx'
;
XA
COMMIT
'xatrx'
;
SELECT
COUNT
(
*
)
FROM
information_schema
.
tables
WHERE
table_name
=
't'
SELECT
COUNT
(
update_time
)
FROM
information_schema
.
tables
WHERE
table_name
=
't'
;
AND
update_time
IS
NOT
NULL
;
DROP
TABLE
t
;
DROP
TABLE
t
;
mysql-test/suite/innodb/t/update_time_wl6658.test
View file @
187a5bbf
This diff is collapsed.
Click to expand it.
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