diff options
-rw-r--r-- | sql/handler.cc | 10 | ||||
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/mysql_priv.h | 2 | ||||
-rw-r--r-- | sql/sql_acl.cc | 126 | ||||
-rw-r--r-- | sql/sql_error.cc | 10 | ||||
-rw-r--r-- | sql/sql_error.h | 2 | ||||
-rw-r--r-- | sql/sql_lex.h | 10 | ||||
-rw-r--r-- | sql/sql_parse.cc | 70 | ||||
-rw-r--r-- | sql/sql_partition.cc | 12 | ||||
-rw-r--r-- | sql/sql_plugin.cc | 6 | ||||
-rw-r--r-- | sql/sql_show.cc | 10 | ||||
-rw-r--r-- | sql/sql_trigger.cc | 24 | ||||
-rw-r--r-- | sql/sql_view.cc | 26 | ||||
-rw-r--r-- | sql/tztime.cc | 10 |
14 files changed, 160 insertions, 160 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index fbccfe7fa46..e1fb8e07a05 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -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} }; diff --git a/sql/item.cc b/sql/item.cc index 6e661afbd91..be15bd528bb 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -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) { } diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index afe2c237d3d..74894e1fe64 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -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; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 5590dd0049d..030a72c2847 100644 --- a/sql/sql_acl.cc +++ b/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") } } }; diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 58763881ecf..9a9a9784df3 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -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) diff --git a/sql/sql_error.h b/sql/sql_error.h index b5cac24d894..f4a7b14ba1a 100644 --- a/sql/sql_error.h +++ b/sql/sql_error.h @@ -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[]; diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 9f6df9861e2..7e78a674b35 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -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 diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 9217c147143..63de7bb1930 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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[]={ @@ -4924,9 +4924,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, diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index f1c8e099441..49ca738ae7f 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -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"; diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index f7205470abd..8dc00908fc5 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -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]= diff --git a/sql/sql_show.cc b/sql/sql_show.cc index edbec84e37b..eb6b37440ca 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2171,7 +2171,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[]; @@ -3214,10 +3214,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); diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 217ce239b4f..a49e9d67a00 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -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") } }; diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 5ec7ca9cfb4..241e47f10d9 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -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); @@ -581,40 +581,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, diff --git a/sql/tztime.cc b/sql/tztime.cc index 4f6542bd043..a1bcf25bb51 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -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 |