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
e09e304b
Commit
e09e304b
authored
Jul 06, 2021
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-16857 system-invisible row_end is displayed in SHOW INDEX
Skip system-invisible keypart in get_schema_stat_record().
parent
f9194d02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
mysql-test/suite/versioning/r/create.result
mysql-test/suite/versioning/r/create.result
+19
-0
mysql-test/suite/versioning/t/create.test
mysql-test/suite/versioning/t/create.test
+12
-0
sql/sql_show.cc
sql/sql_show.cc
+10
-0
No files found.
mysql-test/suite/versioning/r/create.result
View file @
e09e304b
...
...
@@ -580,3 +580,22 @@ t2 CREATE TEMPORARY TABLE `t2` (
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
drop temporary table t2;
drop table t1;
#
# MDEV-16857 system-invisible row_end is displayed in SHOW INDEX
#
create or replace table t1 (id int primary key, x int) with system versioning;
select table_schema, table_name, non_unique, index_schema, index_name, seq_in_index, column_name
from information_schema.statistics where table_name = 't1';
table_schema table_name non_unique index_schema index_name seq_in_index column_name
test t1 0 test PRIMARY 1 id
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 0 PRIMARY 1 id # # # # # #
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
`x` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
drop table t1;
mysql-test/suite/versioning/t/create.test
View file @
e09e304b
...
...
@@ -439,3 +439,15 @@ show create table t1;
show
create
table
t2
;
drop
temporary
table
t2
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-16857 system-invisible row_end is displayed in SHOW INDEX
--
echo
#
create
or
replace
table
t1
(
id
int
primary
key
,
x
int
)
with
system
versioning
;
select
table_schema
,
table_name
,
non_unique
,
index_schema
,
index_name
,
seq_in_index
,
column_name
from
information_schema
.
statistics
where
table_name
=
't1'
;
--
replace_column
6
# 7 # 8 # 9 # 10 # 11 #
show
index
from
t1
;
--
replace_result
$default_engine
DEFAULT_ENGINE
show
create
table
t1
;
drop
table
t1
;
sql/sql_show.cc
View file @
e09e304b
...
...
@@ -6676,6 +6676,16 @@ static int get_schema_stat_record(THD *thd, TABLE_LIST *tables,
LEX_CSTRING
unknown
=
{
STRING_WITH_LEN
(
"?unknown field?"
)
};
for
(
uint
j
=
0
;
j
<
key_info
->
user_defined_key_parts
;
j
++
,
key_part
++
)
{
if
(
key_part
->
field
->
invisible
>=
INVISIBLE_SYSTEM
&&
DBUG_EVALUATE_IF
(
"test_completely_invisible"
,
0
,
1
))
{
/*
NOTE: we will get SEQ_IN_INDEX gap inside the result if this key_part
is not last (currently not possible). Though nothing is wrong with
that probably.
*/
continue
;
}
restore_record
(
table
,
s
->
default_values
);
table
->
field
[
0
]
->
store
(
STRING_WITH_LEN
(
"def"
),
cs
);
table
->
field
[
1
]
->
store
(
db_name
->
str
,
db_name
->
length
,
cs
);
...
...
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