mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-19772 Add helper classes for ST_FIELD_INFO
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
#define MYSQL_SERVER
|
||||
#include <my_global.h>
|
||||
#include <sql_class.h>
|
||||
#include <table.h>
|
||||
#include <sql_i_s.h>
|
||||
#include <sql_show.h>
|
||||
|
||||
|
||||
@ -42,16 +42,18 @@ static const LEX_CSTRING unsigned_result_types[]=
|
||||
};
|
||||
|
||||
|
||||
namespace Show {
|
||||
|
||||
static ST_FIELD_INFO user_variables_fields_info[] =
|
||||
{
|
||||
{ "VARIABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Variable_name", 0 },
|
||||
{ "VARIABLE_VALUE", 2048, MYSQL_TYPE_STRING, 0, MY_I_S_MAYBE_NULL, "Value", 0 },
|
||||
{ "VARIABLE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, 0 },
|
||||
{ "CHARACTER_SET_NAME", MY_CS_NAME_SIZE, MYSQL_TYPE_STRING, 0,
|
||||
MY_I_S_MAYBE_NULL, 0, 0 },
|
||||
{ 0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0 }
|
||||
Column("VARIABLE_NAME", Name(), NOT_NULL, "Variable_name"),
|
||||
Column("VARIABLE_VALUE", Varchar(2048), NULLABLE, "Value"),
|
||||
Column("VARIABLE_TYPE", Name(), NOT_NULL),
|
||||
Column("CHARACTER_SET_NAME", CSName(), NULLABLE),
|
||||
CEnd()
|
||||
};
|
||||
|
||||
} // namespace Show
|
||||
|
||||
static int user_variables_fill(THD *thd, TABLE_LIST *tables, COND *cond)
|
||||
{
|
||||
@ -110,7 +112,7 @@ int user_variables_reset(void)
|
||||
static int user_variables_init(void *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->reset_table= user_variables_reset;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user