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
4156b1a2
Commit
4156b1a2
authored
Jun 16, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-19772 Add helper classes for ST_FIELD_INFO
parent
984d7100
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1143 additions
and
978 deletions
+1143
-978
mysql-test/main/thread_pool_info.result
mysql-test/main/thread_pool_info.result
+1
-1
plugin/disks/information_schema_disks.cc
plugin/disks/information_schema_disks.cc
+14
-11
plugin/feedback/feedback.cc
plugin/feedback/feedback.cc
+3
-3
plugin/locale_info/locale_info.cc
plugin/locale_info/locale_info.cc
+16
-12
plugin/metadata_lock_info/metadata_lock_info.cc
plugin/metadata_lock_info/metadata_lock_info.cc
+14
-15
plugin/qc_info/qc_info.cc
plugin/qc_info/qc_info.cc
+32
-27
plugin/query_response_time/plugin.cc
plugin/query_response_time/plugin.cc
+9
-6
plugin/user_variables/user_variables.cc
plugin/user_variables/user_variables.cc
+10
-8
plugin/userstat/client_stats.cc
plugin/userstat/client_stats.cc
+31
-27
plugin/userstat/index_stats.cc
plugin/userstat/index_stats.cc
+10
-6
plugin/userstat/table_stats.cc
plugin/userstat/table_stats.cc
+11
-7
plugin/userstat/user_stats.cc
plugin/userstat/user_stats.cc
+31
-27
plugin/wsrep_info/plugin.cc
plugin/wsrep_info/plugin.cc
+20
-23
sql/opt_trace.cc
sql/opt_trace.cc
+12
-9
sql/set_var.cc
sql/set_var.cc
+1
-1
sql/sql_basic_types.h
sql/sql_basic_types.h
+2
-0
sql/sql_i_s.h
sql/sql_i_s.h
+318
-0
sql/sql_profile.cc
sql/sql_profile.cc
+23
-21
sql/sql_profile.h
sql/sql_profile.h
+3
-0
sql/sql_show.cc
sql/sql_show.cc
+529
-657
sql/sql_show.h
sql/sql_show.h
+0
-2
sql/table.h
sql/table.h
+1
-80
sql/thread_pool_info.cc
sql/thread_pool_info.cc
+52
-35
No files found.
mysql-test/main/thread_pool_info.result
View file @
4156b1a2
...
@@ -31,7 +31,7 @@ Field Type Null Key Default Extra
...
@@ -31,7 +31,7 @@ Field Type Null Key Default Extra
GROUP_ID int(6) NO 0
GROUP_ID int(6) NO 0
POSITION int(6) NO 0
POSITION int(6) NO 0
PRIORITY int(1) NO 0
PRIORITY int(1) NO 0
CONNECTION_ID bigint(19) NO 0
CONNECTION_ID bigint(19)
unsigned
NO 0
QUEUEING_TIME_MICROSECONDS bigint(19) NO 0
QUEUEING_TIME_MICROSECONDS bigint(19) NO 0
DESC INFORMATION_SCHEMA.THREAD_POOL_STATS;
DESC INFORMATION_SCHEMA.THREAD_POOL_STATS;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
...
...
plugin/disks/information_schema_disks.cc
View file @
4156b1a2
...
@@ -19,25 +19,28 @@
...
@@ -19,25 +19,28 @@
#include <sys/types.h>
#include <sys/types.h>
#include <mntent.h>
#include <mntent.h>
#include <sql_class.h>
#include <sql_class.h>
#include <
table
.h>
#include <
sql_i_s
.h>
bool
schema_table_store_record
(
THD
*
thd
,
TABLE
*
table
);
bool
schema_table_store_record
(
THD
*
thd
,
TABLE
*
table
);
namespace
{
struct
st_mysql_information_schema
disks_table_info
=
{
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
};
struct
st_mysql_information_schema
disks_table_info
=
{
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
};
namespace
Show
{
ST_FIELD_INFO
disks_table_fields
[]
=
ST_FIELD_INFO
disks_table_fields
[]
=
{
{
{
"Disk"
,
PATH_MAX
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"Disk"
,
Varchar
(
PATH_MAX
),
NOT_NULL
)
,
{
"Path"
,
PATH_MAX
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"Path"
,
Varchar
(
PATH_MAX
),
NOT_NULL
)
,
{
"Total"
,
32
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
// Total amount available
Column
(
"Total"
,
SLong
(
32
),
NOT_NULL
)
,
// Total amount available
{
"Used"
,
32
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
// Amount of space used
Column
(
"Used"
,
SLong
(
32
),
NOT_NULL
)
,
// Amount of space used
{
"Available"
,
32
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
// Amount available to users other than root.
Column
(
"Available"
,
SLong
(
32
),
NOT_NULL
)
,
// Amount available to users other than root.
{
0
,
0
,
MYSQL_TYPE_NULL
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
int
disks_table_add_row
(
THD
*
pThd
,
int
disks_table_add_row
(
THD
*
pThd
,
TABLE
*
pTable
,
TABLE
*
pTable
,
const
char
*
zDisk
,
const
char
*
zDisk
,
...
@@ -130,7 +133,7 @@ int disks_table_init(void *ptr)
...
@@ -130,7 +133,7 @@ int disks_table_init(void *ptr)
return
0
;
return
0
;
}
}
}
}
// namespace Show
extern
"C"
extern
"C"
{
{
...
@@ -143,7 +146,7 @@ maria_declare_plugin(disks)
...
@@ -143,7 +146,7 @@ maria_declare_plugin(disks)
"Johan Wikman"
,
/* author */
"Johan Wikman"
,
/* author */
"Disk space information"
,
/* description */
"Disk space information"
,
/* description */
PLUGIN_LICENSE_GPL
,
/* license type */
PLUGIN_LICENSE_GPL
,
/* license type */
disks_table_init
,
/* init function */
Show
::
disks_table_init
,
/* init function */
NULL
,
/* deinit function */
NULL
,
/* deinit function */
0x0100
,
/* version = 1.0 */
0x0100
,
/* version = 1.0 */
NULL
,
/* no status variables */
NULL
,
/* no status variables */
...
...
plugin/feedback/feedback.cc
View file @
4156b1a2
...
@@ -67,9 +67,9 @@ ST_SCHEMA_TABLE *i_s_feedback; ///< table descriptor for our I_S table
...
@@ -67,9 +67,9 @@ ST_SCHEMA_TABLE *i_s_feedback; ///< table descriptor for our I_S table
*/
*/
static
ST_FIELD_INFO
feedback_fields
[]
=
static
ST_FIELD_INFO
feedback_fields
[]
=
{
{
{
"VARIABLE_NAME"
,
255
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Show
::
Column
(
"VARIABLE_NAME"
,
Show
::
Varchar
(
255
),
NOT_NULL
)
,
{
"VARIABLE_VALUE"
,
1024
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Show
::
Column
(
"VARIABLE_VALUE"
,
Show
::
Varchar
(
1024
),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_NULL
,
0
,
0
,
0
,
0
}
Show
::
CEnd
()
};
};
static
COND
*
const
OOM
=
(
COND
*
)
1
;
static
COND
*
const
OOM
=
(
COND
*
)
1
;
...
...
plugin/locale_info/locale_info.cc
View file @
4156b1a2
...
@@ -28,27 +28,31 @@
...
@@ -28,27 +28,31 @@
#include <my_global.h>
#include <my_global.h>
#include <sql_class.h> // THD
#include <sql_class.h> // THD
#include <
table
.h> // ST_SCHEMA_TABLE
#include <
sql_i_s
.h> // ST_SCHEMA_TABLE
#include <mysql/plugin.h>
#include <mysql/plugin.h>
#include <m_ctype.h>
#include <m_ctype.h>
#include "sql_locale.h"
#include "sql_locale.h"
bool
schema_table_store_record
(
THD
*
thd
,
TABLE
*
table
);
static
MY_LOCALE
**
locale_list
;
static
MY_LOCALE
**
locale_list
;
namespace
Show
{
/* LOCALES */
/* LOCALES */
static
ST_FIELD_INFO
locale_info_locale_fields_info
[]
=
static
ST_FIELD_INFO
locale_info_locale_fields_info
[]
=
{
{
{
"ID"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Id"
,
0
}
,
Column
(
"ID"
,
SLonglong
(
4
),
NOT_NULL
,
"Id"
)
,
{
"NAME"
,
255
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Name"
,
0
}
,
Column
(
"NAME"
,
Varchar
(
255
),
NOT_NULL
,
"Name"
)
,
{
"DESCRIPTION"
,
255
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Description"
,
0
}
,
Column
(
"DESCRIPTION"
,
Varchar
(
255
),
NOT_NULL
,
"Description"
)
,
{
"MAX_MONTH_NAME_LENGTH"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"MAX_MONTH_NAME_LENGTH"
,
SLonglong
(
4
),
NOT_NULL
)
,
{
"MAX_DAY_NAME_LENGTH"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"MAX_DAY_NAME_LENGTH"
,
SLonglong
(
4
),
NOT_NULL
)
,
{
"DECIMAL_POINT"
,
2
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"DECIMAL_POINT"
,
Varchar
(
2
),
NOT_NULL
)
,
{
"THOUSAND_SEP"
,
2
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"THOUSAND_SEP"
,
Varchar
(
2
),
NOT_NULL
)
,
{
"ERROR_MESSAGE_LANGUAGE"
,
64
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Error_Message_Language"
,
0
}
,
Column
(
"ERROR_MESSAGE_LANGUAGE"
,
Varchar
(
64
),
NOT_NULL
,
"Error_Message_Language"
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
static
int
locale_info_fill_table_locale
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
static
int
locale_info_fill_table_locale
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
{
TABLE
*
table
=
tables
->
table
;
TABLE
*
table
=
tables
->
table
;
...
@@ -84,7 +88,7 @@ static int locale_info_fill_table_locale(THD* thd, TABLE_LIST* tables, COND* con
...
@@ -84,7 +88,7 @@ static int locale_info_fill_table_locale(THD* thd, TABLE_LIST* tables, COND* con
static
int
locale_info_plugin_init_locales
(
void
*
p
)
static
int
locale_info_plugin_init_locales
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
locale_info_locale_fields_info
;
schema
->
fields_info
=
Show
::
locale_info_locale_fields_info
;
schema
->
fill_table
=
locale_info_fill_table_locale
;
schema
->
fill_table
=
locale_info_fill_table_locale
;
#if defined(_WIN64)
#if defined(_WIN64)
...
...
plugin/metadata_lock_info/metadata_lock_info.cc
View file @
4156b1a2
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#include "mysql_version.h"
#include "mysql_version.h"
#include "mysql/plugin.h"
#include "mysql/plugin.h"
#include "sql_class.h"
#include "sql_class.h"
#include "sql_
show
.h"
#include "sql_
i_s
.h"
static
const
LEX_STRING
metadata_lock_info_lock_name
[]
=
{
static
const
LEX_STRING
metadata_lock_info_lock_name
[]
=
{
{
C_STRING_WITH_LEN
(
"Backup lock"
)
},
{
C_STRING_WITH_LEN
(
"Backup lock"
)
},
...
@@ -32,23 +32,22 @@ static const LEX_STRING metadata_lock_info_lock_name[] = {
...
@@ -32,23 +32,22 @@ static const LEX_STRING metadata_lock_info_lock_name[] = {
{
C_STRING_WITH_LEN
(
"User lock"
)
},
{
C_STRING_WITH_LEN
(
"User lock"
)
},
};
};
namespace
Show
{
static
ST_FIELD_INFO
i_s_metadata_lock_info_fields_info
[]
=
static
ST_FIELD_INFO
i_s_metadata_lock_info_fields_info
[]
=
{
{
{
"THREAD_ID"
,
20
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"THREAD_ID"
,
ULonglong
(
20
),
NOT_NULL
,
"thread_id"
),
MY_I_S_UNSIGNED
,
"thread_id"
,
SKIP_OPEN_TABLE
},
Column
(
"LOCK_MODE"
,
Varchar
(
24
),
NULLABLE
,
"lock_mode"
),
{
"LOCK_MODE"
,
24
,
MYSQL_TYPE_STRING
,
0
,
Column
(
"LOCK_DURATION"
,
Varchar
(
30
),
NULLABLE
,
"lock_duration"
),
MY_I_S_MAYBE_NULL
,
"lock_mode"
,
SKIP_OPEN_TABLE
},
Column
(
"LOCK_TYPE"
,
Varchar
(
33
),
NULLABLE
,
"lock_type"
),
{
"LOCK_DURATION"
,
30
,
MYSQL_TYPE_STRING
,
0
,
Column
(
"TABLE_SCHEMA"
,
Name
(),
NULLABLE
,
"table_schema"
),
MY_I_S_MAYBE_NULL
,
"lock_duration"
,
SKIP_OPEN_TABLE
},
Column
(
"TABLE_NAME"
,
Name
(),
NULLABLE
,
"table_name"
),
{
"LOCK_TYPE"
,
33
,
MYSQL_TYPE_STRING
,
0
,
CEnd
()
MY_I_S_MAYBE_NULL
,
"lock_type"
,
SKIP_OPEN_TABLE
},
{
"TABLE_SCHEMA"
,
64
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
"table_schema"
,
SKIP_OPEN_TABLE
},
{
"TABLE_NAME"
,
64
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
"table_name"
,
SKIP_OPEN_TABLE
},
{
NULL
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
NULL
,
0
}
};
};
}
// namespace Show
struct
st_i_s_metadata_param
struct
st_i_s_metadata_param
{
{
THD
*
thd
;
THD
*
thd
;
...
@@ -110,7 +109,7 @@ static int i_s_metadata_lock_info_init(
...
@@ -110,7 +109,7 @@ static int i_s_metadata_lock_info_init(
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
DBUG_ENTER
(
"i_s_metadata_lock_info_init"
);
DBUG_ENTER
(
"i_s_metadata_lock_info_init"
);
schema
->
fields_info
=
i_s_metadata_lock_info_fields_info
;
schema
->
fields_info
=
Show
::
i_s_metadata_lock_info_fields_info
;
schema
->
fill_table
=
i_s_metadata_lock_info_fill_table
;
schema
->
fill_table
=
i_s_metadata_lock_info_fill_table
;
schema
->
idx_field1
=
0
;
schema
->
idx_field1
=
0
;
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
...
plugin/qc_info/qc_info.cc
View file @
4156b1a2
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
#include <sql_acl.h> // PROCESS_ACL
#include <sql_acl.h> // PROCESS_ACL
#include <sql_class.h> // THD
#include <sql_class.h> // THD
#include <sql_cache.h>
#include <sql_cache.h>
#include <
table.h>
// ST_SCHEMA_TABLE
#include <
sql_i_s.h>
// ST_SCHEMA_TABLE
#include <set_var.h> // sql_mode_string_representation
#include <set_var.h> // sql_mode_string_representation
#include <tztime.h>
#include <tztime.h>
#include <mysql/plugin.h>
#include <mysql/plugin.h>
...
@@ -79,36 +79,41 @@ bool schema_table_store_record(THD *thd, TABLE *table);
...
@@ -79,36 +79,41 @@ bool schema_table_store_record(THD *thd, TABLE *table);
#define COLUMN_PKT_NR 22
#define COLUMN_PKT_NR 22
#define COLUMN_HITS 23
#define COLUMN_HITS 23
namespace
Show
{
/* ST_FIELD_INFO is defined in table.h */
/* ST_FIELD_INFO is defined in table.h */
static
ST_FIELD_INFO
qc_info_fields
[]
=
static
ST_FIELD_INFO
qc_info_fields
[]
=
{
{
{
"STATEMENT_SCHEMA"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"STATEMENT_SCHEMA"
,
Varchar
(
NAME_LEN
),
NOT_NULL
)
,
{
"STATEMENT_TEXT"
,
MAX_STATEMENT_TEXT_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"STATEMENT_TEXT"
,
Longtext
(
MAX_STATEMENT_TEXT_LENGTH
),
NOT_NULL
)
,
{
"RESULT_BLOCKS_COUNT"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"RESULT_BLOCKS_COUNT"
,
SLong
(),
NOT_NULL
)
,
{
"RESULT_BLOCKS_SIZE"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"RESULT_BLOCKS_SIZE"
,
SLonglong
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"RESULT_BLOCKS_SIZE_USED"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"RESULT_BLOCKS_SIZE_USED"
,
SLonglong
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"LIMIT"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"LIMIT"
,
SLonglong
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"MAX_SORT_LENGTH"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"MAX_SORT_LENGTH"
,
SLonglong
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"GROUP_CONCAT_MAX_LENGTH"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"GROUP_CONCAT_MAX_LENGTH"
,
SLonglong
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"CHARACTER_SET_CLIENT"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"CHARACTER_SET_CLIENT"
,
CSName
(),
NOT_NULL
)
,
{
"CHARACTER_SET_RESULT"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"CHARACTER_SET_RESULT"
,
CSName
(),
NOT_NULL
)
,
{
"COLLATION"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"COLLATION"
,
CSName
(),
NOT_NULL
)
,
{
"TIMEZONE"
,
50
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"TIMEZONE"
,
Varchar
(
50
),
NOT_NULL
)
,
{
"DEFAULT_WEEK_FORMAT"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"DEFAULT_WEEK_FORMAT"
,
SLong
(),
NOT_NULL
)
,
{
"DIV_PRECISION_INCREMENT"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"DIV_PRECISION_INCREMENT"
,
SLong
(),
NOT_NULL
)
,
{
"SQL_MODE"
,
250
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"SQL_MODE"
,
Varchar
(
250
),
NOT_NULL
)
,
{
"LC_TIME_NAMES"
,
100
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"LC_TIME_NAMES"
,
Varchar
(
100
),
NOT_NULL
)
,
{
"CLIENT_LONG_FLAG"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
0
}
,
Column
(
"CLIENT_LONG_FLAG"
,
STiny
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"CLIENT_PROTOCOL_41"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
0
}
,
Column
(
"CLIENT_PROTOCOL_41"
,
STiny
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"PROTOCOL_TYPE"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
0
}
,
Column
(
"PROTOCOL_TYPE"
,
STiny
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"MORE_RESULTS_EXISTS"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
0
}
,
Column
(
"MORE_RESULTS_EXISTS"
,
STiny
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"IN_TRANS"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
0
}
,
Column
(
"IN_TRANS"
,
STiny
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"AUTOCOMMIT"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
0
}
,
Column
(
"AUTOCOMMIT"
,
STiny
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"PACKET_NUMBER"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
0
}
,
Column
(
"PACKET_NUMBER"
,
STiny
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
"HITS"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_UNSIGNED
,
0
,
0
}
,
Column
(
"HITS"
,
SLonglong
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
static
const
char
unknown
[]
=
"#UNKNOWN#"
;
static
const
char
unknown
[]
=
"#UNKNOWN#"
;
...
@@ -276,7 +281,7 @@ static int qc_info_plugin_init(void *p)
...
@@ -276,7 +281,7 @@ static int qc_info_plugin_init(void *p)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
qc_info_fields
;
schema
->
fields_info
=
Show
::
qc_info_fields
;
schema
->
fill_table
=
qc_info_fill_table
;
schema
->
fill_table
=
qc_info_fill_table
;
#ifdef _WIN32
#ifdef _WIN32
...
...
plugin/query_response_time/plugin.cc
View file @
4156b1a2
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#define MYSQL_SERVER
#define MYSQL_SERVER
#include <my_global.h>
#include <my_global.h>
#include <sql_class.h>
#include <sql_class.h>
#include <
table
.h>
#include <
sql_i_s
.h>
#include <sql_show.h>
#include <sql_show.h>
#include <mysql/plugin_audit.h>
#include <mysql/plugin_audit.h>
#include "query_response_time.h"
#include "query_response_time.h"
...
@@ -71,19 +71,22 @@ static struct st_mysql_sys_var *query_response_time_info_vars[]=
...
@@ -71,19 +71,22 @@ static struct st_mysql_sys_var *query_response_time_info_vars[]=
};
};
namespace
Show
{
ST_FIELD_INFO
query_response_time_fields_info
[]
=
ST_FIELD_INFO
query_response_time_fields_info
[]
=
{
{
{
"TIME"
,
QRT_TIME_STRING_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Time"
,
0
}
,
Column
(
"TIME"
,
Varchar
(
QRT_TIME_STRING_LENGTH
),
NOT_NULL
,
"Time"
)
,
{
"COUNT"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
0
,
MY_I_S_UNSIGNED
,
"Count"
,
0
}
,
Column
(
"COUNT"
,
ULong
(),
NOT_NULL
,
"Count"
)
,
{
"TOTAL"
,
QRT_TIME_STRING_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Total"
,
0
}
,
Column
(
"TOTAL"
,
Varchar
(
QRT_TIME_STRING_LENGTH
),
NOT_NULL
,
"Total"
)
,
{
0
,
0
,
MYSQL_TYPE_NULL
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
static
int
query_response_time_info_init
(
void
*
p
)
static
int
query_response_time_info_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
i_s_query_response_time
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
i_s_query_response_time
=
(
ST_SCHEMA_TABLE
*
)
p
;
i_s_query_response_time
->
fields_info
=
query_response_time_fields_info
;
i_s_query_response_time
->
fields_info
=
Show
::
query_response_time_fields_info
;
i_s_query_response_time
->
fill_table
=
query_response_time_fill
;
i_s_query_response_time
->
fill_table
=
query_response_time_fill
;
i_s_query_response_time
->
reset_table
=
query_response_time_flush
;
i_s_query_response_time
->
reset_table
=
query_response_time_flush
;
query_response_time_init
();
query_response_time_init
();
...
...
plugin/user_variables/user_variables.cc
View file @
4156b1a2
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#define MYSQL_SERVER
#define MYSQL_SERVER
#include <my_global.h>
#include <my_global.h>
#include <sql_class.h>
#include <sql_class.h>
#include <
table
.h>
#include <
sql_i_s
.h>
#include <sql_show.h>
#include <sql_show.h>
...
@@ -42,16 +42,18 @@ static const LEX_CSTRING unsigned_result_types[]=
...
@@ -42,16 +42,18 @@ static const LEX_CSTRING unsigned_result_types[]=
};
};
namespace
Show
{
static
ST_FIELD_INFO
user_variables_fields_info
[]
=
static
ST_FIELD_INFO
user_variables_fields_info
[]
=
{
{
{
"VARIABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Variable_name"
,
0
},
Column
(
"VARIABLE_NAME"
,
Name
(),
NOT_NULL
,
"Variable_name"
),
{
"VARIABLE_VALUE"
,
2048
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
"Value"
,
0
},
Column
(
"VARIABLE_VALUE"
,
Varchar
(
2048
),
NULLABLE
,
"Value"
),
{
"VARIABLE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
},
Column
(
"VARIABLE_TYPE"
,
Name
(),
NOT_NULL
),
{
"CHARACTER_SET_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
Column
(
"CHARACTER_SET_NAME"
,
CSName
(),
NULLABLE
),
MY_I_S_MAYBE_NULL
,
0
,
0
},
CEnd
()
{
0
,
0
,
MYSQL_TYPE_NULL
,
0
,
0
,
0
,
0
}
};
};
}
// namespace Show
static
int
user_variables_fill
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
static
int
user_variables_fill
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
{
...
@@ -110,7 +112,7 @@ int user_variables_reset(void)
...
@@ -110,7 +112,7 @@ int user_variables_reset(void)
static
int
user_variables_init
(
void
*
p
)
static
int
user_variables_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
is
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
is
=
(
ST_SCHEMA_TABLE
*
)
p
;
is
->
fields_info
=
user_variables_fields_info
;
is
->
fields_info
=
Show
::
user_variables_fields_info
;
is
->
fill_table
=
user_variables_fill
;
is
->
fill_table
=
user_variables_fill
;
is
->
reset_table
=
user_variables_reset
;
is
->
reset_table
=
user_variables_reset
;
return
0
;
return
0
;
...
...
plugin/userstat/client_stats.cc
View file @
4156b1a2
namespace
Show
{
static
ST_FIELD_INFO
client_stats_fields
[]
=
static
ST_FIELD_INFO
client_stats_fields
[]
=
{
{
{
"CLIENT"
,
LIST_PROCESS_HOST_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Client"
,
0
}
,
Column
(
"CLIENT"
,
Varchar
(
LIST_PROCESS_HOST_LEN
),
NOT_NULL
,
"Client"
)
,
{
"TOTAL_CONNECTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Total_connections"
,
0
}
,
Column
(
"TOTAL_CONNECTIONS"
,
SLonglong
(),
NOT_NULL
,
"Total_connections"
)
,
{
"CONCURRENT_CONNECTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Concurrent_connections"
,
0
}
,
Column
(
"CONCURRENT_CONNECTIONS"
,
SLonglong
(),
NOT_NULL
,
"Concurrent_connections"
)
,
{
"CONNECTED_TIME"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Connected_time"
,
0
}
,
Column
(
"CONNECTED_TIME"
,
SLonglong
(),
NOT_NULL
,
"Connected_time"
)
,
{
"BUSY_TIME"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
0
,
"Busy_time"
,
0
}
,
Column
(
"BUSY_TIME"
,
Double
(
MY_INT64_NUM_DECIMAL_DIGITS
),
NOT_NULL
,
"Busy_time"
)
,
{
"CPU_TIME"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
0
,
"Cpu_time"
,
0
}
,
Column
(
"CPU_TIME"
,
Double
(
MY_INT64_NUM_DECIMAL_DIGITS
),
NOT_NULL
,
"Cpu_time"
)
,
{
"BYTES_RECEIVED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Bytes_received"
,
0
}
,
Column
(
"BYTES_RECEIVED"
,
SLonglong
(),
NOT_NULL
,
"Bytes_received"
)
,
{
"BYTES_SENT"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Bytes_sent"
,
0
}
,
Column
(
"BYTES_SENT"
,
SLonglong
(),
NOT_NULL
,
"Bytes_sent"
)
,
{
"BINLOG_BYTES_WRITTEN"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Binlog_bytes_written"
,
0
}
,
Column
(
"BINLOG_BYTES_WRITTEN"
,
SLonglong
(),
NOT_NULL
,
"Binlog_bytes_written"
)
,
{
"ROWS_READ"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_read"
,
0
}
,
Column
(
"ROWS_READ"
,
SLonglong
(),
NOT_NULL
,
"Rows_read"
)
,
{
"ROWS_SENT"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_sent"
,
0
}
,
Column
(
"ROWS_SENT"
,
SLonglong
(),
NOT_NULL
,
"Rows_sent"
)
,
{
"ROWS_DELETED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_deleted"
,
0
}
,
Column
(
"ROWS_DELETED"
,
SLonglong
(),
NOT_NULL
,
"Rows_deleted"
)
,
{
"ROWS_INSERTED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_inserted"
,
0
}
,
Column
(
"ROWS_INSERTED"
,
SLonglong
(),
NOT_NULL
,
"Rows_inserted"
)
,
{
"ROWS_UPDATED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_updated"
,
0
}
,
Column
(
"ROWS_UPDATED"
,
SLonglong
(),
NOT_NULL
,
"Rows_updated"
)
,
{
"SELECT_COMMANDS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Select_commands"
,
0
}
,
Column
(
"SELECT_COMMANDS"
,
SLonglong
(),
NOT_NULL
,
"Select_commands"
)
,
{
"UPDATE_COMMANDS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Update_commands"
,
0
}
,
Column
(
"UPDATE_COMMANDS"
,
SLonglong
(),
NOT_NULL
,
"Update_commands"
)
,
{
"OTHER_COMMANDS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Other_commands"
,
0
}
,
Column
(
"OTHER_COMMANDS"
,
SLonglong
(),
NOT_NULL
,
"Other_commands"
)
,
{
"COMMIT_TRANSACTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Commit_transactions"
,
0
}
,
Column
(
"COMMIT_TRANSACTIONS"
,
SLonglong
(),
NOT_NULL
,
"Commit_transactions"
)
,
{
"ROLLBACK_TRANSACTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rollback_transactions"
,
0
}
,
Column
(
"ROLLBACK_TRANSACTIONS"
,
SLonglong
(),
NOT_NULL
,
"Rollback_transactions"
)
,
{
"DENIED_CONNECTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Denied_connections"
,
0
}
,
Column
(
"DENIED_CONNECTIONS"
,
SLonglong
(),
NOT_NULL
,
"Denied_connections"
)
,
{
"LOST_CONNECTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Lost_connections"
,
0
}
,
Column
(
"LOST_CONNECTIONS"
,
SLonglong
(),
NOT_NULL
,
"Lost_connections"
)
,
{
"ACCESS_DENIED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Access_denied"
,
0
}
,
Column
(
"ACCESS_DENIED"
,
SLonglong
(),
NOT_NULL
,
"Access_denied"
)
,
{
"EMPTY_QUERIES"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Empty_queries"
,
0
}
,
Column
(
"EMPTY_QUERIES"
,
SLonglong
(),
NOT_NULL
,
"Empty_queries"
)
,
{
"TOTAL_SSL_CONNECTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_UNSIGNED
,
"Total_ssl_connections"
,
0
}
,
Column
(
"TOTAL_SSL_CONNECTIONS"
,
ULonglong
(),
NOT_NULL
,
"Total_ssl_connections"
)
,
{
"MAX_STATEMENT_TIME_EXCEEDED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Max_statement_time_exceeded"
,
SKIP_OPEN_TABLE
}
,
Column
(
"MAX_STATEMENT_TIME_EXCEEDED"
,
SLonglong
(),
NOT_NULL
,
"Max_statement_time_exceeded"
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
static
int
send_user_stats
(
THD
*
thd
,
HASH
*
all_user_stats
,
TABLE
*
table
)
static
int
send_user_stats
(
THD
*
thd
,
HASH
*
all_user_stats
,
TABLE
*
table
)
{
{
mysql_mutex_lock
(
&
LOCK_global_user_client_stats
);
mysql_mutex_lock
(
&
LOCK_global_user_client_stats
);
...
@@ -92,7 +96,7 @@ static int client_stats_reset()
...
@@ -92,7 +96,7 @@ static int client_stats_reset()
static
int
client_stats_init
(
void
*
p
)
static
int
client_stats_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
client_stats_fields
;
schema
->
fields_info
=
Show
::
client_stats_fields
;
schema
->
fill_table
=
client_stats_fill
;
schema
->
fill_table
=
client_stats_fill
;
schema
->
reset_table
=
client_stats_reset
;
schema
->
reset_table
=
client_stats_reset
;
return
0
;
return
0
;
...
...
plugin/userstat/index_stats.cc
View file @
4156b1a2
namespace
Show
{
static
ST_FIELD_INFO
index_stats_fields
[]
=
static
ST_FIELD_INFO
index_stats_fields
[]
=
{
{
{
"TABLE_SCHEMA"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Table_schema"
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_SCHEMA"
,
Varchar
(
NAME_LEN
),
NOT_NULL
,
"Table_schema"
)
,
{
"TABLE_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Table_name"
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_NAME"
,
Varchar
(
NAME_LEN
),
NOT_NULL
,
"Table_name"
)
,
{
"INDEX_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Index_name"
,
SKIP_OPEN_TABLE
}
,
Column
(
"INDEX_NAME"
,
Varchar
(
NAME_LEN
),
NOT_NULL
,
"Index_name"
)
,
{
"ROWS_READ"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_read"
,
SKIP_OPEN_TABLE
}
,
Column
(
"ROWS_READ"
,
SLonglong
(),
NOT_NULL
,
"Rows_read"
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
static
int
index_stats_fill
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
static
int
index_stats_fill
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
{
TABLE
*
table
=
tables
->
table
;
TABLE
*
table
=
tables
->
table
;
...
@@ -63,7 +67,7 @@ static int index_stats_reset()
...
@@ -63,7 +67,7 @@ static int index_stats_reset()
static
int
index_stats_init
(
void
*
p
)
static
int
index_stats_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
index_stats_fields
;
schema
->
fields_info
=
Show
::
index_stats_fields
;
schema
->
fill_table
=
index_stats_fill
;
schema
->
fill_table
=
index_stats_fill
;
schema
->
reset_table
=
index_stats_reset
;
schema
->
reset_table
=
index_stats_reset
;
return
0
;
return
0
;
...
...
plugin/userstat/table_stats.cc
View file @
4156b1a2
namespace
Show
{
static
ST_FIELD_INFO
table_stats_fields
[]
=
static
ST_FIELD_INFO
table_stats_fields
[]
=
{
{
{
"TABLE_SCHEMA"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Table_schema"
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_SCHEMA"
,
Varchar
(
NAME_LEN
),
NOT_NULL
,
"Table_schema"
)
,
{
"TABLE_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Table_name"
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_NAME"
,
Varchar
(
NAME_LEN
),
NOT_NULL
,
"Table_name"
)
,
{
"ROWS_READ"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_read"
,
SKIP_OPEN_TABLE
}
,
Column
(
"ROWS_READ"
,
SLonglong
(),
NOT_NULL
,
"Rows_read"
)
,
{
"ROWS_CHANGED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_changed"
,
SKIP_OPEN_TABLE
}
,
Column
(
"ROWS_CHANGED"
,
SLonglong
(),
NOT_NULL
,
"Rows_changed"
)
,
{
"ROWS_CHANGED_X_INDEXES"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_changed_x_#indexes"
,
SKIP_OPEN_TABLE
}
,
Column
(
"ROWS_CHANGED_X_INDEXES"
,
SLonglong
(),
NOT_NULL
,
"Rows_changed_x_#indexes"
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
static
int
table_stats_fill
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
static
int
table_stats_fill
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
{
TABLE
*
table
=
tables
->
table
;
TABLE
*
table
=
tables
->
table
;
...
@@ -67,7 +71,7 @@ static int table_stats_reset()
...
@@ -67,7 +71,7 @@ static int table_stats_reset()
static
int
table_stats_init
(
void
*
p
)
static
int
table_stats_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
table_stats_fields
;
schema
->
fields_info
=
Show
::
table_stats_fields
;
schema
->
fill_table
=
table_stats_fill
;
schema
->
fill_table
=
table_stats_fill
;
schema
->
reset_table
=
table_stats_reset
;
schema
->
reset_table
=
table_stats_reset
;
return
0
;
return
0
;
...
...
plugin/userstat/user_stats.cc
View file @
4156b1a2
namespace
Show
{
static
ST_FIELD_INFO
user_stats_fields
[]
=
static
ST_FIELD_INFO
user_stats_fields
[]
=
{
{
{
"USER"
,
USERNAME_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
"User"
,
0
}
,
Column
(
"USER"
,
Varchar
(
USERNAME_CHAR_LENGTH
),
NOT_NULL
,
"User"
)
,
{
"TOTAL_CONNECTIONS"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
0
,
0
,
"Total_connections"
,
0
}
,
Column
(
"TOTAL_CONNECTIONS"
,
SLong
(),
NOT_NULL
,
"Total_connections"
)
,
{
"CONCURRENT_CONNECTIONS"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
0
,
0
,
"Concurrent_connections"
,
0
}
,
Column
(
"CONCURRENT_CONNECTIONS"
,
SLong
(),
NOT_NULL
,
"Concurrent_connections"
)
,
{
"CONNECTED_TIME"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
0
,
0
,
"Connected_time"
,
0
}
,
Column
(
"CONNECTED_TIME"
,
SLong
(),
NOT_NULL
,
"Connected_time"
)
,
{
"BUSY_TIME"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
0
,
"Busy_time"
,
0
}
,
Column
(
"BUSY_TIME"
,
Double
(
MY_INT64_NUM_DECIMAL_DIGITS
),
NOT_NULL
,
"Busy_time"
)
,
{
"CPU_TIME"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_DOUBLE
,
0
,
0
,
"Cpu_time"
,
0
}
,
Column
(
"CPU_TIME"
,
Double
(
MY_INT64_NUM_DECIMAL_DIGITS
),
NOT_NULL
,
"Cpu_time"
)
,
{
"BYTES_RECEIVED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Bytes_received"
,
0
}
,
Column
(
"BYTES_RECEIVED"
,
SLonglong
(),
NOT_NULL
,
"Bytes_received"
)
,
{
"BYTES_SENT"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Bytes_sent"
,
0
}
,
Column
(
"BYTES_SENT"
,
SLonglong
(),
NOT_NULL
,
"Bytes_sent"
)
,
{
"BINLOG_BYTES_WRITTEN"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Binlog_bytes_written"
,
0
}
,
Column
(
"BINLOG_BYTES_WRITTEN"
,
SLonglong
(),
NOT_NULL
,
"Binlog_bytes_written"
)
,
{
"ROWS_READ"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_read"
,
0
}
,
Column
(
"ROWS_READ"
,
SLonglong
(),
NOT_NULL
,
"Rows_read"
)
,
{
"ROWS_SENT"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_sent"
,
0
}
,
Column
(
"ROWS_SENT"
,
SLonglong
(),
NOT_NULL
,
"Rows_sent"
)
,
{
"ROWS_DELETED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_deleted"
,
0
}
,
Column
(
"ROWS_DELETED"
,
SLonglong
(),
NOT_NULL
,
"Rows_deleted"
)
,
{
"ROWS_INSERTED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_inserted"
,
0
}
,
Column
(
"ROWS_INSERTED"
,
SLonglong
(),
NOT_NULL
,
"Rows_inserted"
)
,
{
"ROWS_UPDATED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rows_updated"
,
0
}
,
Column
(
"ROWS_UPDATED"
,
SLonglong
(),
NOT_NULL
,
"Rows_updated"
)
,
{
"SELECT_COMMANDS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Select_commands"
,
0
}
,
Column
(
"SELECT_COMMANDS"
,
SLonglong
(),
NOT_NULL
,
"Select_commands"
)
,
{
"UPDATE_COMMANDS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Update_commands"
,
0
}
,
Column
(
"UPDATE_COMMANDS"
,
SLonglong
(),
NOT_NULL
,
"Update_commands"
)
,
{
"OTHER_COMMANDS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Other_commands"
,
0
}
,
Column
(
"OTHER_COMMANDS"
,
SLonglong
(),
NOT_NULL
,
"Other_commands"
)
,
{
"COMMIT_TRANSACTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Commit_transactions"
,
0
}
,
Column
(
"COMMIT_TRANSACTIONS"
,
SLonglong
(),
NOT_NULL
,
"Commit_transactions"
)
,
{
"ROLLBACK_TRANSACTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Rollback_transactions"
,
0
}
,
Column
(
"ROLLBACK_TRANSACTIONS"
,
SLonglong
(),
NOT_NULL
,
"Rollback_transactions"
)
,
{
"DENIED_CONNECTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Denied_connections"
,
0
}
,
Column
(
"DENIED_CONNECTIONS"
,
SLonglong
(),
NOT_NULL
,
"Denied_connections"
)
,
{
"LOST_CONNECTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Lost_connections"
,
0
}
,
Column
(
"LOST_CONNECTIONS"
,
SLonglong
(),
NOT_NULL
,
"Lost_connections"
)
,
{
"ACCESS_DENIED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Access_denied"
,
0
}
,
Column
(
"ACCESS_DENIED"
,
SLonglong
(),
NOT_NULL
,
"Access_denied"
)
,
{
"EMPTY_QUERIES"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Empty_queries"
,
0
}
,
Column
(
"EMPTY_QUERIES"
,
SLonglong
(),
NOT_NULL
,
"Empty_queries"
)
,
{
"TOTAL_SSL_CONNECTIONS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_UNSIGNED
,
"Total_ssl_connections"
,
0
}
,
Column
(
"TOTAL_SSL_CONNECTIONS"
,
ULonglong
(),
NOT_NULL
,
"Total_ssl_connections"
)
,
{
"MAX_STATEMENT_TIME_EXCEEDED"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Max_statement_time_exceeded"
,
SKIP_OPEN_TABLE
}
,
Column
(
"MAX_STATEMENT_TIME_EXCEEDED"
,
SLonglong
(),
NOT_NULL
,
"Max_statement_time_exceeded"
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
static
int
user_stats_fill
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
static
int
user_stats_fill
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
{
if
(
check_global_access
(
thd
,
SUPER_ACL
|
PROCESS_ACL
,
true
))
if
(
check_global_access
(
thd
,
SUPER_ACL
|
PROCESS_ACL
,
true
))
...
@@ -48,7 +52,7 @@ static int user_stats_reset()
...
@@ -48,7 +52,7 @@ static int user_stats_reset()
static
int
user_stats_init
(
void
*
p
)
static
int
user_stats_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
user_stats_fields
;
schema
->
fields_info
=
Show
::
user_stats_fields
;
schema
->
fill_table
=
user_stats_fill
;
schema
->
fill_table
=
user_stats_fill
;
schema
->
reset_table
=
user_stats_reset
;
schema
->
reset_table
=
user_stats_reset
;
return
0
;
return
0
;
...
...
plugin/wsrep_info/plugin.cc
View file @
4156b1a2
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include <my_global.h>
#include <my_global.h>
#include <mysql/plugin.h>
#include <mysql/plugin.h>
#include <
table.h>
/* ST_SCHEMA_TABLE */
#include <
sql_i_s.h>
/* ST_SCHEMA_TABLE */
#include <sql_show.h>
#include <sql_show.h>
#include <sql_acl.h>
/* check_global_access() */
#include <sql_acl.h>
/* check_global_access() */
#include <wsrep_mysqld.h>
#include <wsrep_mysqld.h>
...
@@ -55,35 +55,32 @@
...
@@ -55,35 +55,32 @@
/* Application protocol version */
/* Application protocol version */
#define COLUMN_WSREP_STATUS_PROTO_VERSION 7
#define COLUMN_WSREP_STATUS_PROTO_VERSION 7
namespace
Show
{
static
ST_FIELD_INFO
wsrep_memb_fields
[]
=
static
ST_FIELD_INFO
wsrep_memb_fields
[]
=
{
{
{
"INDEX"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
0
,
0
,
"Index"
,
0
}
,
Column
(
"INDEX"
,
SLong
(),
NOT_NULL
,
"Index"
)
,
{
"UUID"
,
WSREP_UUID_STR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Uuid"
,
0
}
,
Column
(
"UUID"
,
Varchar
(
WSREP_UUID_STR_LEN
),
NOT_NULL
,
"Uuid"
)
,
{
"NAME"
,
WSREP_MEMBER_NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Name"
,
0
}
,
Column
(
"NAME"
,
Varchar
(
WSREP_MEMBER_NAME_LEN
),
NOT_NULL
,
"Name"
)
,
{
"ADDRESS"
,
WSREP_INCOMING_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Address"
,
0
}
,
Column
(
"ADDRESS"
,
Varchar
(
WSREP_INCOMING_LEN
),
NOT_NULL
,
"Address"
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
static
ST_FIELD_INFO
wsrep_status_fields
[]
=
static
ST_FIELD_INFO
wsrep_status_fields
[]
=
{
{
{
"NODE_INDEX"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
Column
(
"NODE_INDEX"
,
SLong
(),
NOT_NULL
,
"Node_Index"
),
0
,
0
,
"Node_Index"
,
0
},
Column
(
"NODE_STATUS"
,
Varchar
(
16
),
NOT_NULL
,
"Node_Status"
),
{
"NODE_STATUS"
,
16
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Node_Status"
,
0
},
Column
(
"CLUSTER_STATUS"
,
Varchar
(
16
),
NOT_NULL
,
"Cluster_Status"
),
{
"CLUSTER_STATUS"
,
16
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Cluster_Status"
,
0
},
Column
(
"CLUSTER_SIZE"
,
SLong
(),
NOT_NULL
,
"Cluster_Size"
),
{
"CLUSTER_SIZE"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
Column
(
"CLUSTER_STATE_UUID"
,
Varchar
(
WSREP_UUID_STR_LEN
),
NOT_NULL
),
0
,
0
,
"Cluster_Size"
,
0
},
Column
(
"CLUSTER_STATE_SEQNO"
,
SLonglong
(),
NOT_NULL
),
{
"CLUSTER_STATE_UUID"
,
WSREP_UUID_STR_LEN
,
MYSQL_TYPE_STRING
,
Column
(
"CLUSTER_CONF_ID"
,
SLonglong
(),
NOT_NULL
),
0
,
0
,
0
,
0
},
Column
(
"PROTOCOL_VERSION"
,
SLong
(),
NOT_NULL
),
{
"CLUSTER_STATE_SEQNO"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
CEnd
()
0
,
0
,
0
,
0
},
{
"CLUSTER_CONF_ID"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
},
{
"PROTOCOL_VERSION"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
};
};
}
// namespace Show
static
int
wsrep_memb_fill_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
static
int
wsrep_memb_fill_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
{
int
rc
=
0
;
int
rc
=
0
;
...
@@ -131,7 +128,7 @@ static int wsrep_memb_plugin_init(void *p)
...
@@ -131,7 +128,7 @@ static int wsrep_memb_plugin_init(void *p)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
wsrep_memb_fields
;
schema
->
fields_info
=
Show
::
wsrep_memb_fields
;
schema
->
fill_table
=
wsrep_memb_fill_table
;
schema
->
fill_table
=
wsrep_memb_fill_table
;
return
0
;
return
0
;
...
@@ -189,7 +186,7 @@ static int wsrep_status_plugin_init(void *p)
...
@@ -189,7 +186,7 @@ static int wsrep_status_plugin_init(void *p)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
wsrep_status_fields
;
schema
->
fields_info
=
Show
::
wsrep_status_fields
;
schema
->
fill_table
=
wsrep_status_fill_table
;
schema
->
fill_table
=
wsrep_status_fill_table
;
return
0
;
return
0
;
...
...
sql/opt_trace.cc
View file @
4156b1a2
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include "sql_class.h"
#include "sql_class.h"
#include "sql_show.h"
#include "sql_show.h"
#include "field.h"
#include "field.h"
#include "
table
.h"
#include "
sql_i_s
.h"
#include "opt_trace.h"
#include "opt_trace.h"
#include "sql_parse.h"
#include "sql_parse.h"
#include "set_var.h"
#include "set_var.h"
...
@@ -66,18 +66,21 @@ bool sets_var_optimizer_trace(enum enum_sql_command sql_command,
...
@@ -66,18 +66,21 @@ bool sets_var_optimizer_trace(enum enum_sql_command sql_command,
}
}
namespace
Show
{
ST_FIELD_INFO
optimizer_trace_info
[]
=
ST_FIELD_INFO
optimizer_trace_info
[]
=
{
{
/* name, length, type, value, maybe_null, old_name, open_method */
Column
(
"QUERY"
,
Longtext
(
65535
),
NOT_NULL
),
{
"QUERY"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
false
,
NULL
,
SKIP_OPEN_TABLE
},
Column
(
"TRACE"
,
Longtext
(
65535
),
NOT_NULL
),
{
"TRACE"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
false
,
NULL
,
SKIP_OPEN_TABLE
},
Column
(
"MISSING_BYTES_BEYOND_MAX_MEM_SIZE"
,
SLong
(
20
),
NOT_NULL
),
{
"MISSING_BYTES_BEYOND_MAX_MEM_SIZE"
,
20
,
MYSQL_TYPE_LONG
,
0
,
false
,
NULL
,
Column
(
"INSUFFICIENT_PRIVILEGES"
,
STiny
(
1
),
NOT_NULL
),
SKIP_OPEN_TABLE
},
CEnd
()
{
"INSUFFICIENT_PRIVILEGES"
,
1
,
MYSQL_TYPE_TINY
,
0
,
false
,
NULL
,
SKIP_OPEN_TABLE
},
{
NULL
,
0
,
MYSQL_TYPE_STRING
,
0
,
true
,
NULL
,
0
}
};
};
}
// namespace Show
/*
/*
TODO: one-line needs to be implemented seperately
TODO: one-line needs to be implemented seperately
*/
*/
...
...
sql/set_var.cc
View file @
4156b1a2
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
#include "tztime.h" // my_tz_find, my_tz_SYSTEM, struct Time_zone
#include "tztime.h" // my_tz_find, my_tz_SYSTEM, struct Time_zone
#include "sql_acl.h" // SUPER_ACL
#include "sql_acl.h" // SUPER_ACL
#include "sql_select.h" // free_underlaid_joins
#include "sql_select.h" // free_underlaid_joins
#include "sql_
show
.h"
#include "sql_
i_s
.h"
#include "sql_view.h" // updatable_views_with_limit_typelib
#include "sql_view.h" // updatable_views_with_limit_typelib
#include "lock.h" // lock_global_read_lock,
#include "lock.h" // lock_global_read_lock,
// make_global_read_lock_block_commit,
// make_global_read_lock_block_commit,
...
...
sql/sql_basic_types.h
View file @
4156b1a2
...
@@ -23,6 +23,8 @@
...
@@ -23,6 +23,8 @@
typedef
ulonglong
sql_mode_t
;
typedef
ulonglong
sql_mode_t
;
typedef
int64
query_id_t
;
typedef
int64
query_id_t
;
enum
enum_nullability
{
NOT_NULL
,
NULLABLE
};
/*
/*
"fuzzydate" with strict data type control.
"fuzzydate" with strict data type control.
...
...
sql/sql_i_s.h
0 → 100644
View file @
4156b1a2
#ifndef SQL_I_S_INCLUDED
#define SQL_I_S_INCLUDED
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates.
Copyright (c) 2009, 2019, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#include "sql_const.h" // MAX_FIELD_VARCHARLENGTH
#include "sql_basic_types.h" // enum_nullability
#include "sql_string.h" // strlen, MY_CS_NAME_SIZE
#include "lex_string.h" // LEX_CSTRING
#include "mysql_com.h" // enum_field_types
#include "my_time.h" // TIME_SECOND_PART_DIGITS
struct
TABLE_LIST
;
struct
TABLE
;
typedef
class
Item
COND
;
#ifdef MYSQL_CLIENT
#error MYSQL_CLIENT must not be defined
#endif // MYSQL_CLIENT
bool
schema_table_store_record
(
THD
*
thd
,
TABLE
*
table
);
COND
*
make_cond_for_info_schema
(
THD
*
thd
,
COND
*
cond
,
TABLE_LIST
*
table
);
#define MY_I_S_MAYBE_NULL 1U
#define MY_I_S_UNSIGNED 2U
enum
enum_show_open_table
{
SKIP_OPEN_TABLE
=
0U
,
// do not open table
OPEN_FRM_ONLY
=
1U
,
// open FRM file only
OPEN_FULL_TABLE
=
2U
// open FRM,MYD, MYI files
};
struct
ST_FIELD_INFO
{
/**
This is used as column name.
*/
const
char
*
field_name
;
/**
For string-type columns, this is the maximum number of
characters. Otherwise, it is the 'display-length' for the column.
*/
uint
field_length
;
/**
This denotes data type for the column. For the most part, there seems to
be one entry in the enum for each SQL data type, although there seem to
be a number of additional entries in the enum.
*/
enum
enum_field_types
field_type
;
int
value
;
/**
This is used to set column attributes. By default, columns are @c NOT
@c NULL and @c SIGNED, and you can deviate from the default
by setting the appopriate flags. You can use either one of the flags
@c MY_I_S_MAYBE_NULL and @cMY_I_S_UNSIGNED or
combine them using the bitwise or operator @c |. Both flags are
defined in table.h.
*/
uint
field_flags
;
// Field atributes(maybe_null, signed, unsigned etc.)
const
char
*
old_name
;
/**
This should be one of @c SKIP_OPEN_TABLE,
@c OPEN_FRM_ONLY or @c OPEN_FULL_TABLE.
*/
uint
open_method
;
LEX_CSTRING
get_name
()
const
{
return
LEX_CSTRING
({
field_name
,
strlen
(
field_name
)});
}
LEX_CSTRING
get_old_name
()
const
{
return
LEX_CSTRING
({
old_name
,
strlen
(
old_name
)});
}
bool
unsigned_flag
()
const
{
return
field_flags
&
MY_I_S_UNSIGNED
;
}
uint
fsp
()
const
{
DBUG_ASSERT
(
field_length
<=
TIME_SECOND_PART_DIGITS
);
return
field_length
;
}
};
namespace
Show
{
class
Type
{
enum
enum_field_types
m_type
;
uint
m_char_length
;
uint
m_unsigned_flag
;
public:
Type
(
enum_field_types
type
,
uint
length
,
uint
unsigned_flag
)
:
m_type
(
type
),
m_char_length
(
length
),
m_unsigned_flag
(
unsigned_flag
)
{
}
enum_field_types
type
()
const
{
return
m_type
;
}
uint
char_length
()
const
{
return
m_char_length
;
}
uint
unsigned_flag
()
const
{
return
m_unsigned_flag
;
}
};
class
Blob
:
public
Type
{
public:
Blob
(
uint
length
)
:
Type
(
MYSQL_TYPE_BLOB
,
length
,
false
)
{
}
};
class
Varchar
:
public
Type
{
public:
Varchar
(
uint
length
)
:
Type
(
MYSQL_TYPE_STRING
,
length
,
false
)
{
DBUG_ASSERT
(
length
*
3
<=
MAX_FIELD_VARCHARLENGTH
);
}
};
class
Longtext
:
public
Type
{
public:
Longtext
(
uint
length
)
:
Type
(
MYSQL_TYPE_STRING
,
length
,
false
)
{
}
};
class
Yesno
:
public
Varchar
{
public:
Yesno
()
:
Varchar
(
3
)
{
}
};
class
Catalog
:
public
Varchar
{
public:
Catalog
()
:
Varchar
(
FN_REFLEN
)
{
}
};
class
Name
:
public
Varchar
{
public:
Name
()
:
Varchar
(
NAME_CHAR_LEN
)
{
}
};
class
Definer
:
public
Varchar
{
public:
Definer
()
:
Varchar
(
DEFINER_CHAR_LENGTH
)
{
}
};
class
Userhost
:
public
Varchar
{
public:
Userhost
()
:
Varchar
(
USERNAME_CHAR_LENGTH
+
HOSTNAME_LENGTH
+
2
)
{
}
};
class
CSName
:
public
Varchar
{
public:
CSName
()
:
Varchar
(
MY_CS_NAME_SIZE
)
{
}
};
class
SQLMode
:
public
Varchar
{
public:
SQLMode
()
:
Varchar
(
32
*
256
)
{
}
};
class
Datetime
:
public
Type
{
public:
Datetime
(
uint
dec
)
:
Type
(
MYSQL_TYPE_DATETIME
,
dec
,
false
)
{
}
};
class
Decimal
:
public
Type
{
public:
Decimal
(
uint
length
)
:
Type
(
MYSQL_TYPE_DECIMAL
,
length
,
false
)
{
}
};
class
ULonglong
:
public
Type
{
public:
ULonglong
(
uint
length
)
:
Type
(
MYSQL_TYPE_LONGLONG
,
length
,
true
)
{
}
ULonglong
()
:
ULonglong
(
MY_INT64_NUM_DECIMAL_DIGITS
)
{
}
};
class
ULong
:
public
Type
{
public:
ULong
(
uint
length
)
:
Type
(
MYSQL_TYPE_LONG
,
length
,
true
)
{
}
ULong
()
:
ULong
(
MY_INT32_NUM_DECIMAL_DIGITS
)
{
}
};
class
SLonglong
:
public
Type
{
public:
SLonglong
(
uint
length
)
:
Type
(
MYSQL_TYPE_LONGLONG
,
length
,
false
)
{
}
SLonglong
()
:
SLonglong
(
MY_INT64_NUM_DECIMAL_DIGITS
)
{
}
};
class
SLong
:
public
Type
{
public:
SLong
(
uint
length
)
:
Type
(
MYSQL_TYPE_LONG
,
length
,
false
)
{
}
SLong
()
:
SLong
(
MY_INT32_NUM_DECIMAL_DIGITS
)
{
}
};
class
SShort
:
public
Type
{
public:
SShort
(
uint
length
)
:
Type
(
MYSQL_TYPE_SHORT
,
length
,
false
)
{
}
};
class
STiny
:
public
Type
{
public:
STiny
(
uint
length
)
:
Type
(
MYSQL_TYPE_TINY
,
length
,
false
)
{
}
};
class
Double
:
public
Type
{
public:
Double
(
uint
length
)
:
Type
(
MYSQL_TYPE_DOUBLE
,
length
,
false
)
{
}
};
class
Column
:
public
ST_FIELD_INFO
{
public:
Column
(
const
char
*
name
,
const
Type
&
type
,
enum_nullability
nullability
,
const
char
*
old_name
,
enum_show_open_table
open_method
=
SKIP_OPEN_TABLE
)
{
ST_FIELD_INFO
::
field_name
=
name
;
ST_FIELD_INFO
::
field_length
=
type
.
char_length
();
ST_FIELD_INFO
::
field_type
=
type
.
type
();
ST_FIELD_INFO
::
value
=
0
;
ST_FIELD_INFO
::
field_flags
=
(
type
.
unsigned_flag
()
?
MY_I_S_UNSIGNED
:
0
)
|
(
nullability
==
NULLABLE
?
MY_I_S_MAYBE_NULL
:
0
);
ST_FIELD_INFO
::
old_name
=
old_name
;
ST_FIELD_INFO
::
open_method
=
open_method
;
}
Column
(
const
char
*
name
,
const
Type
&
type
,
enum_nullability
nullability
,
enum_show_open_table
open_method
=
SKIP_OPEN_TABLE
)
:
Column
(
name
,
type
,
nullability
,
NullS
,
open_method
)
{
}
};
// End marker
class
CEnd
:
public
Column
{
public:
CEnd
()
:
Column
(
NullS
,
Varchar
(
0
),
NOT_NULL
,
NullS
,
SKIP_OPEN_TABLE
)
{
}
};
}
// namespace Show
struct
TABLE_LIST
;
typedef
class
Item
COND
;
typedef
struct
st_schema_table
{
const
char
*
table_name
;
ST_FIELD_INFO
*
fields_info
;
/* for FLUSH table_name */
int
(
*
reset_table
)
();
/* Fill table with data */
int
(
*
fill_table
)
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
);
/* Handle fileds for old SHOW */
int
(
*
old_format
)
(
THD
*
thd
,
struct
st_schema_table
*
schema_table
);
int
(
*
process_table
)
(
THD
*
thd
,
TABLE_LIST
*
tables
,
TABLE
*
table
,
bool
res
,
const
LEX_CSTRING
*
db_name
,
const
LEX_CSTRING
*
table_name
);
int
idx_field1
,
idx_field2
;
bool
hidden
;
uint
i_s_requested_object
;
/* the object we need to open(TABLE | VIEW) */
}
ST_SCHEMA_TABLE
;
#endif // SQL_I_S_INCLUDED
sql/sql_profile.cc
View file @
4156b1a2
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#include "mariadb.h"
#include "mariadb.h"
#include "sql_priv.h"
#include "sql_priv.h"
#include "sql_profile.h"
#include "sql_profile.h"
#include "sql_
show.h"
// schema_table_store_record
#include "sql_
i_s.h"
// schema_table_store_record
#include "sql_class.h" // THD
#include "sql_class.h" // THD
#ifdef _WIN32
#ifdef _WIN32
...
@@ -60,30 +60,32 @@ int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables,
...
@@ -60,30 +60,32 @@ int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables,
#endif
#endif
}
}
namespace
Show
{
ST_FIELD_INFO
query_profile_statistics_info
[]
=
ST_FIELD_INFO
query_profile_statistics_info
[]
=
{
{
/* name, length, type, value, maybe_null, old_name, open_method */
Column
(
"QUERY_ID"
,
SLong
(
20
),
NOT_NULL
,
"Query_id"
),
{
"QUERY_ID"
,
20
,
MYSQL_TYPE_LONG
,
0
,
false
,
"Query_id"
,
SKIP_OPEN_TABLE
},
Column
(
"SEQ"
,
SLong
(
20
),
NOT_NULL
,
"Seq"
),
{
"SEQ"
,
20
,
MYSQL_TYPE_LONG
,
0
,
false
,
"Seq"
,
SKIP_OPEN_TABLE
},
Column
(
"STATE"
,
Varchar
(
30
),
NOT_NULL
,
"Status"
),
{
"STATE"
,
30
,
MYSQL_TYPE_STRING
,
0
,
false
,
"Status"
,
SKIP_OPEN_TABLE
},
Column
(
"DURATION"
,
Decimal
(
TIME_I_S_DECIMAL_SIZE
),
NOT_NULL
,
"Duration"
),
{
"DURATION"
,
TIME_I_S_DECIMAL_SIZE
,
MYSQL_TYPE_DECIMAL
,
0
,
false
,
"Duration"
,
SKIP_OPEN_TABLE
},
Column
(
"CPU_USER"
,
Decimal
(
TIME_I_S_DECIMAL_SIZE
),
NULLABLE
,
"CPU_user"
),
{
"CPU_USER"
,
TIME_I_S_DECIMAL_SIZE
,
MYSQL_TYPE_DECIMAL
,
0
,
true
,
"CPU_user"
,
SKIP_OPEN_TABLE
},
Column
(
"CPU_SYSTEM"
,
Decimal
(
TIME_I_S_DECIMAL_SIZE
),
NULLABLE
,
"CPU_system"
),
{
"CPU_SYSTEM"
,
TIME_I_S_DECIMAL_SIZE
,
MYSQL_TYPE_DECIMAL
,
0
,
true
,
"CPU_system"
,
SKIP_OPEN_TABLE
},
Column
(
"CONTEXT_VOLUNTARY"
,
SLong
(
20
),
NULLABLE
,
"Context_voluntary"
),
{
"CONTEXT_VOLUNTARY"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Context_voluntary"
,
SKIP_OPEN_TABLE
},
Column
(
"CONTEXT_INVOLUNTARY"
,
SLong
(
20
),
NULLABLE
,
"Context_involuntary"
),
{
"CONTEXT_INVOLUNTARY"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Context_involuntary"
,
SKIP_OPEN_TABLE
},
Column
(
"BLOCK_OPS_IN"
,
SLong
(
20
),
NULLABLE
,
"Block_ops_in"
),
{
"BLOCK_OPS_IN"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Block_ops_in"
,
SKIP_OPEN_TABLE
},
Column
(
"BLOCK_OPS_OUT"
,
SLong
(
20
),
NULLABLE
,
"Block_ops_out"
),
{
"BLOCK_OPS_OUT"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Block_ops_out"
,
SKIP_OPEN_TABLE
},
Column
(
"MESSAGES_SENT"
,
SLong
(
20
),
NULLABLE
,
"Messages_sent"
),
{
"MESSAGES_SENT"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Messages_sent"
,
SKIP_OPEN_TABLE
},
Column
(
"MESSAGES_RECEIVED"
,
SLong
(
20
),
NULLABLE
,
"Messages_received"
),
{
"MESSAGES_RECEIVED"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Messages_received"
,
SKIP_OPEN_TABLE
},
Column
(
"PAGE_FAULTS_MAJOR"
,
SLong
(
20
),
NULLABLE
,
"Page_faults_major"
),
{
"PAGE_FAULTS_MAJOR"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Page_faults_major"
,
SKIP_OPEN_TABLE
},
Column
(
"PAGE_FAULTS_MINOR"
,
SLong
(
20
),
NULLABLE
,
"Page_faults_minor"
),
{
"PAGE_FAULTS_MINOR"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Page_faults_minor"
,
SKIP_OPEN_TABLE
},
Column
(
"SWAPS"
,
SLong
(
20
),
NULLABLE
,
"Swaps"
),
{
"SWAPS"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Swaps"
,
SKIP_OPEN_TABLE
},
Column
(
"SOURCE_FUNCTION"
,
Varchar
(
30
),
NULLABLE
,
"Source_function"
),
{
"SOURCE_FUNCTION"
,
30
,
MYSQL_TYPE_STRING
,
0
,
true
,
"Source_function"
,
SKIP_OPEN_TABLE
},
Column
(
"SOURCE_FILE"
,
Varchar
(
20
),
NULLABLE
,
"Source_file"
),
{
"SOURCE_FILE"
,
20
,
MYSQL_TYPE_STRING
,
0
,
true
,
"Source_file"
,
SKIP_OPEN_TABLE
},
Column
(
"SOURCE_LINE"
,
SLong
(
20
),
NULLABLE
,
"Source_line"
),
{
"SOURCE_LINE"
,
20
,
MYSQL_TYPE_LONG
,
0
,
true
,
"Source_line"
,
SKIP_OPEN_TABLE
},
CEnd
()
{
NULL
,
0
,
MYSQL_TYPE_STRING
,
0
,
true
,
NULL
,
0
}
};
};
}
// namespace Show
int
make_profile_table_for_show
(
THD
*
thd
,
ST_SCHEMA_TABLE
*
schema_table
)
int
make_profile_table_for_show
(
THD
*
thd
,
ST_SCHEMA_TABLE
*
schema_table
)
{
{
...
...
sql/sql_profile.h
View file @
4156b1a2
...
@@ -22,7 +22,10 @@ class THD;
...
@@ -22,7 +22,10 @@ class THD;
struct
ST_FIELD_INFO
;
struct
ST_FIELD_INFO
;
typedef
struct
st_schema_table
ST_SCHEMA_TABLE
;
typedef
struct
st_schema_table
ST_SCHEMA_TABLE
;
namespace
Show
{
extern
ST_FIELD_INFO
query_profile_statistics_info
[];
extern
ST_FIELD_INFO
query_profile_statistics_info
[];
}
// namespace Show
int
fill_query_profile_statistics_info
(
THD
*
thd
,
TABLE_LIST
*
tables
,
Item
*
cond
);
int
fill_query_profile_statistics_info
(
THD
*
thd
,
TABLE_LIST
*
tables
,
Item
*
cond
);
int
make_profile_table_for_show
(
THD
*
thd
,
ST_SCHEMA_TABLE
*
schema_table
);
int
make_profile_table_for_show
(
THD
*
thd
,
ST_SCHEMA_TABLE
*
schema_table
);
...
...
sql/sql_show.cc
View file @
4156b1a2
...
@@ -93,7 +93,6 @@ enum enum_i_s_events_fields
...
@@ -93,7 +93,6 @@ enum enum_i_s_events_fields
ISE_DB_CL
ISE_DB_CL
};
};
#define USERNAME_WITH_HOST_CHAR_LENGTH (USERNAME_CHAR_LENGTH + HOSTNAME_LENGTH + 2)
static
const
LEX_CSTRING
trg_action_time_type_names
[]
=
static
const
LEX_CSTRING
trg_action_time_type_names
[]
=
{
{
...
@@ -4814,7 +4813,7 @@ uint get_table_open_method(TABLE_LIST *tables,
...
@@ -4814,7 +4813,7 @@ uint get_table_open_method(TABLE_LIST *tables,
{
{
star_table_open_method
=
star_table_open_method
=
MY_MIN
(
star_table_open_method
,
MY_MIN
(
star_table_open_method
,
schema_table
->
fields_info
[
field_indx
].
open_method
);
(
uint
)
schema_table
->
fields_info
[
field_indx
].
open_method
);
if
(
bitmap_is_set
(
tables
->
table
->
read_set
,
field
->
field_index
))
if
(
bitmap_is_set
(
tables
->
table
->
read_set
,
field
->
field_index
))
{
{
used_star
=
false
;
used_star
=
false
;
...
@@ -8903,811 +8902,684 @@ int fill_key_cache_tables(THD *thd, TABLE_LIST *tables, COND *cond)
...
@@ -8903,811 +8902,684 @@ int fill_key_cache_tables(THD *thd, TABLE_LIST *tables, COND *cond)
}
}
namespace
Show
{
ST_FIELD_INFO
schema_fields_info
[]
=
ST_FIELD_INFO
schema_fields_info
[]
=
{
{
{
"CATALOG_NAME"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"CATALOG_NAME"
,
Catalog
(),
NOT_NULL
),
{
"SCHEMA_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Database"
,
Column
(
"SCHEMA_NAME"
,
Name
(),
NOT_NULL
,
"Database"
),
SKIP_OPEN_TABLE
},
Column
(
"DEFAULT_CHARACTER_SET_NAME"
,
CSName
(),
NOT_NULL
),
{
"DEFAULT_CHARACTER_SET_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"DEFAULT_COLLATION_NAME"
,
CSName
(),
NOT_NULL
),
SKIP_OPEN_TABLE
},
Column
(
"SQL_PATH"
,
Varchar
(
FN_REFLEN
),
NULLABLE
),
{
"DEFAULT_COLLATION_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"SCHEMA_COMMENT"
,
Varchar
(
DATABASE_COMMENT_MAXLEN
),
NOT_NULL
),
SKIP_OPEN_TABLE
},
CEnd
()
{
"SQL_PATH"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
{
"SCHEMA_COMMENT"
,
DATABASE_COMMENT_MAXLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
tables_fields_info
[]
=
ST_FIELD_INFO
tables_fields_info
[]
=
{
{
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Name"
,
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
"Name"
),
SKIP_OPEN_TABLE
},
Column
(
"TABLE_TYPE"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"TABLE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"ENGINE"
,
Name
(),
NULLABLE
,
"Engine"
,
OPEN_FRM_ONLY
),
{
"ENGINE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Engine"
,
OPEN_FRM_ONLY
},
Column
(
"VERSION"
,
ULonglong
(),
NULLABLE
,
"Version"
,
OPEN_FRM_ONLY
),
{
"VERSION"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"ROW_FORMAT"
,
Varchar
(
10
),
NULLABLE
,
"Row_format"
,
OPEN_FULL_TABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Version"
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_ROWS"
,
ULonglong
(),
NULLABLE
,
"Rows"
,
OPEN_FULL_TABLE
),
{
"ROW_FORMAT"
,
10
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Row_format"
,
OPEN_FULL_TABLE
},
Column
(
"AVG_ROW_LENGTH"
,
ULonglong
(),
NULLABLE
,
"Avg_row_length"
,
{
"TABLE_ROWS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
OPEN_FULL_TABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Rows"
,
OPEN_FULL_TABLE
},
Column
(
"DATA_LENGTH"
,
ULonglong
(),
NULLABLE
,
"Data_length"
,
OPEN_FULL_TABLE
),
{
"AVG_ROW_LENGTH"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"MAX_DATA_LENGTH"
,
ULonglong
(),
NULLABLE
,
"Max_data_length"
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Avg_row_length"
,
OPEN_FULL_TABLE
},
OPEN_FULL_TABLE
),
{
"DATA_LENGTH"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"INDEX_LENGTH"
,
ULonglong
(),
NULLABLE
,
"Index_length"
,
OPEN_FULL_TABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Data_length"
,
OPEN_FULL_TABLE
},
Column
(
"DATA_FREE"
,
ULonglong
(),
NULLABLE
,
"Data_free"
,
OPEN_FULL_TABLE
),
{
"MAX_DATA_LENGTH"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"AUTO_INCREMENT"
,
ULonglong
(),
NULLABLE
,
"Auto_increment"
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Max_data_length"
,
OPEN_FULL_TABLE
},
OPEN_FULL_TABLE
),
{
"INDEX_LENGTH"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"CREATE_TIME"
,
Datetime
(
0
),
NULLABLE
,
"Create_time"
,
OPEN_FULL_TABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Index_length"
,
OPEN_FULL_TABLE
},
Column
(
"UPDATE_TIME"
,
Datetime
(
0
),
NULLABLE
,
"Update_time"
,
OPEN_FULL_TABLE
),
{
"DATA_FREE"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"CHECK_TIME"
,
Datetime
(
0
),
NULLABLE
,
"Check_time"
,
OPEN_FULL_TABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Data_free"
,
OPEN_FULL_TABLE
},
Column
(
"TABLE_COLLATION"
,
CSName
(),
NULLABLE
,
"Collation"
,
OPEN_FRM_ONLY
),
{
"AUTO_INCREMENT"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"CHECKSUM"
,
ULonglong
(),
NULLABLE
,
"Checksum"
,
OPEN_FULL_TABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Auto_increment"
,
OPEN_FULL_TABLE
},
Column
(
"CREATE_OPTIONS"
,
Varchar
(
2048
),
NULLABLE
,
"Create_options"
,
{
"CREATE_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Create_time"
,
OPEN_FULL_TABLE
},
OPEN_FULL_TABLE
),
{
"UPDATE_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Update_time"
,
OPEN_FULL_TABLE
},
Column
(
"TABLE_COMMENT"
,
Varchar
(
TABLE_COMMENT_MAXLEN
),
{
"CHECK_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Check_time"
,
OPEN_FULL_TABLE
},
NOT_NULL
,
"Comment"
,
OPEN_FRM_ONLY
),
{
"TABLE_COLLATION"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Collation"
,
Column
(
"MAX_INDEX_LENGTH"
,
ULonglong
(),
NULLABLE
,
"Max_index_length"
,
OPEN_FRM_ONLY
},
OPEN_FULL_TABLE
),
{
"CHECKSUM"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"TEMPORARY"
,
Varchar
(
1
),
NULLABLE
,
"Temporary"
,
OPEN_FRM_ONLY
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Checksum"
,
OPEN_FULL_TABLE
},
CEnd
()
{
"CREATE_OPTIONS"
,
2048
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Create_options"
,
OPEN_FULL_TABLE
},
{
"TABLE_COMMENT"
,
TABLE_COMMENT_MAXLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Comment"
,
OPEN_FRM_ONLY
},
{
"MAX_INDEX_LENGTH"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Max_index_length"
,
OPEN_FULL_TABLE
},
{
"TEMPORARY"
,
1
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
"Temporary"
,
OPEN_FRM_ONLY
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
columns_fields_info
[]
=
ST_FIELD_INFO
columns_fields_info
[]
=
{
{
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"COLUMN_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Field"
,
Column
(
"COLUMN_NAME"
,
Name
(),
NOT_NULL
,
"Field"
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"ORDINAL_POSITION"
,
ULonglong
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"ORDINAL_POSITION"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"COLUMN_DEFAULT"
,
Longtext
(
MAX_FIELD_VARCHARLENGTH
),
MY_I_S_UNSIGNED
,
0
,
OPEN_FRM_ONLY
},
NULLABLE
,
"Default"
,
OPEN_FRM_ONLY
),
{
"COLUMN_DEFAULT"
,
MAX_FIELD_VARCHARLENGTH
,
MYSQL_TYPE_STRING
,
0
,
Column
(
"IS_NULLABLE"
,
Yesno
(),
NOT_NULL
,
"Null"
,
OPEN_FRM_ONLY
),
1
,
"Default"
,
OPEN_FRM_ONLY
},
Column
(
"DATA_TYPE"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"IS_NULLABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Null"
,
OPEN_FRM_ONLY
},
Column
(
"CHARACTER_MAXIMUM_LENGTH"
,
ULonglong
(),
NULLABLE
,
OPEN_FRM_ONLY
),
{
"DATA_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"CHARACTER_OCTET_LENGTH"
,
ULonglong
(),
NULLABLE
,
OPEN_FRM_ONLY
),
{
"CHARACTER_MAXIMUM_LENGTH"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
Column
(
"NUMERIC_PRECISION"
,
ULonglong
(),
NULLABLE
,
OPEN_FRM_ONLY
),
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FRM_ONLY
},
Column
(
"NUMERIC_SCALE"
,
ULonglong
(),
NULLABLE
,
OPEN_FRM_ONLY
),
{
"CHARACTER_OCTET_LENGTH"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
Column
(
"DATETIME_PRECISION"
,
ULonglong
(),
NULLABLE
,
OPEN_FRM_ONLY
),
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FRM_ONLY
},
Column
(
"CHARACTER_SET_NAME"
,
CSName
(),
NULLABLE
,
OPEN_FRM_ONLY
),
{
"NUMERIC_PRECISION"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
Column
(
"COLLATION_NAME"
,
CSName
(),
NULLABLE
,
"Collation"
,
OPEN_FRM_ONLY
),
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FRM_ONLY
},
Column
(
"COLUMN_TYPE"
,
Longtext
(
65535
),
NOT_NULL
,
"Type"
,
OPEN_FRM_ONLY
),
{
"NUMERIC_SCALE"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
Column
(
"COLUMN_KEY"
,
Varchar
(
3
),
NOT_NULL
,
"Key"
,
OPEN_FRM_ONLY
),
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FRM_ONLY
},
Column
(
"EXTRA"
,
Varchar
(
30
),
NOT_NULL
,
"Extra"
,
OPEN_FRM_ONLY
),
{
"DATETIME_PRECISION"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
Column
(
"PRIVILEGES"
,
Varchar
(
80
),
NOT_NULL
,
"Privileges"
,
OPEN_FRM_ONLY
),
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FRM_ONLY
},
Column
(
"COLUMN_COMMENT"
,
Varchar
(
COLUMN_COMMENT_MAXLEN
),
NOT_NULL
,
"Comment"
,
{
"CHARACTER_SET_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"IS_GENERATED"
,
Varchar
(
6
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"COLLATION_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Collation"
,
Column
(
"GENERATION_EXPRESSION"
,
Longtext
(
MAX_FIELD_VARCHARLENGTH
),
OPEN_FRM_ONLY
},
NULLABLE
,
OPEN_FRM_ONLY
),
{
"COLUMN_TYPE"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Type"
,
OPEN_FRM_ONLY
},
CEnd
()
{
"COLUMN_KEY"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Key"
,
OPEN_FRM_ONLY
},
{
"EXTRA"
,
30
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Extra"
,
OPEN_FRM_ONLY
},
{
"PRIVILEGES"
,
80
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Privileges"
,
OPEN_FRM_ONLY
},
{
"COLUMN_COMMENT"
,
COLUMN_COMMENT_MAXLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Comment"
,
OPEN_FRM_ONLY
},
{
"IS_GENERATED"
,
6
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
{
"GENERATION_EXPRESSION"
,
MAX_FIELD_VARCHARLENGTH
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FRM_ONLY
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
charsets_fields_info
[]
=
ST_FIELD_INFO
charsets_fields_info
[]
=
{
{
{
"CHARACTER_SET_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Charset"
,
Column
(
"CHARACTER_SET_NAME"
,
CSName
(),
NOT_NULL
,
"Charset"
),
SKIP_OPEN_TABLE
},
Column
(
"DEFAULT_COLLATE_NAME"
,
CSName
(),
NOT_NULL
,
"Default collation"
),
{
"DEFAULT_COLLATE_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
Column
(
"DESCRIPTION"
,
Varchar
(
60
),
NOT_NULL
,
"Description"
),
"Default collation"
,
SKIP_OPEN_TABLE
},
Column
(
"MAXLEN"
,
SLonglong
(
3
),
NOT_NULL
,
"Maxlen"
),
{
"DESCRIPTION"
,
60
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Description"
,
CEnd
()
SKIP_OPEN_TABLE
},
{
"MAXLEN"
,
3
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Maxlen"
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
collation_fields_info
[]
=
ST_FIELD_INFO
collation_fields_info
[]
=
{
{
{
"COLLATION_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Collation"
,
Column
(
"COLLATION_NAME"
,
CSName
(),
NOT_NULL
,
"Collation"
),
SKIP_OPEN_TABLE
},
Column
(
"CHARACTER_SET_NAME"
,
CSName
(),
NOT_NULL
,
"Charset"
),
{
"CHARACTER_SET_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Charset"
,
Column
(
"ID"
,
SLonglong
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
,
"Id"
),
SKIP_OPEN_TABLE
},
Column
(
"IS_DEFAULT"
,
Yesno
(),
NOT_NULL
,
"Default"
),
{
"ID"
,
MY_INT32_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Id"
,
Column
(
"IS_COMPILED"
,
Yesno
(),
NOT_NULL
,
"Compiled"
),
SKIP_OPEN_TABLE
},
Column
(
"SORTLEN"
,
SLonglong
(
3
),
NOT_NULL
,
"Sortlen"
),
{
"IS_DEFAULT"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Default"
,
SKIP_OPEN_TABLE
},
CEnd
()
{
"IS_COMPILED"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Compiled"
,
SKIP_OPEN_TABLE
},
{
"SORTLEN"
,
3
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Sortlen"
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
applicable_roles_fields_info
[]
=
ST_FIELD_INFO
applicable_roles_fields_info
[]
=
{
{
{
"GRANTEE"
,
USERNAME_WITH_HOST_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
)
,
{
"ROLE_NAME"
,
USERNAME_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"ROLE_NAME"
,
Varchar
(
USERNAME_CHAR_LENGTH
),
NOT_NULL
)
,
{
"IS_GRANTABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"IS_GRANTABLE"
,
Yesno
(),
NOT_NULL
)
,
{
"IS_DEFAULT"
,
3
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"IS_DEFAULT"
,
Yesno
(),
NULLABLE
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
CEnd
()
};
};
ST_FIELD_INFO
enabled_roles_fields_info
[]
=
ST_FIELD_INFO
enabled_roles_fields_info
[]
=
{
{
{
"ROLE_NAME"
,
USERNAME_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"ROLE_NAME"
,
Varchar
(
USERNAME_CHAR_LENGTH
),
NULLABLE
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
CEnd
()
};
};
ST_FIELD_INFO
engines_fields_info
[]
=
ST_FIELD_INFO
engines_fields_info
[]
=
{
{
{
"ENGINE"
,
64
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Engine"
,
SKIP_OPEN_TABLE
}
,
Column
(
"ENGINE"
,
Varchar
(
64
),
NOT_NULL
,
"Engine"
)
,
{
"SUPPORT"
,
8
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Support"
,
SKIP_OPEN_TABLE
}
,
Column
(
"SUPPORT"
,
Varchar
(
8
),
NOT_NULL
,
"Support"
)
,
{
"COMMENT"
,
160
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Comment"
,
SKIP_OPEN_TABLE
}
,
Column
(
"COMMENT"
,
Varchar
(
160
),
NOT_NULL
,
"Comment"
)
,
{
"TRANSACTIONS"
,
3
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Transactions"
,
SKIP_OPEN_TABLE
}
,
Column
(
"TRANSACTIONS"
,
Varchar
(
3
),
NULLABLE
,
"Transactions"
)
,
{
"XA"
,
3
,
MYSQL_TYPE_STRING
,
0
,
1
,
"XA"
,
SKIP_OPEN_TABLE
}
,
Column
(
"XA"
,
Varchar
(
3
),
NULLABLE
,
"XA"
)
,
{
"SAVEPOINTS"
,
3
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Savepoints"
,
SKIP_OPEN_TABLE
}
,
Column
(
"SAVEPOINTS"
,
Varchar
(
3
),
NULLABLE
,
"Savepoints"
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
CEnd
()
};
};
ST_FIELD_INFO
events_fields_info
[]
=
ST_FIELD_INFO
events_fields_info
[]
=
{
{
{
"EVENT_CATALOG"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
// QQ: shouldn't EVENT_CATALOG be Catalog() like in all other places?
{
"EVENT_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Db"
,
Column
(
"EVENT_CATALOG"
,
Name
(),
NOT_NULL
),
SKIP_OPEN_TABLE
},
Column
(
"EVENT_SCHEMA"
,
Name
(),
NOT_NULL
,
"Db"
),
{
"EVENT_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Name"
,
Column
(
"EVENT_NAME"
,
Name
(),
NOT_NULL
,
"Name"
),
SKIP_OPEN_TABLE
},
Column
(
"DEFINER"
,
Definer
(),
NOT_NULL
,
"Definer"
),
{
"DEFINER"
,
DEFINER_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Definer"
,
SKIP_OPEN_TABLE
},
Column
(
"TIME_ZONE"
,
Varchar
(
64
),
NOT_NULL
,
"Time zone"
),
{
"TIME_ZONE"
,
64
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Time zone"
,
SKIP_OPEN_TABLE
},
Column
(
"EVENT_BODY"
,
Varchar
(
8
),
NOT_NULL
),
{
"EVENT_BODY"
,
8
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"EVENT_DEFINITION"
,
Longtext
(
65535
),
NOT_NULL
),
{
"EVENT_DEFINITION"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"EVENT_TYPE"
,
Varchar
(
9
),
NOT_NULL
,
"Type"
),
{
"EVENT_TYPE"
,
9
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Type"
,
SKIP_OPEN_TABLE
},
Column
(
"EXECUTE_AT"
,
Datetime
(
0
),
NULLABLE
,
"Execute at"
),
{
"EXECUTE_AT"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Execute at"
,
SKIP_OPEN_TABLE
},
Column
(
"INTERVAL_VALUE"
,
Varchar
(
256
),
NULLABLE
,
"Interval value"
),
{
"INTERVAL_VALUE"
,
256
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Interval value"
,
Column
(
"INTERVAL_FIELD"
,
Varchar
(
18
),
NULLABLE
,
"Interval field"
),
SKIP_OPEN_TABLE
},
Column
(
"SQL_MODE"
,
SQLMode
(),
NOT_NULL
),
{
"INTERVAL_FIELD"
,
18
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Interval field"
,
Column
(
"STARTS"
,
Datetime
(
0
),
NULLABLE
,
"Starts"
),
SKIP_OPEN_TABLE
},
Column
(
"ENDS"
,
Datetime
(
0
),
NULLABLE
,
"Ends"
),
{
"SQL_MODE"
,
32
*
256
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"STATUS"
,
Varchar
(
18
),
NOT_NULL
,
"Status"
),
{
"STARTS"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Starts"
,
SKIP_OPEN_TABLE
},
Column
(
"ON_COMPLETION"
,
Varchar
(
12
),
NOT_NULL
),
{
"ENDS"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Ends"
,
SKIP_OPEN_TABLE
},
Column
(
"CREATED"
,
Datetime
(
0
),
NOT_NULL
),
{
"STATUS"
,
18
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Status"
,
SKIP_OPEN_TABLE
},
Column
(
"LAST_ALTERED"
,
Datetime
(
0
),
NOT_NULL
),
{
"ON_COMPLETION"
,
12
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"LAST_EXECUTED"
,
Datetime
(
0
),
NULLABLE
),
{
"CREATED"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"EVENT_COMMENT"
,
Name
(),
NOT_NULL
),
{
"LAST_ALTERED"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"ORIGINATOR"
,
SLonglong
(
10
),
NOT_NULL
,
"Originator"
),
{
"LAST_EXECUTED"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"CHARACTER_SET_CLIENT"
,
CSName
(),
NOT_NULL
,
"character_set_client"
),
{
"EVENT_COMMENT"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"COLLATION_CONNECTION"
,
CSName
(),
NOT_NULL
,
"collation_connection"
),
{
"ORIGINATOR"
,
10
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Originator"
,
SKIP_OPEN_TABLE
},
Column
(
"DATABASE_COLLATION"
,
CSName
(),
NOT_NULL
,
"Database Collation"
),
{
"CHARACTER_SET_CLIENT"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
CEnd
()
"character_set_client"
,
SKIP_OPEN_TABLE
},
{
"COLLATION_CONNECTION"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
"collation_connection"
,
SKIP_OPEN_TABLE
},
{
"DATABASE_COLLATION"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Database Collation"
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
coll_charset_app_fields_info
[]
=
ST_FIELD_INFO
coll_charset_app_fields_info
[]
=
{
{
{
"COLLATION_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"COLLATION_NAME"
,
CSName
(),
NOT_NULL
),
SKIP_OPEN_TABLE
},
Column
(
"CHARACTER_SET_NAME"
,
CSName
(),
NOT_NULL
),
{
"CHARACTER_SET_NAME"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
CEnd
()
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
proc_fields_info
[]
=
ST_FIELD_INFO
proc_fields_info
[]
=
{
{
{
"SPECIFIC_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"SPECIFIC_NAME"
,
Name
(),
NOT_NULL
),
{
"ROUTINE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"ROUTINE_CATALOG"
,
Catalog
(),
NOT_NULL
),
{
"ROUTINE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Db"
,
Column
(
"ROUTINE_SCHEMA"
,
Name
(),
NOT_NULL
,
"Db"
),
SKIP_OPEN_TABLE
},
Column
(
"ROUTINE_NAME"
,
Name
(),
NOT_NULL
,
"Name"
),
{
"ROUTINE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Name"
,
Column
(
"ROUTINE_TYPE"
,
Varchar
(
13
),
NOT_NULL
,
"Type"
),
SKIP_OPEN_TABLE
},
Column
(
"DATA_TYPE"
,
Name
(),
NOT_NULL
),
{
"ROUTINE_TYPE"
,
13
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Type"
,
SKIP_OPEN_TABLE
},
Column
(
"CHARACTER_MAXIMUM_LENGTH"
,
SLong
(
21
),
NULLABLE
),
{
"DATA_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"CHARACTER_OCTET_LENGTH"
,
SLong
(
21
),
NULLABLE
),
{
"CHARACTER_MAXIMUM_LENGTH"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"NUMERIC_PRECISION"
,
SLong
(
21
),
NULLABLE
),
{
"CHARACTER_OCTET_LENGTH"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"NUMERIC_SCALE"
,
SLong
(
21
),
NULLABLE
),
{
"NUMERIC_PRECISION"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"DATETIME_PRECISION"
,
ULonglong
(),
NULLABLE
,
OPEN_FRM_ONLY
),
{
"NUMERIC_SCALE"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"CHARACTER_SET_NAME"
,
Varchar
(
64
),
NULLABLE
),
{
"DATETIME_PRECISION"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
Column
(
"COLLATION_NAME"
,
Varchar
(
64
),
NULLABLE
),
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FRM_ONLY
},
Column
(
"DTD_IDENTIFIER"
,
Longtext
(
65535
),
NULLABLE
),
{
"CHARACTER_SET_NAME"
,
64
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"ROUTINE_BODY"
,
Varchar
(
8
),
NOT_NULL
),
{
"COLLATION_NAME"
,
64
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"ROUTINE_DEFINITION"
,
Longtext
(
65535
),
NULLABLE
),
{
"DTD_IDENTIFIER"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"EXTERNAL_NAME"
,
Name
(),
NULLABLE
),
{
"ROUTINE_BODY"
,
8
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"EXTERNAL_LANGUAGE"
,
Name
(),
NULLABLE
),
{
"ROUTINE_DEFINITION"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"PARAMETER_STYLE"
,
Varchar
(
8
),
NOT_NULL
),
{
"EXTERNAL_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"IS_DETERMINISTIC"
,
Varchar
(
3
),
NOT_NULL
),
{
"EXTERNAL_LANGUAGE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
Column
(
"SQL_DATA_ACCESS"
,
Name
(),
NOT_NULL
),
SKIP_OPEN_TABLE
},
Column
(
"SQL_PATH"
,
Name
(),
NULLABLE
),
{
"PARAMETER_STYLE"
,
8
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"SECURITY_TYPE"
,
Varchar
(
7
),
NOT_NULL
,
"Security_type"
),
{
"IS_DETERMINISTIC"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"CREATED"
,
Datetime
(
0
),
NOT_NULL
,
"Created"
),
{
"SQL_DATA_ACCESS"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"LAST_ALTERED"
,
Datetime
(
0
),
NOT_NULL
,
"Modified"
),
SKIP_OPEN_TABLE
},
Column
(
"SQL_MODE"
,
SQLMode
(),
NOT_NULL
),
{
"SQL_PATH"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"ROUTINE_COMMENT"
,
Longtext
(
65535
),
NOT_NULL
,
"Comment"
),
{
"SECURITY_TYPE"
,
7
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Security_type"
,
Column
(
"DEFINER"
,
Definer
(),
NOT_NULL
,
"Definer"
),
SKIP_OPEN_TABLE
},
Column
(
"CHARACTER_SET_CLIENT"
,
CSName
(),
NOT_NULL
,
"character_set_client"
),
{
"CREATED"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
0
,
"Created"
,
SKIP_OPEN_TABLE
},
Column
(
"COLLATION_CONNECTION"
,
CSName
(),
NOT_NULL
,
"collation_connection"
),
{
"LAST_ALTERED"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
0
,
"Modified"
,
SKIP_OPEN_TABLE
},
Column
(
"DATABASE_COLLATION"
,
CSName
(),
NOT_NULL
,
"Database Collation"
),
{
"SQL_MODE"
,
32
*
256
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
CEnd
()
{
"ROUTINE_COMMENT"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Comment"
,
SKIP_OPEN_TABLE
},
{
"DEFINER"
,
DEFINER_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Definer"
,
SKIP_OPEN_TABLE
},
{
"CHARACTER_SET_CLIENT"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
"character_set_client"
,
SKIP_OPEN_TABLE
},
{
"COLLATION_CONNECTION"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
"collation_connection"
,
SKIP_OPEN_TABLE
},
{
"DATABASE_COLLATION"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Database Collation"
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
stat_fields_info
[]
=
ST_FIELD_INFO
stat_fields_info
[]
=
{
{
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Table"
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
"Table"
,
OPEN_FRM_ONLY
),
{
"NON_UNIQUE"
,
1
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Non_unique"
,
OPEN_FRM_ONLY
},
Column
(
"NON_UNIQUE"
,
SLonglong
(
1
),
NOT_NULL
,
"Non_unique"
,
OPEN_FRM_ONLY
),
{
"INDEX_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"INDEX_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"INDEX_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Key_name"
,
Column
(
"INDEX_NAME"
,
Name
(),
NOT_NULL
,
"Key_name"
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"SEQ_IN_INDEX"
,
SLonglong
(
2
),
NOT_NULL
,
"Seq_in_index"
,
OPEN_FRM_ONLY
),
{
"SEQ_IN_INDEX"
,
2
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Seq_in_index"
,
OPEN_FRM_ONLY
},
Column
(
"COLUMN_NAME"
,
Name
(),
NOT_NULL
,
"Column_name"
,
OPEN_FRM_ONLY
),
{
"COLUMN_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Column_name"
,
Column
(
"COLLATION"
,
Varchar
(
1
),
NULLABLE
,
"Collation"
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"CARDINALITY"
,
SLonglong
(),
NULLABLE
,
"Cardinality"
,
OPEN_FULL_TABLE
),
{
"COLLATION"
,
1
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Collation"
,
OPEN_FRM_ONLY
},
Column
(
"SUB_PART"
,
SLonglong
(
3
),
NULLABLE
,
"Sub_part"
,
OPEN_FRM_ONLY
),
{
"CARDINALITY"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
Column
(
"PACKED"
,
Varchar
(
10
),
NULLABLE
,
"Packed"
,
OPEN_FRM_ONLY
),
"Cardinality"
,
OPEN_FULL_TABLE
},
Column
(
"NULLABLE"
,
Varchar
(
3
),
NOT_NULL
,
"Null"
,
OPEN_FRM_ONLY
),
{
"SUB_PART"
,
3
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
"Sub_part"
,
OPEN_FRM_ONLY
},
Column
(
"INDEX_TYPE"
,
Varchar
(
16
),
NOT_NULL
,
"Index_type"
,
OPEN_FULL_TABLE
),
{
"PACKED"
,
10
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Packed"
,
OPEN_FRM_ONLY
},
Column
(
"COMMENT"
,
Varchar
(
16
),
NULLABLE
,
"Comment"
,
OPEN_FRM_ONLY
),
{
"NULLABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Null"
,
OPEN_FRM_ONLY
},
Column
(
"INDEX_COMMENT"
,
Varchar
(
INDEX_COMMENT_MAXLEN
),
{
"INDEX_TYPE"
,
16
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Index_type"
,
OPEN_FULL_TABLE
},
NOT_NULL
,
"Index_comment"
,
OPEN_FRM_ONLY
),
{
"COMMENT"
,
16
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Comment"
,
OPEN_FRM_ONLY
},
CEnd
()
{
"INDEX_COMMENT"
,
INDEX_COMMENT_MAXLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Index_comment"
,
OPEN_FRM_ONLY
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
view_fields_info
[]
=
ST_FIELD_INFO
view_fields_info
[]
=
{
{
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"VIEW_DEFINITION"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"VIEW_DEFINITION"
,
Longtext
(
65535
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"CHECK_OPTION"
,
8
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"CHECK_OPTION"
,
Varchar
(
8
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"IS_UPDATABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"IS_UPDATABLE"
,
Yesno
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"DEFINER"
,
DEFINER_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"DEFINER"
,
Definer
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"SECURITY_TYPE"
,
7
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"SECURITY_TYPE"
,
Varchar
(
7
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"CHARACTER_SET_CLIENT"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"CHARACTER_SET_CLIENT"
,
CSName
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"COLLATION_CONNECTION"
,
CSName
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"COLLATION_CONNECTION"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"ALGORITHM"
,
Varchar
(
10
),
NOT_NULL
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
CEnd
()
{
"ALGORITHM"
,
10
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
user_privileges_fields_info
[]
=
ST_FIELD_INFO
user_privileges_fields_info
[]
=
{
{
{
"GRANTEE"
,
USERNAME_WITH_HOST_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
)
,
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
)
,
{
"PRIVILEGE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
)
,
{
"IS_GRANTABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"IS_GRANTABLE"
,
Yesno
(),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
CEnd
()
};
};
ST_FIELD_INFO
schema_privileges_fields_info
[]
=
ST_FIELD_INFO
schema_privileges_fields_info
[]
=
{
{
{
"GRANTEE"
,
USERNAME_WITH_HOST_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
)
,
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
)
,
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
)
,
{
"PRIVILEGE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
)
,
{
"IS_GRANTABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"IS_GRANTABLE"
,
Yesno
(),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
CEnd
()
};
};
ST_FIELD_INFO
table_privileges_fields_info
[]
=
ST_FIELD_INFO
table_privileges_fields_info
[]
=
{
{
{
"GRANTEE"
,
USERNAME_WITH_HOST_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
)
,
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
)
,
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
)
,
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
)
,
{
"PRIVILEGE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
)
,
{
"IS_GRANTABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"IS_GRANTABLE"
,
Yesno
(),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
CEnd
()
};
};
ST_FIELD_INFO
column_privileges_fields_info
[]
=
ST_FIELD_INFO
column_privileges_fields_info
[]
=
{
{
{
"GRANTEE"
,
USERNAME_WITH_HOST_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
)
,
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
)
,
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
)
,
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
)
,
{
"COLUMN_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"COLUMN_NAME"
,
Name
(),
NOT_NULL
)
,
{
"PRIVILEGE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
)
,
{
"IS_GRANTABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"IS_GRANTABLE"
,
Yesno
(),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
CEnd
()
};
};
ST_FIELD_INFO
table_constraints_fields_info
[]
=
ST_FIELD_INFO
table_constraints_fields_info
[]
=
{
{
{
"CONSTRAINT_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"CONSTRAINT_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"CONSTRAINT_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"CONSTRAINT_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"CONSTRAINT_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"CONSTRAINT_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"CONSTRAINT_TYPE"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
CEnd
()
{
"CONSTRAINT_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
key_column_usage_fields_info
[]
=
ST_FIELD_INFO
key_column_usage_fields_info
[]
=
{
{
{
"CONSTRAINT_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"CONSTRAINT_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"CONSTRAINT_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"CONSTRAINT_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"CONSTRAINT_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"CONSTRAINT_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"COLUMN_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"ORDINAL_POSITION"
,
SLonglong
(
10
),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"COLUMN_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"POSITION_IN_UNIQUE_CONSTRAINT"
,
SLonglong
(
10
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"ORDINAL_POSITION"
,
10
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"REFERENCED_TABLE_SCHEMA"
,
Name
(),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"POSITION_IN_UNIQUE_CONSTRAINT"
,
10
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
0
,
Column
(
"REFERENCED_TABLE_NAME"
,
Name
(),
NULLABLE
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"REFERENCED_COLUMN_NAME"
,
Name
(),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"REFERENCED_TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
CEnd
()
OPEN_FULL_TABLE
},
{
"REFERENCED_TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
{
"REFERENCED_COLUMN_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
table_names_fields_info
[]
=
ST_FIELD_INFO
table_names_fields_info
[]
=
{
{
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
+
MYSQL50_TABLE_NAME_PREFIX_LENGTH
,
Column
(
"TABLE_NAME"
,
Varchar
(
NAME_CHAR_LEN
+
MYSQL50_TABLE_NAME_PREFIX_LENGTH
),
MYSQL_TYPE_STRING
,
0
,
0
,
"Tables_in_"
,
SKIP_OPEN_TABLE
},
NOT_NULL
,
"Tables_in_"
),
{
"TABLE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Table_type"
,
Column
(
"TABLE_TYPE"
,
Name
(),
NOT_NULL
,
"Table_type"
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
CEnd
()
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
open_tables_fields_info
[]
=
ST_FIELD_INFO
open_tables_fields_info
[]
=
{
{
{
"Database"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Database"
,
Column
(
"Database"
,
Name
(),
NOT_NULL
,
"Database"
),
SKIP_OPEN_TABLE
},
Column
(
"Table"
,
Name
(),
NOT_NULL
,
"Table"
),
{
"Table"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Table"
,
SKIP_OPEN_TABLE
},
Column
(
"In_use"
,
SLonglong
(
1
),
NOT_NULL
,
"In_use"
),
{
"In_use"
,
1
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"In_use"
,
SKIP_OPEN_TABLE
},
Column
(
"Name_locked"
,
SLonglong
(
4
),
NOT_NULL
,
"Name_locked"
),
{
"Name_locked"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Name_locked"
,
SKIP_OPEN_TABLE
},
CEnd
()
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
triggers_fields_info
[]
=
ST_FIELD_INFO
triggers_fields_info
[]
=
{
{
{
"TRIGGER_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TRIGGER_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"TRIGGER_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"TRIGGER_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"TRIGGER_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Trigger"
,
Column
(
"TRIGGER_NAME"
,
Name
(),
NOT_NULL
,
"Trigger"
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"EVENT_MANIPULATION"
,
Varchar
(
6
),
NOT_NULL
,
"Event"
,
OPEN_FRM_ONLY
),
{
"EVENT_MANIPULATION"
,
6
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Event"
,
OPEN_FRM_ONLY
},
Column
(
"EVENT_OBJECT_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"EVENT_OBJECT_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"EVENT_OBJECT_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"EVENT_OBJECT_TABLE"
,
Name
(),
NOT_NULL
,
"Table"
,
OPEN_FRM_ONLY
),
{
"EVENT_OBJECT_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"ACTION_ORDER"
,
SLonglong
(
4
),
NOT_NULL
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"ACTION_CONDITION"
,
Longtext
(
65535
),
NULLABLE
,
OPEN_FRM_ONLY
),
{
"EVENT_OBJECT_TABLE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Table"
,
Column
(
"ACTION_STATEMENT"
,
Longtext
(
65535
),
NOT_NULL
,
"Statement"
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"ACTION_ORIENTATION"
,
Varchar
(
9
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"ACTION_ORDER"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"ACTION_TIMING"
,
Varchar
(
6
),
NOT_NULL
,
"Timing"
,
OPEN_FRM_ONLY
),
{
"ACTION_CONDITION"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FRM_ONLY
},
Column
(
"ACTION_REFERENCE_OLD_TABLE"
,
Name
(),
NULLABLE
,
OPEN_FRM_ONLY
),
{
"ACTION_STATEMENT"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Statement"
,
Column
(
"ACTION_REFERENCE_NEW_TABLE"
,
Name
(),
NULLABLE
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"ACTION_REFERENCE_OLD_ROW"
,
Varchar
(
3
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"ACTION_ORIENTATION"
,
9
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"ACTION_REFERENCE_NEW_ROW"
,
Varchar
(
3
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"ACTION_TIMING"
,
6
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Timing"
,
OPEN_FRM_ONLY
},
{
"ACTION_REFERENCE_OLD_TABLE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FRM_ONLY
},
{
"ACTION_REFERENCE_NEW_TABLE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FRM_ONLY
},
{
"ACTION_REFERENCE_OLD_ROW"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
{
"ACTION_REFERENCE_NEW_ROW"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
/* 2 here indicates 2 decimals */
/* 2 here indicates 2 decimals */
{
"CREATED"
,
2
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Created"
,
OPEN_FRM_ONLY
}
,
Column
(
"CREATED"
,
Datetime
(
2
),
NULLABLE
,
"Created"
,
OPEN_FRM_ONLY
)
,
{
"SQL_MODE"
,
32
*
256
,
MYSQL_TYPE_STRING
,
0
,
0
,
"sql_mode"
,
OPEN_FRM_ONLY
}
,
Column
(
"SQL_MODE"
,
SQLMode
(),
NOT_NULL
,
"sql_mode"
,
OPEN_FRM_ONLY
)
,
{
"DEFINER"
,
DEFINER_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Definer"
,
OPEN_FRM_ONLY
}
,
Column
(
"DEFINER"
,
Definer
(),
NOT_NULL
,
"Definer"
,
OPEN_FRM_ONLY
)
,
{
"CHARACTER_SET_CLIENT"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
Column
(
"CHARACTER_SET_CLIENT"
,
CSName
(),
NOT_NULL
,
"character_set_client"
,
"character_set_client"
,
OPEN_FRM_ONLY
}
,
OPEN_FRM_ONLY
)
,
{
"COLLATION_CONNECTION"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
Column
(
"COLLATION_CONNECTION"
,
CSName
(),
NOT_NULL
,
"collation_connection"
,
"collation_connection"
,
OPEN_FRM_ONLY
}
,
OPEN_FRM_ONLY
)
,
{
"DATABASE_COLLATION"
,
MY_CS_NAME_SIZE
,
MYSQL_TYPE_STRING
,
0
,
0
,
Column
(
"DATABASE_COLLATION"
,
CSName
(),
NOT_NULL
,
"Database Collation"
,
"Database Collation"
,
OPEN_FRM_ONLY
}
,
OPEN_FRM_ONLY
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
CEnd
()
};
};
ST_FIELD_INFO
partitions_fields_info
[]
=
ST_FIELD_INFO
partitions_fields_info
[]
=
{
{
{
"TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"PARTITION_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"PARTITION_NAME"
,
Name
(),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"SUBPARTITION_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
Column
(
"SUBPARTITION_NAME"
,
Name
(),
NULLABLE
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"PARTITION_ORDINAL_POSITION"
,
ULonglong
(),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"PARTITION_ORDINAL_POSITION"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"SUBPARTITION_ORDINAL_POSITION"
,
ULonglong
(),
NULLABLE
,
OPEN_FULL_TABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FULL_TABLE
},
Column
(
"PARTITION_METHOD"
,
Varchar
(
18
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"SUBPARTITION_ORDINAL_POSITION"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"SUBPARTITION_METHOD"
,
Varchar
(
12
),
NULLABLE
,
OPEN_FULL_TABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FULL_TABLE
},
Column
(
"PARTITION_EXPRESSION"
,
Longtext
(
65535
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"PARTITION_METHOD"
,
18
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"SUBPARTITION_EXPRESSION"
,
Longtext
(
65535
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"SUBPARTITION_METHOD"
,
12
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"PARTITION_DESCRIPTION"
,
Longtext
(
65535
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"PARTITION_EXPRESSION"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"TABLE_ROWS"
,
ULonglong
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"SUBPARTITION_EXPRESSION"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
Column
(
"AVG_ROW_LENGTH"
,
ULonglong
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"DATA_LENGTH"
,
ULonglong
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"PARTITION_DESCRIPTION"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"MAX_DATA_LENGTH"
,
ULonglong
(),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"TABLE_ROWS"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_UNSIGNED
,
0
,
Column
(
"INDEX_LENGTH"
,
ULonglong
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"DATA_FREE"
,
ULonglong
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"AVG_ROW_LENGTH"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_UNSIGNED
,
0
,
Column
(
"CREATE_TIME"
,
Datetime
(
0
),
NULLABLE
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"UPDATE_TIME"
,
Datetime
(
0
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"DATA_LENGTH"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_UNSIGNED
,
0
,
Column
(
"CHECK_TIME"
,
Datetime
(
0
),
NULLABLE
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"CHECKSUM"
,
ULonglong
(),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"MAX_DATA_LENGTH"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"PARTITION_COMMENT"
,
Varchar
(
80
),
NOT_NULL
,
OPEN_FULL_TABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FULL_TABLE
},
Column
(
"NODEGROUP"
,
Varchar
(
12
),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"INDEX_LENGTH"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_UNSIGNED
,
0
,
Column
(
"TABLESPACE_NAME"
,
Name
(),
NULLABLE
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
CEnd
()
{
"DATA_FREE"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_UNSIGNED
,
0
,
OPEN_FULL_TABLE
},
{
"CREATE_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
{
"UPDATE_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
{
"CHECK_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
{
"CHECKSUM"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FULL_TABLE
},
{
"PARTITION_COMMENT"
,
80
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
{
"NODEGROUP"
,
12
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
{
"TABLESPACE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
variables_fields_info
[]
=
ST_FIELD_INFO
variables_fields_info
[]
=
{
{
{
"VARIABLE_NAME"
,
64
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Variable_name"
,
Column
(
"VARIABLE_NAME"
,
Varchar
(
64
),
NOT_NULL
,
"Variable_name"
),
SKIP_OPEN_TABLE
},
Column
(
"VARIABLE_VALUE"
,
Varchar
(
2048
),
NOT_NULL
,
"Value"
),
{
"VARIABLE_VALUE"
,
2048
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Value"
,
SKIP_OPEN_TABLE
},
CEnd
()
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
sysvars_fields_info
[]
=
ST_FIELD_INFO
sysvars_fields_info
[]
=
{
{
{
"VARIABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"VARIABLE_NAME"
,
Name
(),
NOT_NULL
)
,
{
"SESSION_VALUE"
,
2048
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
}
,
Column
(
"SESSION_VALUE"
,
Varchar
(
2048
),
NULLABLE
)
,
{
"GLOBAL_VALUE"
,
2048
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
}
,
Column
(
"GLOBAL_VALUE"
,
Varchar
(
2048
),
NULLABLE
)
,
{
"GLOBAL_VALUE_ORIGIN"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"GLOBAL_VALUE_ORIGIN"
,
Name
(),
NOT_NULL
)
,
{
"DEFAULT_VALUE"
,
2048
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
}
,
Column
(
"DEFAULT_VALUE"
,
Varchar
(
2048
),
NULLABLE
)
,
{
"VARIABLE_SCOPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"VARIABLE_SCOPE"
,
Name
(),
NOT_NULL
)
,
{
"VARIABLE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"VARIABLE_TYPE"
,
Name
(),
NOT_NULL
)
,
{
"VARIABLE_COMMENT"
,
TABLE_COMMENT_MAXLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"VARIABLE_COMMENT"
,
Varchar
(
TABLE_COMMENT_MAXLEN
),
NOT_NULL
)
,
{
"NUMERIC_MIN_VALUE"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
}
,
Column
(
"NUMERIC_MIN_VALUE"
,
Varchar
(
MY_INT64_NUM_DECIMAL_DIGITS
),
NULLABLE
)
,
{
"NUMERIC_MAX_VALUE"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
}
,
Column
(
"NUMERIC_MAX_VALUE"
,
Varchar
(
MY_INT64_NUM_DECIMAL_DIGITS
),
NULLABLE
)
,
{
"NUMERIC_BLOCK_SIZE"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
}
,
Column
(
"NUMERIC_BLOCK_SIZE"
,
Varchar
(
MY_INT64_NUM_DECIMAL_DIGITS
),
NULLABLE
)
,
{
"ENUM_VALUE_LIST"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
}
,
Column
(
"ENUM_VALUE_LIST"
,
Longtext
(
65535
),
NULLABLE
)
,
{
"READ_ONLY"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"READ_ONLY"
,
Yesno
(),
NOT_NULL
)
,
{
"COMMAND_LINE_ARGUMENT"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
0
}
,
Column
(
"COMMAND_LINE_ARGUMENT"
,
Name
(),
NULLABLE
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
ST_FIELD_INFO
processlist_fields_info
[]
=
ST_FIELD_INFO
processlist_fields_info
[]
=
{
{
{
"ID"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Id"
,
SKIP_OPEN_TABLE
},
Column
(
"ID"
,
SLonglong
(
4
),
NOT_NULL
,
"Id"
),
{
"USER"
,
USERNAME_CHAR_LENGTH
,
MYSQL_TYPE_STRING
,
0
,
0
,
"User"
,
Column
(
"USER"
,
Varchar
(
USERNAME_CHAR_LENGTH
),
NOT_NULL
,
"User"
),
SKIP_OPEN_TABLE
},
Column
(
"HOST"
,
Varchar
(
LIST_PROCESS_HOST_LEN
),
NOT_NULL
,
"Host"
),
{
"HOST"
,
LIST_PROCESS_HOST_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Host"
,
Column
(
"DB"
,
Name
(),
NULLABLE
,
"Db"
),
SKIP_OPEN_TABLE
},
Column
(
"COMMAND"
,
Varchar
(
16
),
NOT_NULL
,
"Command"
),
{
"DB"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Db"
,
SKIP_OPEN_TABLE
},
Column
(
"TIME"
,
SLong
(
7
),
NOT_NULL
,
"Time"
),
{
"COMMAND"
,
16
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Command"
,
SKIP_OPEN_TABLE
},
Column
(
"STATE"
,
Varchar
(
64
),
NULLABLE
,
"State"
),
{
"TIME"
,
7
,
MYSQL_TYPE_LONG
,
0
,
0
,
"Time"
,
SKIP_OPEN_TABLE
},
Column
(
"INFO"
,
Longtext
(
PROCESS_LIST_INFO_WIDTH
),
{
"STATE"
,
64
,
MYSQL_TYPE_STRING
,
0
,
1
,
"State"
,
SKIP_OPEN_TABLE
},
NULLABLE
,
"Info"
),
{
"INFO"
,
PROCESS_LIST_INFO_WIDTH
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Info"
,
Column
(
"TIME_MS"
,
Decimal
(
100
*
(
MY_INT64_NUM_DECIMAL_DIGITS
+
1
)
+
3
),
SKIP_OPEN_TABLE
},
NOT_NULL
,
"Time_ms"
),
{
"TIME_MS"
,
100
*
(
MY_INT64_NUM_DECIMAL_DIGITS
+
1
)
+
3
,
MYSQL_TYPE_DECIMAL
,
Column
(
"STAGE"
,
STiny
(
2
),
NOT_NULL
,
"Stage"
),
0
,
0
,
"Time_ms"
,
SKIP_OPEN_TABLE
},
Column
(
"MAX_STAGE"
,
STiny
(
2
),
NOT_NULL
,
"Max_stage"
),
{
"STAGE"
,
2
,
MYSQL_TYPE_TINY
,
0
,
0
,
"Stage"
,
SKIP_OPEN_TABLE
},
Column
(
"PROGRESS"
,
Decimal
(
703
),
NOT_NULL
,
"Progress"
),
{
"MAX_STAGE"
,
2
,
MYSQL_TYPE_TINY
,
0
,
0
,
"Max_stage"
,
SKIP_OPEN_TABLE
},
Column
(
"MEMORY_USED"
,
SLonglong
(
7
),
NOT_NULL
,
"Memory_used"
),
{
"PROGRESS"
,
703
,
MYSQL_TYPE_DECIMAL
,
0
,
0
,
"Progress"
,
Column
(
"MAX_MEMORY_USED"
,
SLonglong
(
7
),
NOT_NULL
,
"Max_memory_used"
),
SKIP_OPEN_TABLE
},
Column
(
"EXAMINED_ROWS"
,
SLong
(
7
),
NOT_NULL
,
"Examined_rows"
),
{
"MEMORY_USED"
,
7
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Memory_used"
,
SKIP_OPEN_TABLE
},
Column
(
"QUERY_ID"
,
SLonglong
(
4
),
NOT_NULL
),
{
"MAX_MEMORY_USED"
,
7
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Max_memory_used"
,
SKIP_OPEN_TABLE
},
Column
(
"INFO_BINARY"
,
Blob
(
PROCESS_LIST_INFO_WIDTH
),
NULLABLE
,
"Info_binary"
),
{
"EXAMINED_ROWS"
,
7
,
MYSQL_TYPE_LONG
,
0
,
0
,
"Examined_rows"
,
SKIP_OPEN_TABLE
},
Column
(
"TID"
,
SLonglong
(
4
),
NOT_NULL
,
"Tid"
),
{
"QUERY_ID"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
CEnd
()
{
"INFO_BINARY"
,
PROCESS_LIST_INFO_WIDTH
,
MYSQL_TYPE_BLOB
,
0
,
1
,
"Info_binary"
,
SKIP_OPEN_TABLE
},
{
"TID"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
"Tid"
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
plugin_fields_info
[]
=
ST_FIELD_INFO
plugin_fields_info
[]
=
{
{
{
"PLUGIN_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Name"
,
Column
(
"PLUGIN_NAME"
,
Name
(),
NOT_NULL
,
"Name"
),
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_VERSION"
,
Varchar
(
20
),
NOT_NULL
),
{
"PLUGIN_VERSION"
,
20
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_STATUS"
,
Varchar
(
16
),
NOT_NULL
,
"Status"
),
{
"PLUGIN_STATUS"
,
16
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Status"
,
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_TYPE"
,
Varchar
(
80
),
NOT_NULL
,
"Type"
),
{
"PLUGIN_TYPE"
,
80
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Type"
,
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_TYPE_VERSION"
,
Varchar
(
20
),
NOT_NULL
),
{
"PLUGIN_TYPE_VERSION"
,
20
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_LIBRARY"
,
Name
(),
NULLABLE
,
"Library"
),
{
"PLUGIN_LIBRARY"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Library"
,
Column
(
"PLUGIN_LIBRARY_VERSION"
,
Varchar
(
20
),
NULLABLE
),
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_AUTHOR"
,
Name
(),
NULLABLE
),
{
"PLUGIN_LIBRARY_VERSION"
,
20
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_DESCRIPTION"
,
Longtext
(
65535
),
NULLABLE
),
{
"PLUGIN_AUTHOR"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_LICENSE"
,
Varchar
(
80
),
NOT_NULL
,
"License"
),
{
"PLUGIN_DESCRIPTION"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"LOAD_OPTION"
,
Varchar
(
64
),
NOT_NULL
),
{
"PLUGIN_LICENSE"
,
80
,
MYSQL_TYPE_STRING
,
0
,
0
,
"License"
,
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_MATURITY"
,
Varchar
(
12
),
NOT_NULL
),
{
"LOAD_OPTION"
,
64
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"PLUGIN_AUTH_VERSION"
,
Varchar
(
80
),
NULLABLE
),
{
"PLUGIN_MATURITY"
,
12
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
CEnd
()
{
"PLUGIN_AUTH_VERSION"
,
80
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
files_fields_info
[]
=
ST_FIELD_INFO
files_fields_info
[]
=
{
{
{
"FILE_ID"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"FILE_ID"
,
SLonglong
(
4
),
NOT_NULL
),
{
"FILE_NAME"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"FILE_NAME"
,
Varchar
(
FN_REFLEN
),
NULLABLE
),
{
"FILE_TYPE"
,
20
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"FILE_TYPE"
,
Varchar
(
20
),
NOT_NULL
),
{
"TABLESPACE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
Column
(
"TABLESPACE_NAME"
,
Name
(),
NULLABLE
),
SKIP_OPEN_TABLE
},
Column
(
"TABLE_CATALOG"
,
Name
(),
NOT_NULL
),
{
"TABLE_CATALOG"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TABLE_SCHEMA"
,
Name
(),
NULLABLE
),
{
"TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TABLE_NAME"
,
Name
(),
NULLABLE
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"LOGFILE_GROUP_NAME"
,
Name
(),
NULLABLE
),
{
"LOGFILE_GROUP_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
Column
(
"LOGFILE_GROUP_NUMBER"
,
SLonglong
(
4
),
NULLABLE
),
SKIP_OPEN_TABLE
},
Column
(
"ENGINE"
,
Name
(),
NOT_NULL
),
{
"LOGFILE_GROUP_NUMBER"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"FULLTEXT_KEYS"
,
Name
(),
NULLABLE
),
{
"ENGINE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"DELETED_ROWS"
,
SLonglong
(
4
),
NULLABLE
),
{
"FULLTEXT_KEYS"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"UPDATE_COUNT"
,
SLonglong
(
4
),
NULLABLE
),
{
"DELETED_ROWS"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"FREE_EXTENTS"
,
SLonglong
(
4
),
NULLABLE
),
{
"UPDATE_COUNT"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TOTAL_EXTENTS"
,
SLonglong
(
4
),
NULLABLE
),
{
"FREE_EXTENTS"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"EXTENT_SIZE"
,
SLonglong
(
4
),
NOT_NULL
),
{
"TOTAL_EXTENTS"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"INITIAL_SIZE"
,
ULonglong
(),
NULLABLE
),
{
"EXTENT_SIZE"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"MAXIMUM_SIZE"
,
ULonglong
(),
NULLABLE
),
{
"INITIAL_SIZE"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"AUTOEXTEND_SIZE"
,
ULonglong
(),
NULLABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
SKIP_OPEN_TABLE
},
Column
(
"CREATION_TIME"
,
Datetime
(
0
),
NULLABLE
),
{
"MAXIMUM_SIZE"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"LAST_UPDATE_TIME"
,
Datetime
(
0
),
NULLABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
SKIP_OPEN_TABLE
},
Column
(
"LAST_ACCESS_TIME"
,
Datetime
(
0
),
NULLABLE
),
{
"AUTOEXTEND_SIZE"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"RECOVER_TIME"
,
SLonglong
(
4
),
NULLABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
SKIP_OPEN_TABLE
},
Column
(
"TRANSACTION_COUNTER"
,
SLonglong
(
4
),
NULLABLE
),
{
"CREATION_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"VERSION"
,
ULonglong
(),
NULLABLE
,
"Version"
),
{
"LAST_UPDATE_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"ROW_FORMAT"
,
Varchar
(
10
),
NULLABLE
,
"Row_format"
),
{
"LAST_ACCESS_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TABLE_ROWS"
,
ULonglong
(),
NULLABLE
,
"Rows"
),
{
"RECOVER_TIME"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"AVG_ROW_LENGTH"
,
ULonglong
(),
NULLABLE
,
"Avg_row_length"
),
{
"TRANSACTION_COUNTER"
,
4
,
MYSQL_TYPE_LONGLONG
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"DATA_LENGTH"
,
ULonglong
(),
NULLABLE
,
"Data_length"
),
{
"VERSION"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"MAX_DATA_LENGTH"
,
ULonglong
(),
NULLABLE
,
"Max_data_length"
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Version"
,
SKIP_OPEN_TABLE
},
Column
(
"INDEX_LENGTH"
,
ULonglong
(),
NULLABLE
,
"Index_length"
),
{
"ROW_FORMAT"
,
10
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Row_format"
,
SKIP_OPEN_TABLE
},
Column
(
"DATA_FREE"
,
ULonglong
(),
NULLABLE
,
"Data_free"
),
{
"TABLE_ROWS"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"CREATE_TIME"
,
Datetime
(
0
),
NULLABLE
,
"Create_time"
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Rows"
,
SKIP_OPEN_TABLE
},
Column
(
"UPDATE_TIME"
,
Datetime
(
0
),
NULLABLE
,
"Update_time"
),
{
"AVG_ROW_LENGTH"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"CHECK_TIME"
,
Datetime
(
0
),
NULLABLE
,
"Check_time"
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Avg_row_length"
,
SKIP_OPEN_TABLE
},
Column
(
"CHECKSUM"
,
ULonglong
(),
NULLABLE
,
"Checksum"
),
{
"DATA_LENGTH"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"STATUS"
,
Varchar
(
20
),
NOT_NULL
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Data_length"
,
SKIP_OPEN_TABLE
},
Column
(
"EXTRA"
,
Varchar
(
255
),
NULLABLE
),
{
"MAX_DATA_LENGTH"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
CEnd
()
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Max_data_length"
,
SKIP_OPEN_TABLE
},
{
"INDEX_LENGTH"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Index_length"
,
SKIP_OPEN_TABLE
},
{
"DATA_FREE"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Data_free"
,
SKIP_OPEN_TABLE
},
{
"CREATE_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Create_time"
,
SKIP_OPEN_TABLE
},
{
"UPDATE_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Update_time"
,
SKIP_OPEN_TABLE
},
{
"CHECK_TIME"
,
0
,
MYSQL_TYPE_DATETIME
,
0
,
1
,
"Check_time"
,
SKIP_OPEN_TABLE
},
{
"CHECKSUM"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
"Checksum"
,
SKIP_OPEN_TABLE
},
{
"STATUS"
,
20
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
{
"EXTRA"
,
255
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
};
// namespace Show
void
init_fill_schema_files_row
(
TABLE
*
table
)
void
init_fill_schema_files_row
(
TABLE
*
table
)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
files_fields_info
[
i
].
field_name
!=
NULL
;
i
++
)
for
(
i
=
0
;
Show
::
files_fields_info
[
i
].
field_name
!=
NULL
;
i
++
)
table
->
field
[
i
]
->
set_null
();
table
->
field
[
i
]
->
set_null
();
table
->
field
[
IS_FILES_STATUS
]
->
set_notnull
();
table
->
field
[
IS_FILES_STATUS
]
->
set_notnull
();
table
->
field
[
IS_FILES_STATUS
]
->
store
(
"NORMAL"
,
6
,
system_charset_info
);
table
->
field
[
IS_FILES_STATUS
]
->
store
(
"NORMAL"
,
6
,
system_charset_info
);
}
}
namespace
Show
{
ST_FIELD_INFO
referential_constraints_fields_info
[]
=
ST_FIELD_INFO
referential_constraints_fields_info
[]
=
{
{
{
"CONSTRAINT_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"CONSTRAINT_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"CONSTRAINT_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"CONSTRAINT_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"CONSTRAINT_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"CONSTRAINT_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"UNIQUE_CONSTRAINT_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"UNIQUE_CONSTRAINT_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"UNIQUE_CONSTRAINT_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"UNIQUE_CONSTRAINT_NAME"
,
Name
(),
NULLABLE
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"MATCH_OPTION"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"UNIQUE_CONSTRAINT_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"UPDATE_RULE"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"DELETE_RULE"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"UNIQUE_CONSTRAINT_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
MY_I_S_MAYBE_NULL
,
0
,
OPEN_FULL_TABLE
},
Column
(
"REFERENCED_TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"MATCH_OPTION"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
CEnd
()
{
"UPDATE_RULE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
{
"DELETE_RULE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
{
"REFERENCED_TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
parameters_fields_info
[]
=
ST_FIELD_INFO
parameters_fields_info
[]
=
{
{
{
"SPECIFIC_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"SPECIFIC_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"SPECIFIC_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"SPECIFIC_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"SPECIFIC_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"SPECIFIC_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"ORDINAL_POSITION"
,
SLong
(
21
),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"ORDINAL_POSITION"
,
21
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"PARAMETER_MODE"
,
Varchar
(
5
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"PARAMETER_MODE"
,
5
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"PARAMETER_NAME"
,
Name
(),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"PARAMETER_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"DATA_TYPE"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"DATA_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"CHARACTER_MAXIMUM_LENGTH"
,
SLong
(
21
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"CHARACTER_MAXIMUM_LENGTH"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"CHARACTER_OCTET_LENGTH"
,
SLong
(
21
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"CHARACTER_OCTET_LENGTH"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"NUMERIC_PRECISION"
,
SLong
(
21
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"NUMERIC_PRECISION"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"NUMERIC_SCALE"
,
SLong
(
21
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"NUMERIC_SCALE"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"DATETIME_PRECISION"
,
ULonglong
(),
NULLABLE
,
OPEN_FRM_ONLY
),
{
"DATETIME_PRECISION"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
Column
(
"CHARACTER_SET_NAME"
,
Varchar
(
64
),
NULLABLE
,
OPEN_FULL_TABLE
),
0
,
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
OPEN_FRM_ONLY
},
Column
(
"COLLATION_NAME"
,
Varchar
(
64
),
NULLABLE
,
OPEN_FULL_TABLE
),
{
"CHARACTER_SET_NAME"
,
64
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"DTD_IDENTIFIER"
,
Longtext
(
65535
),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"COLLATION_NAME"
,
64
,
MYSQL_TYPE_STRING
,
0
,
1
,
0
,
OPEN_FULL_TABLE
},
Column
(
"ROUTINE_TYPE"
,
Varchar
(
9
),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"DTD_IDENTIFIER"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
CEnd
()
{
"ROUTINE_TYPE"
,
9
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
}
};
};
ST_FIELD_INFO
tablespaces_fields_info
[]
=
ST_FIELD_INFO
tablespaces_fields_info
[]
=
{
{
{
"TABLESPACE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"TABLESPACE_NAME"
,
Name
(),
NOT_NULL
),
SKIP_OPEN_TABLE
},
Column
(
"ENGINE"
,
Name
(),
NOT_NULL
),
{
"ENGINE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TABLESPACE_TYPE"
,
Name
(),
NULLABLE
),
{
"TABLESPACE_TYPE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
Column
(
"LOGFILE_GROUP_NAME"
,
Name
(),
NULLABLE
),
0
,
SKIP_OPEN_TABLE
},
Column
(
"EXTENT_SIZE"
,
ULonglong
(),
NULLABLE
),
{
"LOGFILE_GROUP_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
Column
(
"AUTOEXTEND_SIZE"
,
ULonglong
(),
NULLABLE
),
0
,
SKIP_OPEN_TABLE
},
Column
(
"MAXIMUM_SIZE"
,
ULonglong
(),
NULLABLE
),
{
"EXTENT_SIZE"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"NODEGROUP_ID"
,
ULonglong
(),
NULLABLE
),
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"TABLESPACE_COMMENT"
,
Varchar
(
2048
),
NULLABLE
),
{
"AUTOEXTEND_SIZE"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
CEnd
()
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
,
0
,
SKIP_OPEN_TABLE
},
{
"MAXIMUM_SIZE"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
,
0
,
SKIP_OPEN_TABLE
},
{
"NODEGROUP_ID"
,
21
,
MYSQL_TYPE_LONGLONG
,
0
,
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
,
0
,
SKIP_OPEN_TABLE
},
{
"TABLESPACE_COMMENT"
,
2048
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
0
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
keycache_fields_info
[]
=
ST_FIELD_INFO
keycache_fields_info
[]
=
{
{
{
"KEY_CACHE_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"KEY_CACHE_NAME"
,
Varchar
(
NAME_LEN
),
NOT_NULL
),
{
"SEGMENTS"
,
3
,
MYSQL_TYPE_LONG
,
0
,
Column
(
"SEGMENTS"
,
ULong
(
3
),
NULLABLE
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
)
,
0
,
SKIP_OPEN_TABLE
},
Column
(
"SEGMENT_NUMBER"
,
ULong
(
3
),
NULLABLE
),
{
"SEGMENT_NUMBER"
,
3
,
MYSQL_TYPE_LONG
,
0
,
Column
(
"FULL_SIZE"
,
ULonglong
(),
NOT_NULL
),
(
MY_I_S_MAYBE_NULL
|
MY_I_S_UNSIGNED
),
0
,
SKIP_OPEN_TABLE
},
Column
(
"BLOCK_SIZE"
,
ULonglong
(),
NOT_NULL
),
{
"FULL_SIZE"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"USED_BLOCKS"
,
ULonglong
(),
NOT_NULL
,
"Key_blocks_used"
),
(
MY_I_S_UNSIGNED
),
0
,
SKIP_OPEN_TABLE
},
Column
(
"UNUSED_BLOCKS"
,
ULonglong
(),
NOT_NULL
,
"Key_blocks_unused"
),
{
"BLOCK_SIZE"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"DIRTY_BLOCKS"
,
ULonglong
(),
NOT_NULL
,
"Key_blocks_not_flushed"
),
(
MY_I_S_UNSIGNED
),
0
,
SKIP_OPEN_TABLE
},
Column
(
"READ_REQUESTS"
,
ULonglong
(),
NOT_NULL
,
"Key_read_requests"
),
{
"USED_BLOCKS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"READS"
,
ULonglong
(),
NOT_NULL
,
"Key_reads"
),
(
MY_I_S_UNSIGNED
),
"Key_blocks_used"
,
SKIP_OPEN_TABLE
},
Column
(
"WRITE_REQUESTS"
,
ULonglong
(),
NOT_NULL
,
"Key_write_requests"
),
{
"UNUSED_BLOCKS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
Column
(
"WRITES"
,
ULonglong
(),
NOT_NULL
,
"Key_writes"
),
(
MY_I_S_UNSIGNED
),
"Key_blocks_unused"
,
SKIP_OPEN_TABLE
},
CEnd
()
{
"DIRTY_BLOCKS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_UNSIGNED
),
"Key_blocks_not_flushed"
,
SKIP_OPEN_TABLE
},
{
"READ_REQUESTS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_UNSIGNED
),
"Key_read_requests"
,
SKIP_OPEN_TABLE
},
{
"READS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_UNSIGNED
),
"Key_reads"
,
SKIP_OPEN_TABLE
},
{
"WRITE_REQUESTS"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_UNSIGNED
),
"Key_write_requests"
,
SKIP_OPEN_TABLE
},
{
"WRITES"
,
MY_INT64_NUM_DECIMAL_DIGITS
,
MYSQL_TYPE_LONGLONG
,
0
,
(
MY_I_S_UNSIGNED
),
"Key_writes"
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
ST_FIELD_INFO
show_explain_fields_info
[]
=
ST_FIELD_INFO
show_explain_fields_info
[]
=
{
{
/* field_name, length, type, value, field_flags, old_name*/
Column
(
"id"
,
SLonglong
(
3
),
NULLABLE
,
"id"
),
{
"id"
,
3
,
MYSQL_TYPE_LONGLONG
,
0
/*value*/
,
MY_I_S_MAYBE_NULL
,
"id"
,
Column
(
"select_type"
,
Varchar
(
19
),
NOT_NULL
,
"select_type"
),
SKIP_OPEN_TABLE
},
Column
(
"table"
,
Name
(),
NULLABLE
,
"table"
),
{
"select_type"
,
19
,
MYSQL_TYPE_STRING
,
0
/*value*/
,
0
,
"select_type"
,
Column
(
"type"
,
Varchar
(
15
),
NULLABLE
,
"type"
),
SKIP_OPEN_TABLE
},
Column
(
"possible_keys"
,
Varchar
(
NAME_CHAR_LEN
*
MAX_KEY
),
NULLABLE
,
"possible_keys"
),
{
"table"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
/*value*/
,
MY_I_S_MAYBE_NULL
,
Column
(
"key"
,
Varchar
(
NAME_CHAR_LEN
*
MAX_KEY
),
NULLABLE
,
"key"
),
"table"
,
SKIP_OPEN_TABLE
},
Column
(
"key_len"
,
Varchar
(
NAME_CHAR_LEN
*
MAX_KEY
),
NULLABLE
,
"key_len"
),
{
"type"
,
15
,
MYSQL_TYPE_STRING
,
0
,
MY_I_S_MAYBE_NULL
,
"type"
,
SKIP_OPEN_TABLE
},
Column
(
"ref"
,
Varchar
(
NAME_CHAR_LEN
*
MAX_REF_PARTS
),
NULLABLE
,
"ref"
),
{
"possible_keys"
,
NAME_CHAR_LEN
*
MAX_KEY
,
MYSQL_TYPE_STRING
,
0
/*value*/
,
Column
(
"rows"
,
SLonglong
(
10
),
NULLABLE
,
"rows"
),
MY_I_S_MAYBE_NULL
,
"possible_keys"
,
SKIP_OPEN_TABLE
},
Column
(
"Extra"
,
Varchar
(
255
),
NOT_NULL
,
"Extra"
),
{
"key"
,
NAME_CHAR_LEN
*
MAX_KEY
,
MYSQL_TYPE_STRING
,
0
/*value*/
,
CEnd
()
MY_I_S_MAYBE_NULL
,
"key"
,
SKIP_OPEN_TABLE
},
{
"key_len"
,
NAME_CHAR_LEN
*
MAX_KEY
,
MYSQL_TYPE_STRING
,
0
/*value*/
,
MY_I_S_MAYBE_NULL
,
"key_len"
,
SKIP_OPEN_TABLE
},
{
"ref"
,
NAME_CHAR_LEN
*
MAX_REF_PARTS
,
MYSQL_TYPE_STRING
,
0
/*value*/
,
MY_I_S_MAYBE_NULL
,
"ref"
,
SKIP_OPEN_TABLE
},
{
"rows"
,
10
,
MYSQL_TYPE_LONGLONG
,
0
/*value*/
,
MY_I_S_MAYBE_NULL
,
"rows"
,
SKIP_OPEN_TABLE
},
{
"Extra"
,
255
,
MYSQL_TYPE_STRING
,
0
/*value*/
,
0
/*flags*/
,
"Extra"
,
SKIP_OPEN_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
#ifdef HAVE_SPATIAL
#ifdef HAVE_SPATIAL
ST_FIELD_INFO
geometry_columns_fields_info
[]
=
ST_FIELD_INFO
geometry_columns_fields_info
[]
=
{
{
{
"F_TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"F_TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"F_TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"F_TABLE_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"F_TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"F_TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"F_GEOMETRY_COLUMN"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Field"
,
Column
(
"F_GEOMETRY_COLUMN"
,
Name
(),
NOT_NULL
,
"Field"
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"G_TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"G_TABLE_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"G_TABLE_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"G_TABLE_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"G_TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"G_TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"G_GEOMETRY_COLUMN"
,
Name
(),
NOT_NULL
,
"Field"
,
OPEN_FRM_ONLY
),
{
"G_GEOMETRY_COLUMN"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Field"
,
Column
(
"STORAGE_TYPE"
,
STiny
(
2
),
NOT_NULL
,
OPEN_FRM_ONLY
),
OPEN_FRM_ONLY
},
Column
(
"GEOMETRY_TYPE"
,
SLong
(
7
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"STORAGE_TYPE"
,
2
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"COORD_DIMENSION"
,
STiny
(
2
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"GEOMETRY_TYPE"
,
7
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"MAX_PPR"
,
STiny
(
2
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"COORD_DIMENSION"
,
2
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
Column
(
"SRID"
,
SShort
(
5
),
NOT_NULL
,
OPEN_FRM_ONLY
),
{
"MAX_PPR"
,
2
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
CEnd
()
{
"SRID"
,
5
,
MYSQL_TYPE_SHORT
,
0
,
0
,
0
,
OPEN_FRM_ONLY
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
};
};
ST_FIELD_INFO
spatial_ref_sys_fields_info
[]
=
ST_FIELD_INFO
spatial_ref_sys_fields_info
[]
=
{
{
{
"SRID"
,
5
,
MYSQL_TYPE_SHORT
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"SRID"
,
SShort
(
5
),
NOT_NULL
)
,
{
"AUTH_NAME"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"AUTH_NAME"
,
Varchar
(
FN_REFLEN
),
NOT_NULL
)
,
{
"AUTH_SRID"
,
5
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"AUTH_SRID"
,
SLong
(
5
),
NOT_NULL
)
,
{
"SRTEXT"
,
2048
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
,
Column
(
"SRTEXT"
,
Varchar
(
2048
),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
#endif
/*HAVE_SPATIAL*/
#endif
/*HAVE_SPATIAL*/
ST_FIELD_INFO
check_constraints_fields_info
[]
=
ST_FIELD_INFO
check_constraints_fields_info
[]
=
{
{
{
"CONSTRAINT_CATALOG"
,
FN_REFLEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
Column
(
"CONSTRAINT_CATALOG"
,
Catalog
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"CONSTRAINT_SCHEMA"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"CONSTRAINT_SCHEMA"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"CONSTRAINT_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"CONSTRAINT_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
OPEN_FULL_TABLE
},
Column
(
"CHECK_CLAUSE"
,
Name
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
{
"TABLE_NAME"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
CEnd
()
{
"CHECK_CLAUSE"
,
NAME_CHAR_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
OPEN_FULL_TABLE
},
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
SKIP_OPEN_TABLE
}
};
};
};
// namespace Show
namespace
Show
{
/** For creating fields of information_schema.OPTIMIZER_TRACE */
/** For creating fields of information_schema.OPTIMIZER_TRACE */
extern
ST_FIELD_INFO
optimizer_trace_info
[];
extern
ST_FIELD_INFO
optimizer_trace_info
[];
}
//namespace Show
/*
/*
Description of ST_FIELD_INFO in table.h
Description of ST_FIELD_INFO in table.h
...
@@ -9717,106 +9589,106 @@ extern ST_FIELD_INFO optimizer_trace_info[];
...
@@ -9717,106 +9589,106 @@ extern ST_FIELD_INFO optimizer_trace_info[];
ST_SCHEMA_TABLE
schema_tables
[]
=
ST_SCHEMA_TABLE
schema_tables
[]
=
{
{
{
"ALL_PLUGINS"
,
plugin_fields_info
,
0
,
{
"ALL_PLUGINS"
,
Show
::
plugin_fields_info
,
0
,
fill_all_plugins
,
make_old_format
,
0
,
5
,
-
1
,
0
,
0
},
fill_all_plugins
,
make_old_format
,
0
,
5
,
-
1
,
0
,
0
},
{
"APPLICABLE_ROLES"
,
applicable_roles_fields_info
,
0
,
{
"APPLICABLE_ROLES"
,
Show
::
applicable_roles_fields_info
,
0
,
fill_schema_applicable_roles
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_applicable_roles
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"CHARACTER_SETS"
,
charsets_fields_info
,
0
,
{
"CHARACTER_SETS"
,
Show
::
charsets_fields_info
,
0
,
fill_schema_charsets
,
make_character_sets_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_charsets
,
make_character_sets_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"CHECK_CONSTRAINTS"
,
check_constraints_fields_info
,
0
,
{
"CHECK_CONSTRAINTS"
,
Show
::
check_constraints_fields_info
,
0
,
get_all_tables
,
0
,
get_check_constraints_record
,
1
,
2
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
get_all_tables
,
0
,
get_check_constraints_record
,
1
,
2
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
{
"COLLATIONS"
,
collation_fields_info
,
0
,
{
"COLLATIONS"
,
Show
::
collation_fields_info
,
0
,
fill_schema_collation
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_collation
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"COLLATION_CHARACTER_SET_APPLICABILITY"
,
coll_charset_app_fields_info
,
{
"COLLATION_CHARACTER_SET_APPLICABILITY"
,
Show
::
coll_charset_app_fields_info
,
0
,
fill_schema_coll_charset_app
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
0
,
fill_schema_coll_charset_app
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"COLUMNS"
,
columns_fields_info
,
0
,
{
"COLUMNS"
,
Show
::
columns_fields_info
,
0
,
get_all_tables
,
make_columns_old_format
,
get_schema_column_record
,
1
,
2
,
0
,
get_all_tables
,
make_columns_old_format
,
get_schema_column_record
,
1
,
2
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_VIEW_FULL
},
OPTIMIZE_I_S_TABLE
|
OPEN_VIEW_FULL
},
{
"COLUMN_PRIVILEGES"
,
column_privileges_fields_info
,
0
,
{
"COLUMN_PRIVILEGES"
,
Show
::
column_privileges_fields_info
,
0
,
fill_schema_column_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_column_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"ENABLED_ROLES"
,
enabled_roles_fields_info
,
0
,
{
"ENABLED_ROLES"
,
Show
::
enabled_roles_fields_info
,
0
,
fill_schema_enabled_roles
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_enabled_roles
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"ENGINES"
,
engines_fields_info
,
0
,
{
"ENGINES"
,
Show
::
engines_fields_info
,
0
,
fill_schema_engines
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_engines
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
#ifdef HAVE_EVENT_SCHEDULER
#ifdef HAVE_EVENT_SCHEDULER
{
"EVENTS"
,
events_fields_info
,
0
,
{
"EVENTS"
,
Show
::
events_fields_info
,
0
,
Events
::
fill_schema_events
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
Events
::
fill_schema_events
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
#else
#else
{
"EVENTS"
,
events_fields_info
,
0
,
{
"EVENTS"
,
Show
::
events_fields_info
,
0
,
0
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
0
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
#endif
#endif
{
"EXPLAIN"
,
show_explain_fields_info
,
0
,
fill_show_explain
,
{
"EXPLAIN"
,
Show
::
show_explain_fields_info
,
0
,
fill_show_explain
,
make_old_format
,
0
,
-
1
,
-
1
,
TRUE
/*hidden*/
,
0
},
make_old_format
,
0
,
-
1
,
-
1
,
TRUE
/*hidden*/
,
0
},
{
"FILES"
,
files_fields_info
,
0
,
{
"FILES"
,
Show
::
files_fields_info
,
0
,
hton_fill_schema_table
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
hton_fill_schema_table
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"GLOBAL_STATUS"
,
variables_fields_info
,
0
,
{
"GLOBAL_STATUS"
,
Show
::
variables_fields_info
,
0
,
fill_status
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
fill_status
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
{
"GLOBAL_VARIABLES"
,
variables_fields_info
,
0
,
{
"GLOBAL_VARIABLES"
,
Show
::
variables_fields_info
,
0
,
fill_variables
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
fill_variables
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
{
"KEY_CACHES"
,
keycache_fields_info
,
0
,
{
"KEY_CACHES"
,
Show
::
keycache_fields_info
,
0
,
fill_key_cache_tables
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_key_cache_tables
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"KEY_COLUMN_USAGE"
,
key_column_usage_fields_info
,
0
,
{
"KEY_COLUMN_USAGE"
,
Show
::
key_column_usage_fields_info
,
0
,
get_all_tables
,
0
,
get_schema_key_column_usage_record
,
4
,
5
,
0
,
get_all_tables
,
0
,
get_schema_key_column_usage_record
,
4
,
5
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
{
"OPEN_TABLES"
,
open_tables_fields_info
,
0
,
{
"OPEN_TABLES"
,
Show
::
open_tables_fields_info
,
0
,
fill_open_tables
,
make_old_format
,
0
,
-
1
,
-
1
,
1
,
0
},
fill_open_tables
,
make_old_format
,
0
,
-
1
,
-
1
,
1
,
0
},
{
"OPTIMIZER_TRACE"
,
optimizer_trace_info
,
0
,
{
"OPTIMIZER_TRACE"
,
Show
::
optimizer_trace_info
,
0
,
fill_optimizer_trace_info
,
NULL
,
NULL
,
-
1
,
-
1
,
false
,
0
},
fill_optimizer_trace_info
,
NULL
,
NULL
,
-
1
,
-
1
,
false
,
0
},
{
"PARAMETERS"
,
parameters_fields_info
,
0
,
{
"PARAMETERS"
,
Show
::
parameters_fields_info
,
0
,
fill_schema_proc
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_proc
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"PARTITIONS"
,
partitions_fields_info
,
0
,
{
"PARTITIONS"
,
Show
::
partitions_fields_info
,
0
,
get_all_tables
,
0
,
get_schema_partitions_record
,
1
,
2
,
0
,
get_all_tables
,
0
,
get_schema_partitions_record
,
1
,
2
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
{
"PLUGINS"
,
plugin_fields_info
,
0
,
{
"PLUGINS"
,
Show
::
plugin_fields_info
,
0
,
fill_plugins
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_plugins
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"PROCESSLIST"
,
processlist_fields_info
,
0
,
{
"PROCESSLIST"
,
Show
::
processlist_fields_info
,
0
,
fill_schema_processlist
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_processlist
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"PROFILING"
,
query_profile_statistics_info
,
0
,
{
"PROFILING"
,
Show
::
query_profile_statistics_info
,
0
,
fill_query_profile_statistics_info
,
make_profile_table_for_show
,
fill_query_profile_statistics_info
,
make_profile_table_for_show
,
NULL
,
-
1
,
-
1
,
false
,
0
},
NULL
,
-
1
,
-
1
,
false
,
0
},
{
"REFERENTIAL_CONSTRAINTS"
,
referential_constraints_fields_info
,
{
"REFERENTIAL_CONSTRAINTS"
,
Show
::
referential_constraints_fields_info
,
0
,
get_all_tables
,
0
,
get_referential_constraints_record
,
0
,
get_all_tables
,
0
,
get_referential_constraints_record
,
1
,
9
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
1
,
9
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
{
"ROUTINES"
,
proc_fields_info
,
0
,
{
"ROUTINES"
,
Show
::
proc_fields_info
,
0
,
fill_schema_proc
,
make_proc_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_proc
,
make_proc_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"SCHEMATA"
,
schema_fields_info
,
0
,
{
"SCHEMATA"
,
Show
::
schema_fields_info
,
0
,
fill_schema_schemata
,
make_schemata_old_format
,
0
,
1
,
-
1
,
0
,
0
},
fill_schema_schemata
,
make_schemata_old_format
,
0
,
1
,
-
1
,
0
,
0
},
{
"SCHEMA_PRIVILEGES"
,
schema_privileges_fields_info
,
0
,
{
"SCHEMA_PRIVILEGES"
,
Show
::
schema_privileges_fields_info
,
0
,
fill_schema_schema_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_schema_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"SESSION_STATUS"
,
variables_fields_info
,
0
,
{
"SESSION_STATUS"
,
Show
::
variables_fields_info
,
0
,
fill_status
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
fill_status
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
{
"SESSION_VARIABLES"
,
variables_fields_info
,
0
,
{
"SESSION_VARIABLES"
,
Show
::
variables_fields_info
,
0
,
fill_variables
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
fill_variables
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
{
"STATISTICS"
,
stat_fields_info
,
0
,
{
"STATISTICS"
,
Show
::
stat_fields_info
,
0
,
get_all_tables
,
make_old_format
,
get_schema_stat_record
,
1
,
2
,
0
,
get_all_tables
,
make_old_format
,
get_schema_stat_record
,
1
,
2
,
0
,
OPEN_TABLE_ONLY
|
OPTIMIZE_I_S_TABLE
},
OPEN_TABLE_ONLY
|
OPTIMIZE_I_S_TABLE
},
{
"SYSTEM_VARIABLES"
,
sysvars_fields_info
,
0
,
{
"SYSTEM_VARIABLES"
,
Show
::
sysvars_fields_info
,
0
,
fill_sysvars
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
fill_sysvars
,
make_old_format
,
0
,
0
,
-
1
,
0
,
0
},
{
"TABLES"
,
tables_fields_info
,
0
,
{
"TABLES"
,
Show
::
tables_fields_info
,
0
,
get_all_tables
,
make_old_format
,
get_schema_tables_record
,
1
,
2
,
0
,
get_all_tables
,
make_old_format
,
get_schema_tables_record
,
1
,
2
,
0
,
OPTIMIZE_I_S_TABLE
},
OPTIMIZE_I_S_TABLE
},
{
"TABLESPACES"
,
tablespaces_fields_info
,
0
,
{
"TABLESPACES"
,
Show
::
tablespaces_fields_info
,
0
,
hton_fill_schema_table
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
hton_fill_schema_table
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"TABLE_CONSTRAINTS"
,
table_constraints_fields_info
,
0
,
{
"TABLE_CONSTRAINTS"
,
Show
::
table_constraints_fields_info
,
0
,
get_all_tables
,
0
,
get_schema_constraints_record
,
3
,
4
,
0
,
get_all_tables
,
0
,
get_schema_constraints_record
,
3
,
4
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
OPTIMIZE_I_S_TABLE
|
OPEN_TABLE_ONLY
},
{
"TABLE_NAMES"
,
table_names_fields_info
,
0
,
{
"TABLE_NAMES"
,
Show
::
table_names_fields_info
,
0
,
get_all_tables
,
make_table_names_old_format
,
0
,
1
,
2
,
1
,
OPTIMIZE_I_S_TABLE
},
get_all_tables
,
make_table_names_old_format
,
0
,
1
,
2
,
1
,
OPTIMIZE_I_S_TABLE
},
{
"TABLE_PRIVILEGES"
,
table_privileges_fields_info
,
0
,
{
"TABLE_PRIVILEGES"
,
Show
::
table_privileges_fields_info
,
0
,
fill_schema_table_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_table_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"TRIGGERS"
,
triggers_fields_info
,
0
,
{
"TRIGGERS"
,
Show
::
triggers_fields_info
,
0
,
get_all_tables
,
make_old_format
,
get_schema_triggers_record
,
5
,
6
,
0
,
get_all_tables
,
make_old_format
,
get_schema_triggers_record
,
5
,
6
,
0
,
OPEN_TRIGGER_ONLY
|
OPTIMIZE_I_S_TABLE
},
OPEN_TRIGGER_ONLY
|
OPTIMIZE_I_S_TABLE
},
{
"USER_PRIVILEGES"
,
user_privileges_fields_info
,
0
,
{
"USER_PRIVILEGES"
,
Show
::
user_privileges_fields_info
,
0
,
fill_schema_user_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_schema_user_privileges
,
0
,
0
,
-
1
,
-
1
,
0
,
0
},
{
"VIEWS"
,
view_fields_info
,
0
,
{
"VIEWS"
,
Show
::
view_fields_info
,
0
,
get_all_tables
,
0
,
get_schema_views_record
,
1
,
2
,
0
,
get_all_tables
,
0
,
get_schema_views_record
,
1
,
2
,
0
,
OPEN_VIEW_ONLY
|
OPTIMIZE_I_S_TABLE
},
OPEN_VIEW_ONLY
|
OPTIMIZE_I_S_TABLE
},
#ifdef HAVE_SPATIAL
#ifdef HAVE_SPATIAL
{
"GEOMETRY_COLUMNS"
,
geometry_columns_fields_info
,
0
,
{
"GEOMETRY_COLUMNS"
,
Show
::
geometry_columns_fields_info
,
0
,
get_all_tables
,
make_columns_old_format
,
get_geometry_column_record
,
get_all_tables
,
make_columns_old_format
,
get_geometry_column_record
,
1
,
2
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_VIEW_FULL
},
1
,
2
,
0
,
OPTIMIZE_I_S_TABLE
|
OPEN_VIEW_FULL
},
{
"SPATIAL_REF_SYS"
,
spatial_ref_sys_fields_info
,
0
,
{
"SPATIAL_REF_SYS"
,
Show
::
spatial_ref_sys_fields_info
,
0
,
fill_spatial_ref_sys
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
fill_spatial_ref_sys
,
make_old_format
,
0
,
-
1
,
-
1
,
0
,
0
},
#endif
/*HAVE_SPATIAL*/
#endif
/*HAVE_SPATIAL*/
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
...
...
sql/sql_show.h
View file @
4156b1a2
...
@@ -117,9 +117,7 @@ bool show_create_trigger(THD *thd, const sp_name *trg_name);
...
@@ -117,9 +117,7 @@ bool show_create_trigger(THD *thd, const sp_name *trg_name);
void
view_store_options
(
THD
*
thd
,
TABLE_LIST
*
table
,
String
*
buff
);
void
view_store_options
(
THD
*
thd
,
TABLE_LIST
*
table
,
String
*
buff
);
void
init_fill_schema_files_row
(
TABLE
*
table
);
void
init_fill_schema_files_row
(
TABLE
*
table
);
bool
schema_table_store_record
(
THD
*
thd
,
TABLE
*
table
);
void
initialize_information_schema_acl
();
void
initialize_information_schema_acl
();
COND
*
make_cond_for_info_schema
(
THD
*
thd
,
COND
*
cond
,
TABLE_LIST
*
table
);
ST_SCHEMA_TABLE
*
find_schema_table
(
THD
*
thd
,
const
LEX_CSTRING
*
table_name
,
ST_SCHEMA_TABLE
*
find_schema_table
(
THD
*
thd
,
const
LEX_CSTRING
*
table_name
,
bool
*
in_plugin
);
bool
*
in_plugin
);
...
...
sql/table.h
View file @
4156b1a2
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "thr_lock.h"
/* thr_lock_type */
#include "thr_lock.h"
/* thr_lock_type */
#include "filesort_utils.h"
#include "filesort_utils.h"
#include "parse_file.h"
#include "parse_file.h"
#include "sql_i_s.h"
/* Structs that defines the TABLE */
/* Structs that defines the TABLE */
...
@@ -1662,86 +1663,6 @@ typedef struct st_foreign_key_info
...
@@ -1662,86 +1663,6 @@ typedef struct st_foreign_key_info
LEX_CSTRING
*
fk_option_name
(
enum_fk_option
opt
);
LEX_CSTRING
*
fk_option_name
(
enum_fk_option
opt
);
bool
fk_modifies_child
(
enum_fk_option
opt
);
bool
fk_modifies_child
(
enum_fk_option
opt
);
#define MY_I_S_MAYBE_NULL 1U
#define MY_I_S_UNSIGNED 2U
#define SKIP_OPEN_TABLE 0U // do not open table
#define OPEN_FRM_ONLY 1U // open FRM file only
#define OPEN_FULL_TABLE 2U // open FRM,MYD, MYI files
struct
ST_FIELD_INFO
{
/**
This is used as column name.
*/
const
char
*
field_name
;
/**
For string-type columns, this is the maximum number of
characters. Otherwise, it is the 'display-length' for the column.
*/
uint
field_length
;
/**
This denotes data type for the column. For the most part, there seems to
be one entry in the enum for each SQL data type, although there seem to
be a number of additional entries in the enum.
*/
enum
enum_field_types
field_type
;
int
value
;
/**
This is used to set column attributes. By default, columns are @c NOT
@c NULL and @c SIGNED, and you can deviate from the default
by setting the appopriate flags. You can use either one of the flags
@c MY_I_S_MAYBE_NULL and @cMY_I_S_UNSIGNED or
combine them using the bitwise or operator @c |. Both flags are
defined in table.h.
*/
uint
field_flags
;
// Field atributes(maybe_null, signed, unsigned etc.)
const
char
*
old_name
;
/**
This should be one of @c SKIP_OPEN_TABLE,
@c OPEN_FRM_ONLY or @c OPEN_FULL_TABLE.
*/
uint
open_method
;
LEX_CSTRING
get_name
()
const
{
return
LEX_CSTRING
({
field_name
,
strlen
(
field_name
)});
}
LEX_CSTRING
get_old_name
()
const
{
return
LEX_CSTRING
({
old_name
,
strlen
(
old_name
)});
}
bool
unsigned_flag
()
const
{
return
field_flags
&
MY_I_S_UNSIGNED
;
}
uint
fsp
()
const
{
DBUG_ASSERT
(
field_length
<=
TIME_SECOND_PART_DIGITS
);
return
field_length
;
}
};
struct
TABLE_LIST
;
typedef
class
Item
COND
;
typedef
struct
st_schema_table
{
const
char
*
table_name
;
ST_FIELD_INFO
*
fields_info
;
/* for FLUSH table_name */
int
(
*
reset_table
)
();
/* Fill table with data */
int
(
*
fill_table
)
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
);
/* Handle fileds for old SHOW */
int
(
*
old_format
)
(
THD
*
thd
,
struct
st_schema_table
*
schema_table
);
int
(
*
process_table
)
(
THD
*
thd
,
TABLE_LIST
*
tables
,
TABLE
*
table
,
bool
res
,
const
LEX_CSTRING
*
db_name
,
const
LEX_CSTRING
*
table_name
);
int
idx_field1
,
idx_field2
;
bool
hidden
;
uint
i_s_requested_object
;
/* the object we need to open(TABLE | VIEW) */
}
ST_SCHEMA_TABLE
;
class
IS_table_read_plan
;
class
IS_table_read_plan
;
/*
/*
...
...
sql/thread_pool_info.cc
View file @
4156b1a2
...
@@ -18,24 +18,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
...
@@ -18,24 +18,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
#include <my_global.h>
#include <my_global.h>
#include <sql_class.h>
#include <sql_class.h>
#include <
table
.h>
#include <
sql_i_s
.h>
#include <mysql/plugin.h>
#include <mysql/plugin.h>
#include <sql_show.h>
#include <sql_show.h>
#include <threadpool_generic.h>
#include <threadpool_generic.h>
namespace
Show
{
static
ST_FIELD_INFO
groups_fields_info
[]
=
static
ST_FIELD_INFO
groups_fields_info
[]
=
{
{
{
"GROUP_ID"
,
6
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"GROUP_ID"
,
SLong
(
6
),
NOT_NULL
)
,
{
"CONNECTIONS"
,
6
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"CONNECTIONS"
,
SLong
(
6
),
NOT_NULL
)
,
{
"THREADS"
,
6
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"THREADS"
,
SLong
(
6
),
NOT_NULL
)
,
{
"ACTIVE_THREADS"
,
6
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"ACTIVE_THREADS"
,
SLong
(
6
),
NOT_NULL
)
,
{
"STANDBY_THREADS"
,
6
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"STANDBY_THREADS"
,
SLong
(
6
),
NOT_NULL
)
,
{
"QUEUE_LENGTH"
,
6
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"QUEUE_LENGTH"
,
SLong
(
6
),
NOT_NULL
)
,
{
"HAS_LISTENER"
,
1
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
0
}
,
Column
(
"HAS_LISTENER"
,
STiny
(
1
),
NOT_NULL
)
,
{
"IS_STALLED"
,
1
,
MYSQL_TYPE_TINY
,
0
,
0
,
0
,
0
}
,
Column
(
"IS_STALLED"
,
STiny
(
1
),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
static
int
groups_fill_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
)
static
int
groups_fill_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
)
{
{
if
(
!
all_groups
)
if
(
!
all_groups
)
...
@@ -74,22 +79,26 @@ static int groups_fill_table(THD* thd, TABLE_LIST* tables, COND*)
...
@@ -74,22 +79,26 @@ static int groups_fill_table(THD* thd, TABLE_LIST* tables, COND*)
static
int
groups_init
(
void
*
p
)
static
int
groups_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
groups_fields_info
;
schema
->
fields_info
=
Show
::
groups_fields_info
;
schema
->
fill_table
=
groups_fill_table
;
schema
->
fill_table
=
groups_fill_table
;
return
0
;
return
0
;
}
}
namespace
Show
{
static
ST_FIELD_INFO
queues_field_info
[]
=
static
ST_FIELD_INFO
queues_field_info
[]
=
{
{
{
"GROUP_ID"
,
6
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"GROUP_ID"
,
SLong
(
6
),
NOT_NULL
)
,
{
"POSITION"
,
6
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"POSITION"
,
SLong
(
6
),
NOT_NULL
)
,
{
"PRIORITY"
,
1
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"PRIORITY"
,
SLong
(
1
),
NOT_NULL
)
,
{
"CONNECTION_ID"
,
19
,
MYSQL_TYPE_LONGLONG
,
MY_I_S_UNSIGNED
,
0
,
0
,
0
}
,
Column
(
"CONNECTION_ID"
,
ULonglong
(
19
),
NOT_NULL
)
,
{
"QUEUEING_TIME_MICROSECONDS"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"QUEUEING_TIME_MICROSECONDS"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_NULL
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
typedef
connection_queue_t
::
Iterator
connection_queue_iterator
;
typedef
connection_queue_t
::
Iterator
connection_queue_iterator
;
static
int
queues_fill_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
)
static
int
queues_fill_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
)
...
@@ -140,27 +149,32 @@ static int queues_fill_table(THD* thd, TABLE_LIST* tables, COND*)
...
@@ -140,27 +149,32 @@ static int queues_fill_table(THD* thd, TABLE_LIST* tables, COND*)
static
int
queues_init
(
void
*
p
)
static
int
queues_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
queues_field_info
;
schema
->
fields_info
=
Show
::
queues_field_info
;
schema
->
fill_table
=
queues_fill_table
;
schema
->
fill_table
=
queues_fill_table
;
return
0
;
return
0
;
}
}
namespace
Show
{
static
ST_FIELD_INFO
stats_fields_info
[]
=
static
ST_FIELD_INFO
stats_fields_info
[]
=
{
{
{
"GROUP_ID"
,
6
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
,
0
}
,
Column
(
"GROUP_ID"
,
SLong
(
6
),
NOT_NULL
)
,
{
"THREAD_CREATIONS"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"THREAD_CREATIONS"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
"THREAD_CREATIONS_DUE_TO_STALL"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"THREAD_CREATIONS_DUE_TO_STALL"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
"WAKES"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"WAKES"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
"WAKES_DUE_TO_STALL"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"WAKES_DUE_TO_STALL"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
"THROTTLES"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"THROTTLES"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
"STALLS"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"STALLS"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
"POLLS_BY_LISTENER"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"POLLS_BY_LISTENER"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
"POLLS_BY_WORKER"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"POLLS_BY_WORKER"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
"DEQUEUES_BY_LISTENER"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"DEQUEUES_BY_LISTENER"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
"DEQUEUES_BY_WORKER"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"DEQUEUES_BY_WORKER"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
static
int
stats_fill_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
)
static
int
stats_fill_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
)
{
{
if
(
!
all_groups
)
if
(
!
all_groups
)
...
@@ -206,21 +220,24 @@ static int stats_reset_table()
...
@@ -206,21 +220,24 @@ static int stats_reset_table()
static
int
stats_init
(
void
*
p
)
static
int
stats_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
stats_fields_info
;
schema
->
fields_info
=
Show
::
stats_fields_info
;
schema
->
fill_table
=
stats_fill_table
;
schema
->
fill_table
=
stats_fill_table
;
schema
->
reset_table
=
stats_reset_table
;
schema
->
reset_table
=
stats_reset_table
;
return
0
;
return
0
;
}
}
namespace
Show
{
static
ST_FIELD_INFO
waits_fields_info
[]
=
static
ST_FIELD_INFO
waits_fields_info
[]
=
{
{
{
"REASON"
,
16
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
,
Column
(
"REASON"
,
Varchar
(
16
),
NOT_NULL
)
,
{
"COUNT"
,
19
,
MYSQL_TYPE_LONGLONG
,
0
,
0
,
0
,
0
}
,
Column
(
"COUNT"
,
SLonglong
(
19
),
NOT_NULL
)
,
{
0
,
0
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
,
0
}
CEnd
()
};
};
}
// namespace Show
/* See thd_wait_type enum for explanation*/
/* See thd_wait_type enum for explanation*/
static
const
LEX_CSTRING
wait_reasons
[
THD_WAIT_LAST
]
=
static
const
LEX_CSTRING
wait_reasons
[
THD_WAIT_LAST
]
=
{
{
...
@@ -267,7 +284,7 @@ static int waits_reset_table()
...
@@ -267,7 +284,7 @@ static int waits_reset_table()
static
int
waits_init
(
void
*
p
)
static
int
waits_init
(
void
*
p
)
{
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
waits_fields_info
;
schema
->
fields_info
=
Show
::
waits_fields_info
;
schema
->
fill_table
=
waits_fill_table
;
schema
->
fill_table
=
waits_fill_table
;
schema
->
reset_table
=
waits_reset_table
;
schema
->
reset_table
=
waits_reset_table
;
return
0
;
return
0
;
...
...
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