diff options
author | unknown <wax@kishkin.ru> | 2003-04-02 19:16:19 +0600 |
---|---|---|
committer | unknown <wax@kishkin.ru> | 2003-04-02 19:16:19 +0600 |
commit | 6adb27c65a67db47d91600455f0994772a74f1e1 (patch) | |
tree | 643f418f7f7ee95d9a5ffb9bbec2ba4ccc5dd11b | |
parent | aee0d02abdae17a6c24dd2aa0fe9a82bafc78fd8 (diff) | |
download | mariadb-git-6adb27c65a67db47d91600455f0994772a74f1e1.tar.gz |
resolve new updates group_concat
include/mysqld_error.h:
resolve error message
sql/mysqld.cc:
resolve option
sql/set_var.cc:
resolve variable
sql/share/english/errmsg.txt:
resolve error message
sql/sql_class.h:
resolve
-rw-r--r-- | include/mysqld_error.h | 8 | ||||
-rw-r--r-- | sql/mysqld.cc | 6 | ||||
-rw-r--r-- | sql/set_var.cc | 4 | ||||
-rw-r--r-- | sql/share/english/errmsg.txt | 10 | ||||
-rw-r--r-- | sql/sql_class.h | 57 |
5 files changed, 43 insertions, 42 deletions
diff --git a/include/mysqld_error.h b/include/mysqld_error.h index d1453c86f2a..e168db8312b 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -266,5 +266,9 @@ #define ER_SELECT_REDUCED 1247 #define ER_TABLENAME_NOT_ALLOWED_HERE 1248 #define ER_NOT_SUPPORTED_AUTH_MODE 1249 -#define ER_CUT_VALUE_GROUP_CONCAT 1250 -#define ER_ERROR_MESSAGES 251 +#define ER_SPATIAL_CANT_HAVE_NULL 1250 +#define ER_COLLATION_CHARSET_MISMATCH 1251 +#define ER_SLAVE_WAS_RUNNING 1252 +#define ER_SLAVE_WAS_NOT_RUNNING 1253 +#define ER_CUT_VALUE_GROUP_CONCAT 1254 +#define ER_ERROR_MESSAGES 255 diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 8af89bd58f6..aa43198dcbe 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3485,6 +3485,7 @@ enum options OPT_OLD_PASSWORDS, OPT_EXPIRE_LOGS_DAYS, OPT_DEFAULT_WEEK_FORMAT + OPT_GROUP_CONCAT_MAX_LEN }; @@ -3600,6 +3601,11 @@ struct my_option my_long_options[] = GET_LONG, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"flush", OPT_FLUSH, "Flush tables to disk between SQL commands", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + { "group_concat_max_len", OPT_GROUP_CONCAT_MAX_LEN, + "The maximum length of the result of function group_concat.", + (gptr*) &global_system_variables.group_concat_max_len, + (gptr*) &max_system_variables.group_concat_max_len, 0, GET_ULONG, + REQUIRED_ARG, 1024, 4, (long) ~0, 0, 1, 0}, /* We must always support the next option to make scripts like mysqltest easier to do */ {"init-rpl-role", OPT_INIT_RPL_ROLE, "Set the replication role", 0, 0, 0, diff --git a/sql/set_var.cc b/sql/set_var.cc index 0babec456b8..d0b9a2170e4 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -323,6 +323,9 @@ static sys_var_rand_seed2 sys_rand_seed2("rand_seed2"); static sys_var_thd_ulong sys_default_week_format("default_week_format", &SV::default_week_format); +sys_var_thd_ulong sys_group_concat_max_len("group_concat_max_len", + &SV::group_concat_max_len); + /* List of all variables for initialisation and storage in hash This is sorted in alphabetical order to make it easy to add new variables @@ -354,6 +357,7 @@ sys_var *sys_variables[]= &sys_flush, &sys_flush_time, &sys_foreign_key_checks, + &sys_group_concat_max_len, &sys_identity, &sys_insert_id, &sys_interactive_timeout, diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 1b5d4a23601..8e097b9a44a 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -166,7 +166,7 @@ "Result string is longer than max_allowed_packet", "The used table type doesn't support BLOB/TEXT columns", "The used table type doesn't support AUTO_INCREMENT columns", -"INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES", +"INSERT DELAYED can't be used with table '%-.64s' because it is locked with LOCK TABLES", "Incorrect column name '%-.100s'", "The used table handler can't index column '%-.64s'", "All tables in the MERGE table are not identically defined", @@ -198,7 +198,7 @@ "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again', +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", "This operation cannot be performed with a running slave, run STOP SLAVE first", "This operation requires a running slave, configure slave and do START SLAVE", "The server is not configured as slave, fix in config file or with CHANGE MASTER TO", @@ -250,5 +250,9 @@ "Every derived table must have it's own alias", "Select %u was reduced during optimisation", "Table '%-.64s' from one of SELECT's can not be used in %-.32s" -"Client does not support authentication protocol requested by server. Consider upgrading MySQL client", +"Client does not support authentication protocol requested by server. Consider upgrading MySQL client" +"All parts of a SPATIAL KEY must be NOT NULL" +"COLLATION '%s' is not valid for CHARACTER SET '%s'" +"The slave was already running" +"The slave was already stopped" "%d line(s) was(were) cut by group_concat()" diff --git a/sql/sql_class.h b/sql/sql_class.h index 052da81be4e..769daf257b3 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -34,6 +34,8 @@ enum enum_log_type { LOG_CLOSED, LOG_NORMAL, LOG_NEW, LOG_BIN }; enum enum_delay_key_write { DELAY_KEY_WRITE_NONE, DELAY_KEY_WRITE_ON, DELAY_KEY_WRITE_ALL }; +extern char internal_table_name[2]; + // log info errors #define LOG_INFO_EOF -1 #define LOG_INFO_IO -2 @@ -143,7 +145,9 @@ public: int generate_new_name(char *new_name,const char *old_name); void make_log_name(char* buf, const char* log_ident); bool is_active(const char* log_file_name); + int update_log_index(LOG_INFO* linfo); int purge_logs(THD* thd, const char* to_log); + int purge_logs_before_date(THD* thd, time_t purge_time); int purge_first_log(struct st_relay_log_info* rli); bool reset_logs(THD* thd); // if we are exiting, we also want to close the index file @@ -170,32 +174,6 @@ public: /* character conversion tables */ -class CONVERT; -CONVERT *get_convert_set(const char *name_ptr); - -class CONVERT -{ - const uchar *from_map,*to_map; - void convert_array(const uchar *mapping,uchar *buff,uint length); -public: - const char *name; - uint numb; - CONVERT(const char *name_par,uchar *from_par,uchar *to_par, uint number) - :from_map(from_par),to_map(to_par),name(name_par),numb(number) {} - friend CONVERT *get_convert_set(const char *name_ptr); - inline void convert(char *a,uint length) - { - convert_array(from_map, (uchar*) a,length); - } - char *store_dest(char *to, const char *from, uint length) - { - for (const char *end=from+length ; from != end ; from++) - *to++= to_map[(uchar) *from]; - return to; - } - bool store(String *, const char *,uint); - inline uint number() { return numb; } -}; typedef struct st_copy_info { ha_rows records; @@ -360,10 +338,6 @@ class select_result; #define THD_SENTRY_MAGIC 0xfeedd1ff #define THD_SENTRY_GONE 0xdeadbeef -#ifdef EMBEDDED_LIBRARY -typedef struct st_mysql; -#endif - #define THD_CHECK_SENTRY(thd) DBUG_ASSERT(thd->dbug_sentry == THD_SENTRY_MAGIC) struct system_variables @@ -396,6 +370,7 @@ struct system_variables ulong tmp_table_size; ulong tx_isolation; ulong sql_mode; + ulong default_week_format; ulong group_concat_max_len; /* In slave thread we need to know in behalf of which @@ -404,9 +379,10 @@ struct system_variables ulong pseudo_thread_id; my_bool log_warnings; - my_bool low_priority_updates; + my_bool low_priority_updates; + my_bool new_mode; + my_bool convert_result_charset; - CONVERT *convert_set; CHARSET_INFO *thd_charset; }; @@ -453,8 +429,9 @@ public: db - currently selected database ip - client IP */ - char *host,*user,*priv_user,*db,*ip; + /* remote (peer) port */ + uint16 peer_port; /* Points to info-string that will show in SHOW PROCESSLIST */ const char *proc_info; /* points to host if host is available, otherwise points to ip */ @@ -577,6 +554,7 @@ public: void init(void); void change_user(void); + void init_for_queries(); void cleanup(void); bool store_globals(); #ifdef SIGNAL_WITH_VIO_CLOSE @@ -684,7 +662,9 @@ public: { is_fatal_error= 1; net.report_error= 1; + DBUG_PRINT("error",("Fatal error set")); } + inline CHARSET_INFO *charset() { return variables.thd_charset; } }; /* @@ -910,10 +890,11 @@ class Table_ident :public Sql_alloc LEX_STRING db; LEX_STRING table; SELECT_LEX_UNIT *sel; - inline Table_ident(LEX_STRING db_arg, LEX_STRING table_arg, bool force) + inline Table_ident(THD *thd, LEX_STRING db_arg, LEX_STRING table_arg, + bool force) :table(table_arg), sel((SELECT_LEX_UNIT *)0) { - if (!force && (current_thd->client_capabilities & CLIENT_NO_SCHEMA)) + if (!force && (thd->client_capabilities & CLIENT_NO_SCHEMA)) db.str=0; else db= db_arg; @@ -925,7 +906,8 @@ class Table_ident :public Sql_alloc } inline Table_ident(SELECT_LEX_UNIT *s) : sel(s) { - db.str=0; table.str=(char *)""; table.length=0; + /* We must have a table name here as this is used with add_table_to_list */ + db.str=0; table.str= internal_table_name; table.length=1; } inline void change_db(char *db_name) { @@ -942,6 +924,7 @@ class user_var_entry ulong length, update_query_id, used_query_id; Item_result type; CHARSET_INFO *var_charset; + enum Item::coercion var_coercibility; }; /* Class for unique (removing of duplicates) */ @@ -1000,7 +983,7 @@ class multi_update : public select_result { TABLE_LIST *all_tables, *update_tables, *table_being_updated; THD *thd; - TABLE **tmp_tables, *main_table; + TABLE **tmp_tables, *main_table, *table_to_update; TMP_TABLE_PARAM *tmp_table_param; ha_rows updated, found; List <Item> *fields, *values; |