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
41332426
Commit
41332426
authored
Oct 03, 2017
by
Alice Sherepa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stats_table_flag
parent
b0bccac1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
10 deletions
+110
-10
mysql-test/suite/innodb/include/innodb_stats_table_flag.inc
mysql-test/suite/innodb/include/innodb_stats_table_flag.inc
+88
-0
mysql-test/suite/innodb/include/innodb_stats_table_flag_analyze.inc
.../suite/innodb/include/innodb_stats_table_flag_analyze.inc
+12
-0
mysql-test/suite/innodb/r/innodb_io_pf.result
mysql-test/suite/innodb/r/innodb_io_pf.result
+0
-1
mysql-test/suite/innodb/r/innodb_misc1.result
mysql-test/suite/innodb/r/innodb_misc1.result
+5
-5
mysql-test/suite/innodb/t/innodb_misc1.test
mysql-test/suite/innodb/t/innodb_misc1.test
+5
-4
No files found.
mysql-test/suite/innodb/include/innodb_stats_table_flag.inc
0 → 100644
View file @
41332426
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
default
creation
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
default
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
creation
with
explicit
PS
=
OFF
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
0
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
creation
with
explicit
PS
=
ON
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
1
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
creation
with
explicit
PS
=
OFF
,
--
echo
===
then
ALTER
to
ON
,
then
ALTER
to
OFF
,
then
ALTER
to
default
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
0
;
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
1
;
# also check that the change from the ALTER TABLE survives server restart
--
source
include
/
restart_mysqld
.
inc
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
0
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
default
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
#
--
echo
=====
--
echo
===
Test
ANALYZE
behavior
after
creation
with
explicit
PS
=
ON
,
--
echo
===
then
ALTER
to
OFF
,
then
ALTER
to
ON
,
then
ALTER
to
default
--
echo
=====
CREATE
TABLE
test_ps_flag
(
a
INT
)
ENGINE
=
INNODB
STATS_PERSISTENT
=
1
;
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
0
;
# also check that the change from the ALTER TABLE survives server restart
--
source
include
/
restart_mysqld
.
inc
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
1
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
ALTER
TABLE
test_ps_flag
STATS_PERSISTENT
=
default
;
--
source
suite
/
innodb
/
include
/
innodb_stats_table_flag_analyze
.
inc
DROP
TABLE
test_ps_flag
;
mysql-test/suite/innodb/include/innodb_stats_table_flag_analyze.inc
0 → 100644
View file @
41332426
SHOW
CREATE
TABLE
test_ps_flag
;
DELETE
FROM
mysql
.
innodb_index_stats
WHERE
table_name
=
'test_ps_flag'
;
DELETE
FROM
mysql
.
innodb_table_stats
WHERE
table_name
=
'test_ps_flag'
;
# must be 0, we have just deleted the rows
SELECT
COUNT
(
*
)
AS
cnt_before
FROM
mysql
.
innodb_table_stats
WHERE
table_name
=
'test_ps_flag'
;
ANALYZE
TABLE
test_ps_flag
;
# if the table is PS enabled, then this should be 1 and 0 otherwise
SELECT
COUNT
(
*
)
AS
cnt_after
FROM
mysql
.
innodb_table_stats
WHERE
table_name
=
'test_ps_flag'
;
mysql-test/suite/innodb/r/innodb_io_pf.result
View file @
41332426
...
...
@@ -15,6 +15,5 @@ EVENT_NAME COUNT_STAR
wait/io/file/innodb/innodb_data_file 5
wait/io/file/innodb/innodb_log_file 5
wait/io/file/innodb/innodb_temp_file 5
wait/io/file/innodb/innodb_bmp_file 5
USE test;
DROP table t1;
mysql-test/suite/innodb/r/innodb_misc1.result
View file @
41332426
...
...
@@ -103,7 +103,7 @@ id INT NOT NULL PRIMARY KEY,
b INT,
FOREIGN KEY (b) REFERENCES test.t1(id)
) ENGINE=InnoDB;
ERROR HY000: Can
not add foreign key constraint
ERROR HY000: Can
't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
DROP TABLE t1;
create table t1 (col1 varchar(2000), index (col1(767)))
character set = latin1 engine = innodb;
...
...
@@ -211,13 +211,13 @@ drop table t1;
set foreign_key_checks=0;
create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
ERROR HY000: Can
not add foreign key constraint
ERROR HY000: Can
't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
set foreign_key_checks=1;
drop table t2;
set foreign_key_checks=0;
create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8;
ERROR HY000: Can
not add foreign key constraint
ERROR HY000: Can
't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
set foreign_key_checks=1;
drop table t1;
set foreign_key_checks=0;
...
...
@@ -237,7 +237,7 @@ set foreign_key_checks=0;
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;
rename table t3 to t1;
ERROR HY000: Error on rename of './test/t3' to './test/t1' (errno: 150
- Foreign key constraint is incorrectly formed
)
ERROR HY000: Error on rename of './test/t3' to './test/t1' (errno: 150
"Foreign key constraint is incorrectly formed"
)
set foreign_key_checks=1;
drop table t2,t3;
create table t1(a int primary key) row_format=redundant engine=innodb;
...
...
@@ -580,7 +580,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ERROR HY000:
Can't update table 't2' while 't10' is being created.
ERROR HY000:
Lock wait timeout exceeded; try restarting transaction
commit;
drop table t1, t2, t3, t5, t6, t8, t9;
CREATE TABLE t1 (DB_ROW_ID int) engine=innodb;
...
...
mysql-test/suite/innodb/t/innodb_misc1.test
View file @
41332426
...
...
@@ -129,7 +129,7 @@ CREATE TABLE t1
id
INT
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
--
error
ER_CAN
NOT_ADD_FOREIGN
--
error
ER_CAN
T_CREATE_TABLE
CREATE
TEMPORARY
TABLE
t2
(
id
INT
NOT
NULL
PRIMARY
KEY
,
...
...
@@ -279,7 +279,7 @@ disconnect b;
set
foreign_key_checks
=
0
;
create
table
t2
(
a
int
primary
key
,
b
int
,
foreign
key
(
b
)
references
t1
(
a
))
engine
=
innodb
;
--
error
ER_CAN
NOT_ADD_FOREIGN
--
error
ER_CAN
T_CREATE_TABLE
create
table
t1
(
a
char
(
10
)
primary
key
,
b
varchar
(
20
))
engine
=
innodb
;
set
foreign_key_checks
=
1
;
drop
table
t2
;
...
...
@@ -289,7 +289,7 @@ drop table t2;
set
foreign_key_checks
=
0
;
create
table
t1
(
a
varchar
(
10
)
primary
key
)
engine
=
innodb
DEFAULT
CHARSET
=
latin1
;
--
error
ER_CAN
NOT_ADD_FOREIGN
--
error
ER_CAN
T_CREATE_TABLE
create
table
t2
(
a
varchar
(
10
),
foreign
key
(
a
)
references
t1
(
a
))
engine
=
innodb
DEFAULT
CHARSET
=
utf8
;
set
foreign_key_checks
=
1
;
drop
table
t1
;
...
...
@@ -858,7 +858,8 @@ connection i;
reap
;
connection
j
;
--
error
ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT
#--error ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT
--
error
ER_LOCK_WAIT_TIMEOUT
reap
;
connection
a
;
...
...
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