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
7dbb93d9
Commit
7dbb93d9
authored
Feb 08, 2005
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Make SHOW TABLE STATUS report Row_format=Compact and
Row_format=Redundant
parent
22c18367
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
4 deletions
+56
-4
sql/ha_innodb.cc
sql/ha_innodb.cc
+20
-0
sql/ha_innodb.h
sql/ha_innodb.h
+5
-0
sql/handler.h
sql/handler.h
+6
-0
sql/sql_show.cc
sql/sql_show.cc
+25
-4
No files found.
sql/ha_innodb.cc
View file @
7dbb93d9
...
@@ -1714,6 +1714,26 @@ innobase_close_connection(
...
@@ -1714,6 +1714,26 @@ innobase_close_connection(
** InnoDB database tables
** InnoDB database tables
*****************************************************************************/
*****************************************************************************/
/********************************************************************
Get the record format from the data dictionary. */
enum
row_type
ha_innobase
::
get_row_type
()
const
/*=============================*/
/* out: ROW_TYPE_REDUNDANT or ROW_TYPE_COMPACT */
{
row_prebuilt_t
*
prebuilt
=
(
row_prebuilt_t
*
)
innobase_prebuilt
;
if
(
prebuilt
&&
prebuilt
->
table
)
{
if
(
prebuilt
->
table
->
comp
)
{
return
(
ROW_TYPE_COMPACT
);
}
else
{
return
(
ROW_TYPE_REDUNDANT
);
}
}
ut_ad
(
0
);
return
(
ROW_TYPE_NOT_USED
);
}
/********************************************************************
/********************************************************************
Gives the file extension of an InnoDB single-table tablespace. */
Gives the file extension of an InnoDB single-table tablespace. */
...
...
sql/ha_innodb.h
View file @
7dbb93d9
...
@@ -96,6 +96,11 @@ class ha_innobase: public handler
...
@@ -96,6 +96,11 @@ class ha_innobase: public handler
{
{
}
}
~
ha_innobase
()
{}
~
ha_innobase
()
{}
/*
Get the row type from the storage engine. If this method returns
ROW_TYPE_NOT_USED, the information in HA_CREATE_INFO should be used.
*/
enum
row_type
get_row_type
()
const
;
const
char
*
table_type
()
const
{
return
(
"InnoDB"
);}
const
char
*
table_type
()
const
{
return
(
"InnoDB"
);}
const
char
*
index_type
(
uint
key_number
)
{
return
"BTREE"
;
}
const
char
*
index_type
(
uint
key_number
)
{
return
"BTREE"
;
}
...
...
sql/handler.h
View file @
7dbb93d9
...
@@ -385,6 +385,12 @@ class handler :public Sql_alloc
...
@@ -385,6 +385,12 @@ class handler :public Sql_alloc
virtual
ha_rows
estimate_rows_upper_bound
()
virtual
ha_rows
estimate_rows_upper_bound
()
{
return
records
+
EXTRA_RECORDS
;
}
{
return
records
+
EXTRA_RECORDS
;
}
/*
Get the row type from the storage engine. If this method returns
ROW_TYPE_NOT_USED, the information in HA_CREATE_INFO should be used.
*/
virtual
enum
row_type
get_row_type
()
const
{
return
ROW_TYPE_NOT_USED
;
}
virtual
const
char
*
index_type
(
uint
key_number
)
{
DBUG_ASSERT
(
0
);
return
""
;}
virtual
const
char
*
index_type
(
uint
key_number
)
{
DBUG_ASSERT
(
0
);
return
""
;}
int
ha_index_init
(
uint
idx
)
int
ha_index_init
(
uint
idx
)
...
...
sql/sql_show.cc
View file @
7dbb93d9
...
@@ -2046,10 +2046,31 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
...
@@ -2046,10 +2046,31 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
tmp_buff
=
file
->
table_type
();
tmp_buff
=
file
->
table_type
();
table
->
field
[
4
]
->
store
(
tmp_buff
,
strlen
(
tmp_buff
),
cs
);
table
->
field
[
4
]
->
store
(
tmp_buff
,
strlen
(
tmp_buff
),
cs
);
table
->
field
[
5
]
->
store
((
longlong
)
share
->
frm_version
);
table
->
field
[
5
]
->
store
((
longlong
)
share
->
frm_version
);
enum
row_type
row_type
=
file
->
get_row_type
();
switch
(
row_type
)
{
case
ROW_TYPE_NOT_USED
:
case
ROW_TYPE_DEFAULT
:
tmp_buff
=
((
share
->
db_options_in_use
&
tmp_buff
=
((
share
->
db_options_in_use
&
HA_OPTION_COMPRESS_RECORD
)
?
"Compressed"
:
HA_OPTION_COMPRESS_RECORD
)
?
"Compressed"
:
(
share
->
db_options_in_use
&
HA_OPTION_PACK_RECORD
)
?
(
share
->
db_options_in_use
&
HA_OPTION_PACK_RECORD
)
?
"Dynamic"
:
"Fixed"
);
"Dynamic"
:
"Fixed"
);
break
;
case
ROW_TYPE_FIXED
:
tmp_buff
=
"Fixed"
;
break
;
case
ROW_TYPE_DYNAMIC
:
tmp_buff
=
"Dynamic"
;
break
;
case
ROW_TYPE_COMPRESSED
:
tmp_buff
=
"Compressed"
;
break
;
case
ROW_TYPE_REDUNDANT
:
tmp_buff
=
"Redundant"
;
break
;
case
ROW_TYPE_COMPACT
:
tmp_buff
=
"Compact"
;
break
;
}
table
->
field
[
6
]
->
store
(
tmp_buff
,
strlen
(
tmp_buff
),
cs
);
table
->
field
[
6
]
->
store
(
tmp_buff
,
strlen
(
tmp_buff
),
cs
);
if
(
!
tables
->
schema_table
)
if
(
!
tables
->
schema_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