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
3a24f1cf
Commit
3a24f1cf
authored
Feb 22, 2016
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-9307 - provide info about DATA/INDEX directory in INFORMATION_SCHEMA.TA
BLES (in CREATE_OPTIONS column)
parent
ff25158d
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
10 deletions
+35
-10
mysql-test/r/information_schema_inno.result
mysql-test/r/information_schema_inno.result
+5
-0
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+1
-1
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+2
-2
mysql-test/r/symlink.result
mysql-test/r/symlink.result
+3
-0
mysql-test/suite/funcs_1/r/is_columns_is.result
mysql-test/suite/funcs_1/r/is_columns_is.result
+2
-2
mysql-test/suite/funcs_1/r/is_tables.result
mysql-test/suite/funcs_1/r/is_tables.result
+3
-3
mysql-test/t/information_schema_inno.test
mysql-test/t/information_schema_inno.test
+6
-0
mysql-test/t/symlink.test
mysql-test/t/symlink.test
+2
-0
sql/sql_show.cc
sql/sql_show.cc
+11
-2
No files found.
mysql-test/r/information_schema_inno.result
View file @
3a24f1cf
...
...
@@ -101,3 +101,8 @@ SELECT * FROM information_schema.partitions
WHERE table_schema= 'test' AND table_name= 'v1';
DROP TABLE t1;
DROP VIEW v1;
CREATE TABLE t1(i int) ENGINE=Innodb ROW_FORMAT=REDUNDANT DATA DIRECTORY='MYSQLTEST_VARDIR/tmp';
SELECT CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES where TABLE_NAME='t1';
CREATE_OPTIONS
row_format=REDUNDANT DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/'
DROP TABLE t1;
mysql-test/r/mysqldump.result
View file @
3a24f1cf
...
...
@@ -3715,7 +3715,7 @@ CREATE TEMPORARY TABLE `TABLES` (
`CHECK_TIME` datetime DEFAULT NULL,
`TABLE_COLLATION` varchar(32) DEFAULT NULL,
`CHECKSUM` bigint(21) unsigned DEFAULT NULL,
`CREATE_OPTIONS` varchar(2
55
) DEFAULT NULL,
`CREATE_OPTIONS` varchar(2
048
) DEFAULT NULL,
`TABLE_COMMENT` varchar(2048) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
...
...
mysql-test/r/show_check.result
View file @
3a24f1cf
...
...
@@ -133,7 +133,7 @@ def information_schema TABLES TABLES UPDATE_TIME Update_time 12 19 0 Y 128 0 63
def information_schema TABLES TABLES CHECK_TIME Check_time 12 19 0 Y 128 0 63
def information_schema TABLES TABLES TABLE_COLLATION Collation 253 32 0 Y 0 0 8
def information_schema TABLES TABLES CHECKSUM Checksum 8 21 0 Y 32800 0 63
def information_schema TABLES TABLES CREATE_OPTIONS Create_options 253 2
55
0 Y 0 0 8
def information_schema TABLES TABLES CREATE_OPTIONS Create_options 253 2
048
0 Y 0 0 8
def information_schema TABLES TABLES TABLE_COMMENT Comment 253 2048 0 N 1 0 8
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
show databases;
...
...
@@ -935,7 +935,7 @@ def information_schema TABLES TABLES TABLE_TYPE TABLE_TYPE 253 192 10 N 1 0 33
def information_schema TABLES TABLES ENGINE ENGINE 253 192 6 Y 0 0 33
def information_schema TABLES TABLES ROW_FORMAT ROW_FORMAT 253 30 5 Y 0 0 33
def information_schema TABLES TABLES TABLE_COLLATION TABLE_COLLATION 253 96 17 Y 0 0 33
def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253
765
0 Y 0 0 33
def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253
6144
0 Y 0 0 33
def information_schema TABLES TABLES TABLE_COMMENT TABLE_COMMENT 253 6144 0 N 1 0 33
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE ROW_FORMAT TABLE_COLLATION CREATE_OPTIONS TABLE_COMMENT
def test t1 BASE TABLE MyISAM Fixed latin1_swedish_ci
...
...
mysql-test/r/symlink.result
View file @
3a24f1cf
...
...
@@ -202,6 +202,9 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
select create_options from information_schema.tables where table_name='t1';
create_options
DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
# CREATE TABLE LIKE statement on table with INDEX/DATA DIRECTORY
# options should not fail. Per documentation newly created table
# should not inherit value of these options from the original table.
...
...
mysql-test/suite/funcs_1/r/is_columns_is.result
View file @
3a24f1cf
...
...
@@ -363,7 +363,7 @@ def information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 20 0 N
def information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
def information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
def information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select
def information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 2
55 765 NULL NULL NULL utf8 utf8_general_ci varchar(255
) select
def information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 2
048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048
) select
def information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select
def information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
def information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
...
...
@@ -906,7 +906,7 @@ NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime
3.0000 information_schema TABLES TABLE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32)
NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema TABLES CREATE_OPTIONS varchar 2
55 765 utf8 utf8_general_ci varchar(255
)
3.0000 information_schema TABLES CREATE_OPTIONS varchar 2
048 6144 utf8 utf8_general_ci varchar(2048
)
3.0000 information_schema TABLES TABLE_COMMENT varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
3.0000 information_schema TABLESPACES TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLESPACES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64)
...
...
mysql-test/suite/funcs_1/r/is_tables.result
View file @
3a24f1cf
...
...
@@ -47,7 +47,7 @@ UPDATE_TIME datetime YES NULL
CHECK_TIME datetime YES NULL
TABLE_COLLATION varchar(32) YES NULL
CHECKSUM bigint(21) unsigned YES NULL
CREATE_OPTIONS varchar(2
55
) YES NULL
CREATE_OPTIONS varchar(2
048
) YES NULL
TABLE_COMMENT varchar(2048) NO
SHOW CREATE TABLE information_schema.TABLES;
Table Create Table
...
...
@@ -71,7 +71,7 @@ TABLES CREATE TEMPORARY TABLE `TABLES` (
`CHECK_TIME` datetime DEFAULT NULL,
`TABLE_COLLATION` varchar(32) DEFAULT NULL,
`CHECKSUM` bigint(21) unsigned DEFAULT NULL,
`CREATE_OPTIONS` varchar(2
55
) DEFAULT NULL,
`CREATE_OPTIONS` varchar(2
048
) DEFAULT NULL,
`TABLE_COMMENT` varchar(2048) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.TABLES;
...
...
@@ -95,7 +95,7 @@ UPDATE_TIME datetime YES NULL
CHECK_TIME datetime YES NULL
TABLE_COLLATION varchar(32) YES NULL
CHECKSUM bigint(21) unsigned YES NULL
CREATE_OPTIONS varchar(2
55
) YES NULL
CREATE_OPTIONS varchar(2
048
) YES NULL
TABLE_COMMENT varchar(2048) NO
SELECT table_catalog, table_schema, table_name
FROM information_schema.tables WHERE table_catalog IS NULL OR table_catalog <> 'def';
...
...
mysql-test/t/information_schema_inno.test
View file @
3a24f1cf
...
...
@@ -109,3 +109,9 @@ CREATE TABLE t1 engine = InnoDB AS
DROP
TABLE
t1
;
DROP
VIEW
v1
;
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
eval
CREATE
TABLE
t1
(
i
int
)
ENGINE
=
Innodb
ROW_FORMAT
=
REDUNDANT
DATA
DIRECTORY
=
'$MYSQLTEST_VARDIR/tmp'
;
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
SELECT
CREATE_OPTIONS
FROM
INFORMATION_SCHEMA
.
TABLES
where
TABLE_NAME
=
't1'
;
DROP
TABLE
t1
;
mysql-test/t/symlink.test
View file @
3a24f1cf
...
...
@@ -292,6 +292,8 @@ eval create table t1 (a int primary key) engine=myisam
index
directory
=
"
$MYSQLTEST_VARDIR
/run"
;
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
show
create
table
t1
;
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
select
create_options
from
information_schema
.
tables
where
table_name
=
't1'
;
--
echo
# CREATE TABLE LIKE statement on table with INDEX/DATA DIRECTORY
--
echo
# options should not fail. Per documentation newly created table
--
echo
# should not inherit value of these options from the original table.
...
...
sql/sql_show.cc
View file @
3a24f1cf
...
...
@@ -5036,6 +5036,15 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
}
append_create_options
(
thd
,
&
str
,
share
->
option_list
,
false
,
0
);
if
(
file
)
{
HA_CREATE_INFO
create_info
;
memset
(
&
create_info
,
0
,
sizeof
(
create_info
));
file
->
update_create_info
(
&
create_info
);
append_directory
(
thd
,
&
str
,
"DATA"
,
create_info
.
data_file_name
);
append_directory
(
thd
,
&
str
,
"INDEX"
,
create_info
.
index_file_name
);
}
if
(
str
.
length
())
table
->
field
[
19
]
->
store
(
str
.
ptr
()
+
1
,
str
.
length
()
-
1
,
cs
);
...
...
@@ -8300,8 +8309,8 @@ ST_FIELD_INFO tables_fields_info[]=
OPEN_FRM_ONLY
},
{
"CHECKSUM"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Checksum"
,
OPEN_FULL_TABLE
},
{
"CREATE_OPTIONS"
,
2
55
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Create_options"
,
OPEN_F
RM_ONLY
},
{
"CREATE_OPTIONS"
,
2
048
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Create_options"
,
OPEN_F
ULL_TABLE
},
{
"TABLE_COMMENT"
,
TABLE_COMMENT_MAXLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Comment"
,
OPEN_FRM_ONLY
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
...
...
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