mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Cleanup patch.
There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/handler.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/item.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/mysql_priv.h: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_acl.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_error.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_error.h: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_lex.h: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_parse.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_partition.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_plugin.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_show.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_trigger.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/sql_view.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN sql/tztime.cc: There is an existing macros for initializing LEX_STRINGs with constant strings -> C_STRING_WITH_LEN. Change existing code to use it. (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN
This commit is contained in:
parent
5b7f05dea7
commit
728a924c66
14 changed files with 160 additions and 160 deletions
|
@ -72,11 +72,11 @@ ulong savepoint_alloc_size= 0;
|
|||
|
||||
static const LEX_STRING sys_table_aliases[]=
|
||||
{
|
||||
{(char*)STRING_WITH_LEN("INNOBASE")}, {(char*)STRING_WITH_LEN("INNODB")},
|
||||
{(char*)STRING_WITH_LEN("NDB")}, {(char*)STRING_WITH_LEN("NDBCLUSTER")},
|
||||
{(char*)STRING_WITH_LEN("BDB")}, {(char*)STRING_WITH_LEN("BERKELEYDB")},
|
||||
{(char*)STRING_WITH_LEN("HEAP")}, {(char*)STRING_WITH_LEN("MEMORY")},
|
||||
{(char*)STRING_WITH_LEN("MERGE")}, {(char*)STRING_WITH_LEN("MRG_MYISAM")},
|
||||
{ C_STRING_WITH_LEN("INNOBASE") }, { C_STRING_WITH_LEN("INNODB") },
|
||||
{ C_STRING_WITH_LEN("NDB") }, { C_STRING_WITH_LEN("NDBCLUSTER") },
|
||||
{ C_STRING_WITH_LEN("BDB") }, { C_STRING_WITH_LEN("BERKELEYDB") },
|
||||
{ C_STRING_WITH_LEN("HEAP") }, { C_STRING_WITH_LEN("MEMORY") },
|
||||
{ C_STRING_WITH_LEN("MERGE") }, { C_STRING_WITH_LEN("MRG_MYISAM")},
|
||||
{NullS, 0}
|
||||
};
|
||||
|
||||
|
|
|
@ -1004,7 +1004,7 @@ bool Item_splocal::set_value(THD *thd, sp_rcontext *ctx, Item **it)
|
|||
*****************************************************************************/
|
||||
|
||||
Item_case_expr::Item_case_expr(int case_expr_id)
|
||||
:Item_sp_variable((char *) STRING_WITH_LEN("case_expr")),
|
||||
:Item_sp_variable( C_STRING_WITH_LEN("case_expr")),
|
||||
m_case_expr_id(case_expr_id)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1479,7 +1479,7 @@ extern char *mysql_data_home,server_version[SERVER_VERSION_LENGTH],
|
|||
def_ft_boolean_syntax[sizeof(ft_boolean_syntax)];
|
||||
#define mysql_tmpdir (my_tmpdir(&mysql_tmpdir_list))
|
||||
extern MY_TMPDIR mysql_tmpdir_list;
|
||||
extern LEX_STRING command_name[];
|
||||
extern const LEX_STRING command_name[];
|
||||
extern const char *first_keyword, *my_localhost, *delayed_user, *binary_keyword;
|
||||
extern const char **errmesg; /* Error messages */
|
||||
extern const char *myisam_recover_options_str;
|
||||
|
|
126
sql/sql_acl.cc
126
sql/sql_acl.cc
|
@ -36,114 +36,114 @@ time_t mysql_db_table_last_check= 0L;
|
|||
|
||||
TABLE_FIELD_W_TYPE mysql_db_table_fields[MYSQL_DB_FIELD_COUNT] = {
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Host")},
|
||||
{(char *) STRING_WITH_LEN("char(60)")},
|
||||
{ C_STRING_WITH_LEN("Host") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{NULL, 0}
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Db")},
|
||||
{(char *) STRING_WITH_LEN("char(64)")},
|
||||
{ C_STRING_WITH_LEN("Db") },
|
||||
{ C_STRING_WITH_LEN("char(64)") },
|
||||
{NULL, 0}
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("User")},
|
||||
{(char *) STRING_WITH_LEN("char(16)")},
|
||||
{ C_STRING_WITH_LEN("User") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{NULL, 0}
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Select_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Select_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Insert_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Insert_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Update_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Update_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Delete_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Delete_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Create_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Create_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Drop_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Drop_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Grant_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Grant_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("References_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("References_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Index_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Index_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Alter_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Alter_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Create_tmp_table_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Create_tmp_table_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Lock_tables_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Lock_tables_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Create_view_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Create_view_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Show_view_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Show_view_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Create_routine_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Create_routine_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Alter_routine_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Alter_routine_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Execute_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Execute_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Event_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Event_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("Trigger_priv")},
|
||||
{(char *) STRING_WITH_LEN("enum('N','Y')")},
|
||||
{(char *) STRING_WITH_LEN("utf8")}
|
||||
{ C_STRING_WITH_LEN("Trigger_priv") },
|
||||
{ C_STRING_WITH_LEN("enum('N','Y')") },
|
||||
{ C_STRING_WITH_LEN("utf8") }
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -212,12 +212,12 @@ void push_warning_printf(THD *thd, MYSQL_ERROR::enum_warning_level level,
|
|||
TRUE Error sending data to client
|
||||
*/
|
||||
|
||||
LEX_STRING warning_level_names[]=
|
||||
const LEX_STRING warning_level_names[]=
|
||||
{
|
||||
{(char*) STRING_WITH_LEN("Note")},
|
||||
{(char*) STRING_WITH_LEN("Warning")},
|
||||
{(char*) STRING_WITH_LEN("Error")},
|
||||
{(char*) STRING_WITH_LEN("?")}
|
||||
{ C_STRING_WITH_LEN("Note") },
|
||||
{ C_STRING_WITH_LEN("Warning") },
|
||||
{ C_STRING_WITH_LEN("Error") },
|
||||
{ C_STRING_WITH_LEN("?") }
|
||||
};
|
||||
|
||||
bool mysqld_show_warnings(THD *thd, ulong levels_to_show)
|
||||
|
|
|
@ -41,4 +41,4 @@ void push_warning_printf(THD *thd, MYSQL_ERROR::enum_warning_level level,
|
|||
void mysql_reset_errors(THD *thd, bool force);
|
||||
bool mysqld_show_warnings(THD *thd, ulong levels_to_show);
|
||||
|
||||
extern LEX_STRING warning_level_names[];
|
||||
extern const LEX_STRING warning_level_names[];
|
||||
|
|
|
@ -149,11 +149,11 @@ enum enum_sp_data_access
|
|||
|
||||
const LEX_STRING sp_data_access_name[]=
|
||||
{
|
||||
{ (char*) STRING_WITH_LEN("") },
|
||||
{ (char*) STRING_WITH_LEN("CONTAINS SQL") },
|
||||
{ (char*) STRING_WITH_LEN("NO SQL") },
|
||||
{ (char*) STRING_WITH_LEN("READS SQL DATA") },
|
||||
{ (char*) STRING_WITH_LEN("MODIFIES SQL DATA") }
|
||||
{ C_STRING_WITH_LEN("") },
|
||||
{ C_STRING_WITH_LEN("CONTAINS SQL") },
|
||||
{ C_STRING_WITH_LEN("NO SQL") },
|
||||
{ C_STRING_WITH_LEN("READS SQL DATA") },
|
||||
{ C_STRING_WITH_LEN("MODIFIES SQL DATA") }
|
||||
};
|
||||
|
||||
#define DERIVED_SUBQUERY 1
|
||||
|
|
|
@ -72,38 +72,38 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables);
|
|||
|
||||
const char *any_db="*any*"; // Special symbol for check_access
|
||||
|
||||
LEX_STRING command_name[]={
|
||||
(char *)STRING_WITH_LEN("Sleep"),
|
||||
(char *)STRING_WITH_LEN("Quit"),
|
||||
(char *)STRING_WITH_LEN("Init DB"),
|
||||
(char *)STRING_WITH_LEN("Query"),
|
||||
(char *)STRING_WITH_LEN("Field List"),
|
||||
(char *)STRING_WITH_LEN("Create DB"),
|
||||
(char *)STRING_WITH_LEN("Drop DB"),
|
||||
(char *)STRING_WITH_LEN("Refresh"),
|
||||
(char *)STRING_WITH_LEN("Shutdown"),
|
||||
(char *)STRING_WITH_LEN("Statistics"),
|
||||
(char *)STRING_WITH_LEN("Processlist"),
|
||||
(char *)STRING_WITH_LEN("Connect"),
|
||||
(char *)STRING_WITH_LEN("Kill"),
|
||||
(char *)STRING_WITH_LEN("Debug"),
|
||||
(char *)STRING_WITH_LEN("Ping"),
|
||||
(char *)STRING_WITH_LEN("Time"),
|
||||
(char *)STRING_WITH_LEN("Delayed insert"),
|
||||
(char *)STRING_WITH_LEN("Change user"),
|
||||
(char *)STRING_WITH_LEN("Binlog Dump"),
|
||||
(char *)STRING_WITH_LEN("Table Dump"),
|
||||
(char *)STRING_WITH_LEN("Connect Out"),
|
||||
(char *)STRING_WITH_LEN("Register Slave"),
|
||||
(char *)STRING_WITH_LEN("Prepare"),
|
||||
(char *)STRING_WITH_LEN("Execute"),
|
||||
(char *)STRING_WITH_LEN("Long Data"),
|
||||
(char *)STRING_WITH_LEN("Close stmt"),
|
||||
(char *)STRING_WITH_LEN("Reset stmt"),
|
||||
(char *)STRING_WITH_LEN("Set option"),
|
||||
(char *)STRING_WITH_LEN("Fetch"),
|
||||
(char *)STRING_WITH_LEN("Daemon"),
|
||||
(char *)STRING_WITH_LEN("Error") // Last command number
|
||||
const LEX_STRING command_name[]={
|
||||
C_STRING_WITH_LEN("Sleep"),
|
||||
C_STRING_WITH_LEN("Quit"),
|
||||
C_STRING_WITH_LEN("Init DB"),
|
||||
C_STRING_WITH_LEN("Query"),
|
||||
C_STRING_WITH_LEN("Field List"),
|
||||
C_STRING_WITH_LEN("Create DB"),
|
||||
C_STRING_WITH_LEN("Drop DB"),
|
||||
C_STRING_WITH_LEN("Refresh"),
|
||||
C_STRING_WITH_LEN("Shutdown"),
|
||||
C_STRING_WITH_LEN("Statistics"),
|
||||
C_STRING_WITH_LEN("Processlist"),
|
||||
C_STRING_WITH_LEN("Connect"),
|
||||
C_STRING_WITH_LEN("Kill"),
|
||||
C_STRING_WITH_LEN("Debug"),
|
||||
C_STRING_WITH_LEN("Ping"),
|
||||
C_STRING_WITH_LEN("Time"),
|
||||
C_STRING_WITH_LEN("Delayed insert"),
|
||||
C_STRING_WITH_LEN("Change user"),
|
||||
C_STRING_WITH_LEN("Binlog Dump"),
|
||||
C_STRING_WITH_LEN("Table Dump"),
|
||||
C_STRING_WITH_LEN("Connect Out"),
|
||||
C_STRING_WITH_LEN("Register Slave"),
|
||||
C_STRING_WITH_LEN("Prepare"),
|
||||
C_STRING_WITH_LEN("Execute"),
|
||||
C_STRING_WITH_LEN("Long Data"),
|
||||
C_STRING_WITH_LEN("Close stmt"),
|
||||
C_STRING_WITH_LEN("Reset stmt"),
|
||||
C_STRING_WITH_LEN("Set option"),
|
||||
C_STRING_WITH_LEN("Fetch"),
|
||||
C_STRING_WITH_LEN("Daemon"),
|
||||
C_STRING_WITH_LEN("Error") // Last command number
|
||||
};
|
||||
|
||||
const char *xa_state_names[]={
|
||||
|
@ -4940,9 +4940,9 @@ end_with_restore_list:
|
|||
{
|
||||
String buff;
|
||||
const LEX_STRING command[3]=
|
||||
{{(char *)STRING_WITH_LEN("CREATE ")},
|
||||
{(char *)STRING_WITH_LEN("ALTER ")},
|
||||
{(char *)STRING_WITH_LEN("CREATE OR REPLACE ")}};
|
||||
{{ C_STRING_WITH_LEN("CREATE ") },
|
||||
{ C_STRING_WITH_LEN("ALTER ") },
|
||||
{ C_STRING_WITH_LEN("CREATE OR REPLACE ") }};
|
||||
thd->clear_error();
|
||||
|
||||
buff.append(command[thd->lex->create_view_mode].str,
|
||||
|
|
|
@ -46,12 +46,12 @@
|
|||
*/
|
||||
const LEX_STRING partition_keywords[]=
|
||||
{
|
||||
{ (char *) STRING_WITH_LEN("HASH") },
|
||||
{ (char *) STRING_WITH_LEN("RANGE") },
|
||||
{ (char *) STRING_WITH_LEN("LIST") },
|
||||
{ (char *) STRING_WITH_LEN("KEY") },
|
||||
{ (char *) STRING_WITH_LEN("MAXVALUE") },
|
||||
{ (char *) STRING_WITH_LEN("LINEAR ") }
|
||||
{ C_STRING_WITH_LEN("HASH") },
|
||||
{ C_STRING_WITH_LEN("RANGE") },
|
||||
{ C_STRING_WITH_LEN("LIST") },
|
||||
{ C_STRING_WITH_LEN("KEY") },
|
||||
{ C_STRING_WITH_LEN("MAXVALUE") },
|
||||
{ C_STRING_WITH_LEN("LINEAR ") }
|
||||
};
|
||||
static const char *part_str= "PARTITION";
|
||||
static const char *sub_str= "SUB";
|
||||
|
|
|
@ -25,9 +25,9 @@ char *opt_plugin_dir_ptr;
|
|||
char opt_plugin_dir[FN_REFLEN];
|
||||
const LEX_STRING plugin_type_names[MYSQL_MAX_PLUGIN_TYPE_NUM]=
|
||||
{
|
||||
{ (char *)STRING_WITH_LEN("UDF") },
|
||||
{ (char *)STRING_WITH_LEN("STORAGE ENGINE") },
|
||||
{ (char *)STRING_WITH_LEN("FTPARSER") }
|
||||
{ C_STRING_WITH_LEN("UDF") },
|
||||
{ C_STRING_WITH_LEN("STORAGE ENGINE") },
|
||||
{ C_STRING_WITH_LEN("FTPARSER") }
|
||||
};
|
||||
|
||||
plugin_type_init plugin_type_initialize[MYSQL_MAX_PLUGIN_TYPE_NUM]=
|
||||
|
|
|
@ -2159,7 +2159,7 @@ LEX_STRING *make_lex_string(THD *thd, LEX_STRING *lex_str,
|
|||
|
||||
|
||||
/* INFORMATION_SCHEMA name */
|
||||
LEX_STRING information_schema_name= {(char*)"information_schema", 18};
|
||||
LEX_STRING information_schema_name= { C_STRING_WITH_LEN("information_schema")};
|
||||
|
||||
/* This is only used internally, but we need it here as a forward reference */
|
||||
extern ST_SCHEMA_TABLE schema_tables[];
|
||||
|
@ -3189,10 +3189,10 @@ static my_bool iter_schema_engines(THD *thd, st_plugin_int *plugin,
|
|||
if (!(wild && wild[0] &&
|
||||
wild_case_compare(scs, plugin->name.str,wild)))
|
||||
{
|
||||
LEX_STRING state[2]= {{(char*) STRING_WITH_LEN("ENABLED")},
|
||||
{(char*) STRING_WITH_LEN("DISABLED")}};
|
||||
LEX_STRING yesno[2]= {{(char*) STRING_WITH_LEN("NO")},
|
||||
{(char*) STRING_WITH_LEN("YES")}};
|
||||
LEX_STRING state[2]= {{ C_STRING_WITH_LEN("ENABLED") },
|
||||
{ C_STRING_WITH_LEN("DISABLED") }};
|
||||
LEX_STRING yesno[2]= {{ C_STRING_WITH_LEN("NO") },
|
||||
{ C_STRING_WITH_LEN("YES") }};
|
||||
LEX_STRING *tmp;
|
||||
restore_record(table, s->default_values);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "parse_file.h"
|
||||
|
||||
static const LEX_STRING triggers_file_type=
|
||||
{(char *) STRING_WITH_LEN("TRIGGERS")};
|
||||
{ C_STRING_WITH_LEN("TRIGGERS") };
|
||||
|
||||
const char * const triggers_file_ext= ".TRG";
|
||||
|
||||
|
@ -35,17 +35,17 @@ const char * const triggers_file_ext= ".TRG";
|
|||
static File_option triggers_file_parameters[]=
|
||||
{
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("triggers") },
|
||||
{ C_STRING_WITH_LEN("triggers") },
|
||||
offsetof(class Table_triggers_list, definitions_list),
|
||||
FILE_OPTIONS_STRLIST
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("sql_modes") },
|
||||
{ C_STRING_WITH_LEN("sql_modes") },
|
||||
offsetof(class Table_triggers_list, definition_modes_list),
|
||||
FILE_OPTIONS_ULLLIST
|
||||
},
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("definers") },
|
||||
{ C_STRING_WITH_LEN("definers") },
|
||||
offsetof(class Table_triggers_list, definers_list),
|
||||
FILE_OPTIONS_STRLIST
|
||||
},
|
||||
|
@ -54,7 +54,7 @@ static File_option triggers_file_parameters[]=
|
|||
|
||||
File_option sql_modes_parameters=
|
||||
{
|
||||
{(char*) STRING_WITH_LEN("sql_modes") },
|
||||
{ C_STRING_WITH_LEN("sql_modes") },
|
||||
offsetof(class Table_triggers_list, definition_modes_list),
|
||||
FILE_OPTIONS_ULLLIST
|
||||
};
|
||||
|
@ -78,14 +78,14 @@ struct st_trigname
|
|||
};
|
||||
|
||||
static const LEX_STRING trigname_file_type=
|
||||
{(char *) STRING_WITH_LEN("TRIGGERNAME")};
|
||||
{ C_STRING_WITH_LEN("TRIGGERNAME") };
|
||||
|
||||
const char * const trigname_file_ext= ".TRN";
|
||||
|
||||
static File_option trigname_file_parameters[]=
|
||||
{
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("trigger_table")},
|
||||
{ C_STRING_WITH_LEN("trigger_table")},
|
||||
offsetof(struct st_trigname, trigger_table),
|
||||
FILE_OPTIONS_ESTRING
|
||||
},
|
||||
|
@ -95,15 +95,15 @@ static File_option trigname_file_parameters[]=
|
|||
|
||||
const LEX_STRING trg_action_time_type_names[]=
|
||||
{
|
||||
{ (char *) STRING_WITH_LEN("BEFORE") },
|
||||
{ (char *) STRING_WITH_LEN("AFTER") }
|
||||
{ C_STRING_WITH_LEN("BEFORE") },
|
||||
{ C_STRING_WITH_LEN("AFTER") }
|
||||
};
|
||||
|
||||
const LEX_STRING trg_event_type_names[]=
|
||||
{
|
||||
{ (char *) STRING_WITH_LEN("INSERT") },
|
||||
{ (char *) STRING_WITH_LEN("UPDATE") },
|
||||
{ (char *) STRING_WITH_LEN("DELETE") }
|
||||
{ C_STRING_WITH_LEN("INSERT") },
|
||||
{ C_STRING_WITH_LEN("UPDATE") },
|
||||
{ C_STRING_WITH_LEN("DELETE") }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#define MD5_BUFF_LENGTH 33
|
||||
|
||||
const LEX_STRING view_type= { (char*) STRING_WITH_LEN("VIEW") };
|
||||
const LEX_STRING view_type= { C_STRING_WITH_LEN("VIEW") };
|
||||
|
||||
static int mysql_register_view(THD *thd, TABLE_LIST *view,
|
||||
enum_view_create_mode mode);
|
||||
|
@ -579,40 +579,40 @@ static const int num_view_backups= 3;
|
|||
parse()
|
||||
*/
|
||||
static File_option view_parameters[]=
|
||||
{{{(char*) STRING_WITH_LEN("query")},
|
||||
{{{ C_STRING_WITH_LEN("query")},
|
||||
offsetof(TABLE_LIST, query),
|
||||
FILE_OPTIONS_ESTRING},
|
||||
{{(char*) STRING_WITH_LEN("md5")},
|
||||
{{ C_STRING_WITH_LEN("md5")},
|
||||
offsetof(TABLE_LIST, md5),
|
||||
FILE_OPTIONS_STRING},
|
||||
{{(char*) STRING_WITH_LEN("updatable")},
|
||||
{{ C_STRING_WITH_LEN("updatable")},
|
||||
offsetof(TABLE_LIST, updatable_view),
|
||||
FILE_OPTIONS_ULONGLONG},
|
||||
{{(char*) STRING_WITH_LEN("algorithm")},
|
||||
{{ C_STRING_WITH_LEN("algorithm")},
|
||||
offsetof(TABLE_LIST, algorithm),
|
||||
FILE_OPTIONS_ULONGLONG},
|
||||
{{(char*) STRING_WITH_LEN("definer_user")},
|
||||
{{ C_STRING_WITH_LEN("definer_user")},
|
||||
offsetof(TABLE_LIST, definer.user),
|
||||
FILE_OPTIONS_STRING},
|
||||
{{(char*) STRING_WITH_LEN("definer_host")},
|
||||
{{ C_STRING_WITH_LEN("definer_host")},
|
||||
offsetof(TABLE_LIST, definer.host),
|
||||
FILE_OPTIONS_STRING},
|
||||
{{(char*) STRING_WITH_LEN("suid")},
|
||||
{{ C_STRING_WITH_LEN("suid")},
|
||||
offsetof(TABLE_LIST, view_suid),
|
||||
FILE_OPTIONS_ULONGLONG},
|
||||
{{(char*) STRING_WITH_LEN("with_check_option")},
|
||||
{{ C_STRING_WITH_LEN("with_check_option")},
|
||||
offsetof(TABLE_LIST, with_check),
|
||||
FILE_OPTIONS_ULONGLONG},
|
||||
{{(char*) STRING_WITH_LEN("revision")},
|
||||
{{ C_STRING_WITH_LEN("revision")},
|
||||
offsetof(TABLE_LIST, revision),
|
||||
FILE_OPTIONS_REV},
|
||||
{{(char*) STRING_WITH_LEN("timestamp")},
|
||||
{{ C_STRING_WITH_LEN("timestamp")},
|
||||
offsetof(TABLE_LIST, timestamp),
|
||||
FILE_OPTIONS_TIMESTAMP},
|
||||
{{(char*)STRING_WITH_LEN("create-version")},
|
||||
{{ C_STRING_WITH_LEN("create-version")},
|
||||
offsetof(TABLE_LIST, file_version),
|
||||
FILE_OPTIONS_ULONGLONG},
|
||||
{{(char*) STRING_WITH_LEN("source")},
|
||||
{{ C_STRING_WITH_LEN("source")},
|
||||
offsetof(TABLE_LIST, source),
|
||||
FILE_OPTIONS_ESTRING},
|
||||
{{NullS, 0}, 0,
|
||||
|
|
|
@ -1389,15 +1389,15 @@ static bool time_zone_tables_exist= 1;
|
|||
|
||||
static const LEX_STRING tz_tables_names[MY_TZ_TABLES_COUNT]=
|
||||
{
|
||||
{(char *) STRING_WITH_LEN("time_zone_name")},
|
||||
{(char *) STRING_WITH_LEN("time_zone")},
|
||||
{(char *) STRING_WITH_LEN("time_zone_transition_type")},
|
||||
{(char *) STRING_WITH_LEN("time_zone_transition")}
|
||||
{ C_STRING_WITH_LEN("time_zone_name")},
|
||||
{ C_STRING_WITH_LEN("time_zone")},
|
||||
{ C_STRING_WITH_LEN("time_zone_transition_type")},
|
||||
{ C_STRING_WITH_LEN("time_zone_transition")}
|
||||
};
|
||||
|
||||
/* Name of database to which those tables belong. */
|
||||
|
||||
static const LEX_STRING tz_tables_db_name= {(char *) STRING_WITH_LEN("mysql")};
|
||||
static const LEX_STRING tz_tables_db_name= { C_STRING_WITH_LEN("mysql")};
|
||||
|
||||
|
||||
class Tz_names_entry: public Sql_alloc
|
||||
|
|
Loading…
Add table
Reference in a new issue