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
ac97ad4e
Commit
ac97ad4e
authored
Apr 25, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#19811005: Add a simple test case
parent
3ae21984
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
mysql-test/suite/innodb/r/innodb-index.result
mysql-test/suite/innodb/r/innodb-index.result
+27
-0
mysql-test/suite/innodb/t/innodb-index.test
mysql-test/suite/innodb/t/innodb-index.test
+20
-0
No files found.
mysql-test/suite/innodb/r/innodb-index.result
View file @
ac97ad4e
...
...
@@ -1213,3 +1213,30 @@ test.t1 check status OK
DROP TABLE t1;
SET GLOBAL innodb_file_format=@save_format;
SET GLOBAL innodb_large_prefix=@save_prefix;
#
# Bug#19811005 ALTER TABLE ADD INDEX DOES NOT UPDATE INDEX_LENGTH
# IN I_S TABLES
#
CREATE TABLE t1(a INT, b INT) ENGINE=INNODB, STATS_PERSISTENT=1;
SELECT cast(DATA_LENGTH/@@innodb_page_size as int) D,
cast(INDEX_LENGTH/@@innodb_page_size as int) I
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test';
D I
1 0
ALTER TABLE t1 ADD INDEX (a);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT cast(DATA_LENGTH/@@innodb_page_size as int) D,
cast(INDEX_LENGTH/@@innodb_page_size as int) I
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test';
D I
1 1
ALTER TABLE t1 ADD INDEX (b);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT cast(DATA_LENGTH/@@innodb_page_size as int) D,
cast(INDEX_LENGTH/@@innodb_page_size as int) I
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test';
D I
1 2
DROP TABLE t1;
mysql-test/suite/innodb/t/innodb-index.test
View file @
ac97ad4e
...
...
@@ -593,3 +593,23 @@ CHECK TABLE t1;
DROP
TABLE
t1
;
SET
GLOBAL
innodb_file_format
=@
save_format
;
SET
GLOBAL
innodb_large_prefix
=@
save_prefix
;
--
echo
#
--
echo
# Bug#19811005 ALTER TABLE ADD INDEX DOES NOT UPDATE INDEX_LENGTH
--
echo
# IN I_S TABLES
--
echo
#
let
$i_s_query
=
SELECT
cast
(
DATA_LENGTH
/@@
innodb_page_size
as
int
)
D
,
cast
(
INDEX_LENGTH
/@@
innodb_page_size
as
int
)
I
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
'test'
;
CREATE
TABLE
t1
(
a
INT
,
b
INT
)
ENGINE
=
INNODB
,
STATS_PERSISTENT
=
1
;
eval
$i_s_query
;
--
enable_info
ALTER
TABLE
t1
ADD
INDEX
(
a
);
--
disable_info
eval
$i_s_query
;
--
enable_info
ALTER
TABLE
t1
ADD
INDEX
(
b
);
--
disable_info
eval
$i_s_query
;
DROP
TABLE
t1
;
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