diff --git a/client/client_priv.h b/client/client_priv.h index 4dbf3f7895b..9a678eb7d2a 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -67,5 +67,5 @@ enum options_client OPT_SLAP_POST_QUERY, OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID, OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT, - OPT_DEBUG_INFO, OPT_COLUMN_TYPES + OPT_DEBUG_INFO, OPT_COLUMN_TYPES, OPT_WRITE_BINLOG }; diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 1a9d07804b4..2f5d435d0a5 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -34,7 +34,8 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0, opt_medium_check = 0, opt_quick = 0, opt_all_in_1 = 0, opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0, tty_password= 0, opt_frm= 0, info_flag= 0, - opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0; + opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0, + opt_write_binlog= 1; static uint verbose = 0, opt_mysql_port=0; static my_string opt_mysql_unix_port = 0; static char *opt_password = 0, *current_user = 0, @@ -123,6 +124,10 @@ static struct my_option my_long_options[] = {"medium-check", 'm', "Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"write-binlog", OPT_WRITE_BINLOG, + "Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Enabled by default; use --skip-write-binlog when commands should not be sent to replication slaves.", + (gptr*) &opt_write_binlog, (gptr*) &opt_write_binlog, 0, GET_BOOL, NO_ARG, + 1, 0, 0, 0, 0, 0}, {"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"password", 'p', @@ -598,16 +603,16 @@ static int handle_request_for_tables(char *tables, uint length) if (opt_upgrade) end = strmov(end, " FOR UPGRADE"); break; case DO_REPAIR: - op = "REPAIR"; + op= (opt_write_binlog) ? "REPAIR" : "REPAIR NO_WRITE_TO_BINLOG"; if (opt_quick) end = strmov(end, " QUICK"); if (opt_extended) end = strmov(end, " EXTENDED"); if (opt_frm) end = strmov(end, " USE_FRM"); break; case DO_ANALYZE: - op = "ANALYZE"; + op= (opt_write_binlog) ? "ANALYZE" : "ANALYZE NO_WRITE_TO_BINLOG"; break; case DO_OPTIMIZE: - op = "OPTIMIZE"; + op= (opt_write_binlog) ? "OPTIMIZE" : "OPTIMIZE NO_WRITE_TO_BINLOG"; break; case DO_UPGRADE: return fix_object_name("TABLE", tables); diff --git a/client/mysqldump.c b/client/mysqldump.c index c86a2fc385f..99415a5a593 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -77,13 +77,13 @@ #define IGNORE_DATA 0x01 /* don't dump data for this table */ #define IGNORE_INSERT_DELAYED 0x02 /* table doesn't support INSERT DELAYED */ -static char *add_load_option(char *ptr, const char *object, - const char *statement); +static void add_load_option(DYNAMIC_STRING *str, const char *option, + const char *option_value); static ulong find_set(TYPELIB *lib, const char *x, uint length, char **err_pos, uint *err_len); static char *alloc_query_str(ulong size); -static char *field_escape(char *to,const char *from,uint length); +static void field_escape(DYNAMIC_STRING* in, const char *from); static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0, quick= 1, extended_insert= 1, lock_tables=1,ignore_errors=0,flush_logs=0,flush_privileges=0, @@ -125,6 +125,19 @@ FILE *md_result_file= 0; static char *shared_memory_base_name=0; #endif static uint opt_protocol= 0; + +/* +Dynamic_string wrapper functions. In this file use these +wrappers, they will terminate the process if there is +an allocation failure. +*/ +static void init_dynamic_string_checked(DYNAMIC_STRING *str, const char *init_str, + uint init_alloc, uint alloc_increment); +static void dynstr_append_checked(DYNAMIC_STRING* dest, const char* src); +static void dynstr_set_checked(DYNAMIC_STRING *str, const char *init_str); +static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append, + uint length); +static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size); /* Constant for detection of default value of default_charset. If default_charset is equal to mysql_universal_client_charset, then @@ -436,7 +449,9 @@ static struct my_option my_long_options[] = static const char *load_default_groups[]= { "mysqldump","client",0 }; -static void safe_exit(int error); +static void maybe_exit(int error); +static void die(int error, const char* reason, ...); +static void maybe_die(int error, const char* reason, ...); static void write_header(FILE *sql_file, char *db_name); static void print_value(FILE *file, MYSQL_RES *result, MYSQL_ROW row, const char *prefix,const char *name, @@ -495,11 +510,7 @@ static void verbose_msg(const char *fmt, ...) void check_io(FILE *file) { if (ferror(file)) - { - fprintf(stderr, "%s: Got errno %d on write\n", my_progname, errno); - ignore_errors= 0; /* We can't ignore this error */ - safe_exit(EX_EOF); - } + die(EX_EOF, "Got errno %d on write", errno); } static void print_version(void) @@ -887,12 +898,74 @@ static int get_options(int *argc, char ***argv) static void DB_error(MYSQL *mysql_arg, const char *when) { DBUG_ENTER("DB_error"); - fprintf(stderr, "%s: Got error: %d: %s %s\n", my_progname, + maybe_die(EX_MYSQLERR, "Got error: %d: %s %s", mysql_errno(mysql_arg), mysql_error(mysql_arg), when); - fflush(stderr); - safe_exit(EX_MYSQLERR); DBUG_VOID_RETURN; -} /* DB_error */ +} + + + +/* + Prints out an error message and kills the process. + + SYNOPSIS + die() + error_num - process return value + fmt_reason - a format string for use by my_vsnprintf. + ... - variable arguments for above fmt_reason string + + DESCRIPTION + This call prints out the formatted error message to stderr and then + terminates the process. +*/ +static void die(int error_num, const char* fmt_reason, ...) +{ + char buffer[1000]; + va_list args; + va_start(args,fmt_reason); + my_vsnprintf(buffer, sizeof(buffer), fmt_reason, args); + va_end(args); + + fprintf(stderr, "%s: %s\n", my_progname, buffer); + fflush(stderr); + + ignore_errors= 0; /* force the exit */ + maybe_exit(error_num); +} + + +/* + Prints out an error message and maybe kills the process. + + SYNOPSIS + maybe_die() + error_num - process return value + fmt_reason - a format string for use by my_vsnprintf. + ... - variable arguments for above fmt_reason string + + DESCRIPTION + This call prints out the formatted error message to stderr and then + terminates the process, unless the --force command line option is used. + + This call should be used for non-fatal errors (such as database + errors) that the code may still be able to continue to the next unit + of work. + +*/ +static void maybe_die(int error_num, const char* fmt_reason, ...) +{ + char buffer[1000]; + va_list args; + va_start(args,fmt_reason); + my_vsnprintf(buffer, sizeof(buffer), fmt_reason, args); + va_end(args); + + fprintf(stderr, "%s: %s\n", my_progname, buffer); + fflush(stderr); + + maybe_exit(error_num); +} + /* @@ -917,10 +990,8 @@ static int mysql_query_with_error_report(MYSQL *mysql_con, MYSQL_RES **res, if (mysql_query(mysql_con, query) || (res && !((*res)= mysql_store_result(mysql_con)))) { - fprintf(stderr, "%s: Couldn't execute '%s': %s (%d)\n", - my_progname, query, - mysql_error(mysql_con), mysql_errno(mysql_con)); - safe_exit(EX_MYSQLERR); + maybe_die(EX_MYSQLERR, "Couldn't execute '%s': %s (%d)", + query, mysql_error(mysql_con), mysql_errno(mysql_con)); return 1; } return 0; @@ -965,7 +1036,7 @@ static void free_resources() } -static void safe_exit(int error) +static void maybe_exit(int error) { if (!first_error) first_error= error; @@ -1025,10 +1096,7 @@ static int connect_to_db(char *host, char *user,char *passwd) my_snprintf(buff, sizeof(buff), "/*!40100 SET @@SQL_MODE='%s' */", compatible_mode_normal_str); if (mysql_query_with_error_report(mysql, 0, buff)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(1); - } /* set time_zone to UTC to allow dumping date types between servers with different time zone settings @@ -1037,10 +1105,7 @@ static int connect_to_db(char *host, char *user,char *passwd) { my_snprintf(buff, sizeof(buff), "/*!40103 SET TIME_ZONE='+00:00' */"); if (mysql_query_with_error_report(mysql, 0, buff)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(1); - } } DBUG_RETURN(0); } /* connect_to_db */ @@ -1061,10 +1126,8 @@ static void unescape(FILE *file,char *pos,uint length) char *tmp; DBUG_ENTER("unescape"); if (!(tmp=(char*) my_malloc(length*2+1, MYF(MY_WME)))) - { - ignore_errors=0; /* Fatal error */ - safe_exit(EX_MYSQLERR); /* Force exit */ - } + die(EX_MYSQLERR, "Couldn't allocate memory"); + mysql_real_escape_string(&mysql_connection, tmp, pos, length); fputc('\'', file); fputs(tmp, file); @@ -1423,10 +1486,7 @@ static uint dump_events_for_db(char *db) mysql_query(mysql, "LOCK TABLES mysql.event READ"); if (mysql_query_with_error_report(mysql, &event_list_res, "show events")) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } strcpy(delimiter, ";"); if (mysql_num_rows(event_list_res) > 0) @@ -1468,11 +1528,11 @@ static uint dump_events_for_db(char *db) fprintf(sql_file, "/*!50106 %s */ %s\n", row[3], delimiter); } } /* end of event printing */ + mysql_free_result(event_res); + } /* end of list of events */ fprintf(sql_file, "DELIMITER ;\n"); fprintf(sql_file, "/*!50106 SET TIME_ZONE= @save_time_zone */ ;\n"); - - mysql_free_result(event_res); } mysql_free_result(event_list_res); @@ -1639,8 +1699,9 @@ static uint dump_routines_for_db(char *db) my_free(query_str, MYF(MY_ALLOW_ZERO_PTR)); } } /* end of routine printing */ + mysql_free_result(routine_res); + } /* end of list of routines */ - mysql_free_result(routine_res); } mysql_free_result(routine_list_res); } /* end of for i (0 .. 1) */ @@ -1701,11 +1762,10 @@ static uint get_table_structure(char *table, char *db, char *table_type, if (!insert_pat_inited) { insert_pat_inited= 1; - if (init_dynamic_string(&insert_pat, "", 1024, 1024)) - safe_exit(EX_MYSQLERR); + init_dynamic_string_checked(&insert_pat, "", 1024, 1024); } else - dynstr_set(&insert_pat, ""); + dynstr_set_checked(&insert_pat, ""); } insert_option= ((delayed && opt_ignore) ? " DELAYED IGNORE " : @@ -1737,18 +1797,13 @@ static uint get_table_structure(char *table, char *db, char *table_type, my_snprintf(buff, sizeof(buff), "show create table %s", result_table); if (mysql_query_with_error_report(mysql, 0, buff)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } if (path) { if (!(sql_file= open_sql_file_for_table(table))) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } + write_header(sql_file, db); } if (!opt_xml && opt_comments) @@ -1812,7 +1867,6 @@ static uint get_table_structure(char *table, char *db, char *table_type, my_free(scv_buff, MYF(MY_ALLOW_ZERO_PTR)); - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } else @@ -1875,7 +1929,6 @@ static uint get_table_structure(char *table, char *db, char *table_type, { if (path) my_fclose(sql_file, MYF(MY_WME)); - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } @@ -1888,21 +1941,21 @@ static uint get_table_structure(char *table, char *db, char *table_type, if (write_data) { if (opt_replace_into) - dynstr_append_mem(&insert_pat, "REPLACE ", 8); + dynstr_append_checked(&insert_pat, "REPLACE "); else - dynstr_append_mem(&insert_pat, "INSERT ", 7); - dynstr_append(&insert_pat, insert_option); - dynstr_append_mem(&insert_pat, "INTO ", 5); - dynstr_append(&insert_pat, opt_quoted_table); + dynstr_append_checked(&insert_pat, "INSERT "); + dynstr_append_checked(&insert_pat, insert_option); + dynstr_append_checked(&insert_pat, "INTO "); + dynstr_append_checked(&insert_pat, opt_quoted_table); if (complete_insert) { - dynstr_append_mem(&insert_pat, " (", 2); + dynstr_append_checked(&insert_pat, " ("); } else { - dynstr_append_mem(&insert_pat, " VALUES ", 8); + dynstr_append_checked(&insert_pat, " VALUES "); if (!extended_insert) - dynstr_append_mem(&insert_pat, "(", 1); + dynstr_append_checked(&insert_pat, "("); } } @@ -1912,10 +1965,10 @@ static uint get_table_structure(char *table, char *db, char *table_type, { if (init) { - dynstr_append_mem(&insert_pat, ", ", 2); + dynstr_append_checked(&insert_pat, ", "); } init=1; - dynstr_append(&insert_pat, + dynstr_append_checked(&insert_pat, quote_name(row[SHOW_FIELDNAME], name_buff, 0)); } } @@ -1930,10 +1983,7 @@ static uint get_table_structure(char *table, char *db, char *table_type, my_snprintf(query_buff, sizeof(query_buff), "show fields from %s", result_table); if (mysql_query_with_error_report(mysql, &result, query_buff)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } /* Make an sql-file, if path was given iow. option -T was given */ if (!opt_no_create_info) @@ -1941,10 +1991,7 @@ static uint get_table_structure(char *table, char *db, char *table_type, if (path) { if (!(sql_file= open_sql_file_for_table(table))) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } write_header(sql_file, db); } if (!opt_xml && opt_comments) @@ -1963,19 +2010,19 @@ static uint get_table_structure(char *table, char *db, char *table_type, if (write_data) { if (opt_replace_into) - dynstr_append_mem(&insert_pat, "REPLACE ", 8); + dynstr_append_checked(&insert_pat, "REPLACE "); else - dynstr_append_mem(&insert_pat, "INSERT ", 7); - dynstr_append(&insert_pat, insert_option); - dynstr_append_mem(&insert_pat, "INTO ", 5); - dynstr_append(&insert_pat, result_table); - if (opt_complete_insert) - dynstr_append_mem(&insert_pat, " (", 2); + dynstr_append_checked(&insert_pat, "INSERT "); + dynstr_append_checked(&insert_pat, insert_option); + dynstr_append_checked(&insert_pat, "INTO "); + dynstr_append_checked(&insert_pat, result_table); + if (complete_insert) + dynstr_append_checked(&insert_pat, " ("); else { - dynstr_append_mem(&insert_pat, " VALUES ", 8); + dynstr_append_checked(&insert_pat, " VALUES "); if (!extended_insert) - dynstr_append_mem(&insert_pat, "(", 1); + dynstr_append_checked(&insert_pat, "("); } } @@ -1990,11 +2037,11 @@ static uint get_table_structure(char *table, char *db, char *table_type, check_io(sql_file); } if (complete_insert) - dynstr_append_mem(&insert_pat, ", ", 2); + dynstr_append_checked(&insert_pat, ", "); } init=1; - if (opt_complete_insert) - dynstr_append(&insert_pat, + if (complete_insert) + dynstr_append_checked(&insert_pat, quote_name(row[SHOW_FIELDNAME], name_buff, 0)); if (!opt_no_create_info) { @@ -2044,7 +2091,6 @@ static uint get_table_structure(char *table, char *db, char *table_type, my_progname, result_table, mysql_error(mysql)); if (path) my_fclose(sql_file, MYF(MY_WME)); - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } @@ -2152,11 +2198,11 @@ continue_xml: check_io(sql_file); } } - if (opt_complete_insert) + if (complete_insert) { - dynstr_append_mem(&insert_pat, ") VALUES ", 9); + dynstr_append_checked(&insert_pat, ") VALUES "); if (!extended_insert) - dynstr_append_mem(&insert_pat, "(", 1); + dynstr_append_checked(&insert_pat, "("); } if (sql_file != md_result_file) { @@ -2203,7 +2249,6 @@ static void dump_triggers_for_table(char *table, { if (path) my_fclose(sql_file, MYF(MY_WME)); - safe_exit(EX_MYSQLERR); DBUG_VOID_RETURN; } if (mysql_num_rows(result)) @@ -2262,24 +2307,28 @@ DELIMITER ;;\n"); DBUG_VOID_RETURN; } -static char *add_load_option(char *ptr,const char *object, - const char *statement) +static void add_load_option(DYNAMIC_STRING *str, const char *option, + const char *option_value) { - if (object) + if (!option_value) { - /* Don't escape hex constants */ - if (object[0] == '0' && (object[1] == 'x' || object[1] == 'X')) - ptr= strxmov(ptr," ",statement," ",object,NullS); - else - { - /* char constant; escape */ - ptr= strxmov(ptr," ",statement," '",NullS); - ptr= field_escape(ptr,object,(uint) strlen(object)); - *ptr++= '\''; - } + /* Null value means we don't add this option. */ + return; } - return ptr; -} /* add_load_option */ + + dynstr_append_checked(str, option); + + if (strncmp(option_value, "0x", sizeof("0x")-1) == 0) + { + /* It's a hex constant, don't escape */ + dynstr_append_checked(str, option_value); + } + else + { + /* char constant; escape */ + field_escape(str, option_value); + } +} /* @@ -2289,28 +2338,36 @@ static char *add_load_option(char *ptr,const char *object, syntax errors from the SQL parser. */ -static char *field_escape(char *to,const char *from,uint length) +static void field_escape(DYNAMIC_STRING* in, const char *from) { - const char *end; - uint end_backslashes=0; + uint end_backslashes= 0; - for (end= from+length; from != end; from++) + dynstr_append_checked(in, "'"); + + while (*from) { - *to++= *from; + dynstr_append_mem_checked(in, from, 1); + if (*from == '\\') end_backslashes^=1; /* find odd number of backslashes */ else { if (*from == '\'' && !end_backslashes) - *to++= *from; /* We want a duplicate of "'" for MySQL */ + { + /* We want a duplicate of "'" for MySQL */ + dynstr_append_checked(in, "\'"); + } end_backslashes=0; } + from++; } /* Add missing backslashes if user has specified odd number of backs.*/ if (end_backslashes) - *to++= '\\'; - return to; -} /* field_escape */ + dynstr_append_checked(in, "\\"); + + dynstr_append_checked(in, "'"); +} + static char *alloc_query_str(ulong size) @@ -2318,10 +2375,8 @@ static char *alloc_query_str(ulong size) char *query; if (!(query= (char*) my_malloc(size, MYF(MY_WME)))) - { - ignore_errors= 0; /* Fatal error */ - safe_exit(EX_MYSQLERR); /* Force exit */ - } + die(EX_MYSQLERR, "Couldn't allocate a query string."); + return query; } @@ -2341,13 +2396,14 @@ static char *alloc_query_str(ulong size) void */ + static void dump_table(char *table, char *db) { char ignore_flag; - char query_buf[QUERY_LENGTH], *end, buff[256],table_buff[NAME_LEN+3]; + char buf[200], table_buff[NAME_LEN+3]; + DYNAMIC_STRING query_string; char table_type[NAME_LEN]; char *result_table, table_buff2[NAME_LEN*2+3], *opt_quoted_table; - char *query= query_buf; int error= 0; ulong rownr, row_break, total_length, init_length; uint num_fields; @@ -2401,44 +2457,69 @@ static void dump_table(char *table, char *db) opt_quoted_table= quote_name(table, table_buff2, 0); verbose_msg("-- Sending SELECT query...\n"); + + init_dynamic_string_checked(&query_string, "", 1024, 1024); + if (path) { char filename[FN_REFLEN], tmp_path[FN_REFLEN]; - convert_dirname(tmp_path,path,NullS); + + if (strlen(path) >= FN_REFLEN) + { + /* + This check is made because the some the file functions below + have FN_REFLEN sized stack allocated buffers and will cause + a crash even if the input destination buffer is large enough + to hold the output. + */ + die(EX_USAGE, "Input filename or options too long: %s", path); + } + + /* + Convert the path to native os format + and resolve to the full filepath. + */ + convert_dirname(tmp_path,path,NullS); my_load_path(tmp_path, tmp_path, NULL); - fn_format(filename, table, tmp_path, ".txt", 4); - my_delete(filename, MYF(0)); /* 'INTO OUTFILE' doesn't work, if - filename wasn't deleted */ + fn_format(filename, table, tmp_path, ".txt", MYF(MY_UNPACK_FILENAME)); + + /* Must delete the file that 'INTO OUTFILE' will write to */ + my_delete(filename, MYF(0)); + + /* convert to a unix path name to stick into the query */ to_unix_path(filename); - my_snprintf(query, QUERY_LENGTH, - "SELECT /*!40001 SQL_NO_CACHE */ * INTO OUTFILE '%s'", - filename); - end= strend(query); + + /* now build the query string */ + + dynstr_append_checked(&query_string, "SELECT /*!40001 SQL_NO_CACHE */ * INTO OUTFILE '"); + dynstr_append_checked(&query_string, filename); + dynstr_append_checked(&query_string, "'"); if (fields_terminated || enclosed || opt_enclosed || escaped) - end= strmov(end, " FIELDS"); - end= add_load_option(end, fields_terminated, " TERMINATED BY"); - end= add_load_option(end, enclosed, " ENCLOSED BY"); - end= add_load_option(end, opt_enclosed, " OPTIONALLY ENCLOSED BY"); - end= add_load_option(end, escaped, " ESCAPED BY"); - end= add_load_option(end, lines_terminated, " LINES TERMINATED BY"); - *end= '\0'; + dynstr_append_checked(&query_string, " FIELDS"); + + add_load_option(&query_string, " TERMINATED BY ", fields_terminated); + add_load_option(&query_string, " ENCLOSED BY ", enclosed); + add_load_option(&query_string, " OPTIONALLY ENCLOSED BY ", opt_enclosed); + add_load_option(&query_string, " ESCAPED BY ", escaped); + add_load_option(&query_string, " LINES TERMINATED BY ", lines_terminated); - my_snprintf(buff, sizeof(buff), " FROM %s", result_table); - end= strmov(end,buff); - if (where || order_by) + dynstr_append_checked(&query_string, " FROM "); + dynstr_append_checked(&query_string, result_table); + + if (where) { - query= alloc_query_str((ulong) ((end - query) + 1 + - (where ? strlen(where) + 7 : 0) + - (order_by ? strlen(order_by) + 10 : 0))); - end= strmov(query, query_buf); - - if (where) - end= strxmov(end, " WHERE ", where, NullS); - if (order_by) - end= strxmov(end, " ORDER BY ", order_by, NullS); + dynstr_append_checked(&query_string, " WHERE "); + dynstr_append_checked(&query_string, where); } - if (mysql_real_query(mysql, query, (uint) (end - query))) + + if (order_by) + { + dynstr_append_checked(&query_string, " ORDER BY "); + dynstr_append_checked(&query_string, order_by); + } + + if (mysql_real_query(mysql, query_string.str, query_string.length)) { DB_error(mysql, "when executing 'SELECT INTO OUTFILE'"); DBUG_VOID_RETURN; @@ -2452,41 +2533,38 @@ static void dump_table(char *table, char *db) result_table); check_io(md_result_file); } - my_snprintf(query, QUERY_LENGTH, - "SELECT /*!40001 SQL_NO_CACHE */ * FROM %s", - result_table); - if (where || order_by) - { - query= alloc_query_str((ulong) (strlen(query) + 1 + - (where ? strlen(where) + 7 : 0) + - (order_by ? strlen(order_by) + 10 : 0))); - end= strmov(query, query_buf); + + dynstr_append_checked(&query_string, "SELECT /*!40001 SQL_NO_CACHE */ * FROM "); + dynstr_append_checked(&query_string, result_table); - if (where) + if (where) + { + if (!opt_xml && opt_comments) { - if (!opt_xml && opt_comments) - { - fprintf(md_result_file, "-- WHERE: %s\n", where); - check_io(md_result_file); - } - end= strxmov(end, " WHERE ", where, NullS); - } - if (order_by) - { - if (!opt_xml && opt_comments) - { - fprintf(md_result_file, "-- ORDER BY: %s\n", order_by); - check_io(md_result_file); - } - end= strxmov(end, " ORDER BY ", order_by, NullS); + fprintf(md_result_file, "-- WHERE: %s\n", where); + check_io(md_result_file); } + + dynstr_append_checked(&query_string, " WHERE "); + dynstr_append_checked(&query_string, where); } + if (order_by) + { + if (!opt_xml && opt_comments) + { + fprintf(md_result_file, "-- ORDER BY: %s\n", order_by); + check_io(md_result_file); + } + dynstr_append_checked(&query_string, " ORDER BY "); + dynstr_append_checked(&query_string, order_by); + } + if (!opt_xml && !opt_compact) { fputs("\n", md_result_file); check_io(md_result_file); } - if (mysql_query_with_error_report(mysql, 0, query)) + if (mysql_query_with_error_report(mysql, 0, query_string.str)) { DB_error(mysql, "when retrieving data from server"); goto err; @@ -2560,14 +2638,9 @@ static void dump_table(char *table, char *db) ulong length= lengths[i]; if (!(field= mysql_fetch_field(res))) - { - my_snprintf(query, QUERY_LENGTH, - "%s: Not enough fields from table %s! Aborting.\n", - my_progname, result_table); - fputs(query,stderr); - error= EX_CONSCHECK; - goto err; - } + die(EX_CONSCHECK, + "Not enough fields from table %s! Aborting.\n", + result_table); /* 63 is my_charset_bin. If charsetnr is not 63, @@ -2586,9 +2659,9 @@ static void dump_table(char *table, char *db) if (extended_insert && !opt_xml) { if (i == 0) - dynstr_set(&extended_row,"("); + dynstr_set_checked(&extended_row,"("); else - dynstr_append(&extended_row,","); + dynstr_append_checked(&extended_row,","); if (row[i]) { @@ -2603,15 +2676,10 @@ static void dump_table(char *table, char *db) - In non-HEX mode we need up to 2 bytes per character, plus 2 bytes for leading and trailing '\'' characters. */ - if (dynstr_realloc(&extended_row,length * 2+2)) - { - fputs("Aborting dump (out of memory)",stderr); - error= EX_EOM; - goto err; - } + dynstr_realloc_checked(&extended_row,length * 2+2); if (opt_hex_blob && is_blob) { - dynstr_append(&extended_row, "0x"); + dynstr_append_checked(&extended_row, "0x"); extended_row.length+= mysql_hex_string(extended_row.str + extended_row.length, row[i], length); @@ -2619,13 +2687,13 @@ static void dump_table(char *table, char *db) } else { - dynstr_append(&extended_row,"'"); + dynstr_append_checked(&extended_row,"'"); extended_row.length += mysql_real_escape_string(&mysql_connection, &extended_row.str[extended_row.length], row[i],length); extended_row.str[extended_row.length]='\0'; - dynstr_append(&extended_row,"'"); + dynstr_append_checked(&extended_row,"'"); } } else @@ -2634,30 +2702,26 @@ static void dump_table(char *table, char *db) char *ptr= row[i]; if (my_isalpha(charset_info, *ptr) || (*ptr == '-' && my_isalpha(charset_info, ptr[1]))) - dynstr_append(&extended_row, "NULL"); + dynstr_append_checked(&extended_row, "NULL"); else { if (field->type == MYSQL_TYPE_DECIMAL) { /* add " signs around */ - dynstr_append(&extended_row, "'"); - dynstr_append(&extended_row, ptr); - dynstr_append(&extended_row, "'"); + dynstr_append_checked(&extended_row, "'"); + dynstr_append_checked(&extended_row, ptr); + dynstr_append_checked(&extended_row, "'"); } else - dynstr_append(&extended_row, ptr); + dynstr_append_checked(&extended_row, ptr); } } } else - dynstr_append(&extended_row,"''"); - } - else if (dynstr_append(&extended_row,"NULL")) - { - fputs("Aborting dump (out of memory)",stderr); - error= EX_EOM; - goto err; + dynstr_append_checked(&extended_row,"''"); } + else + dynstr_append_checked(&extended_row,"NULL"); } else { @@ -2743,7 +2807,7 @@ static void dump_table(char *table, char *db) if (extended_insert) { ulong row_length; - dynstr_append(&extended_row,")"); + dynstr_append_checked(&extended_row,")"); row_length= 2 + extended_row.length; if (total_length + row_length < opt_net_buffer_length) { @@ -2779,14 +2843,14 @@ static void dump_table(char *table, char *db) check_io(md_result_file); if (mysql_errno(mysql)) { - my_snprintf(query, QUERY_LENGTH, + my_snprintf(buf, sizeof(buf), "%s: Error %d: %s when dumping table %s at row: %ld\n", my_progname, mysql_errno(mysql), mysql_error(mysql), result_table, rownr); - fputs(query,stderr); + fputs(buf,stderr); error= EX_CONSCHECK; goto err; } @@ -2809,15 +2873,13 @@ static void dump_table(char *table, char *db) check_io(md_result_file); } mysql_free_result(res); - if (query != query_buf) - my_free(query, MYF(MY_ALLOW_ZERO_PTR)); + dynstr_free(&query_string); } DBUG_VOID_RETURN; err: - if (query != query_buf) - my_free(query, MYF(MY_ALLOW_ZERO_PTR)); - safe_exit(error); + dynstr_free(&query_string); + maybe_exit(error); DBUG_VOID_RETURN; } /* dump_table */ @@ -2864,25 +2926,25 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables) mysql_real_escape_string(mysql, name_buff, db, strlen(db)); - init_dynamic_string(&where, " AND TABLESPACE_NAME IN (" + init_dynamic_string_checked(&where, " AND TABLESPACE_NAME IN (" "SELECT DISTINCT TABLESPACE_NAME FROM" " INFORMATION_SCHEMA.PARTITIONS" " WHERE" " TABLE_SCHEMA='", 256, 1024); - dynstr_append(&where, name_buff); - dynstr_append(&where, "' AND TABLE_NAME IN ("); + dynstr_append_checked(&where, name_buff); + dynstr_append_checked(&where, "' AND TABLE_NAME IN ("); for (i=0 ; i 0 ; tables-- , table_names++) { /* the table name passed on commandline may be wrong case */ @@ -3476,16 +3536,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables) /* Add found table name to lock_tables_query */ if (lock_tables) { - dynstr_append(&lock_tables_query, quote_name(*pos, table_buff, 1)); - dynstr_append(&lock_tables_query, " READ /*!32311 LOCAL */,"); + dynstr_append_checked(&lock_tables_query, quote_name(*pos, table_buff, 1)); + dynstr_append_checked(&lock_tables_query, " READ /*!32311 LOCAL */,"); } pos++; } else { - my_printf_error(0,"Couldn't find table: \"%s\"\n", MYF(0), - *table_names); - safe_exit(EX_ILLEGAL_TABLE); + maybe_die(EX_ILLEGAL_TABLE, "Couldn't find table: \"%s\"", *table_names); /* We shall countinue here, if --force was given */ } } @@ -3737,7 +3795,7 @@ char check_if_ignore_table(const char *table_name, char *table_type) { char result= IGNORE_NONE; char buff[FN_REFLEN+80], show_name_buff[FN_REFLEN]; - MYSQL_RES *res; + MYSQL_RES *res= NULL; MYSQL_ROW row; DBUG_ENTER("check_if_ignore_table"); @@ -3906,12 +3964,12 @@ static int replace(DYNAMIC_STRING *ds_str, const char *start= strstr(ds_str->str, search_str); if (!start) return 1; - init_dynamic_string(&ds_tmp, "", + init_dynamic_string_checked(&ds_tmp, "", ds_str->length + replace_len, 256); - dynstr_append_mem(&ds_tmp, ds_str->str, start - ds_str->str); - dynstr_append_mem(&ds_tmp, replace_str, replace_len); - dynstr_append(&ds_tmp, start + search_len); - dynstr_set(ds_str, ds_tmp.str); + dynstr_append_mem_checked(&ds_tmp, ds_str->str, start - ds_str->str); + dynstr_append_mem_checked(&ds_tmp, replace_str, replace_len); + dynstr_append_checked(&ds_tmp, start + search_len); + dynstr_set_checked(ds_str, ds_tmp.str); dynstr_free(&ds_tmp); return 0; } @@ -3957,10 +4015,7 @@ static my_bool get_view_structure(char *table, char* db) my_snprintf(query, sizeof(query), "SHOW CREATE TABLE %s", result_table); if (mysql_query_with_error_report(mysql, &table_res, query)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } /* Check if this is a view */ field= mysql_fetch_field_direct(table_res, 0); @@ -3974,10 +4029,8 @@ static my_bool get_view_structure(char *table, char* db) if (path) { if (!(sql_file= open_sql_file_for_table(table))) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(1); - } + write_header(sql_file, db); } @@ -4023,14 +4076,14 @@ static my_bool get_view_structure(char *table, char* db) /* Save the result of SHOW CREATE TABLE in ds_view */ row= mysql_fetch_row(table_res); lengths= mysql_fetch_lengths(table_res); - init_dynamic_string(&ds_view, row[1], lengths[1] + 1, 1024); + init_dynamic_string_checked(&ds_view, row[1], lengths[1] + 1, 1024); mysql_free_result(table_res); /* Get the result from "select ... information_schema" */ if (!(table_res= mysql_store_result(mysql)) || !(row= mysql_fetch_row(table_res))) { - safe_exit(EX_MYSQLERR); + DB_error(mysql, "when trying to save the result of SHOW CREATE TABLE in ds_view."); DBUG_RETURN(1); } @@ -4102,6 +4155,45 @@ static my_bool get_view_structure(char *table, char* db) DBUG_RETURN(0); } +/* + The following functions are wrappers for the dynamic string functions + and if they fail, the wrappers will terminate the current process. +*/ + +#define DYNAMIC_STR_ERROR_MSG "Couldn't perform DYNAMIC_STRING operation" + +static void init_dynamic_string_checked(DYNAMIC_STRING *str, const char *init_str, + uint init_alloc, uint alloc_increment) +{ + if (init_dynamic_string(str, init_str, init_alloc, alloc_increment)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + +static void dynstr_append_checked(DYNAMIC_STRING* dest, const char* src) +{ + if (dynstr_append(dest, src)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + +static void dynstr_set_checked(DYNAMIC_STRING *str, const char *init_str) +{ + if (dynstr_set(str, init_str)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + +static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append, + uint length) +{ + if (dynstr_append_mem(str, append, length)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + +static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size) +{ + if (dynstr_realloc(str, additional_size)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + int main(int argc, char **argv) { diff --git a/client/mysqltest.c b/client/mysqltest.c index bb6cc037b84..e4eb06953e2 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -3540,7 +3540,7 @@ void do_connect(struct st_command *command) opt_ssl_capath, opt_ssl_cipher); #if MYSQL_VERSION_ID >= 50000 /* Turn on ssl_verify_server_cert only if host is "localhost" */ - opt_ssl_verify_server_cert= !strcmp(ds_connection_name.str, "localhost"); + opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost"); mysql_options(&next_con->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &opt_ssl_verify_server_cert); #endif @@ -6012,15 +6012,13 @@ int main(int argc, char **argv) #ifdef HAVE_OPENSSL -#if MYSQL_VERSION_ID >= 50000 - opt_ssl_verify_server_cert= TRUE; /* Always on in mysqltest */ -#endif - if (opt_use_ssl) { mysql_ssl_set(&cur_con->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher); #if MYSQL_VERSION_ID >= 50000 + /* Turn on ssl_verify_server_cert only if host is "localhost" */ + opt_ssl_verify_server_cert= opt_host && !strcmp(opt_host, "localhost"); mysql_options(&cur_con->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &opt_ssl_verify_server_cert); #endif diff --git a/extra/yassl/README b/extra/yassl/README index 32d97a1e873..6c4d101efc0 100644 --- a/extra/yassl/README +++ b/extra/yassl/README @@ -1,3 +1,11 @@ +*****************yaSSL Release notes, version 1.6.0 (2/22/07) + + This release of yaSSL contains bug fixes, portability enhancements, and + better X509 support. + +See normal build instructions below under 1.0.6. +See libcurl build instructions below under 1.3.0 and note in 1.5.8. + *****************yaSSL Release notes, version 1.5.8 (1/10/07) This release of yaSSL contains bug fixes, portability enhancements, and diff --git a/extra/yassl/include/buffer.hpp b/extra/yassl/include/buffer.hpp index 3fe12f38f57..a51bca9a630 100644 --- a/extra/yassl/include/buffer.hpp +++ b/extra/yassl/include/buffer.hpp @@ -49,13 +49,11 @@ const uint AUTO = 0xFEEDBEEF; // Checking Policy should implement a check function that tests whether the // index is within the size limit of the array struct Check { - Check() {} void check(uint i, uint limit); }; struct NoCheck { - NoCheck() {} void check(uint, uint); }; @@ -193,7 +191,6 @@ inline void checked_delete(T* p) // sets pointer to zero so safe for std conatiners struct del_ptr_zero { - del_ptr_zero() {} template void operator()(T*& p) const { diff --git a/extra/yassl/include/crypto_wrapper.hpp b/extra/yassl/include/crypto_wrapper.hpp index 9e4eb582368..07b5925265a 100644 --- a/extra/yassl/include/crypto_wrapper.hpp +++ b/extra/yassl/include/crypto_wrapper.hpp @@ -42,7 +42,6 @@ namespace yaSSL { // Digest policy should implement a get_digest, update, and get sizes for pad // and digest struct Digest : public virtual_base { - Digest() {} virtual void get_digest(byte*) = 0; virtual void get_digest(byte*, const byte*, unsigned int) = 0; virtual void update(const byte*, unsigned int) = 0; @@ -54,7 +53,6 @@ struct Digest : public virtual_base { // For use with NULL Digests struct NO_MAC : public Digest { - NO_MAC() {} void get_digest(byte*); void get_digest(byte*, const byte*, unsigned int); void update(const byte*, unsigned int); @@ -179,7 +177,6 @@ private: // BulkCipher policy should implement encrypt, decrypt, get block size, // and set keys for encrypt and decrypt struct BulkCipher : public virtual_base { - BulkCipher() {} virtual void encrypt(byte*, const byte*, unsigned int) = 0; virtual void decrypt(byte*, const byte*, unsigned int) = 0; virtual void set_encryptKey(const byte*, const byte* = 0) = 0; @@ -193,7 +190,6 @@ struct BulkCipher : public virtual_base { // For use with NULL Ciphers struct NO_Cipher : public BulkCipher { - NO_Cipher() {} void encrypt(byte*, const byte*, unsigned int) {} void decrypt(byte*, const byte*, unsigned int) {} void set_encryptKey(const byte*, const byte*) {} @@ -315,14 +311,12 @@ struct Auth : public virtual_base { virtual bool verify(const byte*, unsigned int, const byte*, unsigned int) = 0; virtual uint get_signatureLength() const = 0; - Auth() {} virtual ~Auth() {} }; // For use with NULL Authentication schemes struct NO_Auth : public Auth { - NO_Auth() {} void sign(byte*, const byte*, unsigned int, const RandomPool&) {} bool verify(const byte*, unsigned int, const byte*, unsigned int) { return true; } diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp index b961ec3e478..0525943e45d 100644 --- a/extra/yassl/include/lock.hpp +++ b/extra/yassl/include/lock.hpp @@ -28,7 +28,7 @@ namespace yaSSL { #ifdef MULTI_THREADED - #if defined(_WIN32) || defined(_WIN64) + #ifdef _WIN32 #include class Mutex { diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index 14384f632e1..7dd33e3fcad 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -33,14 +33,9 @@ #include "opensslv.h" /* for version number */ #include "rsa.h" -#define YASSL_VERSION "1.5.8" -#if defined(_WIN32) || defined(_WIN64) - #include - typedef SOCKET socket_t; -#else - typedef int socket_t; -#endif +#define YASSL_VERSION "1.6.5" + #if defined(__cplusplus) extern "C" { @@ -195,10 +190,17 @@ enum { /* ERR Constants */ EVP_R_BAD_DECRYPT = 2 }; +/* + Allow type used by SSL_set_fd to be changed, default to int + in order to be compatible with OpenSSL + */ +#ifndef YASSL_SOCKET_T_DEFINED +typedef int YASSL_SOCKET_T; +#endif SSL_CTX* SSL_CTX_new(SSL_METHOD*); SSL* SSL_new(SSL_CTX*); -int SSL_set_fd (SSL*, socket_t); +int SSL_set_fd (SSL*, YASSL_SOCKET_T); int SSL_connect(SSL*); int SSL_write(SSL*, const void*, int); int SSL_read(SSL*, void*, int); diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp index 60c00d5e6c3..308704c2af0 100644 --- a/extra/yassl/include/socket_wrapper.hpp +++ b/extra/yassl/include/socket_wrapper.hpp @@ -28,8 +28,9 @@ #include -#include "openssl/ssl.h" /* for socket_t */ -#if !defined(_WIN32) && !defined(_WIN64) +#ifdef _WIN32 + #include +#else #include #include #include @@ -43,7 +44,10 @@ namespace yaSSL { typedef unsigned int uint; -#if !defined( _WIN32) && !defined(_WIN64) +#ifdef _WIN32 + typedef SOCKET socket_t; +#else + typedef int socket_t; const socket_t INVALID_SOCKET = -1; const int SD_RECEIVE = 0; const int SD_SEND = 1; diff --git a/extra/yassl/include/yassl.hpp b/extra/yassl/include/yassl.hpp index b8190c484f7..29e0a5d94ec 100644 --- a/extra/yassl/include/yassl.hpp +++ b/extra/yassl/include/yassl.hpp @@ -28,7 +28,7 @@ namespace yaSSL { -#if defined(_WIN32) || defined(_WIN64) +#ifdef _WIN32 typedef unsigned int SOCKET_T; #else typedef int SOCKET_T; diff --git a/extra/yassl/include/yassl_imp.hpp b/extra/yassl/include/yassl_imp.hpp index a94b03bacbf..f6434443cb0 100644 --- a/extra/yassl/include/yassl_imp.hpp +++ b/extra/yassl/include/yassl_imp.hpp @@ -64,7 +64,6 @@ struct RecordLayerHeader { // base for all messages struct Message : public virtual_base { - Message() {} virtual input_buffer& set(input_buffer&) =0; virtual output_buffer& get(output_buffer&) const =0; @@ -178,7 +177,6 @@ private: class HandShakeBase : public virtual_base { int length_; public: - HandShakeBase() {} int get_length() const; void set_length(int); @@ -196,7 +194,6 @@ public: struct HelloRequest : public HandShakeBase { - HelloRequest() {} input_buffer& set(input_buffer& in); output_buffer& get(output_buffer& out) const; @@ -330,7 +327,6 @@ private: struct ServerKeyBase : public virtual_base { - ServerKeyBase() {} virtual ~ServerKeyBase() {} virtual void build(SSL&) {} virtual void read(SSL&, input_buffer&) {} @@ -341,21 +337,15 @@ struct ServerKeyBase : public virtual_base { // Server random number for FORTEZZA KEA struct Fortezza_Server : public ServerKeyBase { - Fortezza_Server() {} opaque r_s_[FORTEZZA_MAX]; }; struct SignatureBase : public virtual_base { - SignatureBase() {} virtual ~SignatureBase() {} }; -struct anonymous_sa : public SignatureBase -{ -public: - anonymous_sa() {} -}; +struct anonymous_sa : public SignatureBase {}; struct Hashes { @@ -365,13 +355,11 @@ struct Hashes { struct rsa_sa : public SignatureBase { - rsa_sa() {} Hashes hashes_; }; struct dsa_sa : public SignatureBase { - dsa_sa() {} uint8 sha_[SHA_LEN]; }; @@ -399,7 +387,6 @@ private: // Server's RSA exchange struct RSA_Server : public ServerKeyBase { - RSA_Server() {} ServerRSAParams params_; opaque* signature_; // signed rsa_sa hashes }; @@ -474,7 +461,6 @@ struct PreMasterSecret { struct ClientKeyBase : public virtual_base { - ClientKeyBase() {} virtual ~ClientKeyBase() {} virtual void build(SSL&) {} virtual void read(SSL&, input_buffer&) {} @@ -505,7 +491,6 @@ private: // Fortezza Key Parameters from page 29 // hard code lengths cause only used here struct FortezzaKeys : public ClientKeyBase { - FortezzaKeys() {} opaque y_c_ [128]; // client's Yc, public value opaque r_c_ [128]; // client's Rc opaque y_signature_ [40]; // DSS signed public key diff --git a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp index d75d2200b3c..94cb85c3300 100644 --- a/extra/yassl/include/yassl_int.hpp +++ b/extra/yassl/include/yassl_int.hpp @@ -228,7 +228,6 @@ struct BIGNUM { TaoCrypt::Integer), we need to explicitly state the namespace here to let gcc 2.96 deduce the correct type. */ - BIGNUM() {} yaSSL::Integer int_; void assign(const byte* b, uint s) { int_.assign(b,s); } }; diff --git a/extra/yassl/src/crypto_wrapper.cpp b/extra/yassl/src/crypto_wrapper.cpp index 0291faab301..28d7f1b5693 100644 --- a/extra/yassl/src/crypto_wrapper.cpp +++ b/extra/yassl/src/crypto_wrapper.cpp @@ -550,7 +550,6 @@ void RandomPool::Fill(opaque* dst, uint sz) const // Implementation of DSS Authentication struct DSS::DSSImpl { - DSSImpl() {} void SetPublic (const byte*, unsigned int); void SetPrivate(const byte*, unsigned int); TaoCrypt::DSA_PublicKey publicKey_; @@ -623,7 +622,6 @@ bool DSS::verify(const byte* sha_digest, unsigned int /* shaSz */, // Implementation of RSA key interface struct RSA::RSAImpl { - RSAImpl() {} void SetPublic (const byte*, unsigned int); void SetPrivate(const byte*, unsigned int); TaoCrypt::RSA_PublicKey publicKey_; diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index c1d9ac81919..86dfa1c6ebd 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -39,7 +39,6 @@ #include "coding.hpp" // HexDecoder #include "helpers.hpp" // for placement new hack #include -#include #ifdef _WIN32 #include // FindFirstFile etc.. @@ -233,7 +232,7 @@ void SSL_free(SSL* ssl) } -int SSL_set_fd(SSL* ssl, socket_t fd) +int SSL_set_fd(SSL* ssl, YASSL_SOCKET_T fd) { ssl->useSocket().set_fd(fd); return SSL_SUCCESS; @@ -954,7 +953,7 @@ void ERR_print_errors_fp(FILE* /*fp*/) char* ERR_error_string(unsigned long errNumber, char* buffer) { - static char* msg = (char*) "Please supply a buffer for error string"; + static char* msg = (char*)"Please supply a buffer for error string"; if (buffer) { SetErrorString(YasslError(errNumber), buffer); diff --git a/extra/yassl/taocrypt/README b/extra/yassl/taocrypt/README index 34e1744492e..0a7ff301786 100644 --- a/extra/yassl/taocrypt/README +++ b/extra/yassl/taocrypt/README @@ -1,4 +1,15 @@ -TaoCrypt release 0.9.0 09/18/2006 +TaoCrypt release 0.9.2 02/5/2007 + + +This release includes bug fixes, portability enhancements, and some +optimiations. + +See 0.9.0 for build instructions. + + + + +******************TaoCrypt release 0.9.0 09/18/2006 This is the first release of TaoCrypt, it was previously only included with yaSSL. TaoCrypt is highly portable and fast, its features include: diff --git a/extra/yassl/taocrypt/benchmark/benchmark.cpp b/extra/yassl/taocrypt/benchmark/benchmark.cpp index dd9d1b1ff0d..bb725a90187 100644 --- a/extra/yassl/taocrypt/benchmark/benchmark.cpp +++ b/extra/yassl/taocrypt/benchmark/benchmark.cpp @@ -65,7 +65,7 @@ int main(int argc, char** argv) const int megs = 5; // how much to test -const byte global_key[] = +const byte key[] = { 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, @@ -81,19 +81,19 @@ const byte iv[] = }; -byte global_plain [1024*1024]; -byte global_cipher[1024*1024]; +byte plain [1024*1024]; +byte cipher[1024*1024]; void bench_des() { DES_EDE3_CBC_Encryption enc; - enc.SetKey(global_key, 16, iv); + enc.SetKey(key, 16, iv); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_plain, global_cipher, sizeof(global_plain)); + enc.Process(plain, cipher, sizeof(plain)); double total = current_time() - start; @@ -107,12 +107,12 @@ void bench_des() void bench_aes(bool show) { AES_CBC_Encryption enc; - enc.SetKey(global_key, 16, iv); + enc.SetKey(key, 16, iv); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_plain, global_cipher, sizeof(global_plain)); + enc.Process(plain, cipher, sizeof(plain)); double total = current_time() - start; @@ -127,12 +127,12 @@ void bench_aes(bool show) void bench_twofish() { Twofish_CBC_Encryption enc; - enc.SetKey(global_key, 16, iv); + enc.SetKey(key, 16, iv); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_plain, global_cipher, sizeof(global_plain)); + enc.Process(plain, cipher, sizeof(plain)); double total = current_time() - start; @@ -147,12 +147,12 @@ void bench_twofish() void bench_blowfish() { Blowfish_CBC_Encryption enc; - enc.SetKey(global_key, 16, iv); + enc.SetKey(key, 16, iv); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_plain, global_cipher, sizeof(global_plain)); + enc.Process(plain, cipher, sizeof(plain)); double total = current_time() - start; @@ -166,12 +166,12 @@ void bench_blowfish() void bench_arc4() { ARC4 enc; - enc.SetKey(global_key, 16); + enc.SetKey(key, 16); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_cipher, global_plain, sizeof(global_plain)); + enc.Process(cipher, plain, sizeof(plain)); double total = current_time() - start; @@ -191,7 +191,7 @@ void bench_md5() for(int i = 0; i < megs; i++) - hash.Update(global_plain, sizeof(global_plain)); + hash.Update(plain, sizeof(plain)); hash.Final(digest); @@ -213,7 +213,7 @@ void bench_sha() for(int i = 0; i < megs; i++) - hash.Update(global_plain, sizeof(global_plain)); + hash.Update(plain, sizeof(plain)); hash.Final(digest); @@ -241,7 +241,7 @@ void bench_ripemd() for(int i = 0; i < megs; i++) - hash.Update(global_plain, sizeof(global_plain)); + hash.Update(plain, sizeof(plain)); hash.Final(digest); diff --git a/extra/yassl/taocrypt/include/algebra.hpp b/extra/yassl/taocrypt/include/algebra.hpp index 9a6b5344c0d..298ef115a4a 100644 --- a/extra/yassl/taocrypt/include/algebra.hpp +++ b/extra/yassl/taocrypt/include/algebra.hpp @@ -40,7 +40,6 @@ class TAOCRYPT_NO_VTABLE AbstractGroup : public virtual_base public: typedef Integer Element; - AbstractGroup() {} virtual ~AbstractGroup() {} virtual bool Equal(const Element &a, const Element &b) const =0; @@ -95,7 +94,6 @@ private: class MultiplicativeGroupT : public AbstractGroup { public: - MultiplicativeGroupT() {} const AbstractRing& GetRing() const {return *m_pRing;} @@ -147,7 +145,6 @@ class TAOCRYPT_NO_VTABLE AbstractEuclideanDomain : public AbstractRing { public: - AbstractEuclideanDomain() {} typedef Integer Element; virtual void DivisionAlgorithm(Element &r, Element &q, const Element &a, diff --git a/extra/yassl/taocrypt/include/des.hpp b/extra/yassl/taocrypt/include/des.hpp index 9082f8ab57d..f99a289392f 100644 --- a/extra/yassl/taocrypt/include/des.hpp +++ b/extra/yassl/taocrypt/include/des.hpp @@ -41,7 +41,6 @@ enum { DES_BLOCK_SIZE = 8, DES_KEY_SIZE = 32 }; class BasicDES { public: - BasicDES() {} void SetKey(const byte*, word32, CipherDir dir); void RawProcessBlock(word32&, word32&) const; protected: diff --git a/extra/yassl/taocrypt/include/hash.hpp b/extra/yassl/taocrypt/include/hash.hpp index 71072bd3e74..fa5f6c04720 100644 --- a/extra/yassl/taocrypt/include/hash.hpp +++ b/extra/yassl/taocrypt/include/hash.hpp @@ -31,7 +31,6 @@ namespace TaoCrypt { // HASH class HASH : public virtual_base { public: - HASH() {} virtual ~HASH() {} virtual void Update(const byte*, word32) = 0; @@ -58,8 +57,7 @@ public: word32 GetBitCountLo() const { return loLen_ << 3; } word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) + (hiLen_ << 3); } - - enum { MaxDigestSz = 5, MaxBufferSz = 64 }; + enum { MaxDigestSz = 8, MaxBufferSz = 64 }; protected: typedef word32 HashLengthType; word32 buffLen_; // in bytes @@ -74,6 +72,38 @@ protected: }; +#ifdef WORD64_AVAILABLE + +// 64-bit HASH with Transform +class HASH64withTransform : public HASH { +public: + HASH64withTransform(word32 digSz, word32 buffSz); + virtual ~HASH64withTransform() {} + virtual ByteOrder getByteOrder() const = 0; + virtual word32 getPadSize() const = 0; + + virtual void Update(const byte*, word32); + virtual void Final(byte*); + + word32 GetBitCountLo() const { return loLen_ << 3; } + word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) + + (hiLen_ << 3); } + enum { MaxDigestSz = 8, MaxBufferSz = 128 }; +protected: + typedef word32 HashLengthType; + word32 buffLen_; // in bytes + HashLengthType loLen_; // length in bytes + HashLengthType hiLen_; // length in bytes + word64 digest_[MaxDigestSz]; + word64 buffer_[MaxBufferSz / sizeof(word64)]; + + virtual void Transform() = 0; + + void AddLength(word32); +}; + +#endif // WORD64_AVAILABLE + } // namespace diff --git a/extra/yassl/taocrypt/include/hmac.hpp b/extra/yassl/taocrypt/include/hmac.hpp index ccd54c05cb1..1d486514e06 100644 --- a/extra/yassl/taocrypt/include/hmac.hpp +++ b/extra/yassl/taocrypt/include/hmac.hpp @@ -109,11 +109,11 @@ void HMAC::KeyInnerHash() // Update template -void HMAC::Update(const byte* msg_arg, word32 length) +void HMAC::Update(const byte* msg, word32 length) { if (!innerHashKeyed_) KeyInnerHash(); - mac_.Update(msg_arg, length); + mac_.Update(msg, length); } diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp index 224589e0640..96648a39aa1 100644 --- a/extra/yassl/taocrypt/include/misc.hpp +++ b/extra/yassl/taocrypt/include/misc.hpp @@ -464,6 +464,25 @@ inline word32 ByteReverse(word32 value) } +#ifdef WORD64_AVAILABLE + +inline word64 ByteReverse(word64 value) +{ +#ifdef TAOCRYPT_SLOW_WORD64 + return (word64(ByteReverse(word32(value))) << 32) | + ByteReverse(word32(value>>32)); +#else + value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) | + ((value & W64LIT(0x00FF00FF00FF00FF)) << 8); + value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) | + ((value & W64LIT(0x0000FFFF0000FFFF)) << 16); + return rotlFixed(value, 32U); +#endif +} + +#endif // WORD64_AVAILABLE + + template inline void ByteReverse(T* out, const T* in, word32 byteCount) { diff --git a/extra/yassl/taocrypt/include/modarith.hpp b/extra/yassl/taocrypt/include/modarith.hpp index f42a4397d48..501a8129b90 100644 --- a/extra/yassl/taocrypt/include/modarith.hpp +++ b/extra/yassl/taocrypt/include/modarith.hpp @@ -37,8 +37,8 @@ public: typedef int RandomizationParameter; typedef Integer Element; - ModularArithmetic(const Integer &modulus_arg = Integer::One()) - : modulus(modulus_arg), result((word)0, modulus_arg.reg_.size()) {} + ModularArithmetic(const Integer &modulus = Integer::One()) + : modulus(modulus), result((word)0, modulus.reg_.size()) {} ModularArithmetic(const ModularArithmetic &ma) : AbstractRing(), diff --git a/extra/yassl/taocrypt/include/modes.hpp b/extra/yassl/taocrypt/include/modes.hpp index 36618a8f5ed..d1ebce7568b 100644 --- a/extra/yassl/taocrypt/include/modes.hpp +++ b/extra/yassl/taocrypt/include/modes.hpp @@ -42,8 +42,8 @@ public: { cipher_.Process(c, p, sz); } void SetKey(const byte* k, word32 sz) { cipher_.SetKey(k, sz, DIR); } - void SetKey(const byte* k, word32 sz, const byte* iv_arg) - { cipher_.SetKey(k, sz, DIR); cipher_.SetIV(iv_arg); } + void SetKey(const byte* k, word32 sz, const byte* iv) + { cipher_.SetKey(k, sz, DIR); cipher_.SetIV(iv); } private: T cipher_; diff --git a/extra/yassl/taocrypt/include/rsa.hpp b/extra/yassl/taocrypt/include/rsa.hpp index 454b0ef33a7..c895ab6fd34 100644 --- a/extra/yassl/taocrypt/include/rsa.hpp +++ b/extra/yassl/taocrypt/include/rsa.hpp @@ -131,7 +131,6 @@ private: // block type 2 padding class RSA_BlockType2 { public: - RSA_BlockType2() {} void Pad(const byte*, word32, byte*, word32, RandomNumberGenerator&) const; word32 UnPad(const byte*, word32, byte*) const; @@ -141,7 +140,6 @@ public: // block type 1 padding class RSA_BlockType1 { public: - RSA_BlockType1() {} void Pad(const byte*, word32, byte*, word32, RandomNumberGenerator&) const; word32 UnPad(const byte*, word32, byte*) const; @@ -176,27 +174,25 @@ public: // Public Encrypt template -void RSA_Encryptor::Encrypt(const byte* plain_arg, word32 sz, - byte* cipher_arg, - RandomNumberGenerator& rng_arg) +void RSA_Encryptor::Encrypt(const byte* plain, word32 sz, byte* cipher, + RandomNumberGenerator& rng) { PK_Lengths lengths(key_.GetModulus()); assert(sz <= lengths.FixedMaxPlaintextLength()); ByteBlock paddedBlock(lengths.PaddedBlockByteLength()); - padding_.Pad(plain_arg, sz, paddedBlock.get_buffer(), - lengths.PaddedBlockBitLength(), rng_arg); + padding_.Pad(plain, sz, paddedBlock.get_buffer(), + lengths.PaddedBlockBitLength(), rng); key_.ApplyFunction(Integer(paddedBlock.get_buffer(), paddedBlock.size())). - Encode(cipher_arg, lengths.FixedCiphertextLength()); + Encode(cipher, lengths.FixedCiphertextLength()); } // Private Decrypt template -word32 RSA_Decryptor::Decrypt(const byte* cipher_arg, word32 sz, - byte* plain_arg, - RandomNumberGenerator& rng_arg) +word32 RSA_Decryptor::Decrypt(const byte* cipher, word32 sz, byte* plain, + RandomNumberGenerator& rng) { PK_Lengths lengths(key_.GetModulus()); assert(sz == lengths.FixedCiphertextLength()); @@ -205,29 +201,29 @@ word32 RSA_Decryptor::Decrypt(const byte* cipher_arg, word32 sz, return 0; ByteBlock paddedBlock(lengths.PaddedBlockByteLength()); - Integer x = key_.CalculateInverse(rng_arg, Integer(cipher_arg, + Integer x = key_.CalculateInverse(rng, Integer(cipher, lengths.FixedCiphertextLength()).Ref()); if (x.ByteCount() > paddedBlock.size()) x = Integer::Zero(); // don't return false, prevents timing attack x.Encode(paddedBlock.get_buffer(), paddedBlock.size()); return padding_.UnPad(paddedBlock.get_buffer(), - lengths.PaddedBlockBitLength(), plain_arg); + lengths.PaddedBlockBitLength(), plain); } // Private SSL type (block 1) Encrypt template void RSA_Decryptor::SSL_Sign(const byte* message, word32 sz, byte* sig, - RandomNumberGenerator& rng_arg) + RandomNumberGenerator& rng) { RSA_PublicKey inverse; inverse.Initialize(key_.GetModulus(), key_.GetPrivateExponent()); RSA_Encryptor enc(inverse); // SSL Type - enc.Encrypt(message, sz, sig, rng_arg); + enc.Encrypt(message, sz, sig, rng); } -word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain_arg); +word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain); // Public SSL type (block 1) Decrypt @@ -235,11 +231,11 @@ template bool RSA_Encryptor::SSL_Verify(const byte* message, word32 sz, const byte* sig) { - ByteBlock local_plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength()); - if (SSL_Decrypt(key_, sig, local_plain.get_buffer()) != sz) + ByteBlock plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength()); + if (SSL_Decrypt(key_, sig, plain.get_buffer()) != sz) return false; // not right justified or bad padding - if ( (memcmp(local_plain.get_buffer(), message, sz)) == 0) + if ( (memcmp(plain.get_buffer(), message, sz)) == 0) return true; return false; } diff --git a/extra/yassl/taocrypt/include/sha.hpp b/extra/yassl/taocrypt/include/sha.hpp index c501d3ad306..c0b4368121b 100644 --- a/extra/yassl/taocrypt/include/sha.hpp +++ b/extra/yassl/taocrypt/include/sha.hpp @@ -64,6 +64,103 @@ inline void swap(SHA& a, SHA& b) a.Swap(b); } +// SHA-256 digest +class SHA256 : public HASHwithTransform { +public: + enum { BLOCK_SIZE = 64, DIGEST_SIZE = 32, PAD_SIZE = 56, + TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes + SHA256() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) + { Init(); } + ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } + word32 getBlockSize() const { return BLOCK_SIZE; } + word32 getDigestSize() const { return DIGEST_SIZE; } + word32 getPadSize() const { return PAD_SIZE; } + + void Init(); + + SHA256(const SHA256&); + SHA256& operator= (const SHA256&); + + void Swap(SHA256&); +private: + void Transform(); +}; + + +// SHA-224 digest +class SHA224 : public HASHwithTransform { +public: + enum { BLOCK_SIZE = 64, DIGEST_SIZE = 28, PAD_SIZE = 56, + TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes + SHA224() : HASHwithTransform(SHA256::DIGEST_SIZE /sizeof(word32),BLOCK_SIZE) + { Init(); } + ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } + word32 getBlockSize() const { return BLOCK_SIZE; } + word32 getDigestSize() const { return DIGEST_SIZE; } + word32 getPadSize() const { return PAD_SIZE; } + + void Init(); + + SHA224(const SHA224&); + SHA224& operator= (const SHA224&); + + void Swap(SHA224&); +private: + void Transform(); +}; + + +#ifdef WORD64_AVAILABLE + +// SHA-512 digest +class SHA512 : public HASH64withTransform { +public: + enum { BLOCK_SIZE = 128, DIGEST_SIZE = 64, PAD_SIZE = 112, + TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes + SHA512() : HASH64withTransform(DIGEST_SIZE / sizeof(word64), BLOCK_SIZE) + { Init(); } + ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } + word32 getBlockSize() const { return BLOCK_SIZE; } + word32 getDigestSize() const { return DIGEST_SIZE; } + word32 getPadSize() const { return PAD_SIZE; } + + void Init(); + + SHA512(const SHA512&); + SHA512& operator= (const SHA512&); + + void Swap(SHA512&); +private: + void Transform(); +}; + + +// SHA-384 digest +class SHA384 : public HASH64withTransform { +public: + enum { BLOCK_SIZE = 128, DIGEST_SIZE = 48, PAD_SIZE = 112, + TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes + SHA384() : HASH64withTransform(SHA512::DIGEST_SIZE/ sizeof(word64), + BLOCK_SIZE) + { Init(); } + ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } + word32 getBlockSize() const { return BLOCK_SIZE; } + word32 getDigestSize() const { return DIGEST_SIZE; } + word32 getPadSize() const { return PAD_SIZE; } + + void Init(); + + SHA384(const SHA384&); + SHA384& operator= (const SHA384&); + + void Swap(SHA384&); +private: + void Transform(); +}; + +#endif // WORD64_AVAILABLE + + } // namespace diff --git a/extra/yassl/taocrypt/include/type_traits.hpp b/extra/yassl/taocrypt/include/type_traits.hpp index ce21a2eaa63..0dd5e4e5c50 100644 --- a/extra/yassl/taocrypt/include/type_traits.hpp +++ b/extra/yassl/taocrypt/include/type_traits.hpp @@ -62,11 +62,7 @@ MK_FUNDAMENTAL_TYPE(unsigned long) MK_FUNDAMENTAL_TYPE(float) MK_FUNDAMENTAL_TYPE( double) - -#ifdef LONG_DOUBLE_IS_DISTINCT_TYPE -// Don't define by default as this gives warnings on power mac - MK_FUNDAMENTAL_TYPE(long double) -#endif +MK_FUNDAMENTAL_TYPE(long double) #if defined(WORD64_AVAILABLE) && defined(WORD64_IS_DISTINCT_TYPE) MK_FUNDAMENTAL_TYPE(word64) diff --git a/extra/yassl/taocrypt/include/types.hpp b/extra/yassl/taocrypt/include/types.hpp index c817572d265..3efdcdfbccb 100644 --- a/extra/yassl/taocrypt/include/types.hpp +++ b/extra/yassl/taocrypt/include/types.hpp @@ -46,13 +46,16 @@ typedef unsigned int word32; #define WORD64_AVAILABLE #define WORD64_IS_DISTINCT_TYPE typedef unsigned __int64 word64; + #define W64LIT(x) x##ui64 #elif SIZEOF_LONG == 8 #define WORD64_AVAILABLE typedef unsigned long word64; + #define W64LIT(x) x##LL #elif SIZEOF_LONG_LONG == 8 #define WORD64_AVAILABLE #define WORD64_IS_DISTINCT_TYPE typedef unsigned long long word64; + #define W64LIT(x) x##LL #endif diff --git a/extra/yassl/taocrypt/mySTL/algorithm.hpp b/extra/yassl/taocrypt/mySTL/algorithm.hpp index f6a29cf4bdb..d8bc29a0bb9 100644 --- a/extra/yassl/taocrypt/mySTL/algorithm.hpp +++ b/extra/yassl/taocrypt/mySTL/algorithm.hpp @@ -27,8 +27,6 @@ namespace mySTL { -#undef max -#undef min template inline const T& max(const T& a, const T&b) diff --git a/extra/yassl/taocrypt/mySTL/list.hpp b/extra/yassl/taocrypt/mySTL/list.hpp index 98a4589a354..6a081cba5ad 100644 --- a/extra/yassl/taocrypt/mySTL/list.hpp +++ b/extra/yassl/taocrypt/mySTL/list.hpp @@ -231,7 +231,7 @@ void list::push_front(T t) template void list::pop_front() { - node* local_front = head_; + node* front = head_; if (head_ == 0) return; @@ -241,8 +241,8 @@ void list::pop_front() head_ = head_->next_; head_->prev_ = 0; } - destroy(local_front); - FreeMemory(local_front); + destroy(front); + FreeMemory(front); --sz_; } @@ -303,13 +303,13 @@ T list::back() const template typename list::node* list::look_up(T t) { - node* local_list = head_; + node* list = head_; - if (local_list == 0) return 0; + if (list == 0) return 0; - for (; local_list; local_list = local_list->next_) - if (local_list->value_ == t) - return local_list; + for (; list; list = list->next_) + if (list->value_ == t) + return list; return 0; } diff --git a/extra/yassl/taocrypt/src/aes.cpp b/extra/yassl/taocrypt/src/aes.cpp index 4f87bf3778a..b2b42d3dcf0 100644 --- a/extra/yassl/taocrypt/src/aes.cpp +++ b/extra/yassl/taocrypt/src/aes.cpp @@ -90,14 +90,13 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) rounds_ = keylen/4 + 6; word32 temp, *rk = key_; + unsigned int i=0; GetUserKey(BigEndianOrder, rk, keylen/4, userKey, keylen); switch(keylen) { case 16: - { - unsigned int i=0; while (true) { temp = rk[3]; @@ -115,10 +114,8 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) rk += 4; } break; - } + case 24: - { - unsigned int i=0; while (true) // for (;;) here triggers a bug in VC60 SP4 w/ Pro Pack { temp = rk[ 5]; @@ -139,10 +136,7 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) } break; - } case 32: - { - unsigned int i=0; while (true) { temp = rk[ 7]; @@ -171,7 +165,6 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) } break; } - } if (dir_ == DECRYPTION) { diff --git a/extra/yassl/taocrypt/src/algebra.cpp b/extra/yassl/taocrypt/src/algebra.cpp index d797d0d4108..cb597c41552 100644 --- a/extra/yassl/taocrypt/src/algebra.cpp +++ b/extra/yassl/taocrypt/src/algebra.cpp @@ -186,10 +186,10 @@ Integer AbstractGroup::CascadeScalarMultiply(const Element &x, struct WindowSlider { - WindowSlider(const Integer &exp_arg, bool fastNegate_arg, + WindowSlider(const Integer &exp, bool fastNegate, unsigned int windowSizeIn=0) - : exp(exp_arg), windowModulus(Integer::One()), windowSize(windowSizeIn), - windowBegin(0), fastNegate(fastNegate_arg), firstTime(true), + : exp(exp), windowModulus(Integer::One()), windowSize(windowSizeIn), + windowBegin(0), fastNegate(fastNegate), firstTime(true), finished(false) { if (windowSize == 0) diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index 5bc865a4ba7..a06ab658c7b 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -737,17 +737,17 @@ void CertDecoder::GetName(NameType nt) email = true; source_.advance(oidSz + 1); - word32 length2 = GetLength(source_); + word32 length = GetLength(source_); if (email) { memcpy(&ptr[idx], "/emailAddress=", 14); idx += 14; - memcpy(&ptr[idx], source_.get_current(), length2); - idx += length2; + memcpy(&ptr[idx], source_.get_current(), length); + idx += length; } - source_.advance(length2); + source_.advance(length); } } ptr[idx++] = 0; diff --git a/extra/yassl/taocrypt/src/hash.cpp b/extra/yassl/taocrypt/src/hash.cpp index 66598177631..c51dc42a909 100644 --- a/extra/yassl/taocrypt/src/hash.cpp +++ b/extra/yassl/taocrypt/src/hash.cpp @@ -108,4 +108,89 @@ void HASHwithTransform::Final(byte* hash) Init(); // reset state } + +#ifdef WORD64_AVAILABLE + +HASH64withTransform::HASH64withTransform(word32 digSz, word32 buffSz) +{ + assert(digSz <= MaxDigestSz); + assert(buffSz <= MaxBufferSz); +} + + +void HASH64withTransform::AddLength(word32 len) +{ + HashLengthType tmp = loLen_; + if ( (loLen_ += len) < tmp) + hiLen_++; // carry low to high + hiLen_ += SafeRightShift<8*sizeof(HashLengthType)>(len); +} + + +// Update digest with data of size len, do in blocks +void HASH64withTransform::Update(const byte* data, word32 len) +{ + // do block size increments + word32 blockSz = getBlockSize(); + byte* local = reinterpret_cast(buffer_); + + while (len) { + word32 add = min(len, blockSz - buffLen_); + memcpy(&local[buffLen_], data, add); + + buffLen_ += add; + data += add; + len -= add; + + if (buffLen_ == blockSz) { + ByteReverseIf(buffer_, buffer_, blockSz, getByteOrder()); + Transform(); + AddLength(blockSz); + buffLen_ = 0; + } + } +} + + +// Final process, place digest in hash +void HASH64withTransform::Final(byte* hash) +{ + word32 blockSz = getBlockSize(); + word32 digestSz = getDigestSize(); + word32 padSz = getPadSize(); + ByteOrder order = getByteOrder(); + + AddLength(buffLen_); // before adding pads + HashLengthType preLoLen = GetBitCountLo(); + HashLengthType preHiLen = GetBitCountHi(); + byte* local = reinterpret_cast(buffer_); + + local[buffLen_++] = 0x80; // add 1 + + // pad with zeros + if (buffLen_ > padSz) { + memset(&local[buffLen_], 0, blockSz - buffLen_); + buffLen_ += blockSz - buffLen_; + + ByteReverseIf(buffer_, buffer_, blockSz, order); + Transform(); + buffLen_ = 0; + } + memset(&local[buffLen_], 0, padSz - buffLen_); + + ByteReverseIf(buffer_, buffer_, padSz, order); + + buffer_[blockSz / sizeof(word64) - 2] = order ? preHiLen : preLoLen; + buffer_[blockSz / sizeof(word64) - 1] = order ? preLoLen : preHiLen; + + Transform(); + ByteReverseIf(digest_, digest_, digestSz, order); + memcpy(hash, digest_, digestSz); + + Init(); // reset state +} + +#endif // WORD64_AVAILABLE + + } // namespace diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index 84255aa8544..85733b88aa9 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -3390,7 +3390,7 @@ void Integer::DivideByPowerOf2(Integer &r, Integer &q, const Integer &a, CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount); SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount); if (n % WORD_BITS != 0) - r.reg_[wordCount-1] %= ((word) 1 << (n % WORD_BITS)); + r.reg_[wordCount-1] %= (word(1) << (n % WORD_BITS)); } else { diff --git a/extra/yassl/taocrypt/src/sha.cpp b/extra/yassl/taocrypt/src/sha.cpp index 9713940529a..ef165a342ad 100644 --- a/extra/yassl/taocrypt/src/sha.cpp +++ b/extra/yassl/taocrypt/src/sha.cpp @@ -69,6 +69,77 @@ void SHA::Init() hiLen_ = 0; } +void SHA256::Init() +{ + digest_[0] = 0x6A09E667L; + digest_[1] = 0xBB67AE85L; + digest_[2] = 0x3C6EF372L; + digest_[3] = 0xA54FF53AL; + digest_[4] = 0x510E527FL; + digest_[5] = 0x9B05688CL; + digest_[6] = 0x1F83D9ABL; + digest_[7] = 0x5BE0CD19L; + + buffLen_ = 0; + loLen_ = 0; + hiLen_ = 0; +} + + +void SHA224::Init() +{ + digest_[0] = 0xc1059ed8; + digest_[1] = 0x367cd507; + digest_[2] = 0x3070dd17; + digest_[3] = 0xf70e5939; + digest_[4] = 0xffc00b31; + digest_[5] = 0x68581511; + digest_[6] = 0x64f98fa7; + digest_[7] = 0xbefa4fa4; + + buffLen_ = 0; + loLen_ = 0; + hiLen_ = 0; +} + + +#ifdef WORD64_AVAILABLE + +void SHA512::Init() +{ + digest_[0] = W64LIT(0x6a09e667f3bcc908); + digest_[1] = W64LIT(0xbb67ae8584caa73b); + digest_[2] = W64LIT(0x3c6ef372fe94f82b); + digest_[3] = W64LIT(0xa54ff53a5f1d36f1); + digest_[4] = W64LIT(0x510e527fade682d1); + digest_[5] = W64LIT(0x9b05688c2b3e6c1f); + digest_[6] = W64LIT(0x1f83d9abfb41bd6b); + digest_[7] = W64LIT(0x5be0cd19137e2179); + + buffLen_ = 0; + loLen_ = 0; + hiLen_ = 0; +} + + +void SHA384::Init() +{ + digest_[0] = W64LIT(0xcbbb9d5dc1059ed8); + digest_[1] = W64LIT(0x629a292a367cd507); + digest_[2] = W64LIT(0x9159015a3070dd17); + digest_[3] = W64LIT(0x152fecd8f70e5939); + digest_[4] = W64LIT(0x67332667ffc00b31); + digest_[5] = W64LIT(0x8eb44a8768581511); + digest_[6] = W64LIT(0xdb0c2e0d64f98fa7); + digest_[7] = W64LIT(0x47b5481dbefa4fa4); + + buffLen_ = 0; + loLen_ = 0; + hiLen_ = 0; +} + +#endif // WORD64_AVAILABLE + SHA::SHA(const SHA& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) @@ -81,6 +152,59 @@ SHA::SHA(const SHA& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32), memcpy(buffer_, that.buffer_, BLOCK_SIZE); } + +SHA256::SHA256(const SHA256& that) : HASHwithTransform(DIGEST_SIZE / + sizeof(word32), BLOCK_SIZE) +{ + buffLen_ = that.buffLen_; + loLen_ = that.loLen_; + hiLen_ = that.hiLen_; + + memcpy(digest_, that.digest_, DIGEST_SIZE); + memcpy(buffer_, that.buffer_, BLOCK_SIZE); +} + + +SHA224::SHA224(const SHA224& that) : HASHwithTransform(SHA256::DIGEST_SIZE / + sizeof(word32), BLOCK_SIZE) +{ + buffLen_ = that.buffLen_; + loLen_ = that.loLen_; + hiLen_ = that.hiLen_; + + memcpy(digest_, that.digest_, DIGEST_SIZE); + memcpy(buffer_, that.buffer_, BLOCK_SIZE); +} + + +#ifdef WORD64_AVAILABLE + +SHA512::SHA512(const SHA512& that) : HASH64withTransform(DIGEST_SIZE / + sizeof(word64), BLOCK_SIZE) +{ + buffLen_ = that.buffLen_; + loLen_ = that.loLen_; + hiLen_ = that.hiLen_; + + memcpy(digest_, that.digest_, DIGEST_SIZE); + memcpy(buffer_, that.buffer_, BLOCK_SIZE); +} + + +SHA384::SHA384(const SHA384& that) : HASH64withTransform(SHA512::DIGEST_SIZE / + sizeof(word64), BLOCK_SIZE) +{ + buffLen_ = that.buffLen_; + loLen_ = that.loLen_; + hiLen_ = that.hiLen_; + + memcpy(digest_, that.digest_, DIGEST_SIZE); + memcpy(buffer_, that.buffer_, BLOCK_SIZE); +} + +#endif // WORD64_AVAILABLE + + SHA& SHA::operator= (const SHA& that) { SHA tmp(that); @@ -90,6 +214,46 @@ SHA& SHA::operator= (const SHA& that) } +SHA256& SHA256::operator= (const SHA256& that) +{ + SHA256 tmp(that); + Swap(tmp); + + return *this; +} + + +SHA224& SHA224::operator= (const SHA224& that) +{ + SHA224 tmp(that); + Swap(tmp); + + return *this; +} + + +#ifdef WORD64_AVAILABLE + +SHA512& SHA512::operator= (const SHA512& that) +{ + SHA512 tmp(that); + Swap(tmp); + + return *this; +} + + +SHA384& SHA384::operator= (const SHA384& that) +{ + SHA384 tmp(that); + Swap(tmp); + + return *this; +} + +#endif // WORD64_AVAILABLE + + void SHA::Swap(SHA& other) { STL::swap(loLen_, other.loLen_); @@ -101,6 +265,53 @@ void SHA::Swap(SHA& other) } +void SHA256::Swap(SHA256& other) +{ + STL::swap(loLen_, other.loLen_); + STL::swap(hiLen_, other.hiLen_); + STL::swap(buffLen_, other.buffLen_); + + memcpy(digest_, other.digest_, DIGEST_SIZE); + memcpy(buffer_, other.buffer_, BLOCK_SIZE); +} + + +void SHA224::Swap(SHA224& other) +{ + STL::swap(loLen_, other.loLen_); + STL::swap(hiLen_, other.hiLen_); + STL::swap(buffLen_, other.buffLen_); + + memcpy(digest_, other.digest_, DIGEST_SIZE); + memcpy(buffer_, other.buffer_, BLOCK_SIZE); +} + + +#ifdef WORD64_AVAILABLE + +void SHA512::Swap(SHA512& other) +{ + STL::swap(loLen_, other.loLen_); + STL::swap(hiLen_, other.hiLen_); + STL::swap(buffLen_, other.buffLen_); + + memcpy(digest_, other.digest_, DIGEST_SIZE); + memcpy(buffer_, other.buffer_, BLOCK_SIZE); +} + + +void SHA384::Swap(SHA384& other) +{ + STL::swap(loLen_, other.loLen_); + STL::swap(hiLen_, other.hiLen_); + STL::swap(buffLen_, other.buffLen_); + + memcpy(digest_, other.digest_, DIGEST_SIZE); + memcpy(buffer_, other.buffer_, BLOCK_SIZE); +} + +#endif // WORD64_AVIALABLE + #ifdef DO_SHA_ASM @@ -203,6 +414,205 @@ void SHA::Transform() } +#define blk2(i) (W[i&15]+=s1(W[(i-2)&15])+W[(i-7)&15]+s0(W[(i-15)&15])) + +#define Ch(x,y,z) (z^(x&(y^z))) +#define Maj(x,y,z) ((x&y)|(z&(x|y))) + +#define a(i) T[(0-i)&7] +#define b(i) T[(1-i)&7] +#define c(i) T[(2-i)&7] +#define d(i) T[(3-i)&7] +#define e(i) T[(4-i)&7] +#define f(i) T[(5-i)&7] +#define g(i) T[(6-i)&7] +#define h(i) T[(7-i)&7] + +#define R(i) h(i)+=S1(e(i))+Ch(e(i),f(i),g(i))+K[i+j]+(j?blk2(i):blk0(i));\ + d(i)+=h(i);h(i)+=S0(a(i))+Maj(a(i),b(i),c(i)) + +// for SHA256 +#define S0(x) (rotrFixed(x,2)^rotrFixed(x,13)^rotrFixed(x,22)) +#define S1(x) (rotrFixed(x,6)^rotrFixed(x,11)^rotrFixed(x,25)) +#define s0(x) (rotrFixed(x,7)^rotrFixed(x,18)^(x>>3)) +#define s1(x) (rotrFixed(x,17)^rotrFixed(x,19)^(x>>10)) + + +static const word32 K256[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + + +static void Transform256(word32* digest_, word32* buffer_) +{ + const word32* K = K256; + + word32 W[16]; + word32 T[8]; + + // Copy digest to working vars + memcpy(T, digest_, sizeof(T)); + + // 64 operations, partially loop unrolled + for (unsigned int j = 0; j < 64; j += 16) { + R( 0); R( 1); R( 2); R( 3); + R( 4); R( 5); R( 6); R( 7); + R( 8); R( 9); R(10); R(11); + R(12); R(13); R(14); R(15); + } + + // Add the working vars back into digest + digest_[0] += a(0); + digest_[1] += b(0); + digest_[2] += c(0); + digest_[3] += d(0); + digest_[4] += e(0); + digest_[5] += f(0); + digest_[6] += g(0); + digest_[7] += h(0); + + // Wipe variables + memset(W, 0, sizeof(W)); + memset(T, 0, sizeof(T)); +} + + +// undef for 256 +#undef S0 +#undef S1 +#undef s0 +#undef s1 + + +void SHA256::Transform() +{ + Transform256(digest_, buffer_); +} + + +void SHA224::Transform() +{ + Transform256(digest_, buffer_); +} + + +#ifdef WORD64_AVAILABLE + +static const word64 K512[80] = { + W64LIT(0x428a2f98d728ae22), W64LIT(0x7137449123ef65cd), + W64LIT(0xb5c0fbcfec4d3b2f), W64LIT(0xe9b5dba58189dbbc), + W64LIT(0x3956c25bf348b538), W64LIT(0x59f111f1b605d019), + W64LIT(0x923f82a4af194f9b), W64LIT(0xab1c5ed5da6d8118), + W64LIT(0xd807aa98a3030242), W64LIT(0x12835b0145706fbe), + W64LIT(0x243185be4ee4b28c), W64LIT(0x550c7dc3d5ffb4e2), + W64LIT(0x72be5d74f27b896f), W64LIT(0x80deb1fe3b1696b1), + W64LIT(0x9bdc06a725c71235), W64LIT(0xc19bf174cf692694), + W64LIT(0xe49b69c19ef14ad2), W64LIT(0xefbe4786384f25e3), + W64LIT(0x0fc19dc68b8cd5b5), W64LIT(0x240ca1cc77ac9c65), + W64LIT(0x2de92c6f592b0275), W64LIT(0x4a7484aa6ea6e483), + W64LIT(0x5cb0a9dcbd41fbd4), W64LIT(0x76f988da831153b5), + W64LIT(0x983e5152ee66dfab), W64LIT(0xa831c66d2db43210), + W64LIT(0xb00327c898fb213f), W64LIT(0xbf597fc7beef0ee4), + W64LIT(0xc6e00bf33da88fc2), W64LIT(0xd5a79147930aa725), + W64LIT(0x06ca6351e003826f), W64LIT(0x142929670a0e6e70), + W64LIT(0x27b70a8546d22ffc), W64LIT(0x2e1b21385c26c926), + W64LIT(0x4d2c6dfc5ac42aed), W64LIT(0x53380d139d95b3df), + W64LIT(0x650a73548baf63de), W64LIT(0x766a0abb3c77b2a8), + W64LIT(0x81c2c92e47edaee6), W64LIT(0x92722c851482353b), + W64LIT(0xa2bfe8a14cf10364), W64LIT(0xa81a664bbc423001), + W64LIT(0xc24b8b70d0f89791), W64LIT(0xc76c51a30654be30), + W64LIT(0xd192e819d6ef5218), W64LIT(0xd69906245565a910), + W64LIT(0xf40e35855771202a), W64LIT(0x106aa07032bbd1b8), + W64LIT(0x19a4c116b8d2d0c8), W64LIT(0x1e376c085141ab53), + W64LIT(0x2748774cdf8eeb99), W64LIT(0x34b0bcb5e19b48a8), + W64LIT(0x391c0cb3c5c95a63), W64LIT(0x4ed8aa4ae3418acb), + W64LIT(0x5b9cca4f7763e373), W64LIT(0x682e6ff3d6b2b8a3), + W64LIT(0x748f82ee5defb2fc), W64LIT(0x78a5636f43172f60), + W64LIT(0x84c87814a1f0ab72), W64LIT(0x8cc702081a6439ec), + W64LIT(0x90befffa23631e28), W64LIT(0xa4506cebde82bde9), + W64LIT(0xbef9a3f7b2c67915), W64LIT(0xc67178f2e372532b), + W64LIT(0xca273eceea26619c), W64LIT(0xd186b8c721c0c207), + W64LIT(0xeada7dd6cde0eb1e), W64LIT(0xf57d4f7fee6ed178), + W64LIT(0x06f067aa72176fba), W64LIT(0x0a637dc5a2c898a6), + W64LIT(0x113f9804bef90dae), W64LIT(0x1b710b35131c471b), + W64LIT(0x28db77f523047d84), W64LIT(0x32caab7b40c72493), + W64LIT(0x3c9ebe0a15c9bebc), W64LIT(0x431d67c49c100d4c), + W64LIT(0x4cc5d4becb3e42b6), W64LIT(0x597f299cfc657e2a), + W64LIT(0x5fcb6fab3ad6faec), W64LIT(0x6c44198c4a475817) +}; + + +// for SHA512 +#define S0(x) (rotrFixed(x,28)^rotrFixed(x,34)^rotrFixed(x,39)) +#define S1(x) (rotrFixed(x,14)^rotrFixed(x,18)^rotrFixed(x,41)) +#define s0(x) (rotrFixed(x,1)^rotrFixed(x,8)^(x>>7)) +#define s1(x) (rotrFixed(x,19)^rotrFixed(x,61)^(x>>6)) + + +static void Transform512(word64* digest_, word64* buffer_) +{ + const word64* K = K512; + + word64 W[16]; + word64 T[8]; + + // Copy digest to working vars + memcpy(T, digest_, sizeof(T)); + + // 64 operations, partially loop unrolled + for (unsigned int j = 0; j < 80; j += 16) { + R( 0); R( 1); R( 2); R( 3); + R( 4); R( 5); R( 6); R( 7); + R( 8); R( 9); R(10); R(11); + R(12); R(13); R(14); R(15); + } + + // Add the working vars back into digest + + digest_[0] += a(0); + digest_[1] += b(0); + digest_[2] += c(0); + digest_[3] += d(0); + digest_[4] += e(0); + digest_[5] += f(0); + digest_[6] += g(0); + digest_[7] += h(0); + + // Wipe variables + memset(W, 0, sizeof(W)); + memset(T, 0, sizeof(T)); +} + + +void SHA512::Transform() +{ + Transform512(digest_, buffer_); +} + + +void SHA384::Transform() +{ + Transform512(digest_, buffer_); +} + +#endif // WORD64_AVIALABLE + + #ifdef DO_SHA_ASM // f1(x,y,z) (z^(x &(y^z))) diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp index c0d7aa50f18..0af278404ab 100644 --- a/extra/yassl/taocrypt/test/test.cpp +++ b/extra/yassl/taocrypt/test/test.cpp @@ -29,6 +29,12 @@ using TaoCrypt::byte; using TaoCrypt::word32; using TaoCrypt::SHA; +using TaoCrypt::SHA256; +using TaoCrypt::SHA224; +#ifdef WORD64_AVAILABLE + using TaoCrypt::SHA512; + using TaoCrypt::SHA384; +#endif using TaoCrypt::MD5; using TaoCrypt::MD2; using TaoCrypt::MD4; @@ -88,8 +94,13 @@ struct testVector { output_((byte*)out), inLen_(strlen(in)), outLen_(strlen(out)) {} }; -void file_test(int, char**); int sha_test(); +int sha256_test(); +#ifdef WORD64_AVAILABLE + int sha512_test(); + int sha384_test(); +#endif +int sha224_test(); int md5_test(); int md2_test(); int md4_test(); @@ -139,20 +150,20 @@ const byte msgTmp[] = { // "now is the time for all " w/o trailing 0 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 }; -byte* global_msg = 0; // for block cipher input -byte* global_plain = 0; // for cipher decrypt comparison -byte* global_cipher = 0; // block output +byte* msg = 0; // for block cipher input +byte* plain = 0; // for cipher decrypt comparison +byte* cipher = 0; // block output void taocrypt_test(void* args) { ((func_args*)args)->return_code = -1; // error state - global_msg = NEW_TC byte[24]; - global_plain = NEW_TC byte[24]; - global_cipher = NEW_TC byte[24]; + msg = NEW_TC byte[24]; + plain = NEW_TC byte[24]; + cipher = NEW_TC byte[24]; - memcpy(global_msg, msgTmp, 24); + memcpy(msg, msgTmp, 24); int ret = 0; if ( (ret = sha_test()) ) @@ -160,6 +171,30 @@ void taocrypt_test(void* args) else printf( "SHA test passed!\n"); + if ( (ret = sha256_test()) ) + err_sys("SHA-256 test failed!\n", ret); + else + printf( "SHA-256 test passed!\n"); + + if ( (ret = sha224_test()) ) + err_sys("SHA-224 test failed!\n", ret); + else + printf( "SHA-224 test passed!\n"); + +#ifdef WORD64_AVAILABLE + + if ( (ret = sha512_test()) ) + err_sys("SHA-512 test failed!\n", ret); + else + printf( "SHA-512 test passed!\n"); + + if ( (ret = sha384_test()) ) + err_sys("SHA-384 test failed!\n", ret); + else + printf( "SHA-384 test passed!\n"); + +#endif + if ( (ret = md5_test()) ) err_sys("MD5 test failed!\n", ret); else @@ -237,9 +272,9 @@ void taocrypt_test(void* args) printf( "PKCS12 test passed!\n"); */ - tcArrayDelete(global_cipher); - tcArrayDelete(global_plain); - tcArrayDelete(global_msg); + tcArrayDelete(cipher); + tcArrayDelete(plain); + tcArrayDelete(msg); ((func_args*)args)->return_code = ret; } @@ -264,7 +299,7 @@ void taocrypt_test(void* args) #endif // NO_MAIN_DRIVER -void file_test(char* file, byte* check) +void file_test(const char* file, byte* check) { FILE* f; int i(0); @@ -328,6 +363,136 @@ int sha_test() } +int sha256_test() +{ + SHA256 sha; + byte hash[SHA256::DIGEST_SIZE]; + + testVector test_sha[] = + { + testVector("abc", + "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22" + "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00" + "\x15\xAD"), + testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", + "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" + "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" + "\x06\xC1") + }; + + int times( sizeof(test_sha) / sizeof(testVector) ); + for (int i = 0; i < times; ++i) { + sha.Update(test_sha[i].input_, test_sha[i].inLen_); + sha.Final(hash); + + if (memcmp(hash, test_sha[i].output_, SHA256::DIGEST_SIZE) != 0) + return -1 - i; + } + + return 0; +} + + +#ifdef WORD64_AVAILABLE + +int sha512_test() +{ + SHA512 sha; + byte hash[SHA512::DIGEST_SIZE]; + + testVector test_sha[] = + { + testVector("abc", + "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41" + "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55" + "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3" + "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f" + "\xa5\x4c\xa4\x9f"), + testVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", + "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" + "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" + "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" + "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" + "\x87\x4b\xe9\x09") + }; + + int times( sizeof(test_sha) / sizeof(testVector) ); + for (int i = 0; i < times; ++i) { + sha.Update(test_sha[i].input_, test_sha[i].inLen_); + sha.Final(hash); + + if (memcmp(hash, test_sha[i].output_, SHA512::DIGEST_SIZE) != 0) + return -1 - i; + } + + return 0; +} + + +int sha384_test() +{ + SHA384 sha; + byte hash[SHA384::DIGEST_SIZE]; + + testVector test_sha[] = + { + testVector("abc", + "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50" + "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff" + "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34" + "\xc8\x25\xa7"), + testVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", + "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" + "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" + "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" + "\x74\x60\x39") + }; + + int times( sizeof(test_sha) / sizeof(testVector) ); + for (int i = 0; i < times; ++i) { + sha.Update(test_sha[i].input_, test_sha[i].inLen_); + sha.Final(hash); + + if (memcmp(hash, test_sha[i].output_, SHA384::DIGEST_SIZE) != 0) + return -1 - i; + } + + return 0; +} + +#endif // WORD64_AVAILABLE + + +int sha224_test() +{ + SHA224 sha; + byte hash[SHA224::DIGEST_SIZE]; + + testVector test_sha[] = + { + testVector("abc", + "\x23\x09\x7d\x22\x34\x05\xd8\x22\x86\x42\xa4\x77\xbd\xa2\x55" + "\xb3\x2a\xad\xbc\xe4\xbd\xa0\xb3\xf7\xe3\x6c\x9d\xa7"), + testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", + "\x75\x38\x8b\x16\x51\x27\x76\xcc\x5d\xba\x5d\xa1\xfd\x89\x01" + "\x50\xb0\xc6\x45\x5c\xb4\xf5\x8b\x19\x52\x52\x25\x25") + }; + + int times( sizeof(test_sha) / sizeof(testVector) ); + for (int i = 0; i < times; ++i) { + sha.Update(test_sha[i].input_, test_sha[i].inLen_); + sha.Final(hash); + + if (memcmp(hash, test_sha[i].output_, SHA224::DIGEST_SIZE) != 0) + return -1 - i; + } + + return 0; +} + + int md5_test() { MD5 md5; @@ -606,11 +771,11 @@ int des_test() const byte iv[] = { 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef }; enc.SetKey(key, sizeof(key)); - enc.Process(global_cipher, global_msg, sz); + enc.Process(cipher, msg, sz); dec.SetKey(key, sizeof(key)); - dec.Process(global_plain, global_cipher, sz); + dec.Process(plain, cipher, sz); - if (memcmp(global_plain, global_msg, sz)) + if (memcmp(plain, msg, sz)) return -50; const byte verify1[] = @@ -620,7 +785,7 @@ int des_test() 0x89,0x3d,0x51,0xec,0x4b,0x56,0x3b,0x53 }; - if (memcmp(global_cipher, verify1, sz)) + if (memcmp(cipher, verify1, sz)) return -51; // CBC mode @@ -628,11 +793,11 @@ int des_test() DES_CBC_Decryption dec2; enc2.SetKey(key, sizeof(key), iv); - enc2.Process(global_cipher, global_msg, sz); + enc2.Process(cipher, msg, sz); dec2.SetKey(key, sizeof(key), iv); - dec2.Process(global_plain, global_cipher, sz); + dec2.Process(plain, cipher, sz); - if (memcmp(global_plain, global_msg, sz)) + if (memcmp(plain, msg, sz)) return -52; const byte verify2[] = @@ -642,7 +807,7 @@ int des_test() 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b }; - if (memcmp(global_cipher, verify2, sz)) + if (memcmp(cipher, verify2, sz)) return -53; // EDE3 CBC mode @@ -664,11 +829,11 @@ int des_test() }; enc3.SetKey(key3, sizeof(key3), iv3); - enc3.Process(global_cipher, global_msg, sz); + enc3.Process(cipher, msg, sz); dec3.SetKey(key3, sizeof(key3), iv3); - dec3.Process(global_plain, global_cipher, sz); + dec3.Process(plain, cipher, sz); - if (memcmp(global_plain, global_msg, sz)) + if (memcmp(plain, msg, sz)) return -54; const byte verify3[] = @@ -678,7 +843,7 @@ int des_test() 0x18,0xbc,0xbb,0x6d,0xd2,0xb1,0x16,0xda }; - if (memcmp(global_cipher, verify3, sz)) + if (memcmp(cipher, verify3, sz)) return -55; return 0; @@ -697,10 +862,10 @@ int aes_test() enc.SetKey(key, bs, iv); dec.SetKey(key, bs, iv); - enc.Process(global_cipher, global_msg, bs); - dec.Process(global_plain, global_cipher, bs); + enc.Process(cipher, msg, bs); + dec.Process(plain, cipher, bs); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -60; const byte verify[] = @@ -709,7 +874,7 @@ int aes_test() 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb }; - if (memcmp(global_cipher, verify, bs)) + if (memcmp(cipher, verify, bs)) return -61; AES_ECB_Encryption enc2; @@ -718,10 +883,10 @@ int aes_test() enc2.SetKey(key, bs, iv); dec2.SetKey(key, bs, iv); - enc2.Process(global_cipher, global_msg, bs); - dec2.Process(global_plain, global_cipher, bs); + enc2.Process(cipher, msg, bs); + dec2.Process(plain, cipher, bs); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -62; const byte verify2[] = @@ -730,7 +895,7 @@ int aes_test() 0xc8,0x8c,0x33,0x3b,0xb5,0x8f,0x85,0xd1 }; - if (memcmp(global_cipher, verify2, bs)) + if (memcmp(cipher, verify2, bs)) return -63; return 0; @@ -749,10 +914,10 @@ int twofish_test() enc.SetKey(key, bs, iv); dec.SetKey(key, bs, iv); - enc.Process(global_cipher, global_msg, bs); - dec.Process(global_plain, global_cipher, bs); + enc.Process(cipher, msg, bs); + dec.Process(plain, cipher, bs); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -60; const byte verify[] = @@ -761,7 +926,7 @@ int twofish_test() 0x21,0x03,0x58,0x79,0x5F,0x02,0x27,0x2C }; - if (memcmp(global_cipher, verify, bs)) + if (memcmp(cipher, verify, bs)) return -61; Twofish_ECB_Encryption enc2; @@ -770,10 +935,10 @@ int twofish_test() enc2.SetKey(key, bs, iv); dec2.SetKey(key, bs, iv); - enc2.Process(global_cipher, global_msg, bs); - dec2.Process(global_plain, global_cipher, bs); + enc2.Process(cipher, msg, bs); + dec2.Process(plain, cipher, bs); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -62; const byte verify2[] = @@ -782,7 +947,7 @@ int twofish_test() 0xC4,0xCD,0x6B,0x91,0x14,0xC5,0x3A,0x09 }; - if (memcmp(global_cipher, verify2, bs)) + if (memcmp(cipher, verify2, bs)) return -63; return 0; @@ -801,10 +966,10 @@ int blowfish_test() enc.SetKey(key, 16, iv); dec.SetKey(key, 16, iv); - enc.Process(global_cipher, global_msg, bs * 2); - dec.Process(global_plain, global_cipher, bs * 2); + enc.Process(cipher, msg, bs * 2); + dec.Process(plain, cipher, bs * 2); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -60; const byte verify[] = @@ -813,7 +978,7 @@ int blowfish_test() 0xBC,0xD9,0x08,0xC4,0x94,0x6C,0x89,0xA3 }; - if (memcmp(global_cipher, verify, bs)) + if (memcmp(cipher, verify, bs)) return -61; Blowfish_ECB_Encryption enc2; @@ -822,10 +987,10 @@ int blowfish_test() enc2.SetKey(key, 16, iv); dec2.SetKey(key, 16, iv); - enc2.Process(global_cipher, global_msg, bs * 2); - dec2.Process(global_plain, global_cipher, bs * 2); + enc2.Process(cipher, msg, bs * 2); + dec2.Process(plain, cipher, bs * 2); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -62; const byte verify2[] = @@ -834,7 +999,7 @@ int blowfish_test() 0x8F,0xCE,0x39,0x32,0xDE,0xD7,0xBC,0x5B }; - if (memcmp(global_cipher, verify2, bs)) + if (memcmp(cipher, verify2, bs)) return -63; return 0; diff --git a/extra/yassl/testsuite/testsuite.cpp b/extra/yassl/testsuite/testsuite.cpp index 06e75153341..3cd832ebb03 100644 --- a/extra/yassl/testsuite/testsuite.cpp +++ b/extra/yassl/testsuite/testsuite.cpp @@ -7,7 +7,7 @@ typedef unsigned char byte; void taocrypt_test(void*); -void file_test(char*, byte*); +void file_test(const char*, byte*); void client_test(void*); void echoclient_test(void*); @@ -86,8 +86,8 @@ int main(int argc, char** argv) // input output compare byte input[TaoCrypt::MD5::DIGEST_SIZE]; byte output[TaoCrypt::MD5::DIGEST_SIZE]; - file_test((char*) "input", input); - file_test((char*) "output", output); + file_test("input", input); + file_test("output", output); assert(memcmp(input, output, sizeof(input)) == 0); printf("\nAll tests passed!\n"); @@ -141,17 +141,16 @@ int test_openSSL_des() /* test des encrypt/decrypt */ char data[] = "this is my data "; int dataSz = strlen(data); - DES_key_schedule local_key[3]; + DES_key_schedule key[3]; byte iv[8]; EVP_BytesToKey(EVP_des_ede3_cbc(), EVP_md5(), NULL, (byte*)data, dataSz, 1, - (byte*)local_key, iv); + (byte*)key, iv); byte cipher[16]; - DES_ede3_cbc_encrypt((byte*)data, cipher, dataSz, - &local_key[0], &local_key[1], - &local_key[2], &iv, true); + DES_ede3_cbc_encrypt((byte*)data, cipher, dataSz, &key[0], &key[1], + &key[2], &iv, true); byte plain[16]; - DES_ede3_cbc_encrypt(cipher, plain, 16, &local_key[0], &local_key[1], - &local_key[2], &iv, false); + DES_ede3_cbc_encrypt(cipher, plain, 16, &key[0], &key[1], &key[2], + &iv, false); return 0; } diff --git a/include/my_base.h b/include/my_base.h index dd21362e8f7..37110810558 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -172,7 +172,15 @@ enum ha_extra_function { Off by default. */ HA_EXTRA_WRITE_CAN_REPLACE, - HA_EXTRA_WRITE_CANNOT_REPLACE + HA_EXTRA_WRITE_CANNOT_REPLACE, + /* + Inform handler that delete_row()/update_row() cannot batch deletes/updates + and should perform them immediately. This may be needed when table has + AFTER DELETE/UPDATE triggers which access to subject table. + These flags are reset by the handler::extra(HA_EXTRA_RESET) call. + */ + HA_EXTRA_DELETE_CANNOT_BATCH, + HA_EXTRA_UPDATE_CANNOT_BATCH }; /* The following is parameter to ha_panic() */ diff --git a/include/my_time.h b/include/my_time.h index d96c5822069..6aa25487cf1 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -72,6 +72,8 @@ typedef long my_time_t; #define TIME_MAX_SECOND 59 #define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \ TIME_MAX_SECOND) +#define TIME_MAX_VALUE_SECONDS (TIME_MAX_HOUR * 3600L + \ + TIME_MAX_MINUTE * 60L + TIME_MAX_SECOND) my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, ulong flags, int *was_cut); diff --git a/include/mysql.h b/include/mysql.h index f76ae10ca16..33bdf80ef73 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -525,7 +525,7 @@ MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild); MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild); MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, - const char *arg); + const void *arg); void STDCALL mysql_free_result(MYSQL_RES *result); void STDCALL mysql_data_seek(MYSQL_RES *result, my_ulonglong offset); diff --git a/include/mysql_com.h b/include/mysql_com.h index e2ab9601f5f..2223dbad6ab 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -20,9 +20,13 @@ #ifndef _mysql_com_h #define _mysql_com_h -#define NAME_LEN 64 /* Field/table name length */ #define HOSTNAME_LENGTH 60 -#define USERNAME_LENGTH 16 +#define SYSTEM_CHARSET_MBMAXLEN 3 +#define NAME_CHAR_LEN 64 /* Field/table name length */ +#define USERNAME_CHAR_LENGTH 16 +#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) +#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN) + #define SERVER_VERSION_LENGTH 60 #define SQLSTATE_LENGTH 5 diff --git a/include/mysql_h.ic b/include/mysql_h.ic index 44c51b34c1d..7d16a886fd8 100644 --- a/include/mysql_h.ic +++ b/include/mysql_h.ic @@ -638,7 +638,7 @@ extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from); # 415 "mysql_com.h" extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st); # 30 "typelib.h" -extern int find_type(char * x, TYPELIB * typelib, unsigned int); +extern int find_type(char * x, const TYPELIB * typelib, unsigned int); # 429 "mysql_com.h" extern void get_salt_from_password(unsigned char * res, char const * password); # 422 "mysql_com.h" diff --git a/include/typelib.h b/include/typelib.h index 75d170e59d3..e04ec20f2bc 100644 --- a/include/typelib.h +++ b/include/typelib.h @@ -26,7 +26,8 @@ typedef struct st_typelib { /* Different types saved here */ unsigned int *type_lengths; } TYPELIB; -extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name); +extern int find_type(char *x, const TYPELIB *typelib, + unsigned int full_name); extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); extern const char *get_type(TYPELIB *typelib,unsigned int nr); extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from); diff --git a/include/violite.h b/include/violite.h index 2647342ed65..04365213ec0 100644 --- a/include/violite.h +++ b/include/violite.h @@ -102,6 +102,9 @@ void vio_timeout(Vio *vio,uint which, uint timeout); #define HEADER_DES_LOCL_H dummy_something #define YASSL_MYSQL_COMPATIBLE #define YASSL_PREFIX +/* Set yaSSL to use same type as MySQL do for socket handles */ +typedef my_socket YASSL_SOCKET_T; +#define YASSL_SOCKET_T_DEFINED #include #include diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc index e3b716953c3..e4fee4448c1 100644 --- a/mysql-test/include/gis_generic.inc +++ b/mysql-test/include/gis_generic.inc @@ -178,4 +178,73 @@ insert into t1 (fl) values (pointfromtext('point(1,1)')); drop table t1; -# End of 5.0 tests +--echo End of 4.1 tests + + +# +# Bug#24563: MBROverlaps does not seem to function propertly +# Bug#54888: MBROverlaps missing in 5.1? +# + +# Test all MBR* functions and their non-MBR-prefixed aliases, +# using shifted squares to verify the spatial relations. + +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); + +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); + +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); + +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); + +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); + +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); + +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); + +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; + +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; + +# Overlaps needs a few more tests, with point and line dimensions + +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); + +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +SELECT Overlaps(@horiz1, @point2) FROM DUAL; + +DROP TABLE t1; + +--echo End of 5.0 tests diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 22290a88d39..28c78fbffeb 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -498,6 +498,17 @@ sub collect_one_test_case($$$$$$$) { { mtr_options_from_test_file($tinfo,"$testdir/${tname}.test"); + if ( defined $::used_default_engine ) + { + # Different default engine is used + # tag test to require that engine + $tinfo->{'ndb_test'}= 1 + if ( $::used_default_engine =~ /^ndb/i ); + + $tinfo->{'innodb_test'}= 1 + if ( $::used_default_engine =~ /^innodb/i ); + } + if ( $tinfo->{'big_test'} and ! $::opt_big_test ) { $tinfo->{'skip'}= 1; diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 690ca8313dd..53bf37bcc83 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -38,8 +38,8 @@ sub mtr_kill_processes ($); sub mtr_ping_with_timeout($); sub mtr_ping_port ($); -# static in C -sub spawn_impl ($$$$$$$$); +# Local function +sub spawn_impl ($$$$$$$); ############################################################################## # @@ -47,18 +47,16 @@ sub spawn_impl ($$$$$$$$); # ############################################################################## -# This function try to mimic the C version used in "netware/mysql_test_run.c" - sub mtr_run ($$$$$$;$) { my $path= shift; my $arg_list_t= shift; my $input= shift; my $output= shift; my $error= shift; - my $pid_file= shift; + my $pid_file= shift; # Not used my $spawn_opts= shift; - return spawn_impl($path,$arg_list_t,'run',$input,$output,$error,$pid_file, + return spawn_impl($path,$arg_list_t,'run',$input,$output,$error, $spawn_opts); } @@ -68,10 +66,10 @@ sub mtr_run_test ($$$$$$;$) { my $input= shift; my $output= shift; my $error= shift; - my $pid_file= shift; + my $pid_file= shift; # Not used my $spawn_opts= shift; - return spawn_impl($path,$arg_list_t,'test',$input,$output,$error,$pid_file, + return spawn_impl($path,$arg_list_t,'test',$input,$output,$error, $spawn_opts); } @@ -81,28 +79,22 @@ sub mtr_spawn ($$$$$$;$) { my $input= shift; my $output= shift; my $error= shift; - my $pid_file= shift; + my $pid_file= shift; # Not used my $spawn_opts= shift; - return spawn_impl($path,$arg_list_t,'spawn',$input,$output,$error,$pid_file, + return spawn_impl($path,$arg_list_t,'spawn',$input,$output,$error, $spawn_opts); } -############################################################################## -# -# If $join is set, we return the error code, else we return the PID -# -############################################################################## -sub spawn_impl ($$$$$$$$) { +sub spawn_impl ($$$$$$$) { my $path= shift; my $arg_list_t= shift; my $mode= shift; my $input= shift; my $output= shift; my $error= shift; - my $pid_file= shift; # FIXME my $spawn_opts= shift; if ( $::opt_script_debug ) @@ -155,10 +147,6 @@ sub spawn_impl ($$$$$$$$) { else { # Child, redirect output and exec - # FIXME I tried POSIX::setsid() here to detach and, I hoped, - # avoid zombies. But everything went wild, somehow the parent - # became a deamon as well, and was hard to kill ;-) - # Need to catch SIGCHLD and do waitpid or something instead...... $SIG{INT}= 'DEFAULT'; # Parent do some stuff, we don't @@ -196,7 +184,15 @@ sub spawn_impl ($$$$$$$$) { } else { - if ( ! open(STDERR,$log_file_open_mode,$error) ) + if ( $::glob_win32_perl ) + { + # Don't redirect stdout on ActiveState perl since this is + # just another thread in the same process. + # Should be fixed so that the thread that is created with fork + # executes the exe in another process and wait's for it to return. + # In the meanwhile, we get all the output from mysqld's to screen + } + elsif ( ! open(STDERR,$log_file_open_mode,$error) ) { mtr_child_error("can't redirect STDERR to \"$error\": $!"); } @@ -259,9 +255,7 @@ sub spawn_parent_impl { # We do blocking waitpid() until we get the return from the # "mysqltest" call. But if a mysqld process dies that we # started, we take this as an error, and kill mysqltest. - # - # FIXME is this as it should be? Can't mysqld terminate - # normally from running a test case? + my $exit_value= -1; my $saved_exit_value; @@ -450,7 +444,6 @@ sub mtr_kill_leftovers () { # We scan the "var/run/" directory for other process id's to kill - # FIXME $path_run_dir or something my $rundir= "$::opt_vardir/run"; mtr_debug("Processing PID files in directory '$rundir'..."); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 43ed90534d4..46938ea7cde 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -305,6 +305,7 @@ our $path_sql_dir; our @data_dir_lst; our $used_binlog_format; +our $used_default_engine; our $debug_compiled_binaries; our $glob_tot_real_time= 0; @@ -520,7 +521,7 @@ sub command_line_setup () { 'compress' => \$opt_compress, 'bench' => \$opt_bench, 'small-bench' => \$opt_small_bench, - 'with-ndbcluster' => \$opt_with_ndbcluster, + 'with-ndbcluster|ndb' => \$opt_with_ndbcluster, 'vs-config' => \$opt_vs_config, # Control what test suites or cases to run @@ -777,6 +778,26 @@ sub command_line_setup () { mtr_report("Using binlog format '$used_binlog_format'"); } + + # -------------------------------------------------------------------------- + # Find out default storage engine being used(if any) + # -------------------------------------------------------------------------- + if ( $opt_with_ndbcluster ) + { + # --ndb or --with-ndbcluster turns on --default-storage-engine=ndbcluster + push(@opt_extra_mysqld_opt, "--default-storage-engine=ndbcluster"); + } + + foreach my $arg ( @opt_extra_mysqld_opt ) + { + if ( $arg =~ /default-storage-engine=(\S+)/ ) + { + $used_default_engine= $1; + } + } + mtr_report("Using default engine '$used_default_engine'") + if defined $used_default_engine; + # -------------------------------------------------------------------------- # Check if we should speed up tests by trying to run on tmpfs # -------------------------------------------------------------------------- @@ -849,20 +870,22 @@ sub command_line_setup () { # -------------------------------------------------------------------------- # Check im suport # -------------------------------------------------------------------------- - if (!$opt_extern) + if ($opt_extern) { - if ( $mysql_version_id < 50000 ) { - # Instance manager is not supported until 5.0 - $opt_skip_im= 1; - - } - - if ( $glob_win32 ) { - mtr_report("Disable Instance manager - not supported on Windows"); - $opt_skip_im= 1; - } - + mtr_report("Disable instance manager when running with extern mysqld"); + $opt_skip_im= 1; } + elsif ( $mysql_version_id < 50000 ) + { + # Instance manager is not supported until 5.0 + $opt_skip_im= 1; + } + elsif ( $glob_win32 ) + { + mtr_report("Disable Instance manager - testing not supported on Windows"); + $opt_skip_im= 1; + } + # -------------------------------------------------------------------------- # Record flag # -------------------------------------------------------------------------- @@ -900,10 +923,6 @@ sub command_line_setup () { # -------------------------------------------------------------------------- # Ndb cluster flags # -------------------------------------------------------------------------- - if ( $opt_with_ndbcluster and !$opt_bench) - { - mtr_error("Can only use --with-ndbcluster together with --bench"); - } if ( $opt_ndbconnectstring ) { @@ -1056,8 +1075,6 @@ sub command_line_setup () { # socket path names. $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 ); - # Put this into a hash, will be a C struct - $master->[0]= { pid => 0, @@ -1065,7 +1082,6 @@ sub command_line_setup () { idx => 0, path_myddir => "$opt_vardir/master-data", path_myerr => "$opt_vardir/log/master.err", - path_mylog => "$opt_vardir/log/master.log", path_pid => "$opt_vardir/run/master.pid", path_sock => "$sockdir/master.sock", port => $opt_master_myport, @@ -1081,7 +1097,6 @@ sub command_line_setup () { idx => 1, path_myddir => "$opt_vardir/master1-data", path_myerr => "$opt_vardir/log/master1.err", - path_mylog => "$opt_vardir/log/master1.log", path_pid => "$opt_vardir/run/master1.pid", path_sock => "$sockdir/master1.sock", port => $opt_master_myport + 1, @@ -1097,7 +1112,6 @@ sub command_line_setup () { idx => 0, path_myddir => "$opt_vardir/slave-data", path_myerr => "$opt_vardir/log/slave.err", - path_mylog => "$opt_vardir/log/slave.log", path_pid => "$opt_vardir/run/slave.pid", path_sock => "$sockdir/slave.sock", port => $opt_slave_myport, @@ -1114,7 +1128,6 @@ sub command_line_setup () { idx => 1, path_myddir => "$opt_vardir/slave1-data", path_myerr => "$opt_vardir/log/slave1.err", - path_mylog => "$opt_vardir/log/slave1.log", path_pid => "$opt_vardir/run/slave1.pid", path_sock => "$sockdir/slave1.sock", port => $opt_slave_myport + 1, @@ -1130,7 +1143,6 @@ sub command_line_setup () { idx => 2, path_myddir => "$opt_vardir/slave2-data", path_myerr => "$opt_vardir/log/slave2.err", - path_mylog => "$opt_vardir/log/slave2.log", path_pid => "$opt_vardir/run/slave2.pid", path_sock => "$sockdir/slave2.sock", port => $opt_slave_myport + 2, @@ -1334,7 +1346,7 @@ sub collect_mysqld_features () { # # Execute "mysqld --no-defaults --help --verbose" to get a - # of all features and settings + # list of all features and settings # my $list= `$exe_mysqld --no-defaults --verbose --help`; @@ -1398,6 +1410,40 @@ sub collect_mysqld_features () { } +sub run_query($$) { + my ($mysqld, $query)= @_; + + my $args; + mtr_init_args(\$args); + + mtr_add_arg($args, "--no-defaults"); + mtr_add_arg($args, "--user=%s", $opt_user); + mtr_add_arg($args, "--port=%d", $mysqld->{'port'}); + mtr_add_arg($args, "--socket=%s", $mysqld->{'path_sock'}); + mtr_add_arg($args, "--silent"); # Tab separated output + mtr_add_arg($args, "-e '%s'", $query); + + my $cmd= "$exe_mysql " . join(' ', @$args); + mtr_verbose("cmd: $cmd"); + return `$cmd`; +} + + +sub collect_mysqld_features_from_running_server () +{ + my $list= run_query($master->[0], "use mysql; SHOW VARIABLES"); + + foreach my $line (split('\n', $list)) + { + # Put variables into hash + if ( $line =~ /^([\S]+)[ \t]+(.*?)\r?$/ ) + { + print "$1=\"$2\"\n"; + $mysqld_variables{$1}= $2; + } + } +} + sub executable_setup_im () { # Look for instance manager binary - mysqlmanager @@ -1933,7 +1979,7 @@ sub environment_setup () { # ---------------------------------------------------- my $cmdline_mysqlbinlog= mtr_native_path($exe_mysqlbinlog) . - " --no-defaults --disable-force-if-open --debug-info --local-load=$opt_tmpdir"; + " --no-defaults --disable-force-if-open --debug-info"; if ( !$opt_extern && $mysql_version_id >= 50000 ) { $cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir"; @@ -2802,10 +2848,7 @@ sub initialize_servers () { } else { - if ($opt_verbose) - { - mtr_report("No need to create '$opt_vardir' it already exists"); - } + mtr_verbose("No need to create '$opt_vardir' it already exists"); } } else @@ -3712,8 +3755,10 @@ sub mysqld_arguments ($$$$) { mtr_add_arg($args, "%s--log-output=table,file", $prefix); } - mtr_add_arg($args, "%s--log=%s", $prefix, $mysqld->{'path_mylog'}); - + my $log_base_path= "$opt_vardir/log/$mysqld->{'type'}$sidx"; + mtr_add_arg($args, "%s--log=%s.log", $prefix, $log_base_path); + mtr_add_arg($args, + "%s--log-slow-queries=%s-slow.log", $prefix, $log_base_path); # Check if "extra_opt" contains --skip-log-bin my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt); @@ -5016,7 +5061,7 @@ Options to control what engine/variation to run skip-ssl Dont start server with support for ssl connections bench Run the benchmark suite small-bench Run the benchmarks with --small-tests --small-tables - with-ndbcluster Use cluster as default table type for benchmark + ndb|with-ndbcluster Use cluster as default table type vs-config Visual Studio configuration used to create executables (default: MTR_VS_CONFIG environment variable) diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index 6ba8191e2c3..59462e848d2 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12666,3 +12666,12 @@ t6 CREATE TABLE `t6` ( KEY `a` (`a`) ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 DROP TABLE t1, t2, t4, t5, t6; +create table t1 (i int) engine=archive; +insert into t1 values (1); +repair table t1 use_frm; +Table Op Msg_type Msg_text +test.t1 repair status OK +select * from t1; +i +1 +drop table t1; diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 210140ea11b..6f8175bd609 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -393,7 +393,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -460,3 +460,89 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 (fl) values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; +End of 4.1 tests +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/r/compress.result b/mysql-test/r/compress.result index 0aebc817146..11b15ed7675 100644 --- a/mysql-test/r/compress.result +++ b/mysql-test/r/compress.result @@ -1,6 +1,9 @@ SHOW STATUS LIKE 'Compression'; Variable_name Value Compression ON +select * from information_schema.session_status where variable_name= 'COMPRESSION'; +VARIABLE_NAME VARIABLE_VALUE +COMPRESSION 1.0000000 drop table if exists t1,t2,t3,t4; CREATE TABLE t1 ( Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, diff --git a/mysql-test/r/crash_commit_before.result b/mysql-test/r/crash_commit_before.result index 8eba584c539..34fb3284bae 100644 --- a/mysql-test/r/crash_commit_before.result +++ b/mysql-test/r/crash_commit_before.result @@ -11,3 +11,4 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SELECT * FROM t1; a +DROP TABLE t1; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 53892b219eb..c7f8ba17930 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -784,6 +784,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (upgrade int); drop table t1; +End of 5.0 tests CREATE TABLE t1 (a int, b int); insert into t1 values (1,1),(1,2); CREATE TABLE t2 (primary key (a)) select * from t1; @@ -827,7 +828,7 @@ ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa DROP DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' RENAME DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa TO a; -ERROR 42000: Unknown database 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +ERROR 42000: Unknown database 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' create database mysqltest; @@ -838,3 +839,103 @@ USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +set names utf8; +create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +select database(); +database() +имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45 +use test; +select SCHEMA_NAME from information_schema.schemata +where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +SCHEMA_NAME +имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45 +drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 +( +имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int, +index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45) +); +create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as +select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +select TABLE_NAME from information_schema.tables where +table_schema='test'; +TABLE_NAME +имÑ_вью_кодировке_утф8_длиной_больше_чем_42 +имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 +select COLUMN_NAME from information_schema.columns where +table_schema='test'; +COLUMN_NAME +имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +select INDEX_NAME from information_schema.statistics where +table_schema='test'; +INDEX_NAME +имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 +select TABLE_NAME from information_schema.views where +table_schema='test'; +TABLE_NAME +имÑ_вью_кодировке_утф8_длиной_больше_чем_42 +show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +Table Create Table +имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 CREATE TABLE `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` ( + `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` int(11) DEFAULT NULL, + KEY `имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48` (`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; +View Create View +имÑ_вью_кодировке_утф8_длиной_больше_чем_42 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `имÑ_вью_кодировке_утф8_длиной_больше_чем_42` AS select `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48`.`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` AS `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` from `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` +create event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 on schedule every 2 year do select 1; +select EVENT_NAME from information_schema.events +where event_schema='test'; +EVENT_NAME +имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 +drop event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48; +create event +очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 +on schedule every 2 year do select 1; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49 +before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; +select TRIGGER_NAME from information_schema.triggers where +trigger_schema='test'; +TRIGGER_NAME +имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49 +drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49; +create trigger +очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 +before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50() +begin +end; +select ROUTINE_NAME from information_schema.routines where +routine_schema='test'; +ROUTINE_NAME +имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50 +drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50; +create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() +begin +end; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49() +returns int +return 0; +select ROUTINE_NAME from information_schema.routines where +routine_schema='test'; +ROUTINE_NAME +имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49 +drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49; +create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() +returns int +return 0; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; +drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +set names default; +End of 5.1 tests diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index cf3495ef26d..9d8de75fe60 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -189,12 +189,12 @@ date format datetime 2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450 2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 00:11:12.123450 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12 -10:20:10 %H:%i:%s 0000-00-00 00:00:00 -10:20:10 %h:%i:%s.%f 0000-00-00 00:00:00 -10:20:10 %T 0000-00-00 00:00:00 -10:20:10AM %h:%i:%s%p 0000-00-00 00:00:00 -10:20:10AM %r 0000-00-00 00:00:00 -10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 00:00:00 +10:20:10 %H:%i:%s 0000-00-00 10:20:10 +10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10 +10:20:10 %T 0000-00-00 10:20:10 +10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10 +10:20:10AM %r 0000-00-00 10:20:10 +10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 15 September 2001 %d %M %Y 2001-09-15 00:00:00 15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 @@ -211,13 +211,6 @@ Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00 15-01-20 %d-%m-%y 2020-01-15 00:00:00 15-2001-1 %d-%Y-%c 2001-01-15 00:00:00 -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Incorrect datetime value: '0000-00-00 10:20:10.440000' select date,format,DATE(str_to_date(date, format)) as date2 from t1; date format date2 2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 @@ -258,12 +251,12 @@ date format time 2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450 2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12 -10:20:10 %H:%i:%s NULL -10:20:10 %h:%i:%s.%f NULL -10:20:10 %T NULL -10:20:10AM %h:%i:%s%p NULL -10:20:10AM %r NULL -10:20:10.44AM %h:%i:%s.%f%p NULL +10:20:10 %H:%i:%s 10:20:10 +10:20:10 %h:%i:%s.%f 10:20:10 +10:20:10 %T 10:20:10 +10:20:10AM %h:%i:%s%p 10:20:10 +10:20:10AM %r 10:20:10 +10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58 15 September 2001 %d %M %Y 00:00:00 15 SEPTEMB 2001 %d %M %Y 00:00:00 @@ -280,13 +273,6 @@ Tuesday 52 2001 %W %V %X 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00 15-01-20 %d-%m-%y 00:00:00 15-2001-1 %d-%Y-%c 00:00:00 -Warnings: -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10.440000' select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1; date format time2 2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 10:11:12 @@ -296,12 +282,12 @@ date format time2 2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450 2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12 -10:20:10 %H:%i:%s NULL -10:20:10 %h:%i:%s.%f NULL -10:20:10 %T NULL -10:20:10AM %h:%i:%s%p NULL -10:20:10AM %r NULL -10:20:10.44AM %h:%i:%s.%f%p NULL +10:20:10 %H:%i:%s 10:20:10 +10:20:10 %h:%i:%s.%f 10:20:10 +10:20:10 %T 10:20:10 +10:20:10AM %h:%i:%s%p 10:20:10 +10:20:10AM %r 10:20:10 +10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58 15 September 2001 %d %M %Y 00:00:00 15 SEPTEMB 2001 %d %M %Y 00:00:00 @@ -318,13 +304,6 @@ Tuesday 52 2001 %W %V %X 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00 15-01-20 %d-%m-%y 00:00:00 15-2001-1 %d-%Y-%c 00:00:00 -Warnings: -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10.440000' select concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d')); concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d')) 2003-01-02 08:11:02.123456 @@ -473,8 +452,6 @@ create table t1 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:% str_to_date("10:11:12.0012", "%H:%i:%S.%f") as f2, str_to_date("2003-01-02", "%Y-%m-%d") as f3, str_to_date("02", "%d") as f4, str_to_date("02 10", "%d %H") as f5; -Warnings: -Warning 1265 Data truncated for column 'f4' at row 1 describe t1; Field Type Null Key Default Extra f1 datetime YES NULL @@ -484,7 +461,7 @@ f4 date YES NULL f5 time YES NULL select * from t1; f1 f2 f3 f4 f5 -2003-01-02 10:11:12 10:11:12 2003-01-02 0000-00-00 58:00:00 +2003-01-02 10:11:12 10:11:12 2003-01-02 0000-00-02 58:00:00 drop table t1; create table t1 select "02 10" as a, "%d %H" as b; select str_to_date(a,b) from t1; diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index 0c84f24a2e4..94debb1785f 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -28,3 +28,16 @@ ERROR 42000: Display width out of range for column 'a' (max = 255) set sql_mode='traditional'; create table t1 (a varchar(66000)); ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +set sql_mode=default; +CREATE TABLE t1 (a INT); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +a +INSERT INTO t1 VALUES(1); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +a +1 +INSERT INTO t1 VALUES(2),(3); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +a +1 +DROP TABLE t1; diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result index 59073358185..0b1cd67f559 100644 --- a/mysql-test/r/events.result +++ b/mysql-test/r/events.result @@ -1,4 +1,8 @@ -create database if not exists events_test; +drop database if exists events_test; +drop database if exists db_x; +drop database if exists mysqltest_db2; +drop database if exists mysqltest_no_such_database; +create database events_test; use events_test; CREATE USER pauline@localhost; CREATE DATABASE db_x; @@ -73,7 +77,7 @@ DROP EVENT event_starts_test; create table test_nested(a int); create event e_43 on schedule every 1 second do set @a = 5; alter event e_43 do alter event e_43 do set @a = 4; -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present alter event e_43 do begin alter event e_43 on schedule every 5 minute; @@ -223,73 +227,180 @@ drop event root19; drop event root20; drop event ðóóò21; set names latin1; +Create a test event. Only event metadata is relevant, +the actual schedule and body are not. CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 +Try to alter mysql.event: the server should fail to load +event information after mysql.event was tampered with. + +First, let's add a column to the end and make sure everything +works as before + +ALTER TABLE mysql.event ADD dummy INT; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 +SELECT event_name FROM INFORMATION_SCHEMA.events; +event_name +intact_check +SHOW CREATE EVENT intact_check; +Event sql_mode time_zone Create Event +intact_check SYSTEM CREATE EVENT `intact_check` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO SELECT "nothing" +DROP EVENT no_such_event; +ERROR HY000: Unknown event 'no_such_event' +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +DROP EVENT intact_check_1; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_2; +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +Warnings: +Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +@@event_scheduler +OFF +SHOW VARIABLES LIKE 'event_scheduler'; +Variable_name Value +event_scheduler OFF +SET GLOBAL event_scheduler=OFF; +ALTER TABLE mysql.event DROP dummy; +CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; + +Now let's add a column to the first position: the server +expects to see event schema name there + ALTER TABLE mysql.event ADD dummy INT FIRST; SHOW EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 19. Table probably corrupted -ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST; -SHOW EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 19. Table probably corrupted -ALTER TABLE mysql.event DROP dummy2; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +SELECT event_name FROM INFORMATION_SCHEMA.events; +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +SHOW CREATE EVENT intact_check; +ERROR HY000: Unknown event 'intact_check' +DROP EVENT no_such_event; +ERROR HY000: Unknown event 'no_such_event' +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ERROR HY000: Unknown event 'intact_check_1' +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_1; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_2; +ERROR HY000: Unknown event 'intact_check_2' +DROP EVENT intact_check; +ERROR HY000: Unknown event 'intact_check' +DROP DATABASE IF EXISTS mysqltest_no_such_database; +Warnings: +Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +@@event_scheduler +OFF +SHOW VARIABLES LIKE 'event_scheduler'; +Variable_name Value +event_scheduler OFF +SET GLOBAL event_scheduler=OFF; +Clean up +ALTER TABLE mysql.event DROP dummy; +DELETE FROM mysql.event; +CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; +Back up the table, further changes are not reversible CREATE TABLE event_like LIKE mysql.event; INSERT INTO event_like SELECT * FROM mysql.event; -ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. -ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin default ''; -SHOW CREATE TABLE mysql.event; -Table Create Table -event CREATE TABLE `event` ( - `db` char(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `name` char(64) NOT NULL DEFAULT '', - `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `execute_at` datetime DEFAULT NULL, - `interval_value` int(11) DEFAULT NULL, - `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - `last_executed` datetime DEFAULT NULL, - `starts` datetime DEFAULT NULL, - `ends` datetime DEFAULT NULL, - `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', - `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', - `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL DEFAULT '', - `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `originator` int(10) NOT NULL, - `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', - PRIMARY KEY (`db`,`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. -ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin default ''; -"This should work" -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 -ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. -ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default ''; -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. + +Drop some columns and try more checks. + + ALTER TABLE mysql.event DROP comment, DROP starts; +SHOW EVENTS; +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 16. Table probably corrupted +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +SHOW CREATE EVENT intact_check; +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +DROP EVENT no_such_event; +ERROR HY000: Unknown event 'no_such_event' +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 16. The table is probably corrupted +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ERROR HY000: Unknown event 'intact_check_1' +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_1; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_2; +ERROR HY000: Unknown event 'intact_check_2' +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +Warnings: +Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +@@event_scheduler +OFF +SHOW VARIABLES LIKE 'event_scheduler'; +Variable_name Value +event_scheduler OFF +SET GLOBAL event_scheduler=OFF; + +Now drop the table, and test again + + DROP TABLE mysql.event; +SHOW EVENTS; +ERROR 42S02: Table 'mysql.event' doesn't exist +SELECT event_name FROM INFORMATION_SCHEMA.events; +ERROR 42S02: Table 'mysql.event' doesn't exist +SHOW CREATE EVENT intact_check; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP EVENT no_such_event; +ERROR 42S02: Table 'mysql.event' doesn't exist +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +ERROR 42S02: Table 'mysql.event' doesn't exist +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ERROR 42S02: Table 'mysql.event' doesn't exist +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP EVENT intact_check_1; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP EVENT intact_check_2; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP EVENT intact_check; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP DATABASE IF EXISTS mysqltest_no_such_database; +Warnings: +Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist +Error 1146 Table 'mysql.event' doesn't exist +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +OK, there is an unnecessary warning about the non-existent table +but it's not easy to fix and no one complained about it. +A similar warning is printed if mysql.proc is missing. +SHOW WARNINGS; +Level Code Message +Error 1146 Table 'mysql.event' doesn't exist +SELECT @@event_scheduler; +@@event_scheduler +OFF +SHOW VARIABLES LIKE 'event_scheduler'; +Variable_name Value +event_scheduler OFF +SET GLOBAL event_scheduler=OFF; +Restore the original table. CREATE TABLE mysql.event like event_like; -INSERT INTO mysql.event SELECT * FROM event_like; DROP TABLE event_like; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 -DROP EVENT intact_check; create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion @@ -368,7 +479,7 @@ root localhost events_test Connect User lock select get_lock("test_lock2_1", 20) drop event закачка21; create table t_16 (s1 int); create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present drop table t_16; create event white_space on schedule every 10 hour @@ -402,4 +513,196 @@ SHOW EVENTS FROM ``; ERROR 42000: Incorrect database name '' SHOW EVENTS FROM `events\\test`; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator + +LOCK TABLES mode. + +create table t1 (a int); +create event e1 on schedule every 10 hour do select 1; +lock table t1 read; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 disable; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 rename to e3; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e2; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +unlock tables; +lock table t1 write; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 disable; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 rename to e3; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e2; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +unlock tables; +lock table t1 read, mysql.event read; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 disable; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 rename to e3; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e2; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +unlock tables; +lock table t1 write, mysql.event read; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 disable; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 rename to e3; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e2; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +unlock tables; +lock table t1 read, mysql.event write; +ERROR HY000: You can't combine write-locking of system tables with other tables or lock types +lock table t1 write, mysql.event write; +ERROR HY000: You can't combine write-locking of system tables with other tables or lock types +lock table mysql.event write; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +alter event e2 disable; +alter event e2 rename to e3; +drop event e3; +drop event e1; +unlock tables; +Make sure we have left no events +select event_name from information_schema.events; +event_name + +Events in sub-statements, events and prelocking + + +create event e1 on schedule every 10 hour do select 1; +create function f1() returns int +begin +show create event e1; +return 1; +end| +ERROR 0A000: Not allowed to return a result set from a function +create trigger trg before insert on t1 for each row +begin +show create event e1; +end| +ERROR 0A000: Not allowed to return a result set from a trigger +create function f1() returns int +begin +select event_name from information_schema.events; +return 1; +end| +ERROR 0A000: Not allowed to return a result set from a function +create trigger trg before insert on t1 for each row +begin +select event_name from information_schema.events; +end| +ERROR 0A000: Not allowed to return a result set from a trigger +create function f1() returns int +begin +create event e2 on schedule every 10 hour do select 1; +return 1; +end| +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present +create function f1() returns int +begin +alter event e1 rename to e2; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +create function f1() returns int +begin +drop event e2; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +---------------------------------------------------------------------- +create trigger trg before insert on t1 for each row +begin +set new.a= f1(); +end| +create function f1() returns int +begin +call p1(); +return 0; +end| +create procedure p1() +begin +select event_name from information_schema.events; +end| +insert into t1 (a) values (1)| +ERROR 0A000: Not allowed to return a result set from a trigger +drop procedure p1| +create procedure p1() +begin +show create event e1; +end| +insert into t1 (a) values (1)| +ERROR 0A000: Not allowed to return a result set from a trigger +drop procedure p1| +create procedure p1() +begin +create temporary table tmp select event_name from information_schema.events; +end| +expected to work, since we redirect the output into a tmp table +insert into t1 (a) values (1)| +select * from tmp| +event_name +e1 +drop temporary table tmp| +drop procedure p1| +create procedure p1() +begin +alter event e1 rename to e2; +end| +insert into t1 (a) values (1)| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop procedure p1| +create procedure p1() +begin +drop event e1; +end| +insert into t1 (a) values (1)| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop table t1| +drop event e1| drop database events_test; diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 9b58420465e..c4053bcfb47 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -1,4 +1,7 @@ -create database if not exists events_test; +drop database if exists events_test; +drop database if exists mysqltest_db1; +drop database if exists mysqltest_db2; +create database events_test; use events_test; CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1; CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2; @@ -17,7 +20,7 @@ DROP EVENT ДОЛЕÐ_региÑтър_утф8; SET NAMES latin1; set @a=3; CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5; -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present create event e_55 on schedule at 99990101000000 do drop table t; ERROR HY000: Incorrect AT value: '99990101000000' create event e_55 on schedule every 10 hour starts 99990101000000 do drop table t; @@ -381,4 +384,149 @@ ERROR 42000: Access denied; you need the SUPER privilege for this operation DROP EVENT e1; ERROR HY000: Unknown event 'e1' DROP USER mysqltest_u1@localhost; +SET GLOBAL EVENT_SCHEDULER= OFF; +SET @save_time_zone= @@TIME_ZONE; +SET TIME_ZONE= '+00:00'; +SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); +CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +00:00 RECURRING NULL 1 DAY 2005-12-31 23:58:59 NULL ENABLED 1 +SET TIME_ZONE= '-01:00'; +ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00'; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost -01:00 RECURRING NULL 1 DAY 2000-01-01 00:00:00 NULL ENABLED 1 +SET TIME_ZONE= '+02:00'; +ALTER EVENT e1 ON SCHEDULE AT '2000-01-02 00:00:00' + ON COMPLETION PRESERVE DISABLE; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +02:00 ONE TIME 2000-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 +SET TIME_ZONE= '-03:00'; +ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY ENDS '2030-01-03 00:00:00' + ON COMPLETION PRESERVE DISABLE; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 DISABLED 1 +SET TIME_ZONE= '+04:00'; +ALTER EVENT e1 DO SELECT 2; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 ENABLED 1 +DROP EVENT e1; +SET TIME_ZONE='+05:00'; +CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO +SELECT 1; +SET TIMESTAMP= @@TIMESTAMP + 1; +SET TIME_ZONE='-05:00'; +CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO +SELECT 1; +SET TIMESTAMP= @@TIMESTAMP + 1; +SET TIME_ZONE='+00:00'; +CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO +SELECT 1; +SELECT * FROM INFORMATION_SCHEMA.EVENTS ORDER BY event_name; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR +NULL events_test e1 root@localhost +05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:58:59 2005-12-31 23:58:59 NULL 1 +NULL events_test e2 root@localhost -05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:00 2005-12-31 23:59:00 NULL 1 +NULL events_test e3 root@localhost +00:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:01 2005-12-31 23:59:01 NULL 1 +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +events_test e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +events_test e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +SHOW CREATE EVENT e1; +Event sql_mode time_zone Create Event +e1 +05:00 CREATE EVENT `e1` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 +SHOW CREATE EVENT e2; +Event sql_mode time_zone Create Event +e2 -05:00 CREATE EVENT `e2` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 +SHOW CREATE EVENT e3; +Event sql_mode time_zone Create Event +e3 +00:00 CREATE EVENT `e3` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 +The following should fail, and nothing should be altered. +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00'; +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' DISABLE; +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered +The following should give warnings, and nothing should be created. +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' +DO +SELECT 1; +Warnings: +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' DISABLE +DO +SELECT 1; +Warnings: +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO +SELECT 1; +Warnings: +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE +DO +SELECT 1; +Warnings: +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +events_test e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +events_test e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +The following should succeed giving a warning. +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; +Warnings: +Note 1533 Event execution time is in the past. Event has been disabled +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE +DO +SELECT 1; +Warnings: +Note 1533 Event execution time is in the past. Event has been disabled +CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' + ON COMPLETION PRESERVE +DO +SELECT 1; +Warnings: +Note 1533 Event execution time is in the past. Event has been disabled +The following should succeed without warnings. +ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; +ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; +CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO +SELECT 1; +CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE +DO +SELECT 1; +CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' + ON COMPLETION PRESERVE DISABLE +DO +SELECT 1; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 +events_test e2 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED 1 +events_test e3 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 +events_test e4 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 +events_test e5 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED 1 +events_test e6 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED 1 +events_test e7 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 +events_test e8 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED 1 +DROP EVENT e8; +DROP EVENT e7; +DROP EVENT e6; +DROP EVENT e5; +DROP EVENT e4; +DROP EVENT e3; +DROP EVENT e2; +DROP EVENT e1; +SET TIME_ZONE=@save_time_zone; drop database events_test; diff --git a/mysql-test/r/events_restart_phase0.result b/mysql-test/r/events_restart_phase0.result deleted file mode 100644 index 218b804a302..00000000000 --- a/mysql-test/r/events_restart_phase0.result +++ /dev/null @@ -1,22 +0,0 @@ -SHOW VARIABLES LIKE 'event%'; -Variable_name Value -event_scheduler DISABLED -SELECT @@global.event_scheduler; -@@global.event_scheduler -DISABLED -SET GLOBAL event_scheduler=on; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=off; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=0; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=1; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=2; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2' -SET GLOBAL event_scheduler=SUSPEND; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND' -SET GLOBAL event_scheduler=SUSPENDED; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED' -SET GLOBAL event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' diff --git a/mysql-test/r/events_restart_phase1.result b/mysql-test/r/events_restart_phase1.result index 75e3ef5176f..7b1de62f2ef 100644 --- a/mysql-test/r/events_restart_phase1.result +++ b/mysql-test/r/events_restart_phase1.result @@ -1,12 +1,16 @@ -create database if not exists mysqltest_events_test; -use mysqltest_events_test; set global event_scheduler=off; +drop database if exists events_test; +create database events_test; +use events_test; create table execution_log(name char(10)); -create event abc1 on schedule every 1 second do insert into execution_log value('abc1'); -create event abc2 on schedule every 1 second do insert into execution_log value('abc2'); -create event abc3 on schedule every 1 second do insert into execution_log value('abc3'); -select name from execution_log; -name -insert into mysql.event values ('db1','bad','select 42','root@localhost',NULL,1000,'MICROSECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment1',1,'SYSTEM'); -insert into mysql.event values ('db1','bad2','sect','root@localhost',NULL,1000,'SECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment2',1,'SYSTEM'); +create event abc1 on schedule every 1 second do +insert into execution_log value('abc1'); +create event abc2 on schedule every 1 second do +insert into execution_log value('abc2'); +create event abc3 on schedule every 1 second do +insert into execution_log value('abc3'); +create table event_like like mysql.event; +insert into event_like select * from mysql.event; +alter table mysql.event +change column body body longtext character set utf8 collate utf8_bin; "Now we restart the server" diff --git a/mysql-test/r/events_restart_phase2.result b/mysql-test/r/events_restart_phase2.result index 703cb92324f..60ddf06bf23 100644 --- a/mysql-test/r/events_restart_phase2.result +++ b/mysql-test/r/events_restart_phase2.result @@ -1,6 +1,42 @@ -use mysqltest_events_test; -"Should get 0 rows because the queue aborted run -select distinct name from execution_log order by name; -name -delete from mysql.event where name like 'bad%'; -"Now restart the server again" +use events_test; +select @@event_scheduler; +@@event_scheduler +DISABLED +show events; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +select event_name from information_schema.events; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +show create event intact_check; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +drop event no_such_event; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +create event intact_check_1 on schedule every 5 hour do select 5; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +alter event intact_check_1 on schedule every 8 hour do select 8; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +alter event intact_check_1 rename to intact_check_2; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +drop event intact_check_1; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +drop event intact_check_2; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +drop event intact_check; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +set global event_scheduler=on; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +set global event_scheduler=off; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +show variables like 'event_scheduler'; +Variable_name Value +event_scheduler DISABLED +Make sure that we still can create and drop databases, +and no warnings are produced. +drop database if exists mysqltest_database_not_exists; +Warnings: +Note 1008 Can't drop database 'mysqltest_database_not_exists'; database doesn't exist +create database mysqltest_db1; +drop database mysqltest_db1; +Restore the original mysql.event table +drop table mysql.event; +rename table event_like to mysql.event; +Now let's restart the server again diff --git a/mysql-test/r/events_restart_phase3.result b/mysql-test/r/events_restart_phase3.result index e653d6a7c23..8ac00fdc70d 100644 --- a/mysql-test/r/events_restart_phase3.result +++ b/mysql-test/r/events_restart_phase3.result @@ -1,12 +1,12 @@ -use mysqltest_events_test; +use events_test; +select @@event_scheduler; +@@event_scheduler +ON "Should get 3 rows : abc1, abc2, abc3 select distinct name from execution_log order by name; name abc1 abc2 abc3 -drop event abc1; -drop event abc2; -drop event abc3; drop table execution_log; -drop database mysqltest_events_test; +drop database events_test; diff --git a/mysql-test/r/events_scheduling.result b/mysql-test/r/events_scheduling.result index 12f270748a6..d45bffcd7ff 100644 --- a/mysql-test/r/events_scheduling.result +++ b/mysql-test/r/events_scheduling.result @@ -1,6 +1,8 @@ CREATE DATABASE IF NOT EXISTS events_test; USE events_test; SET GLOBAL event_scheduler=OFF; +Try agian to make sure it's allowed +SET GLOBAL event_scheduler=OFF; SHOW VARIABLES LIKE 'event_scheduler'; Variable_name Value event_scheduler OFF @@ -13,6 +15,8 @@ SHOW VARIABLES LIKE 'event_scheduler'; Variable_name Value event_scheduler OFF SET GLOBAL event_scheduler=ON; +Try again to make sure it's allowed +SET GLOBAL event_scheduler=ON; SHOW VARIABLES LIKE 'event_scheduler'; Variable_name Value event_scheduler ON @@ -40,44 +44,56 @@ CREATE TABLE table_1(a int); CREATE TABLE table_2(a int); CREATE TABLE table_3(a int); CREATE TABLE table_4(a int); -CREATE TABLE T19170(s1 TIMESTAMP); SET GLOBAL event_scheduler=ON; -CREATE EVENT two_sec ON SCHEDULE EVERY 2 SECOND DO INSERT INTO table_1 VALUES(1); -CREATE EVENT start_n_end -ON SCHEDULE EVERY 1 SECOND +CREATE EVENT event_1 ON SCHEDULE EVERY 2 SECOND +DO +INSERT INTO table_1 VALUES (1); +CREATE EVENT event_2 ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 6 SECOND ON COMPLETION PRESERVE -DO INSERT INTO table_2 VALUES(1); -CREATE EVENT only_one_time ON SCHEDULE EVERY 2 SECOND ENDS NOW() + INTERVAL 1 SECOND DO INSERT INTO table_3 VALUES(1); -CREATE EVENT two_time ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND ON COMPLETION PRESERVE DO INSERT INTO table_4 VALUES(1); +DO +INSERT INTO table_2 VALUES (1); +CREATE EVENT event_3 ON SCHEDULE EVERY 2 SECOND ENDS NOW() + INTERVAL 1 SECOND +ON COMPLETION NOT PRESERVE +DO +INSERT INTO table_3 VALUES (1); +CREATE EVENT event_4 ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND +ON COMPLETION PRESERVE +DO +INSERT INTO table_4 VALUES (1); SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1; IF(SUM(a) >= 4, 'OK', 'ERROR') OK SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2; IF(SUM(a) >= 5, 'OK', 'ERROR') OK -SELECT IF(SUM(a) > 0, 'OK', 'ERROR') FROM table_3; -IF(SUM(a) > 0, 'OK', 'ERROR') +SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3; +IF(SUM(a) >= 1, 'OK', 'ERROR') OK -SELECT IF(SUM(a) > 0, 'OK', 'ERROR') FROM table_4; -IF(SUM(a) > 0, 'OK', 'ERROR') +SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4; +IF(SUM(a) >= 1, 'OK', 'ERROR') OK -DROP EVENT two_sec; -SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='start_n_end' AND ENDS IS NOT NULL; +SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') +FROM INFORMATION_SCHEMA.EVENTS +WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') OK -SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='start_n_end' AND ENDS IS NOT NULL; +SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') +FROM INFORMATION_SCHEMA.EVENTS +WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') OK -DROP EVENT IF EXISTS events_test.start_n_end; "Already dropped because ended. Therefore an error." -DROP EVENT only_one_time; -ERROR HY000: Unknown event 'only_one_time' +DROP EVENT event_3; +ERROR HY000: Unknown event 'event_3' +DROP EVENT event_1; "Should be preserved" SELECT EVENT_NAME, STATUS FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_NAME; EVENT_NAME STATUS -two_time DISABLED -DROP EVENT two_time; +event_2 DISABLED +event_4 DISABLED +DROP EVENT event_2; +DROP EVENT event_4; DROP TABLE table_1; DROP TABLE table_2; DROP TABLE table_3; diff --git a/mysql-test/r/events_time_zone.result b/mysql-test/r/events_time_zone.result index ec5cae88f4f..b20aa445183 100644 --- a/mysql-test/r/events_time_zone.result +++ b/mysql-test/r/events_time_zone.result @@ -3,148 +3,6 @@ CREATE DATABASE mysqltest_db1; USE mysqltest_db1; SET GLOBAL EVENT_SCHEDULER= OFF; SET @save_time_zone= @@TIME_ZONE; -SET TIME_ZONE= '+00:00'; -SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); -CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -mysqltest_db1 e1 root@localhost +00:00 RECURRING NULL 1 DAY 2005-12-31 23:58:59 NULL ENABLED 1 -SET TIME_ZONE= '-01:00'; -ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00'; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -mysqltest_db1 e1 root@localhost -01:00 RECURRING NULL 1 DAY 2000-01-01 00:00:00 NULL ENABLED 1 -SET TIME_ZONE= '+02:00'; -ALTER EVENT e1 ON SCHEDULE AT '2000-01-02 00:00:00' - ON COMPLETION PRESERVE DISABLE; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -mysqltest_db1 e1 root@localhost +02:00 ONE TIME 2000-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 -SET TIME_ZONE= '-03:00'; -ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY ENDS '2030-01-03 00:00:00' - ON COMPLETION PRESERVE DISABLE; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -mysqltest_db1 e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 DISABLED 1 -SET TIME_ZONE= '+04:00'; -ALTER EVENT e1 DO SELECT 2; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -mysqltest_db1 e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 ENABLED 1 -DROP EVENT e1; -SET TIME_ZONE='+05:00'; -CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO -SELECT 1; -SET TIMESTAMP= @@TIMESTAMP + 1; -SET TIME_ZONE='-05:00'; -CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO -SELECT 1; -SET TIMESTAMP= @@TIMESTAMP + 1; -SET TIME_ZONE='+00:00'; -CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO -SELECT 1; -SELECT * FROM INFORMATION_SCHEMA.EVENTS; -EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR -NULL mysqltest_db1 e1 root@localhost +05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:58:59 2005-12-31 23:58:59 NULL 1 -NULL mysqltest_db1 e2 root@localhost -05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:00 2005-12-31 23:59:00 NULL 1 -NULL mysqltest_db1 e3 root@localhost +00:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:01 2005-12-31 23:59:01 NULL 1 -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -mysqltest_db1 e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 -mysqltest_db1 e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 -mysqltest_db1 e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 -SHOW CREATE EVENT e1; -Event sql_mode time_zone Create Event -e1 +05:00 CREATE EVENT `e1` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 -SHOW CREATE EVENT e2; -Event sql_mode time_zone Create Event -e2 -05:00 CREATE EVENT `e2` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 -SHOW CREATE EVENT e3; -Event sql_mode time_zone Create Event -e3 +00:00 CREATE EVENT `e3` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 -The following should fail, and nothing should be altered. -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00'; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' DISABLE; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered -The following should give warnings, and nothing should be created. -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' -DO -SELECT 1; -Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' DISABLE -DO -SELECT 1; -Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created -CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO -SELECT 1; -Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created -CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE -DO -SELECT 1; -Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -mysqltest_db1 e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 -mysqltest_db1 e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 -mysqltest_db1 e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 -The following should succeed giving a warning. -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; -Warnings: -Note 1533 Event execution time is in the past. Event has been disabled -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE -DO -SELECT 1; -Warnings: -Note 1533 Event execution time is in the past. Event has been disabled -CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' - ON COMPLETION PRESERVE -DO -SELECT 1; -Warnings: -Note 1533 Event execution time is in the past. Event has been disabled -The following should succeed without warnings. -ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; -ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; -CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO -SELECT 1; -CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE -DO -SELECT 1; -CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' - ON COMPLETION PRESERVE DISABLE -DO -SELECT 1; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator -mysqltest_db1 e1 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 -mysqltest_db1 e2 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED 1 -mysqltest_db1 e3 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 -mysqltest_db1 e4 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 -mysqltest_db1 e5 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED 1 -mysqltest_db1 e6 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED 1 -mysqltest_db1 e7 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 -mysqltest_db1 e8 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED 1 -DROP EVENT e8; -DROP EVENT e7; -DROP EVENT e6; -DROP EVENT e5; -DROP EVENT e4; -DROP EVENT e3; -DROP EVENT e2; -DROP EVENT e1; CREATE TABLE t_step (step INT); INSERT INTO t_step VALUES (@step); CREATE FUNCTION round_to_step(i INT, n INT) RETURNS INT diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result new file mode 100644 index 00000000000..a9829db0c61 --- /dev/null +++ b/mysql-test/r/events_trans.result @@ -0,0 +1,118 @@ +drop database if exists events_test; +drop database if exists mysqltest_no_such_database; +create database events_test; +use events_test; + +Test that Events DDL issue an implicit COMMIT + + +set autocommit=off; +select @@autocommit; +@@autocommit +0 +create table t1 (a varchar(255)) engine=innodb; +begin work; +insert into t1 (a) values ("OK: create event"); +create event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +a +OK: create event +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: alter event"); +alter event e1 on schedule every 2 day do select 2; +rollback work; +select * from t1; +a +OK: alter event +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: alter event rename"); +alter event e1 rename to e2; +rollback work; +select * from t1; +a +OK: alter event rename +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: drop event"); +drop event e2; +rollback work; +select * from t1; +a +OK: drop event +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: drop event if exists"); +drop event if exists e2; +Warnings: +Note 1305 Event e2 does not exist +rollback work; +select * from t1; +a +OK: drop event if exists +delete from t1; +commit work; +create event e1 on schedule every 1 day do select 1; +begin work; +insert into t1 (a) values ("OK: create event if not exists"); +create event if not exists e1 on schedule every 2 day do select 2; +Warnings: +Note 1526 Event 'e1' already exists +rollback work; +select * from t1; +a +OK: create event if not exists +delete from t1; +commit work; + +Now check various error conditions: make sure we issue an +implicit commit anyway + +begin work; +insert into t1 (a) values ("OK: create event: event already exists"); +create event e1 on schedule every 2 day do select 2; +ERROR HY000: Event 'e1' already exists +rollback work; +select * from t1; +a +OK: create event: event already exists +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: alter event rename: rename to same name"); +alter event e1 rename to e1; +ERROR HY000: Same old and new event name +rollback work; +select * from t1; +a +OK: alter event rename: rename to same name +delete from t1; +commit work; +create event e2 on schedule every 3 day do select 3; +begin work; +insert into t1 (a) values ("OK: alter event rename: destination exists"); +alter event e2 rename to e1; +ERROR HY000: Event 'e1' already exists +rollback work; +select * from t1; +a +OK: alter event rename: destination exists +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: create event: database does not exist"); +create event mysqltest_no_such_database.e1 on schedule every 1 day do select 1; +ERROR 42000: Unknown database 'mysqltest_no_such_database' +rollback work; +select * from t1; +a +OK: create event: database does not exist +delete from t1; +commit work; +drop database events_test; diff --git a/mysql-test/r/events_trans_notembedded.result b/mysql-test/r/events_trans_notembedded.result new file mode 100644 index 00000000000..1e3dfffe232 --- /dev/null +++ b/mysql-test/r/events_trans_notembedded.result @@ -0,0 +1,45 @@ +drop database if exists events_test; +drop database if exists mysqltest_db2; +create database events_test; +use events_test; +grant create, insert, select, delete on mysqltest_db2.* +to mysqltest_user1@localhost; +create database mysqltest_db2; +set autocommit=off; +select @@autocommit; +@@autocommit +0 +create table t1 (a varchar(255)) engine=innodb; +begin work; +insert into t1 (a) values ("OK: create event: insufficient privileges"); +create event e1 on schedule every 1 day do select 1; +ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' +rollback work; +select * from t1; +a +OK: create event: insufficient privileges +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: alter event: insufficient privileges"); +alter event e1 on schedule every 1 day do select 1; +ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' +rollback work; +select * from t1; +a +OK: alter event: insufficient privileges +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: drop event: insufficient privileges"); +drop event e1; +ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' +rollback work; +select * from t1; +a +OK: drop event: insufficient privileges +delete from t1; +commit work; +drop user mysqltest_user1@localhost; +drop database mysqltest_db2; +drop database events_test; diff --git a/mysql-test/r/federated_server.result b/mysql-test/r/federated_server.result index a3e7cd793a6..0905aabb075 100644 --- a/mysql-test/r/federated_server.result +++ b/mysql-test/r/federated_server.result @@ -259,8 +259,10 @@ create procedure p1 () begin DECLARE v INT DEFAULT 0; DECLARE e INT DEFAULT 0; +DECLARE i INT; DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET e = e + 1; -WHILE v < 10000 do +SET i = sleep(5); +WHILE v < 20000 do CREATE SERVER s FOREIGN DATA WRAPPER mysql OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test'); diff --git a/mysql-test/r/fulltext_left_join.result b/mysql-test/r/fulltext_left_join.result index fdf11c14cc4..ea4cacf2fab 100644 --- a/mysql-test/r/fulltext_left_join.result +++ b/mysql-test/r/fulltext_left_join.result @@ -90,3 +90,10 @@ id link name relevance 1 1 string 0 2 0 string 0 DROP TABLE t1,t2; +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT, c TEXT, KEY(b)); +INSERT INTO t1 VALUES(1); +INSERT INTO t2(b,c) VALUES(2,'castle'),(3,'castle'); +SELECT * FROM t1 LEFT JOIN t2 ON a=b WHERE MATCH(c) AGAINST('+castle' IN BOOLEAN MODE); +a b c +DROP TABLE t1, t2; diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 972bb99d56f..7177028cb48 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1287,6 +1287,15 @@ select var_samp(e) as '0.5', var_pop(e) as '0.25' from bug22555; 0.5 0.25 0.5000 0.2500 drop table bug22555; +create table t1 (a decimal(20)); +insert into t1 values (12345678901234567890); +select count(a) from t1; +count(a) +1 +select count(distinct a) from t1; +count(distinct a) +1 +drop table t1; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8); INSERT INTO t1 SELECT a, b+8 FROM t1; diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 8bc613be4c0..283327430ba 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2297,6 +2297,15 @@ A B tire 0 # # 1 ## ## 2 +SELECT REPEAT('0', CAST(0 AS UNSIGNED)); +REPEAT('0', CAST(0 AS UNSIGNED)) + +SELECT REPEAT('0', -2); +REPEAT('0', -2) + +SELECT REPEAT('0', 2); +REPEAT('0', 2) +00 DROP TABLE t1; SELECT UNHEX('G'); UNHEX('G') diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 63a92fa3a62..cfca4e318c0 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -385,7 +385,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -781,6 +781,91 @@ Field Type Null Key Default Extra a geometry YES NULL DROP VIEW v1,v2; DROP TABLE t1; +create table t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime); create view v1 as select * from t1; desc v1; @@ -792,3 +877,4 @@ f4 geometry YES NULL f5 datetime YES NULL drop view v1; drop table t1; +End of 5.1 tests diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 5d97e540976..2ac5953c456 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1060,3 +1060,12 @@ DROP USER bug23556@localhost; GRANT PROCESS ON * TO user@localhost; ERROR 3D000: No database selected End of 5.0 tests +set names utf8; +grant select on test.* to юзер_юзер@localhost; +user() +юзер_юзер@localhost +revoke all on test.* from юзер_юзер@localhost; +drop user юзер_юзер@localhost; +grant select on test.* to очень_длинный_юзер@localhost; +ERROR HY000: String 'очень_длинный_юзер' is too long for user name (should be no longer than 16) +set names default; diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index e5d6078e863..078946b4d81 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -706,7 +706,7 @@ Warnings: Warning 1356 View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them show create table v3; View Create View -v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `test`.`sub1`(1) AS `c` +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `sub1`(1) AS `c` Warnings: Warning 1356 View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them drop view v2; @@ -1408,4 +1408,24 @@ select user,db from information_schema.processlist; user db user3148 test drop user user3148@localhost; +DROP TABLE IF EXISTS server_status; +DROP EVENT IF EXISTS event_status; +SET GLOBAL event_scheduler=1; +CREATE EVENT event_status +ON SCHEDULE AT NOW() +ON COMPLETION NOT PRESERVE +DO +BEGIN +CREATE TABLE server_status +SELECT variable_name +FROM information_schema.global_status +WHERE variable_name LIKE 'ABORTED_CONNECTS' OR +variable_name LIKE 'BINLOG_CACHE_DISK_USE'; +END$$ +SELECT variable_name FROM server_status; +variable_name +ABORTED_CONNECTS +BINLOG_CACHE_DISK_USE +DROP TABLE server_status; +SET GLOBAL event_scheduler=0; End of 5.1 tests. diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index f2d504f555f..4d104c64fa9 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -3159,3 +3159,21 @@ t2 CREATE TABLE `t2` ( CONSTRAINT `t2_t1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t2, t1; +CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB; +CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; +ALTER TABLE t2 MODIFY a INT NOT NULL; +ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150) +DELETE FROM t1; +DROP TABLE t2,t1; +CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY) +ENGINE=InnoDB; +INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4); +DELETE FROM t1; +INSERT INTO t1 VALUES ('DDD'); +SELECT * FROM t1; +a +DDD +DROP TABLE t1; diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index a65155909f1..e5d921514c5 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -393,7 +393,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -460,5 +460,91 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 (fl) values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; +End of 4.1 tests +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests create table t1 (g geometry not null, spatial gk(g)) engine=innodb; ERROR HY000: The used table type doesn't support SPATIAL indexes diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index eb3418f1f18..bb222db74da 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -165,6 +165,15 @@ select load_file("MYSQL_TEST_DIR/t/loaddata.test"); load_file("MYSQL_TEST_DIR/t/loaddata.test") NULL drop table t1, t2; +create table t1(f1 int); +insert into t1 values(1),(null); +create table t2(f2 int auto_increment primary key); +select * from t2; +f2 +1 +2 +SET @@SQL_MODE=@OLD_SQL_MODE; +drop table t1,t2; CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (1); SET NAMES latin1; diff --git a/mysql-test/r/log_tables-big.result b/mysql-test/r/log_tables-big.result new file mode 100644 index 00000000000..9b81127c825 --- /dev/null +++ b/mysql-test/r/log_tables-big.result @@ -0,0 +1,29 @@ +set session long_query_time=10; +select get_lock('bug27638', 1); +get_lock('bug27638', 1) +1 +set session long_query_time=1; +truncate table mysql.slow_log; +select get_lock('bug27638', 2); +get_lock('bug27638', 2) +0 +select if (query_time between '00:00:01' and '00:00:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +qt sql_text +OK select get_lock('bug27638', 2) +truncate table mysql.slow_log; +select get_lock('bug27638', 60); +get_lock('bug27638', 60) +0 +select if (query_time between '00:00:59' and '00:01:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +qt sql_text +OK select get_lock('bug27638', 60) +truncate table mysql.slow_log; +select get_lock('bug27638', 101); +get_lock('bug27638', 101) +0 +select if (query_time between '00:01:40' and '00:01:50', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +qt sql_text +OK select get_lock('bug27638', 101) +select release_lock('bug27638'); +release_lock('bug27638') +1 diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index e83bbe97eaa..61d04deef51 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -167,7 +167,7 @@ ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errn The commands reported in the bug report ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) Too long dbname -ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' +ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' Too long hostname ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) 1 diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 5a7dcca2420..57961698034 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -290,23 +290,23 @@ SET @@session.sql_mode=0/*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; create table t1 (a varchar(64) character set utf8)/*!*/; SET TIMESTAMP=1000000000/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-6-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-6-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=7/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-7-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-7-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-8-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-8-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-9-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-9-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=7/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-a-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-b-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-c-0' INTO table t1 character set koi8r/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO table t1 character set koi8r/*!*/; SET TIMESTAMP=1000000000/*!*/; drop table t1/*!*/; DELIMITER ; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 895e5dd46fa..d898869caac 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1568,29 +1568,17 @@ create table t3(a varchar(30) primary key, b int not null); test_sequence ------ Testing with illegal table names ------ mysqldump: Couldn't find table: "\d-2-1.sql" - mysqldump: Couldn't find table: "\t1" - mysqldump: Couldn't find table: "\t1" - mysqldump: Couldn't find table: "\\t1" - mysqldump: Couldn't find table: "t\1" - mysqldump: Couldn't find table: "t\1" - mysqldump: Couldn't find table: "t/1" - mysqldump: Couldn't find table: "T_1" - mysqldump: Couldn't find table: "T%1" - mysqldump: Couldn't find table: "T'1" - mysqldump: Couldn't find table: "T_1" - mysqldump: Couldn't find table: "T_" - test_sequence ------ Testing with illegal database names ------ mysqldump: Got error: 1049: Unknown database 'mysqldump_test_d' when selecting the database @@ -3217,6 +3205,83 @@ INSERT INTO t1 VALUES(1,0xff00fef0); DROP TABLE t1; # +# Bug#26346: stack + buffer overrun in mysqldump +# +CREATE TABLE t1(a int); +INSERT INTO t1 VALUES (1), (2); +mysqldump: Input filename or options too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +DROP TABLE t1; +CREATE TABLE t2 (a int); +CREATE TABLE t3 (a int); +CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3); + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t2`,`t3`); +DROP TABLE IF EXISTS `t2`; +CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +LOCK TABLES `t2` WRITE; +/*!40000 ALTER TABLE `t2` DISABLE KEYS */; +/*!40000 ALTER TABLE `t2` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `t3`; +CREATE TABLE `t3` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +LOCK TABLES `t3` WRITE; +/*!40000 ALTER TABLE `t3` DISABLE KEYS */; +/*!40000 ALTER TABLE `t3` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +DROP TABLE t1, t2, t3; +# +# Bug #23491: MySQLDump prefix function call in a view by database name +# +create database bug23491_original; +create database bug23491_restore; +use bug23491_original; +create table t1 (c1 int); +create view v1 as select * from t1; +create procedure p1() select 1; +create function f1() returns int return 1; +create view v2 as select f1(); +create function f2() returns int return f1(); +create view v3 as select bug23491_original.f1(); +use bug23491_restore; +show create view bug23491_restore.v2; +View Create View +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `f1`() AS `f1()` +show create view bug23491_restore.v3; +View Create View +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `bug23491_original`.`f1`() AS `bug23491_original.f1()` +drop database bug23491_original; +drop database bug23491_restore; +use test; +# # End of 5.0 tests # drop table if exists t1; diff --git a/mysql-test/r/ndb_dd_basic.result b/mysql-test/r/ndb_dd_basic.result index 014858e6856..470c2cb9c0e 100644 --- a/mysql-test/r/ndb_dd_basic.result +++ b/mysql-test/r/ndb_dd_basic.result @@ -186,6 +186,34 @@ INITIAL_SIZE 1000000000000K ENGINE = NDB; ERROR HY000: The size number was correct but we don't allow the digit part to be more than 2 billion DROP TABLE t1; +create tablespace ts2 +add datafile 'datafile2_1.dat' +use logfile group lg1 +initial_size 12M +engine ndb; +CREATE TABLE City ( +ID int(11) NOT NULL AUTO_INCREMENT, +Name char(35) NOT NULL, +CountryCode char(3) NOT NULL, +District char(20) NOT NULL, +Population int(11) NOT NULL, +PRIMARY KEY (ID) +) ENGINE=ndbcluster +tablespace ts2 +storage disk; +alter tablespace ts2 +drop datafile 'datafile2_1.dat' +engine ndb; +insert +into City (Name,CountryCode,District,Population) +values ('BeiJing','CN','Beijing',2000); +ERROR HY000: Got error 1602 'No datafile in tablespace' from NDBCLUSTER +drop tablespace ts2 +engine ndb; +ERROR HY000: Failed to drop TABLESPACE +drop table City; +drop tablespace ts2 +engine ndb; CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); BEGIN; diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index 23341ee0216..279a0884b5b 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -393,7 +393,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -460,6 +460,94 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 (fl) values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; +End of 4.1 tests +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +Warnings: +Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests set engine_condition_pushdown = on; DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); @@ -855,7 +943,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -922,3 +1010,91 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 (fl) values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; +End of 4.1 tests +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +Warnings: +Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/r/ndb_partition_error2.result b/mysql-test/r/ndb_partition_error2.result new file mode 100644 index 00000000000..a739ef3923c --- /dev/null +++ b/mysql-test/r/ndb_partition_error2.result @@ -0,0 +1,3 @@ +drop table if exists t1; +create table t1 (s1 int) engine=ndbcluster; +ERROR HY000: For the partitioned engine it is necessary to define all partitions diff --git a/mysql-test/r/ndb_trigger.result b/mysql-test/r/ndb_trigger.result index 2aeca5db2d3..28f9f9bdc37 100644 --- a/mysql-test/r/ndb_trigger.result +++ b/mysql-test/r/ndb_trigger.result @@ -141,4 +141,175 @@ a b drop trigger t4_au; drop trigger t4_ad; drop table t1, t2, t3, t4, t5; +CREATE TABLE t1 ( +id INT NOT NULL PRIMARY KEY, +xy INT +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (1, 0); +CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // +CREATE TABLE t2 ( +id INT NOT NULL PRIMARY KEY, +xy INT +) ENGINE=ndbcluster; +INSERT INTO t2 VALUES (2, 0); +CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; +INSERT INTO t3 VALUES (1); +CREATE TABLE t4 LIKE t1; +CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // +CREATE TABLE t5 LIKE t2; +UPDATE t1 SET xy = 3 WHERE id = 1; +SELECT xy FROM t1 where id = 1; +xy +3 +SELECT xy FROM t2 where id = 1; +xy +3 +UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +xy +4 +SELECT xy FROM t2 where id = 1; +xy +4 +INSERT INTO t4 SELECT * FROM t1; +INSERT INTO t5 SELECT * FROM t2; +UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; +SELECT xy FROM t1 where id = 1; +xy +3 +SELECT xy FROM t2 where id = 1; +xy +3 +SELECT xy FROM t4 where id = 1; +xy +3 +SELECT xy FROM t5 where id = 1; +xy +3 +UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +xy +4 +SELECT xy FROM t2 where id = 1; +xy +4 +SELECT xy FROM t4 where id = 1; +xy +4 +SELECT xy FROM t5 where id = 1; +xy +4 +INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; +SELECT xy FROM t1 where id = 1; +xy +5 +SELECT xy FROM t2 where id = 1; +xy +5 +DROP TRIGGER t1_update; +DROP TRIGGER t4_update; +CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // +CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // +INSERT INTO t1 VALUES (5, 0),(6,0); +INSERT INTO t2 VALUES (5, 1),(6,1); +INSERT INTO t3 VALUES (5); +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +id xy +1 5 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +INSERT INTO t1 VALUES (5,0); +UPDATE t2 SET xy = 1 WHERE id = 6; +TRUNCATE t4; +INSERT INTO t4 SELECT * FROM t1; +TRUNCATE t5; +INSERT INTO t5 SELECT * FROM t2; +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +SELECT * FROM t4 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t5 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +id xy +1 5 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +SELECT * FROM t4 order by id; +id xy +1 5 +6 0 +SELECT * FROM t5 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +INSERT INTO t1 VALUES (5, 0); +REPLACE INTO t2 VALUES (6,1); +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +REPLACE INTO t1 VALUES (5, 1); +SELECT * FROM t1 order by id; +id xy +1 5 +5 1 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +DROP TRIGGER t1_delete; +DROP TRIGGER t4_delete; +DROP TABLE t1, t2, t3, t4, t5; End of 5.1 tests diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index 34d8e3ab768..c6e077b2857 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -51,3 +51,27 @@ SSL error: Unable to get private key from '' mysqltest: Could not open connection 'default': 2026 SSL connection error SSL error: Unable to get certificate from '' mysqltest: Could not open connection 'default': 2026 SSL connection error +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA +End of 5.0 tests +DROP TABLE IF EXISTS thread_status; +DROP EVENT IF EXISTS event_status; +SET GLOBAL event_scheduler=1; +CREATE EVENT event_status +ON SCHEDULE AT NOW() +ON COMPLETION NOT PRESERVE +DO +BEGIN +CREATE TABLE thread_status +SELECT variable_name, variable_value +FROM information_schema.session_status +WHERE variable_name LIKE 'SSL_ACCEPTS' OR +variable_name LIKE 'SSL_CALLBACK_CACHE_HITS'; +END$$ +SELECT variable_name, variable_value FROM thread_status; +variable_name variable_value +SSL_ACCEPTS 0.0000000 +SSL_CALLBACK_CACHE_HITS 0.0000000 +DROP TABLE thread_status; +SET GLOBAL event_scheduler=0; +End of 5.1 tests diff --git a/mysql-test/r/openssl_2.result b/mysql-test/r/openssl_2.result deleted file mode 100644 index 879c623dd40..00000000000 --- a/mysql-test/r/openssl_2.result +++ /dev/null @@ -1,25 +0,0 @@ -SHOW STATUS LIKE 'Ssl%'; -Variable_name Value -Ssl_accepts 1 -Ssl_finished_accepts 1 -Ssl_finished_connects 0 -Ssl_accept_renegotiates 0 -Ssl_connect_renegotiates 0 -Ssl_callback_cache_hits 0 -Ssl_session_cache_hits 0 -Ssl_session_cache_misses 0 -Ssl_session_cache_timeouts 0 -Ssl_used_session_cache_entries 1 -Ssl_client_connects 0 -Ssl_session_cache_overflows 0 -Ssl_session_cache_size 128 -Ssl_session_cache_mode SERVER -Ssl_sessions_reused 0 -Ssl_ctx_verify_mode 7 -Ssl_ctx_verify_depth 4294967295 -Ssl_verify_mode 7 -Ssl_verify_depth 4294967295 -Ssl_version TLSv1 -Ssl_cipher EDH-RSA-DES-CBC3-SHA -Ssl_cipher_list -Ssl_default_timeout 7200 diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index c7adfb784de..25fbeadf21b 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -906,6 +906,90 @@ ERROR 23000: Column 'val' in order clause is ambiguous SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1; ERROR 23000: Column 'val' in order clause is ambiguous DROP TABLE t1; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (3), (2), (4), (1); +SELECT a, IF(a IN (2,3), a, a+10) FROM t1 +ORDER BY IF(a IN (2,3), a, a+10); +a IF(a IN (2,3), a, a+10) +2 2 +3 3 +1 11 +4 14 +SELECT a, IF(a NOT IN (2,3), a, a+10) FROM t1 +ORDER BY IF(a NOT IN (2,3), a, a+10); +a IF(a NOT IN (2,3), a, a+10) +1 1 +4 4 +2 12 +3 13 +SELECT a, IF(a IN (2,3), a, a+10) FROM t1 +ORDER BY IF(a NOT IN (2,3), a, a+10); +a IF(a IN (2,3), a, a+10) +1 11 +4 14 +2 2 +3 3 +SELECT a, IF(a BETWEEN 2 AND 3, a, a+10) FROM t1 +ORDER BY IF(a BETWEEN 2 AND 3, a, a+10); +a IF(a BETWEEN 2 AND 3, a, a+10) +2 2 +3 3 +1 11 +4 14 +SELECT a, IF(a NOT BETWEEN 2 AND 3, a, a+10) FROM t1 +ORDER BY IF(a NOT BETWEEN 2 AND 3, a, a+10); +a IF(a NOT BETWEEN 2 AND 3, a, a+10) +1 1 +4 4 +2 12 +3 13 +SELECT a, IF(a BETWEEN 2 AND 3, a, a+10) FROM t1 +ORDER BY IF(a NOT BETWEEN 2 AND 3, a, a+10); +a IF(a BETWEEN 2 AND 3, a, a+10) +1 11 +4 14 +2 2 +3 3 +SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 +FROM t1 GROUP BY x1, x2; +x1 x2 + 3 + 4 +1 +2 +SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 +FROM t1 GROUP BY x1, IF(a NOT IN (1,2), a, ''); +x1 x2 + 3 + 4 +1 +2 +SELECT a, a IN (1,2) FROM t1 ORDER BY a IN (1,2); +a a IN (1,2) +3 0 +4 0 +2 1 +1 1 +SELECT a FROM t1 ORDER BY a IN (1,2); +a +3 +4 +2 +1 +SELECT a+10 FROM t1 ORDER BY a IN (1,2); +a+10 +13 +14 +12 +11 +SELECT a, IF(a IN (1,2), a, a+10) FROM t1 +ORDER BY IF(a IN (3,4), a, a+10); +a IF(a IN (1,2), a, a+10) +3 13 +4 14 +1 1 +2 2 +DROP TABLE t1; create table t1 (a int not null, b int not null, c int not null); insert t1 values (1,1,1),(1,1,2),(1,2,1); select a, b from t1 group by a, b order by sum(c); diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index f7eda649dd2..2e5fa4b9195 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1219,4 +1219,23 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified' id 22589 drop table t1, t2; +set @org_mode=@@sql_mode; +set @@sql_mode='NO_DIR_IN_CREATE'; +select @@sql_mode; +@@sql_mode +NO_DIR_IN_CREATE +create table t1 (i int ) +partition by range (i) +( +partition p01 values less than (1000) +data directory='/not/existing' + index directory='/not/existing' +); +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `i` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */ +DROP TABLE t1, t2; +set @@sql_mode=@org_mode; End of 5.1 tests diff --git a/mysql-test/r/partition_grant.result b/mysql-test/r/partition_grant.result index e88427e5396..c334a473a2a 100644 --- a/mysql-test/r/partition_grant.result +++ b/mysql-test/r/partition_grant.result @@ -19,7 +19,16 @@ revoke alter on mysqltest_1.* from mysqltest_1@localhost; alter table t1 drop partition p3; ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' revoke select,alter,drop on mysqltest_1.* from mysqltest_1@localhost; -drop user mysqltest_1@localhost; drop table t1; +create table t1 (s1 int); +insert into t1 values (1); +grant alter on mysqltest_1.* to mysqltest_1@localhost; +alter table t1 partition by list (s1) (partition p1 values in (2)); +ERROR HY000: Table has no partition for some existing values +grant select, alter on mysqltest_1.* to mysqltest_1@localhost; +alter table t1 partition by list (s1) (partition p1 values in (2)); +ERROR HY000: Table has no partition for value 1 +drop table t1; +drop user mysqltest_1@localhost; drop schema mysqltest_1; End of 5.1 tests diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 1df845850b8..15e1c8730f0 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -2285,7 +2285,7 @@ drop user pstest_xyz@localhost; deallocate prepare abc; drop event if exists xyz; create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end| -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present select func_1(), func_1(), func_1() from dual; ERROR 42000: FUNCTION test.func_1 does not exist drop function func_1; diff --git a/mysql-test/r/rpl_000015.result b/mysql-test/r/rpl_000015.result index 13da328e522..8d23136420f 100644 --- a/mysql-test/r/rpl_000015.result +++ b/mysql-test/r/rpl_000015.result @@ -4,20 +4,20 @@ File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 106 reset slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert change master to master_host='127.0.0.1'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=MASTER_PORT; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No drop table if exists t1; create table t1 (n int, PRIMARY KEY(n)); insert into t1 values (10),(45),(90); diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result index c3909de5ba5..680328bcea5 100644 --- a/mysql-test/r/rpl_change_master.result +++ b/mysql-test/r/rpl_change_master.result @@ -12,12 +12,12 @@ insert into t1 values(1); insert into t1 values(2); stop slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No change master to master_user='root'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No start slave; select * from t1; n diff --git a/mysql-test/r/rpl_deadlock_innodb.result b/mysql-test/r/rpl_deadlock_innodb.result index 48fdf051d50..914e1497094 100644 --- a/mysql-test/r/rpl_deadlock_innodb.result +++ b/mysql-test/r/rpl_deadlock_innodb.result @@ -78,6 +78,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No stop slave; delete from t3; change master to master_log_pos=548; @@ -132,6 +133,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No set @my_max_relay_log_size= @@global.max_relay_log_size; set global max_relay_log_size=0; stop slave; @@ -191,6 +193,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No drop table t1,t2,t3,t4; set global max_relay_log_size= @my_max_relay_log_size; End of 5.1 tests diff --git a/mysql-test/r/rpl_empty_master_crash.result b/mysql-test/r/rpl_empty_master_crash.result index 3e234d4ef59..d57600d7396 100644 --- a/mysql-test/r/rpl_empty_master_crash.result +++ b/mysql-test/r/rpl_empty_master_crash.result @@ -5,7 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert load table t1 from master; ERROR 08S01: Error connecting to master: Master is not configured load table t1 from master; diff --git a/mysql-test/r/rpl_extraCol_innodb.result b/mysql-test/r/rpl_extraCol_innodb.result index ff505364124..a237edc8063 100644 --- a/mysql-test/r/rpl_extraCol_innodb.result +++ b/mysql-test/r/rpl_extraCol_innodb.result @@ -87,6 +87,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -144,6 +145,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -201,6 +203,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -257,6 +260,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -364,6 +368,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -420,6 +425,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -605,6 +611,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Try to insert in master **** @@ -735,6 +742,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** DROP table t17 *** diff --git a/mysql-test/r/rpl_extraCol_myisam.result b/mysql-test/r/rpl_extraCol_myisam.result index b5ccab8ff4c..95f99ba1014 100644 --- a/mysql-test/r/rpl_extraCol_myisam.result +++ b/mysql-test/r/rpl_extraCol_myisam.result @@ -87,6 +87,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -144,6 +145,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -201,6 +203,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -257,6 +260,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -364,6 +368,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -420,6 +425,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -605,6 +611,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Try to insert in master **** @@ -735,6 +742,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** DROP table t17 *** diff --git a/mysql-test/r/rpl_flushlog_loop.result b/mysql-test/r/rpl_flushlog_loop.result index 40eb403f6e7..1e90796b2ea 100644 --- a/mysql-test/r/rpl_flushlog_loop.result +++ b/mysql-test/r/rpl_flushlog_loop.result @@ -51,3 +51,4 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No diff --git a/mysql-test/r/rpl_ignore_table.result b/mysql-test/r/rpl_ignore_table.result index 136cf5cc5eb..e7200b31212 100644 --- a/mysql-test/r/rpl_ignore_table.result +++ b/mysql-test/r/rpl_ignore_table.result @@ -14,6 +14,114 @@ SELECT * FROM t4; a DROP TABLE t1; DROP TABLE t4; +**** Test case for BUG#25482 **** +**** Adding GRANTS on master **** +create table test.t1(a int); +create table test.t4(a int); +GRANT SELECT ON test.t1 TO mysqltest1@localhost; +GRANT INSERT ON test.t4 TO mysqltest2@localhost; +GRANT select, update, insert, references on t1 +to mysqltest2@localhost; +GRANT SELECT ON test.* TO mysqltest3@localhost; +GRANT INSERT ON test.t4 TO mysqltest3@localhost; +GRANT select(a), update(a), insert(a), references(a) on t4 +to mysqltest3@localhost; +create database mysqltest2; +create table mysqltest2.t2 (id int); +GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; +insert into mysql.user (user, host) values ("mysqltest5", "somehost"); +Warnings: +Warning 1364 Field 'ssl_cipher' doesn't have a default value +Warning 1364 Field 'x509_issuer' doesn't have a default value +Warning 1364 Field 'x509_subject' doesn't have a default value +GRANT SELECT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON test.* TO mysqltest6@localhost; +GRANT INSERT ON test.t1 TO mysqltest6@localhost; +show grants for mysqltest1@localhost; +Grants for mysqltest1@localhost +GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +GRANT SELECT ON `test`.`t1` TO 'mysqltest1'@'localhost' +show grants for mysqltest2@localhost; +Grants for mysqltest2@localhost +GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' +GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO 'mysqltest2'@'localhost' +GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +show grants for mysqltest6@localhost; +Grants for mysqltest6@localhost +GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.`t1` TO 'mysqltest6'@'localhost' +flush privileges; +show grants for mysqltest5@somehost; +Grants for mysqltest5@somehost +GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +**** Checking grants on slave **** +show grants for mysqltest2@localhost; +Grants for mysqltest2@localhost +GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' +GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +show grants for mysqltest5@somehost; +Grants for mysqltest5@somehost +GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +show grants for mysqltest6@localhost; +Grants for mysqltest6@localhost +GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +show grants for mysqltest1@localhost; +ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' +**** Revoking grants on master **** +REVOKE SELECT ON test.t1 FROM mysqltest1@localhost; +REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; +REVOKE select(a) on t4 +from mysqltest3@localhost; +show grants for mysqltest1@localhost; +Grants for mysqltest1@localhost +GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +**** Checking grants on slave **** +show grants for mysqltest1@localhost; +ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +drop table t1, t4, mysqltest2.t2; +drop database mysqltest2; +delete from mysql.user where user like "mysqltest%"; +delete from mysql.db where user like "mysqltest%"; +delete from mysql.columns_priv where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; DROP TABLE IF EXISTS t5; CREATE TABLE t5 ( word varchar(50) collate utf8_unicode_ci NOT NULL default '' diff --git a/mysql-test/r/rpl_incident.result b/mysql-test/r/rpl_incident.result index a9547832ed9..aea35c5f477 100644 --- a/mysql-test/r/rpl_incident.result +++ b/mysql-test/r/rpl_incident.result @@ -59,6 +59,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; SELECT * FROM t1; @@ -101,5 +102,6 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No DROP TABLE t1; DROP TABLE t1; diff --git a/mysql-test/r/rpl_known_bugs_detection.result b/mysql-test/r/rpl_known_bugs_detection.result index 9ce6ac25c88..318bc3d63e7 100644 --- a/mysql-test/r/rpl_known_bugs_detection.result +++ b/mysql-test/r/rpl_known_bugs_detection.result @@ -45,6 +45,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SELECT * FROM t1; a b stop slave; @@ -127,6 +128,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SELECT * FROM t1; id field_1 field_2 field_3 drop table t1, t2; diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index c68d2d9677e..cabc20b7057 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -38,8 +38,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; set global sql_slave_skip_counter=1; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1797 # # master-bin.000001 Yes Yes # 0 0 1797 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1797 # # master-bin.000001 Yes Yes # 0 0 1797 # None 0 No # No set sql_log_bin=0; delete from t1; set sql_log_bin=1; @@ -48,8 +48,8 @@ stop slave; change master to master_user='test'; change master to master_user='root'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1832 # # master-bin.000001 No No # 0 0 1832 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1832 # # master-bin.000001 No No # 0 0 1832 # None 0 No # No set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; @@ -59,8 +59,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; stop slave; reset slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; diff --git a/mysql-test/r/rpl_log_pos.result b/mysql-test/r/rpl_log_pos.result index 01ff89741c8..60fba96fb6a 100644 --- a/mysql-test/r/rpl_log_pos.result +++ b/mysql-test/r/rpl_log_pos.result @@ -8,26 +8,26 @@ show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 106 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No stop slave; change master to master_log_pos=75; start slave; stop slave; change master to master_log_pos=75; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 75 # # master-bin.000001 No No 0 0 75 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 75 # # master-bin.000001 No No 0 0 75 # None 0 No # No start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 75 # # master-bin.000001 No Yes 0 0 75 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 75 # # master-bin.000001 No Yes 0 0 75 # None 0 No # No stop slave; change master to master_log_pos=178; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 178 # # master-bin.000001 No Yes 0 0 178 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 178 # # master-bin.000001 No Yes 0 0 178 # None 0 No # No show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 106 diff --git a/mysql-test/r/rpl_ndb_basic.result b/mysql-test/r/rpl_ndb_basic.result index 499ce41597c..9a99ddd2137 100644 --- a/mysql-test/r/rpl_ndb_basic.result +++ b/mysql-test/r/rpl_ndb_basic.result @@ -147,6 +147,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +Master_SSL_Verify_Server_Cert No set GLOBAL slave_transaction_retries=10; START SLAVE; select * from t1 order by nid; diff --git a/mysql-test/r/rpl_ndb_extraCol.result b/mysql-test/r/rpl_ndb_extraCol.result index 336a6152d36..8f6dae7c5b5 100644 --- a/mysql-test/r/rpl_ndb_extraCol.result +++ b/mysql-test/r/rpl_ndb_extraCol.result @@ -87,6 +87,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -144,6 +145,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -201,6 +203,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -257,6 +260,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -364,6 +368,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -420,6 +425,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -605,6 +611,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Try to insert in master **** @@ -736,6 +743,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** DROP table t17 *** diff --git a/mysql-test/r/rpl_ndb_idempotent.result b/mysql-test/r/rpl_ndb_idempotent.result index 982cab33482..2f2273c145e 100644 --- a/mysql-test/r/rpl_ndb_idempotent.result +++ b/mysql-test/r/rpl_ndb_idempotent.result @@ -33,15 +33,15 @@ c1 c2 c3 row3 C 3 row4 D 4 SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No STOP SLAVE; CHANGE MASTER TO master_log_file = 'master-bin.000001', master_log_pos = ; SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 No No 0 0 None 0 No +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 No No 0 0 None 0 No No START SLAVE; SELECT * FROM t1 ORDER BY c3; c1 c2 c3 @@ -68,6 +68,6 @@ SELECT * FROM t1; c1 c2 c3 row2 new on slave 2 SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_ndb_log.result b/mysql-test/r/rpl_ndb_log.result index 03b7fd89875..3720da993be 100644 --- a/mysql-test/r/rpl_ndb_log.result +++ b/mysql-test/r/rpl_ndb_log.result @@ -127,8 +127,8 @@ slave-bin.000002 # Write_rows 2 # table_id: # slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000002 # Query 1 # COMMIT show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 617 # # master-bin.000002 Yes Yes # 0 0 617 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 617 # # master-bin.000002 Yes Yes # 0 0 617 # None 0 No # No show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; diff --git a/mysql-test/r/rpl_ndb_sync.result b/mysql-test/r/rpl_ndb_sync.result index d05367c5fc0..f2797eaa623 100644 --- a/mysql-test/r/rpl_ndb_sync.result +++ b/mysql-test/r/rpl_ndb_sync.result @@ -72,8 +72,8 @@ master_log_file = 'master-bin.000001', master_log_pos = ; START SLAVE; SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; hex(c1) hex(c2) c3 1 1 row1 diff --git a/mysql-test/r/rpl_openssl.result b/mysql-test/r/rpl_openssl.result deleted file mode 100644 index 4fe02088632..00000000000 --- a/mysql-test/r/rpl_openssl.result +++ /dev/null @@ -1,31 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -grant replication slave on *.* to replssl@localhost require ssl; -create table t1 (t int); -stop slave; -change master to master_user='replssl',master_password=''; -start slave; -insert into t1 values (1); -select * from t1; -t -stop slave; -change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; -start slave; -select * from t1; -t -1 -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 replssl MASTER_MYPORT 1 # # # # # # Yes # 0 0 # # None 0 Yes MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # -stop slave; -change master to master_user='root',master_password='', master_ssl=0; -start slave; -drop user replssl@localhost; -drop table t1; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 # # # # # # Yes # 0 0 # # None 0 No MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # diff --git a/mysql-test/r/rpl_packet.result b/mysql-test/r/rpl_packet.result index 894bc81b08d..8f4a16341b6 100644 --- a/mysql-test/r/rpl_packet.result +++ b/mysql-test/r/rpl_packet.result @@ -14,6 +14,12 @@ INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa select count(*) from `DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________`.`t1` /* must be 1 */; count(*) 1 +SHOW STATUS LIKE 'Slave_running'; +Variable_name Value +Slave_running ON +select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; +VARIABLE_NAME VARIABLE_VALUE +SLAVE_RUNNING 1.0000000 drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; SET @@global.max_allowed_packet=4096; SET @@global.net_buffer_length=4096; diff --git a/mysql-test/r/rpl_rbr_to_sbr.result b/mysql-test/r/rpl_rbr_to_sbr.result index 2cb0eafa5b8..47adb70bcf5 100644 --- a/mysql-test/r/rpl_rbr_to_sbr.result +++ b/mysql-test/r/rpl_rbr_to_sbr.result @@ -55,6 +55,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SHOW BINLOG EVENTS; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 diff --git a/mysql-test/r/rpl_redirect.result b/mysql-test/r/rpl_redirect.result index dd16626cbe3..64866df1c15 100644 --- a/mysql-test/r/rpl_redirect.result +++ b/mysql-test/r/rpl_redirect.result @@ -5,7 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert SHOW SLAVE HOSTS; Server_id Host Port Rpl_recovery_rank Master_id 2 127.0.0.1 SLAVE_PORT 2 1 diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index 51a281fdb12..fa4f7e224d1 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -27,8 +27,8 @@ select * from t11; ERROR 42S02: Table 'test.t11' doesn't exist drop table if exists t1,t2,t11; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No # No create table t1 (ts timestamp); set one_shot time_zone='met'; insert into t1 values('2005-08-12 00:00:00'); diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index cea84dba1ef..9adde45f87a 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -15,8 +15,8 @@ insert into temp_table values ("testing temporary tables"); create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 556 # # master-bin.000001 Yes Yes # 0 0 556 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 556 # # master-bin.000001 Yes Yes # 0 0 556 # None 0 No # No select * from t1; s Could not break slave @@ -56,8 +56,8 @@ Log_name File_size master-bin.000003 415 insert into t2 values (65); show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 504 # # master-bin.000003 Yes Yes # 0 0 504 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 504 # # master-bin.000003 Yes Yes # 0 0 504 # None 0 No # No select * from t2; m 34 @@ -84,8 +84,8 @@ select * from t4; a testing temporary tables part 2 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2040 # # master-bin.000005 Yes Yes # 0 0 2040 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2040 # # master-bin.000005 Yes Yes # 0 0 2040 # None 0 No # No lock tables t3 read; select count(*) from t3 where n >= 4; count(*) diff --git a/mysql-test/r/rpl_row_inexist_tbl.result b/mysql-test/r/rpl_row_inexist_tbl.result index 7d0d7504ee7..4412a1fa75c 100644 --- a/mysql-test/r/rpl_row_inexist_tbl.result +++ b/mysql-test/r/rpl_row_inexist_tbl.result @@ -51,4 +51,5 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No drop table t1, t2; diff --git a/mysql-test/r/rpl_row_log.result b/mysql-test/r/rpl_row_log.result index 5d252d72bd1..9de0d3d0ebb 100644 --- a/mysql-test/r/rpl_row_log.result +++ b/mysql-test/r/rpl_row_log.result @@ -92,8 +92,8 @@ slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Table_map 1 # table_id: # (test.t2) slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 377 # # master-bin.000002 Yes Yes # 0 0 377 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 377 # # master-bin.000002 Yes Yes # 0 0 377 # None 0 No # No show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; diff --git a/mysql-test/r/rpl_row_log_innodb.result b/mysql-test/r/rpl_row_log_innodb.result index ff1fabb35cb..4d8175142b2 100644 --- a/mysql-test/r/rpl_row_log_innodb.result +++ b/mysql-test/r/rpl_row_log_innodb.result @@ -100,8 +100,8 @@ slave-bin.000002 # Table_map 1 # table_id: # (test.t2) slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000002 # Xid 1 # COMMIT /* XID */ show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 404 # # master-bin.000002 Yes Yes # 0 0 404 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 404 # # master-bin.000002 Yes Yes # 0 0 404 # None 0 No # No show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; diff --git a/mysql-test/r/rpl_row_max_relay_size.result b/mysql-test/r/rpl_row_max_relay_size.result index 4c0f923c323..cb1692568fc 100644 --- a/mysql-test/r/rpl_row_max_relay_size.result +++ b/mysql-test/r/rpl_row_max_relay_size.result @@ -57,6 +57,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 2 # @@ -100,6 +101,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 3: max_relay_log_size = 0 # @@ -143,6 +145,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -183,6 +186,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 5 # @@ -224,6 +228,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # @@ -263,6 +268,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No flush logs; show master status; File master-bin.000002 diff --git a/mysql-test/r/rpl_row_reset_slave.result b/mysql-test/r/rpl_row_reset_slave.result index 657dad30266..c9ae5ced7bc 100644 --- a/mysql-test/r/rpl_row_reset_slave.result +++ b/mysql-test/r/rpl_row_reset_slave.result @@ -5,21 +5,21 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No stop slave; change master to master_user='test'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No reset slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No stop slave; reset slave; start slave; diff --git a/mysql-test/r/rpl_row_tabledefs_2myisam.result b/mysql-test/r/rpl_row_tabledefs_2myisam.result index 10001c736ac..4eca19ff098 100644 --- a/mysql-test/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/r/rpl_row_tabledefs_2myisam.result @@ -137,6 +137,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (2); @@ -175,6 +176,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (4); @@ -213,6 +215,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (5); @@ -251,6 +254,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -289,6 +293,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -326,6 +331,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; diff --git a/mysql-test/r/rpl_row_tabledefs_3innodb.result b/mysql-test/r/rpl_row_tabledefs_3innodb.result index 6bb98afd4c4..687108e17e5 100644 --- a/mysql-test/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/r/rpl_row_tabledefs_3innodb.result @@ -137,6 +137,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (2); @@ -175,6 +176,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (4); @@ -213,6 +215,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (5); @@ -251,6 +254,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -289,6 +293,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -326,6 +331,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; diff --git a/mysql-test/r/rpl_row_until.result b/mysql-test/r/rpl_row_until.result index cffcf12a31b..c691185650a 100644 --- a/mysql-test/r/rpl_row_until.result +++ b/mysql-test/r/rpl_row_until.result @@ -20,8 +20,8 @@ n 3 4 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 # No 0 0 315 # Master master-bin.000001 311 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 # No 0 0 315 # Master master-bin.000001 311 No # No start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; n @@ -30,22 +30,22 @@ n 3 4 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 # No 0 0 315 # Master master-no-such-bin.000001 291 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 # No 0 0 315 # Master master-no-such-bin.000001 291 No # No start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; select * from t2; n 1 2 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 # No 0 0 590 # Relay slave-relay-bin.000004 728 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 # No 0 0 590 # Relay slave-relay-bin.000004 728 No # No start slave; stop slave; start slave until master_log_file='master-bin.000001', master_log_pos=740; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 744 # Master master-bin.000001 740 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 744 # Master master-bin.000001 740 No # No start slave until master_log_file='master-bin', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; diff --git a/mysql-test/r/rpl_server_id1.result b/mysql-test/r/rpl_server_id1.result index 3f0c1a79de3..8f82ca8ea12 100644 --- a/mysql-test/r/rpl_server_id1.result +++ b/mysql-test/r/rpl_server_id1.result @@ -9,8 +9,8 @@ reset master; stop slave; change master to master_port=SLAVE_PORT; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 106 None 0 No NULL +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 106 None 0 No NULL No start slave; insert into t1 values (1); show status like "slave_running"; diff --git a/mysql-test/r/rpl_server_id2.result b/mysql-test/r/rpl_server_id2.result index 60550aba98e..a5c7fc07714 100644 --- a/mysql-test/r/rpl_server_id2.result +++ b/mysql-test/r/rpl_server_id2.result @@ -9,8 +9,8 @@ reset master; stop slave; change master to master_port=SLAVE_PORT; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 106 None 0 No NULL +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 106 None 0 No NULL No start slave; insert into t1 values (1); select * from t1; diff --git a/mysql-test/r/rpl_slave_status.result b/mysql-test/r/rpl_slave_status.result index c7a5d32ddd7..29ec7b77b45 100644 --- a/mysql-test/r/rpl_slave_status.result +++ b/mysql-test/r/rpl_slave_status.result @@ -52,6 +52,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master NULL +Master_SSL_Verify_Server_Cert No drop table t1; delete from mysql.user where user='rpl'; drop table t1; diff --git a/mysql-test/r/rpl_ssl.result b/mysql-test/r/rpl_ssl.result index 33deb9a8c92..908f0020188 100644 --- a/mysql-test/r/rpl_ssl.result +++ b/mysql-test/r/rpl_ssl.result @@ -53,10 +53,12 @@ Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem Master_SSL_Cipher Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No STOP SLAVE; select * from t1; t 1 +insert into t1 values (NULL); show slave status; Slave_IO_State # Master_Host 127.0.0.1 @@ -91,3 +93,6 @@ Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem Master_SSL_Cipher Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +drop user replssl@localhost; +drop table t1; diff --git a/mysql-test/r/rpl_ssl1.result b/mysql-test/r/rpl_ssl1.result new file mode 100644 index 00000000000..6bc4b53849f --- /dev/null +++ b/mysql-test/r/rpl_ssl1.result @@ -0,0 +1,146 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +grant replication slave on *.* to replssl@localhost require ssl; +create table t1 (t int); +stop slave; +change master to master_user='replssl',master_password=''; +start slave; +insert into t1 values (1); +select * from t1; +t +stop slave; +change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; +start slave; +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User replssl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +stop slave; +change master to master_user='root',master_password='', master_ssl=0; +start slave; +drop user replssl@localhost; +drop table t1; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +stop slave; +change master to +master_host="localhost", +master_ssl=1 , +master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', +master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', +master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem', +master_ssl_verify_server_cert=1; +start slave; +create table t1 (t int); +insert into t1 values (1); +on slave +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host localhost +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert Yes +drop table t1; diff --git a/mysql-test/r/rpl_stm_log.result b/mysql-test/r/rpl_stm_log.result index f69ad8a57c1..3ee2d990159 100644 --- a/mysql-test/r/rpl_stm_log.result +++ b/mysql-test/r/rpl_stm_log.result @@ -90,8 +90,8 @@ slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1) show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 392 # # master-bin.000002 Yes Yes # 0 0 392 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 392 # # master-bin.000002 Yes Yes # 0 0 392 # None 0 No # No show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; diff --git a/mysql-test/r/rpl_stm_max_relay_size.result b/mysql-test/r/rpl_stm_max_relay_size.result index 2509cc08205..c2e57be6ad4 100644 --- a/mysql-test/r/rpl_stm_max_relay_size.result +++ b/mysql-test/r/rpl_stm_max_relay_size.result @@ -55,6 +55,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 2 # @@ -98,6 +99,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 3: max_relay_log_size = 0 # @@ -141,6 +143,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -181,6 +184,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 5 # @@ -222,6 +226,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # @@ -261,6 +266,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No flush logs; show master status; File master-bin.000002 diff --git a/mysql-test/r/rpl_stm_reset_slave.result b/mysql-test/r/rpl_stm_reset_slave.result index 2b9fdca0911..e134629d597 100644 --- a/mysql-test/r/rpl_stm_reset_slave.result +++ b/mysql-test/r/rpl_stm_reset_slave.result @@ -5,21 +5,21 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No stop slave; change master to master_user='test'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No reset slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No stop slave; reset slave; start slave; diff --git a/mysql-test/r/rpl_stm_until.result b/mysql-test/r/rpl_stm_until.result index 63544199f4c..ffe6216a42b 100644 --- a/mysql-test/r/rpl_stm_until.result +++ b/mysql-test/r/rpl_stm_until.result @@ -53,6 +53,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; n @@ -94,6 +95,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; select * from t2; n @@ -133,6 +135,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No start slave; stop slave; start slave until master_log_file='master-bin.000001', master_log_pos=776; @@ -170,6 +173,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No start slave until master_log_file='master-bin', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 588f4329368..d56ad426585 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -187,7 +187,7 @@ Pos Instruction 32 set v_dig@4 (v_dig@4 + 1) 33 stmt 4 "update sudoku_work set dig = v_dig wh..." 34 set v_tcounter@6 (v_tcounter@6 + 1) -35 jump_if_not 37(37) (not(`test`.`sudoku_digit_ok`(v_row@7,v_col@8,v_dig@4))) +35 jump_if_not 37(37) (not(`sudoku_digit_ok`(v_row@7,v_col@8,v_dig@4))) 36 jump 15 37 set v_i@3 (v_i@3 + 1) 38 jump 15 diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 4abbb35bd6a..312bb6857a5 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -5398,7 +5398,7 @@ drop database if exists това_е_дълго_име_за_база_данни_ create database това_е_дълго_име_за_база_данни_нали| INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','')| call това_е_дълго_име_за_база_данни_нали.това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго()| -ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6) +ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6) drop database това_е_дълго_име_за_база_данни_нали| CREATE TABLE t3 ( Member_ID varchar(15) NOT NULL, @@ -6061,4 +6061,89 @@ SUM(f2) bug25373(f1) 21.300000071526 NULL DROP FUNCTION bug25373| DROP TABLE t3| +drop function if exists bug20777| +drop table if exists examplebug20777| +create function bug20777(f1 bigint unsigned) returns bigint unsigned +begin +set f1 = (f1 - 10); set f1 = (f1 + 10); +return f1; +end| +select bug20777(9223372036854775803) as '9223372036854775803 2**63-5'; +9223372036854775803 2**63-5 +9223372036854775803 +select bug20777(9223372036854775804) as '9223372036854775804 2**63-4'; +9223372036854775804 2**63-4 +9223372036854775804 +select bug20777(9223372036854775805) as '9223372036854775805 2**63-3'; +9223372036854775805 2**63-3 +9223372036854775805 +select bug20777(9223372036854775806) as '9223372036854775806 2**63-2'; +9223372036854775806 2**63-2 +9223372036854775806 +select bug20777(9223372036854775807) as '9223372036854775807 2**63-1'; +9223372036854775807 2**63-1 +9223372036854775807 +select bug20777(9223372036854775808) as '9223372036854775808 2**63+0'; +9223372036854775808 2**63+0 +9223372036854775808 +select bug20777(9223372036854775809) as '9223372036854775809 2**63+1'; +9223372036854775809 2**63+1 +9223372036854775809 +select bug20777(9223372036854775810) as '9223372036854775810 2**63+2'; +9223372036854775810 2**63+2 +9223372036854775810 +select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; +lower bounds signed bigint +0 +select bug20777(9223372036854775807) as 'upper bounds signed bigint'; +upper bounds signed bigint +9223372036854775807 +select bug20777(0) as 'lower bounds unsigned bigint'; +lower bounds unsigned bigint +0 +select bug20777(18446744073709551615) as 'upper bounds unsigned bigint'; +upper bounds unsigned bigint +18446744073709551615 +select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; +upper bounds unsigned bigint + 1 +18446744073709551615 +select bug20777(-1) as 'lower bounds unsigned bigint - 1'; +lower bounds unsigned bigint - 1 +0 +create table examplebug20777 as select +0 as 'i', +bug20777(9223372036854775806) as '2**63-2', +bug20777(9223372036854775807) as '2**63-1', +bug20777(9223372036854775808) as '2**63', +bug20777(9223372036854775809) as '2**63+1', +bug20777(18446744073709551614) as '2**64-2', +bug20777(18446744073709551615) as '2**64-1', +bug20777(18446744073709551616) as '2**64', +bug20777(0) as '0', +bug20777(-1) as '-1'; +insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); +show create table examplebug20777; +Table Create Table +examplebug20777 CREATE TABLE `examplebug20777` ( + `i` int(1) NOT NULL DEFAULT '0', + `2**63-2` bigint(20) unsigned DEFAULT NULL, + `2**63-1` bigint(20) unsigned DEFAULT NULL, + `2**63` bigint(20) unsigned DEFAULT NULL, + `2**63+1` bigint(20) unsigned DEFAULT NULL, + `2**64-2` bigint(20) unsigned DEFAULT NULL, + `2**64-1` bigint(20) unsigned DEFAULT NULL, + `2**64` bigint(20) unsigned DEFAULT NULL, + `0` bigint(20) unsigned DEFAULT NULL, + `-1` bigint(20) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from examplebug20777 order by i; +i 2**63-2 2**63-1 2**63 2**63+1 2**64-2 2**64-1 2**64 0 -1 +0 9223372036854775806 9223372036854775807 9223372036854775808 9223372036854775809 18446744073709551614 18446744073709551615 18446744073709551615 0 0 +1 9223372036854775806 9223372036854775807 223372036854775808 9223372036854775809 18446744073709551614 18446744073709551615 8446744073709551616 0 0 +drop table examplebug20777; +select bug20777(18446744073709551613)+1; +bug20777(18446744073709551613)+1 +18446744073709551614 +drop function bug20777; +End of 5.0 tests. drop table t1,t2; diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 0e21ff80e29..74cd723e130 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -7,7 +7,6 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (col1 date); INSERT INTO t1 VALUES('2004-01-01'),('2004-02-29'); INSERT INTO t1 VALUES('0000-10-31'); -ERROR 22007: Incorrect date value: '0000-10-31' for column 'col1' at row 1 INSERT INTO t1 VALUES('2004-0-31'); ERROR 22007: Incorrect date value: '2004-0-31' for column 'col1' at row 1 INSERT INTO t1 VALUES('2004-01-02'),('2004-0-31'); @@ -57,6 +56,7 @@ select * from t1; col1 2004-01-01 2004-02-29 +0000-10-31 2004-01-02 2004-01-03 2004-00-31 @@ -124,7 +124,6 @@ set @@sql_mode='ansi,traditional'; CREATE TABLE t1 (col1 datetime); INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('2004-02-29 15:30:00'); INSERT INTO t1 VALUES('0000-10-31 15:30:00'); -ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 VALUES('2004-0-31 15:30:00'); ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 VALUES('2004-10-0 15:30:00'); @@ -145,6 +144,7 @@ select * from t1; col1 2004-10-31 15:30:00 2004-02-29 15:30:00 +0000-10-31 15:30:00 drop table t1; CREATE TABLE t1 (col1 timestamp); INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('2004-02-29 15:30:00'); @@ -206,7 +206,6 @@ INSERT INTO t1 (col1) VALUES (STR_TO_DATE('15.10.2004','%d.%m.%Y')); INSERT INTO t1 (col2) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect date value: '0000-10-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); ERROR 22007: Incorrect date value: '2004-00-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -222,7 +221,6 @@ ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_ti INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); ERROR 22007: Incorrect datetime value: '2004-00-31 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -259,7 +257,6 @@ INSERT INTO t1 (col1) VALUES (CAST('2004-10-15' AS DATE)); INSERT INTO t1 (col2) VALUES (CAST('2004-10-15 10:15' AS DATETIME)); INSERT INTO t1 (col3) VALUES (CAST('2004-10-15 10:15' AS DATETIME)); INSERT INTO t1 (col1) VALUES(CAST('0000-10-31' AS DATE)); -ERROR 22007: Incorrect datetime value: '0000-10-31' INSERT INTO t1 (col1) VALUES(CAST('2004-10-0' AS DATE)); ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CAST('2004-0-10' AS DATE)); @@ -267,7 +264,6 @@ ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CAST('0000-00-00' AS DATE)); ERROR 22007: Incorrect datetime value: '0000-00-00' INSERT INTO t1 (col2) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); -ERROR 22007: Incorrect datetime value: '0000-10-31 15:30' INSERT INTO t1 (col2) VALUES(CAST('2004-10-0 15:30' AS DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); @@ -275,7 +271,7 @@ ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' a INSERT INTO t1 (col2) VALUES(CAST('0000-00-00' AS DATETIME)); ERROR 22007: Incorrect datetime value: '0000-00-00' INSERT INTO t1 (col3) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); -ERROR 22007: Incorrect datetime value: '0000-10-31 15:30' +ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CAST('2004-10-0 15:30' AS DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); @@ -288,7 +284,6 @@ INSERT INTO t1 (col1) VALUES (CONVERT('2004-10-15',DATE)); INSERT INTO t1 (col2) VALUES (CONVERT('2004-10-15 10:15',DATETIME)); INSERT INTO t1 (col3) VALUES (CONVERT('2004-10-15 10:15',DATETIME)); INSERT INTO t1 (col1) VALUES(CONVERT('0000-10-31' , DATE)); -ERROR 22007: Incorrect datetime value: '0000-10-31' INSERT INTO t1 (col1) VALUES(CONVERT('2004-10-0' , DATE)); ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CONVERT('2004-0-10' , DATE)); @@ -296,7 +291,6 @@ ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CONVERT('0000-00-00',DATE)); ERROR 22007: Incorrect datetime value: '0000-00-00' INSERT INTO t1 (col2) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); -ERROR 22007: Incorrect datetime value: '0000-10-31 15:30' INSERT INTO t1 (col2) VALUES(CONVERT('2004-10-0 15:30',DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); @@ -304,7 +298,7 @@ ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' a INSERT INTO t1 (col2) VALUES(CONVERT('0000-00-00',DATETIME)); ERROR 22007: Incorrect datetime value: '0000-00-00' INSERT INTO t1 (col3) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); -ERROR 22007: Incorrect datetime value: '0000-10-31 15:30' +ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CONVERT('2004-10-0 15:30',DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); @@ -1352,3 +1346,44 @@ t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='123456789*123456789*123456789*123456789*123456789*123456789*' drop table t1; +set sql_mode= 'traditional'; +create table t1(col1 tinyint, col2 tinyint unsigned, +col3 smallint, col4 smallint unsigned, +col5 mediumint, col6 mediumint unsigned, +col7 int, col8 int unsigned, +col9 bigint, col10 bigint unsigned); +insert into t1(col1) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col1' at row 1 +insert into t1(col2) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col2' at row 1 +insert into t1(col3) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col3' at row 1 +insert into t1(col4) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col4' at row 1 +insert into t1(col5) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col5' at row 1 +insert into t1(col6) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col6' at row 1 +insert into t1(col7) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col7' at row 1 +insert into t1(col8) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col8' at row 1 +insert into t1(col9) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col9' at row 1 +insert into t1(col10) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col10' at row 1 +drop table t1; +set sql_mode='traditional'; +create table t1(a year); +insert into t1 values ('-'); +ERROR HY000: Incorrect integer value: '-' for column 'a' at row 1 +insert into t1 values ('+'); +ERROR HY000: Incorrect integer value: '+' for column 'a' at row 1 +insert into t1 values (''); +ERROR HY000: Incorrect integer value: '' for column 'a' at row 1 +insert into t1 values ('2000a'); +ERROR 01000: Data truncated for column 'a' at row 1 +insert into t1 values ('2E3x'); +ERROR 01000: Data truncated for column 'a' at row 1 +drop table t1; +End of 5.0 tests diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index 12ce742eab4..644d4d971c6 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -99,7 +99,7 @@ DROP TABLE t1, t2, t3; CREATE TABLE t1 (y YEAR); INSERT INTO t1 VALUES ('abc'); Warnings: -Warning 1264 Out of range value for column 'y' at row 1 +Warning 1366 Incorrect integer value: 'abc' for column 'y' at row 1 SELECT * FROM t1; y 0000 diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index b54bd155c7d..e40ec689127 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -26,8 +26,6 @@ Table Op Msg_type Msg_text test.t1 check status OK delete from t1; insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030100000000"),("20030000000000"); -Warnings: -Warning 1264 Out of range value for column 't' at row 5 insert into t1 values ("2003-003-03"); insert into t1 values ("20030102T131415"),("2001-01-01T01:01:01"), ("2001-1-1T1:01:01"); select * from t1; @@ -36,7 +34,7 @@ t 2069-12-31 00:00:00 1970-01-01 00:00:00 1999-12-31 00:00:00 -0000-00-00 00:00:00 +0000-01-01 00:00:00 0001-01-01 00:00:00 9999-12-31 00:00:00 2000-10-10 00:00:00 diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index 36022383f1b..877400ab7e1 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -66,3 +66,22 @@ ss ue ue DROP TABLE t1; +create table t1(f1 +set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', +'18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', +'34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', +'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','128')); +ERROR HY000: Too many strings for column f1 and SET +create table t1(f1 +set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', +'18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', +'34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', +'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1')); +Warnings: +Note 1291 Column 'f1' has duplicated value '1' in SET +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1') DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result index 84b688429db..e52947455c8 100644 --- a/mysql-test/r/type_year.result +++ b/mysql-test/r/type_year.result @@ -34,3 +34,15 @@ select if(y = now(), 1, 0) from t1; if(y = now(), 1, 0) 1 drop table t1; +create table t1(a year); +insert into t1 values (2000.5), ('2000.5'), ('2001a'), ('2.001E3'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 3 +select * from t1; +a +2001 +2001 +2001 +2001 +drop table t1; +End of 5.0 tests diff --git a/mysql-test/r/udf.result b/mysql-test/r/udf.result index 593ac63ca80..c7a9b0982a9 100644 --- a/mysql-test/r/udf.result +++ b/mysql-test/r/udf.result @@ -159,7 +159,7 @@ EXPLAIN EXTENDED SELECT myfunc_int(fn(MIN(b))) as c FROM t1 GROUP BY a; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort Warnings: -Note 1003 select myfunc_int(`test`.`fn`(min(`test`.`t1`.`b`)) AS `fn(MIN(b))`) AS `c` from `test`.`t1` group by `test`.`t1`.`a` +Note 1003 select myfunc_int(`fn`(min(`test`.`t1`.`b`)) AS `fn(MIN(b))`) AS `c` from `test`.`t1` group by `test`.`t1`.`a` EXPLAIN EXTENDED SELECT myfunc_int(test.fn(MIN(b))) as c FROM t1 GROUP BY a; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result index 7472b724f47..9f3828bff61 100644 --- a/mysql-test/r/windows.result +++ b/mysql-test/r/windows.result @@ -26,3 +26,18 @@ ERROR HY000: No paths allowed for shared library execute abc; ERROR HY000: No paths allowed for shared library deallocate prepare abc; +CREATE TABLE t1 ( +`pkid` int(11) NOT NULL AUTO_INCREMENT, +`SALES_DATE` date NOT NULL DEFAULT '0000-00-00', +KEY `pkid` (`pkid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +PARTITION BY RANGE (MONTH(SALES_DATE)) +( +PARTITION p0 VALUES LESS THAN (2) ENGINE=INNODB +data DIRECTORY='c:/tmp/' + index DIRECTORY = 'c:/tmp/', +PARTITION p1 VALUES LESS THAN (3) ENGINE=INNODB +data DIRECTORY='c:/tmp/' + index DIRECTORY = 'c:/tmp/' +); +DROP TABLE t1; diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index b2e720cb900..b5ace75dbc4 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1540,3 +1540,13 @@ SHOW CREATE TABLE t6; --disable_warnings DROP TABLE t1, t2, t4, t5, t6; --enable_warnings + +# +# BUG#26138 - REPAIR TABLE with option USE_FRM erases all records in ARCHIVE +# table +# +create table t1 (i int) engine=archive; +insert into t1 values (1); +repair table t1 use_frm; +select * from t1; +drop table t1; diff --git a/mysql-test/t/compress.test b/mysql-test/t/compress.test index 3f1892b5dec..cd40aef002c 100644 --- a/mysql-test/t/compress.test +++ b/mysql-test/t/compress.test @@ -10,6 +10,7 @@ connect (comp_con,localhost,root,,,,,COMPRESS); # Check compression turned on SHOW STATUS LIKE 'Compression'; +select * from information_schema.session_status where variable_name= 'COMPRESSION'; # Source select test case -- source include/common-tests.inc diff --git a/mysql-test/t/crash_commit_before.test b/mysql-test/t/crash_commit_before.test index 5a91cd7a7ad..4e212d81e66 100644 --- a/mysql-test/t/crash_commit_before.test +++ b/mysql-test/t/crash_commit_before.test @@ -30,3 +30,6 @@ COMMIT; SHOW CREATE TABLE t1; SELECT * FROM t1; + + +DROP TABLE t1; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index ffdcee06488..5fca63a295c 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -660,6 +660,7 @@ create table t1(a set("a,b","c,d") not null); # End of 4.1 tests + # # Bug #14155: Maximum value of MAX_ROWS handled incorrectly on 64-bit # platforms @@ -678,7 +679,7 @@ drop table t1; create table t1 (upgrade int); drop table t1; -# End of 5.0 tests +--echo End of 5.0 tests # # Test of behaviour with CREATE ... SELECT @@ -734,3 +735,95 @@ drop database mysqltest; USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; --error 1102 SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +# +# Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte +# +set names utf8; + +create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +select database(); +use test; + +select SCHEMA_NAME from information_schema.schemata +where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; + +drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 +( + имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int, + index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45) +); + +create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as +select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; + +# database, table, field, key, view +select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; + +select TABLE_NAME from information_schema.tables where +table_schema='test'; + +select COLUMN_NAME from information_schema.columns where +table_schema='test'; + +select INDEX_NAME from information_schema.statistics where +table_schema='test'; + +select TABLE_NAME from information_schema.views where +table_schema='test'; + +show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; + +# procedure, function, event, trigger + +create event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 on schedule every 2 year do select 1; +select EVENT_NAME from information_schema.events +where event_schema='test'; +drop event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48; +--error 1059 +create event +очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 +on schedule every 2 year do select 1; + +create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49 +before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; +select TRIGGER_NAME from information_schema.triggers where +trigger_schema='test'; +drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49; +--error 1059 +create trigger +очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 +before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; +--error 1059 +drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66; + +create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50() +begin +end; +select ROUTINE_NAME from information_schema.routines where +routine_schema='test'; +drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50; +--error 1059 +create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() +begin +end; + +create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49() + returns int +return 0; +select ROUTINE_NAME from information_schema.routines where +routine_schema='test'; +drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49; +--error 1059 +create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() + returns int +return 0; + +drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; +drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +set names default; +--echo End of 5.1 tests diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index fd64becbc00..121d0dabf3c 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -36,3 +36,6 @@ synchronization : Bug#24529 Test 'synchronization' fails on Mac pushb plugin : Bug#25659 memory leak via "plugins" test rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly + +rpl_ndb_stm_innodb : Bug#26783 +ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms diff --git a/mysql-test/t/errors.test b/mysql-test/t/errors.test index f5647a293e8..4fbdcba635f 100644 --- a/mysql-test/t/errors.test +++ b/mysql-test/t/errors.test @@ -40,5 +40,17 @@ create table t1 (a int(256)); set sql_mode='traditional'; --error 1074 create table t1 (a varchar(66000)); +set sql_mode=default; + +# +# Bug #27513: mysql 5.0.x + NULL pointer DoS +# +CREATE TABLE t1 (a INT); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +INSERT INTO t1 VALUES(1); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +INSERT INTO t1 VALUES(2),(3); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +DROP TABLE t1; # End of 5.0 tests diff --git a/mysql-test/t/events.test b/mysql-test/t/events.test index 8236ae32588..575f9984a79 100644 --- a/mysql-test/t/events.test +++ b/mysql-test/t/events.test @@ -1,7 +1,13 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc -create database if not exists events_test; +--disable_warnings +drop database if exists events_test; +drop database if exists db_x; +drop database if exists mysqltest_db2; +drop database if exists mysqltest_no_such_database; +--enable_warnings +create database events_test; use events_test; # @@ -74,7 +80,7 @@ DROP EVENT event_starts_test; # create table test_nested(a int); create event e_43 on schedule every 1 second do set @a = 5; ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN alter event e_43 do alter event e_43 do set @a = 4; delimiter |; alter event e_43 do @@ -215,62 +221,161 @@ set names latin1; # # -# mysql.event intact checking start +# mysql.event intact checking +# Check that the server does not crash if +# one has destroyed or tampered with the event table. +# Please see see for events_restart_phase* tests to +# see the server behavior at start up with bad mysql.event +# table. # -# There should be at least 1 second between the ALTERs or we can't catch the change of create_time!! +# +--echo Create a test event. Only event metadata is relevant, +--echo the actual schedule and body are not. # CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; --replace_column 8 # 9 # SHOW EVENTS; -ALTER TABLE mysql.event ADD dummy INT FIRST; ---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED -SHOW EVENTS; -ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST; ---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED -SHOW EVENTS; -ALTER TABLE mysql.event DROP dummy2; +# +--echo Try to alter mysql.event: the server should fail to load +--echo event information after mysql.event was tampered with. +--echo +--echo First, let's add a column to the end and make sure everything +--echo works as before +--echo +ALTER TABLE mysql.event ADD dummy INT; --replace_column 8 # 9 # SHOW EVENTS; +SELECT event_name FROM INFORMATION_SCHEMA.events; +--replace_regex /STARTS '[^']+'/STARTS '#'/ +SHOW CREATE EVENT intact_check; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT no_such_event; +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_1; +DROP EVENT intact_check_2; +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +SHOW VARIABLES LIKE 'event_scheduler'; +SET GLOBAL event_scheduler=OFF; +# Clean up +ALTER TABLE mysql.event DROP dummy; +CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; +--echo +--echo Now let's add a column to the first position: the server +--echo expects to see event schema name there +--echo +ALTER TABLE mysql.event ADD dummy INT FIRST; +--error ER_CANNOT_LOAD_FROM_TABLE +SHOW EVENTS; +--error ER_CANNOT_LOAD_FROM_TABLE +SELECT event_name FROM INFORMATION_SCHEMA.events; +--error ER_EVENT_DOES_NOT_EXIST +SHOW CREATE EVENT intact_check; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT no_such_event; +--error ER_CANNOT_LOAD_FROM_TABLE +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +--error ER_EVENT_DOES_NOT_EXIST +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +--error ER_EVENT_DOES_NOT_EXIST +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_1; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_2; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check; +# Should work OK +DROP DATABASE IF EXISTS mysqltest_no_such_database; +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +SHOW VARIABLES LIKE 'event_scheduler'; +SET GLOBAL event_scheduler=OFF; +--echo Clean up +ALTER TABLE mysql.event DROP dummy; +DELETE FROM mysql.event; +CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; +--echo Back up the table, further changes are not reversible CREATE TABLE event_like LIKE mysql.event; INSERT INTO event_like SELECT * FROM mysql.event; -#sleep a bit or we won't catch the change of time ---sleep 1.1 -ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; ---error ER_CANNOT_LOAD_FROM_TABLE -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin default ''; -#wait a bit or we won't see the difference because of seconds resolution ---sleep 1.1 -SHOW CREATE TABLE mysql.event; ---error ER_CANNOT_LOAD_FROM_TABLE -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; ---sleep 1.1 -ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin default ''; ---sleep 1.1 ---echo "This should work" ---replace_column 8 # 9 # -SHOW EVENTS; ---sleep 1.1 -ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; ---error ER_CANNOT_LOAD_FROM_TABLE -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; ---sleep 1.1 -ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default ''; ---sleep 1.1 ---error ER_CANNOT_LOAD_FROM_TABLE -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; ---sleep 1.1 +--echo +--echo Drop some columns and try more checks. +--echo +--echo ALTER TABLE mysql.event DROP comment, DROP starts; ---sleep 1.1 ---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED +--error ER_CANNOT_LOAD_FROM_TABLE +SHOW EVENTS; +--error ER_CANNOT_LOAD_FROM_TABLE SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; +--error ER_CANNOT_LOAD_FROM_TABLE +SHOW CREATE EVENT intact_check; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT no_such_event; +--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +--error ER_EVENT_DOES_NOT_EXIST +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +--error ER_EVENT_DOES_NOT_EXIST +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_1; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_2; +# Should succeed +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +SHOW VARIABLES LIKE 'event_scheduler'; +SET GLOBAL event_scheduler=OFF; +--echo +--echo Now drop the table, and test again +--echo +--echo DROP TABLE mysql.event; +--error ER_NO_SUCH_TABLE +SHOW EVENTS; +--error ER_NO_SUCH_TABLE +SELECT event_name FROM INFORMATION_SCHEMA.events; +--error ER_NO_SUCH_TABLE +SHOW CREATE EVENT intact_check; +--error ER_NO_SUCH_TABLE +DROP EVENT no_such_event; +--error ER_NO_SUCH_TABLE +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +--error ER_NO_SUCH_TABLE +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +--error ER_NO_SUCH_TABLE +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +--error ER_NO_SUCH_TABLE +DROP EVENT intact_check_1; +--error ER_NO_SUCH_TABLE +DROP EVENT intact_check_2; +--error ER_NO_SUCH_TABLE +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +--echo OK, there is an unnecessary warning about the non-existent table +--echo but it's not easy to fix and no one complained about it. +--echo A similar warning is printed if mysql.proc is missing. +SHOW WARNINGS; +SELECT @@event_scheduler; +SHOW VARIABLES LIKE 'event_scheduler'; +SET GLOBAL event_scheduler=OFF; +--echo Restore the original table. CREATE TABLE mysql.event like event_like; -INSERT INTO mysql.event SELECT * FROM event_like; DROP TABLE event_like; --replace_column 8 # 9 # SHOW EVENTS; -DROP EVENT intact_check; # # mysql.event intact checking end # @@ -351,7 +456,7 @@ drop event закачка21; # Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement # create table t_16 (s1 int); ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; drop table t_16; # @@ -424,5 +529,200 @@ SHOW EVENTS FROM aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa SHOW EVENTS FROM ``; SHOW EVENTS FROM `events\\test`; +# +# A check for events SQL under LOCK TABLES and in pre-locked mode. +# +--echo +--echo LOCK TABLES mode. +--echo +# +# SHOW CREATE EVENT and INFORMATION_SCHEMA.events are available and +# cause an implicit lock/unlock of mysql.event table, regardless of the +# currently locked tables. +# +create table t1 (a int); +create event e1 on schedule every 10 hour do select 1; +# +lock table t1 read; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED +drop event e2; +--error ER_TABLE_NOT_LOCKED +drop event e1; +unlock tables; +# +lock table t1 write; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED +drop event e2; +--error ER_TABLE_NOT_LOCKED +drop event e1; +unlock tables; +# +lock table t1 read, mysql.event read; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e2; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e1; +unlock tables; +# +lock table t1 write, mysql.event read; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e2; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e1; +unlock tables; +# +--error ER_WRONG_LOCK_OF_SYSTEM_TABLE +lock table t1 read, mysql.event write; +# +--error ER_WRONG_LOCK_OF_SYSTEM_TABLE +lock table t1 write, mysql.event write; +# +lock table mysql.event write; +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +create event e2 on schedule every 10 hour do select 1; +alter event e2 disable; +alter event e2 rename to e3; +drop event e3; +drop event e1; +unlock tables; +--echo Make sure we have left no events +select event_name from information_schema.events; +--echo +--echo Events in sub-statements, events and prelocking +--echo +--echo +create event e1 on schedule every 10 hour do select 1; +delimiter |; +--error ER_SP_NO_RETSET +create function f1() returns int +begin + show create event e1; + return 1; +end| +--error ER_SP_NO_RETSET +create trigger trg before insert on t1 for each row +begin + show create event e1; +end| +--error ER_SP_NO_RETSET +create function f1() returns int +begin + select event_name from information_schema.events; + return 1; +end| +--error ER_SP_NO_RETSET +create trigger trg before insert on t1 for each row +begin + select event_name from information_schema.events; +end| +--error ER_EVENT_RECURSION_FORBIDDEN +create function f1() returns int +begin + create event e2 on schedule every 10 hour do select 1; + return 1; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +create function f1() returns int +begin + alter event e1 rename to e2; + return 1; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +create function f1() returns int +begin + drop event e2; + return 1; +end| +--echo ---------------------------------------------------------------------- +create trigger trg before insert on t1 for each row +begin + set new.a= f1(); +end| +create function f1() returns int +begin + call p1(); + return 0; +end| +create procedure p1() +begin + select event_name from information_schema.events; +end| +--error ER_SP_NO_RETSET +insert into t1 (a) values (1)| +drop procedure p1| +create procedure p1() +begin + show create event e1; +end| +--error ER_SP_NO_RETSET +insert into t1 (a) values (1)| +drop procedure p1| +create procedure p1() +begin + create temporary table tmp select event_name from information_schema.events; +end| +--echo expected to work, since we redirect the output into a tmp table +insert into t1 (a) values (1)| +select * from tmp| +drop temporary table tmp| +drop procedure p1| +create procedure p1() +begin + alter event e1 rename to e2; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +insert into t1 (a) values (1)| +drop procedure p1| +create procedure p1() +begin + drop event e1; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +insert into t1 (a) values (1)| +drop table t1| +drop event e1| +delimiter ;| drop database events_test; diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test index c1016f1752b..8343c6b4bc6 100644 --- a/mysql-test/t/events_bugs.test +++ b/mysql-test/t/events_bugs.test @@ -1,7 +1,12 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc -create database if not exists events_test; +--disable_warnings +drop database if exists events_test; +drop database if exists mysqltest_db1; +drop database if exists mysqltest_db2; +--enable_warnings +create database events_test; use events_test; # @@ -30,7 +35,7 @@ SET NAMES latin1; # START - BUG#16408: Events: crash for an event in a procedure # set @a=3; ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5; # # END - BUG#16408: Events: crash for an event in a procedure @@ -429,6 +434,184 @@ DROP USER mysqltest_u1@localhost; # +# BUG#16420: Events: timestamps become UTC +# BUG#26429: SHOW CREATE EVENT is incorrect for an event that +# STARTS NOW() +# BUG#26431: Impossible to re-create an event from backup if its +# STARTS clause is in the past +# WL#3698: Events: execution in local time zone +# +# Here we only check non-concurrent aspects of the patch. +# For the actual tests of time zones please see events_time_zone.test +# +SET GLOBAL EVENT_SCHEDULER= OFF; +SET @save_time_zone= @@TIME_ZONE; + +#---------------------------------------------------------------------- + +# We will use a separate connection because SET TIMESTAMP will stop +# the clock in that connection. + +SET TIME_ZONE= '+00:00'; +SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); + + +# Test when event time zone is updated on ALTER EVENT. +# + +CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; +SHOW EVENTS; + +# Test storing and updating of the event time zone. +# +SET TIME_ZONE= '-01:00'; +ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00'; +SHOW EVENTS; + +# This will update event time zone. +SET TIME_ZONE= '+02:00'; +ALTER EVENT e1 ON SCHEDULE AT '2000-01-02 00:00:00' + ON COMPLETION PRESERVE DISABLE; +SHOW EVENTS; + +# This will update event time zone. +SET TIME_ZONE= '-03:00'; +ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY ENDS '2030-01-03 00:00:00' + ON COMPLETION PRESERVE DISABLE; +SHOW EVENTS; + +# This will not update event time zone, as no time is being adjusted. +SET TIME_ZONE= '+04:00'; +ALTER EVENT e1 DO SELECT 2; +SHOW EVENTS; + +DROP EVENT e1; + +#---------------------------------------------------------------------- + +# Create some events. +SET TIME_ZONE='+05:00'; +CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO + SELECT 1; + +SET TIMESTAMP= @@TIMESTAMP + 1; + +SET TIME_ZONE='-05:00'; +CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO + SELECT 1; + +SET TIMESTAMP= @@TIMESTAMP + 1; + +SET TIME_ZONE='+00:00'; +CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO + SELECT 1; + + +# Test INFORMATION_SCHEMA.EVENTS. +# + +SELECT * FROM INFORMATION_SCHEMA.EVENTS ORDER BY event_name; + + +# Test SHOW EVENTS. +# + +SHOW EVENTS; + + +# Test SHOW CREATE EVENT. +# + +SHOW CREATE EVENT e1; +SHOW CREATE EVENT e2; +SHOW CREATE EVENT e3; + +#---------------------------------------------------------------------- + +# Test times in the past. +# + +--echo The following should fail, and nothing should be altered. + +--error ER_EVENT_CANNOT_ALTER_IN_THE_PAST +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00'; + +--error ER_EVENT_CANNOT_ALTER_IN_THE_PAST +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' DISABLE; + +--echo The following should give warnings, and nothing should be created. + +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' +DO + SELECT 1; + +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' DISABLE +DO + SELECT 1; + +CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO + SELECT 1; + +CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE +DO + SELECT 1; + +SHOW EVENTS; + +--echo The following should succeed giving a warning. + +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; + +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE +DO + SELECT 1; + +CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' + ON COMPLETION PRESERVE +DO + SELECT 1; + +--echo The following should succeed without warnings. + +ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; + +ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; + +CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO + SELECT 1; + +CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE +DO + SELECT 1; + +CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' + ON COMPLETION PRESERVE DISABLE +DO + SELECT 1; + +SHOW EVENTS; + + +DROP EVENT e8; +DROP EVENT e7; +DROP EVENT e6; +DROP EVENT e5; +DROP EVENT e4; +DROP EVENT e3; +DROP EVENT e2; +DROP EVENT e1; + +SET TIME_ZONE=@save_time_zone; + +# # End of tests # drop database events_test; diff --git a/mysql-test/t/events_restart_phase0.log b/mysql-test/t/events_restart_phase0.log deleted file mode 100644 index 218b804a302..00000000000 --- a/mysql-test/t/events_restart_phase0.log +++ /dev/null @@ -1,22 +0,0 @@ -SHOW VARIABLES LIKE 'event%'; -Variable_name Value -event_scheduler DISABLED -SELECT @@global.event_scheduler; -@@global.event_scheduler -DISABLED -SET GLOBAL event_scheduler=on; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=off; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=0; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=1; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=2; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2' -SET GLOBAL event_scheduler=SUSPEND; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND' -SET GLOBAL event_scheduler=SUSPENDED; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED' -SET GLOBAL event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' diff --git a/mysql-test/t/events_restart_phase0.result b/mysql-test/t/events_restart_phase0.result deleted file mode 100644 index 218b804a302..00000000000 --- a/mysql-test/t/events_restart_phase0.result +++ /dev/null @@ -1,22 +0,0 @@ -SHOW VARIABLES LIKE 'event%'; -Variable_name Value -event_scheduler DISABLED -SELECT @@global.event_scheduler; -@@global.event_scheduler -DISABLED -SET GLOBAL event_scheduler=on; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=off; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=0; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=1; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=2; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2' -SET GLOBAL event_scheduler=SUSPEND; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND' -SET GLOBAL event_scheduler=SUSPENDED; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED' -SET GLOBAL event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' diff --git a/mysql-test/t/events_restart_phase1.test b/mysql-test/t/events_restart_phase1.test index b2c052d303c..6a94ef12222 100644 --- a/mysql-test/t/events_restart_phase1.test +++ b/mysql-test/t/events_restart_phase1.test @@ -1,19 +1,43 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc +# +# Test that when the server is restarted, it checks mysql.event table, +# and disables the scheduler if it's not up to date. +# + +# Switch off the scheduler for now. +set global event_scheduler=off; --disable_warnings -create database if not exists mysqltest_events_test; +drop database if exists events_test; --enable_warnings - -use mysqltest_events_test; -set global event_scheduler=off; +create database events_test; +use events_test; create table execution_log(name char(10)); -create event abc1 on schedule every 1 second do insert into execution_log value('abc1'); -create event abc2 on schedule every 1 second do insert into execution_log value('abc2'); -create event abc3 on schedule every 1 second do insert into execution_log value('abc3'); ---sleep 1.5 -select name from execution_log; -insert into mysql.event values ('db1','bad','select 42','root@localhost',NULL,1000,'MICROSECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment1',1,'SYSTEM'); -insert into mysql.event values ('db1','bad2','sect','root@localhost',NULL,1000,'SECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment2',1,'SYSTEM'); +create event abc1 on schedule every 1 second do + insert into execution_log value('abc1'); +create event abc2 on schedule every 1 second do + insert into execution_log value('abc2'); +create event abc3 on schedule every 1 second do + insert into execution_log value('abc3'); +# +# There are various conditions when a server would regard mysql.event +# table as damaged: +# - the table has more column than specified in the compiled in value, but +# the version of the server which created the table is the same +# - the column count in the table is less than the compiled in value +# - some column has an incompatible type specification (for what is an +# incompatible type specification please refer to the comments in the source +# +# Unfortunately, in order to test a condition, we need to restart the +# server. Therefore, here we test only one simple case: changing the data +# type of the 'body' field to blob. +# +# First, let's do a backup to not depend on actual definition of mysql.event +create table event_like like mysql.event; +insert into event_like select * from mysql.event; +# Now let's alter the table and restart the server +alter table mysql.event + change column body body longtext character set utf8 collate utf8_bin; --echo "Now we restart the server" diff --git a/mysql-test/t/events_restart_phase2.test b/mysql-test/t/events_restart_phase2.test index 845472377ba..c3f799634b3 100644 --- a/mysql-test/t/events_restart_phase2.test +++ b/mysql-test/t/events_restart_phase2.test @@ -1,9 +1,41 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc -use mysqltest_events_test; ---sleep 1.5 ---echo "Should get 0 rows because the queue aborted run -select distinct name from execution_log order by name; -delete from mysql.event where name like 'bad%'; ---echo "Now restart the server again" +use events_test; +# Event scheduler should be disabled: the system tables are damaged +select @@event_scheduler; +# Try various Event Scheduler operation and check the output. +--error ER_EVENTS_DB_ERROR +show events; +--error ER_EVENTS_DB_ERROR +select event_name from information_schema.events; +--error ER_EVENTS_DB_ERROR +show create event intact_check; +--error ER_EVENTS_DB_ERROR +drop event no_such_event; +--error ER_EVENTS_DB_ERROR +create event intact_check_1 on schedule every 5 hour do select 5; +--error ER_EVENTS_DB_ERROR +alter event intact_check_1 on schedule every 8 hour do select 8; +--error ER_EVENTS_DB_ERROR +alter event intact_check_1 rename to intact_check_2; +--error ER_EVENTS_DB_ERROR +drop event intact_check_1; +--error ER_EVENTS_DB_ERROR +drop event intact_check_2; +--error ER_EVENTS_DB_ERROR +drop event intact_check; +--error ER_EVENTS_DB_ERROR +set global event_scheduler=on; +--error ER_EVENTS_DB_ERROR +set global event_scheduler=off; +show variables like 'event_scheduler'; +--echo Make sure that we still can create and drop databases, +--echo and no warnings are produced. +drop database if exists mysqltest_database_not_exists; +create database mysqltest_db1; +drop database mysqltest_db1; +--echo Restore the original mysql.event table +drop table mysql.event; +rename table event_like to mysql.event; +--echo Now let's restart the server again diff --git a/mysql-test/t/events_restart_phase3.test b/mysql-test/t/events_restart_phase3.test index 76cd9d22752..1be40c72717 100644 --- a/mysql-test/t/events_restart_phase3.test +++ b/mysql-test/t/events_restart_phase3.test @@ -1,14 +1,18 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc - -use mysqltest_events_test; ---sleep 2 +# +# We need this file primarily to make sure that the scheduler is restarted +# and enabled after we have restored mysql.event table. +# This is the final step of the "cleanup". +# +# Make sure also that events are executed OK after restart, just in case. +use events_test; +# Make sure the scheduler was started successfully +select @@event_scheduler; +let $wait_condition=select count(distinct name)=3 from execution_log; +--source include/wait_condition.inc --echo "Should get 3 rows : abc1, abc2, abc3 select distinct name from execution_log order by name; - -drop event abc1; -drop event abc2; -drop event abc3; drop table execution_log; - -drop database mysqltest_events_test; +# Will drop all events +drop database events_test; diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test index f7d4c3c14d6..31c09a3d561 100644 --- a/mysql-test/t/events_scheduling.test +++ b/mysql-test/t/events_scheduling.test @@ -1,10 +1,11 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc --- source include/not_valgrind.inc CREATE DATABASE IF NOT EXISTS events_test; USE events_test; +SET GLOBAL event_scheduler=OFF; +--echo Try agian to make sure it's allowed SET GLOBAL event_scheduler=OFF; SHOW VARIABLES LIKE 'event_scheduler'; SET GLOBAL event_scheduler=1; @@ -12,6 +13,8 @@ SHOW VARIABLES LIKE 'event_scheduler'; SET GLOBAL event_scheduler=0; SHOW VARIABLES LIKE 'event_scheduler'; SET GLOBAL event_scheduler=ON; +--echo Try again to make sure it's allowed +SET GLOBAL event_scheduler=ON; SHOW VARIABLES LIKE 'event_scheduler'; --error ER_WRONG_VALUE_FOR_VAR SET GLOBAL event_scheduler=DISABLED; @@ -30,34 +33,73 @@ CREATE TABLE table_1(a int); CREATE TABLE table_2(a int); CREATE TABLE table_3(a int); CREATE TABLE table_4(a int); -CREATE TABLE T19170(s1 TIMESTAMP); + SET GLOBAL event_scheduler=ON; # We need to have 2 to make it safe with valgrind. This is probably because # of when we calculate the timestamp value -CREATE EVENT two_sec ON SCHEDULE EVERY 2 SECOND DO INSERT INTO table_1 VALUES(1); -CREATE EVENT start_n_end - ON SCHEDULE EVERY 1 SECOND - ENDS NOW() + INTERVAL 6 SECOND - ON COMPLETION PRESERVE - DO INSERT INTO table_2 VALUES(1); ---sleep 5 -CREATE EVENT only_one_time ON SCHEDULE EVERY 2 SECOND ENDS NOW() + INTERVAL 1 SECOND DO INSERT INTO table_3 VALUES(1); -CREATE EVENT two_time ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND ON COMPLETION PRESERVE DO INSERT INTO table_4 VALUES(1); ---sleep 5 +CREATE EVENT event_1 ON SCHEDULE EVERY 2 SECOND +DO + INSERT INTO table_1 VALUES (1); + +CREATE EVENT event_2 ON SCHEDULE EVERY 1 SECOND +ENDS NOW() + INTERVAL 6 SECOND +ON COMPLETION PRESERVE +DO + INSERT INTO table_2 VALUES (1); + +CREATE EVENT event_3 ON SCHEDULE EVERY 2 SECOND ENDS NOW() + INTERVAL 1 SECOND +ON COMPLETION NOT PRESERVE +DO + INSERT INTO table_3 VALUES (1); + +CREATE EVENT event_4 ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND +ON COMPLETION PRESERVE +DO + INSERT INTO table_4 VALUES (1); + +# Let event_1 insert at least 4 records into the table +let $wait_condition=select count(*) >= 4 from table_1; +--source include/wait_condition.inc + +# Let event_2 reach the end of its execution interval +let $wait_condition=select count(*) = 0 from information_schema.events +where event_name='event_2' and status='enabled'; +--source include/wait_condition.inc + +# Let event_3, which is ON COMPLETION NOT PRESERVE execute and drop itself +let $wait_condition=select count(*) = 0 from information_schema.events +where event_name='event_3'; +--source include/wait_condition.inc + +# Let event_4 reach the end of its execution interval +let $wait_condition=select count(*) = 0 from information_schema.events +where event_name='event_4' and status='enabled'; +--source include/wait_condition.inc + +# check the data + SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1; SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2; -SELECT IF(SUM(a) > 0, 'OK', 'ERROR') FROM table_3; -SELECT IF(SUM(a) > 0, 'OK', 'ERROR') FROM table_4; -DROP EVENT two_sec; -SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='start_n_end' AND ENDS IS NOT NULL; -SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='start_n_end' AND ENDS IS NOT NULL; -DROP EVENT IF EXISTS events_test.start_n_end; +SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3; +SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4; + +SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') +FROM INFORMATION_SCHEMA.EVENTS +WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; + +SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') +FROM INFORMATION_SCHEMA.EVENTS +WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; + --echo "Already dropped because ended. Therefore an error." --error ER_EVENT_DOES_NOT_EXIST -DROP EVENT only_one_time; +DROP EVENT event_3; + +DROP EVENT event_1; --echo "Should be preserved" SELECT EVENT_NAME, STATUS FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_NAME; -DROP EVENT two_time; +DROP EVENT event_2; +DROP EVENT event_4; DROP TABLE table_1; DROP TABLE table_2; DROP TABLE table_3; diff --git a/mysql-test/t/events_time_zone.test b/mysql-test/t/events_time_zone.test index fff84c7a995..5f929e0b07a 100644 --- a/mysql-test/t/events_time_zone.test +++ b/mysql-test/t/events_time_zone.test @@ -20,6 +20,7 @@ let $old_db= `SELECT DATABASE()`; USE mysqltest_db1; SET GLOBAL EVENT_SCHEDULER= OFF; +SET @save_time_zone= @@TIME_ZONE; # @@ -31,176 +32,6 @@ SET GLOBAL EVENT_SCHEDULER= OFF; # WL#3698: Events: execution in local time zone # -SET @save_time_zone= @@TIME_ZONE; - -#---------------------------------------------------------------------- - -# We will use a separate connection because SET TIMESTAMP will stop -# the clock in that connection. - -connect (conn1, localhost, root, , mysqltest_db1); - -SET TIME_ZONE= '+00:00'; -SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); - - -# Test when event time zone is updated on ALTER EVENT. -# - -CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; -SHOW EVENTS; - -# Test storing and updating of the event time zone. -# -SET TIME_ZONE= '-01:00'; -ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00'; -SHOW EVENTS; - -# This will update event time zone. -SET TIME_ZONE= '+02:00'; -ALTER EVENT e1 ON SCHEDULE AT '2000-01-02 00:00:00' - ON COMPLETION PRESERVE DISABLE; -SHOW EVENTS; - -# This will update event time zone. -SET TIME_ZONE= '-03:00'; -ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY ENDS '2030-01-03 00:00:00' - ON COMPLETION PRESERVE DISABLE; -SHOW EVENTS; - -# This will not update event time zone, as no time is being adjusted. -SET TIME_ZONE= '+04:00'; -ALTER EVENT e1 DO SELECT 2; -SHOW EVENTS; - -DROP EVENT e1; - -#---------------------------------------------------------------------- - -# Create some events. -SET TIME_ZONE='+05:00'; -CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO - SELECT 1; - -SET TIMESTAMP= @@TIMESTAMP + 1; - -SET TIME_ZONE='-05:00'; -CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO - SELECT 1; - -SET TIMESTAMP= @@TIMESTAMP + 1; - -SET TIME_ZONE='+00:00'; -CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO - SELECT 1; - - -# Test INFORMATION_SCHEMA.EVENTS. -# - -SELECT * FROM INFORMATION_SCHEMA.EVENTS; - - -# Test SHOW EVENTS. -# - -SHOW EVENTS; - - -# Test SHOW CREATE EVENT. -# - -SHOW CREATE EVENT e1; -SHOW CREATE EVENT e2; -SHOW CREATE EVENT e3; - -#---------------------------------------------------------------------- - -# Test times in the past. -# - ---echo The following should fail, and nothing should be altered. - ---error ER_EVENT_CANNOT_ALTER_IN_THE_PAST -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00'; - ---error ER_EVENT_CANNOT_ALTER_IN_THE_PAST -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' DISABLE; - ---echo The following should give warnings, and nothing should be created. - -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' -DO - SELECT 1; - -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' DISABLE -DO - SELECT 1; - -CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO - SELECT 1; - -CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE -DO - SELECT 1; - -SHOW EVENTS; - ---echo The following should succeed giving a warning. - -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; - -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE -DO - SELECT 1; - -CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' - ON COMPLETION PRESERVE -DO - SELECT 1; - ---echo The following should succeed without warnings. - -ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; - -ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; - -CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO - SELECT 1; - -CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE -DO - SELECT 1; - -CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' - ON COMPLETION PRESERVE DISABLE -DO - SELECT 1; - -SHOW EVENTS; - - -DROP EVENT e8; -DROP EVENT e7; -DROP EVENT e6; -DROP EVENT e5; -DROP EVENT e4; -DROP EVENT e3; -DROP EVENT e2; -DROP EVENT e1; - - -disconnect conn1; -connection default; - #---------------------------------------------------------------------- # Create rounding function. diff --git a/mysql-test/t/events_trans.test b/mysql-test/t/events_trans.test new file mode 100644 index 00000000000..77427070cbb --- /dev/null +++ b/mysql-test/t/events_trans.test @@ -0,0 +1,115 @@ +# +# Tests that require transactions +# +-- source include/have_innodb.inc +--disable_warnings +drop database if exists events_test; +drop database if exists mysqltest_no_such_database; +--enable_warnings +create database events_test; +use events_test; + +--echo +--echo Test that Events DDL issue an implicit COMMIT +--echo +--echo +set autocommit=off; +# Sanity check +select @@autocommit; +create table t1 (a varchar(255)) engine=innodb; +# Basic: check that successful Events DDL commits pending transaction +begin work; +insert into t1 (a) values ("OK: create event"); +create event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: alter event"); +alter event e1 on schedule every 2 day do select 2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: alter event rename"); +alter event e1 rename to e2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: drop event"); +drop event e2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: drop event if exists"); +drop event if exists e2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +create event e1 on schedule every 1 day do select 1; +begin work; +insert into t1 (a) values ("OK: create event if not exists"); +create event if not exists e1 on schedule every 2 day do select 2; +rollback work; +select * from t1; +delete from t1; +commit work; +--echo +--echo Now check various error conditions: make sure we issue an +--echo implicit commit anyway +--echo +# +begin work; +insert into t1 (a) values ("OK: create event: event already exists"); +--error ER_EVENT_ALREADY_EXISTS +create event e1 on schedule every 2 day do select 2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: alter event rename: rename to same name"); +--error ER_EVENT_SAME_NAME +alter event e1 rename to e1; +rollback work; +select * from t1; +delete from t1; +commit work; +# +create event e2 on schedule every 3 day do select 3; +begin work; +insert into t1 (a) values ("OK: alter event rename: destination exists"); +--error ER_EVENT_ALREADY_EXISTS +alter event e2 rename to e1; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: create event: database does not exist"); +--error ER_BAD_DB_ERROR +create event mysqltest_no_such_database.e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; + +# +# Cleanup +# +drop database events_test; + diff --git a/mysql-test/t/events_trans_notembedded.test b/mysql-test/t/events_trans_notembedded.test new file mode 100644 index 00000000000..adc293d7e79 --- /dev/null +++ b/mysql-test/t/events_trans_notembedded.test @@ -0,0 +1,61 @@ +# +# Tests that require transactions +# +-- source include/not_embedded.inc +-- source include/have_innodb.inc +--disable_warnings +drop database if exists events_test; +drop database if exists mysqltest_db2; +--enable_warnings +create database events_test; +use events_test; + +# +# Privilege checks +# +grant create, insert, select, delete on mysqltest_db2.* + to mysqltest_user1@localhost; +create database mysqltest_db2; +connect (conn1,localhost,mysqltest_user1,,mysqltest_db2); +set autocommit=off; +# Sanity check +select @@autocommit; +create table t1 (a varchar(255)) engine=innodb; +# Not enough privileges to CREATE EVENT +begin work; +insert into t1 (a) values ("OK: create event: insufficient privileges"); +--error ER_DBACCESS_DENIED_ERROR +create event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; +# Not enough privileges to ALTER EVENT +begin work; +insert into t1 (a) values ("OK: alter event: insufficient privileges"); +--error ER_DBACCESS_DENIED_ERROR +alter event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; +# Not enough privileges to DROP EVENT +begin work; +insert into t1 (a) values ("OK: drop event: insufficient privileges"); +--error ER_DBACCESS_DENIED_ERROR +drop event e1; +rollback work; +select * from t1; +delete from t1; +commit work; +# Cleanup +disconnect conn1; +connection default; +drop user mysqltest_user1@localhost; +drop database mysqltest_db2; + +# +# Cleanup +# +drop database events_test; + diff --git a/mysql-test/t/federated_server.test b/mysql-test/t/federated_server.test index b2075b8e262..20332f65bff 100644 --- a/mysql-test/t/federated_server.test +++ b/mysql-test/t/federated_server.test @@ -296,8 +296,10 @@ create procedure p1 () begin DECLARE v INT DEFAULT 0; DECLARE e INT DEFAULT 0; + DECLARE i INT; DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET e = e + 1; - WHILE v < 10000 do + SET i = sleep(5); + WHILE v < 20000 do CREATE SERVER s FOREIGN DATA WRAPPER mysql OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test'); diff --git a/mysql-test/t/fulltext_left_join.test b/mysql-test/t/fulltext_left_join.test index 5942ce119ee..8c13ae5cad9 100644 --- a/mysql-test/t/fulltext_left_join.test +++ b/mysql-test/t/fulltext_left_join.test @@ -87,3 +87,14 @@ SELECT t1.*, MATCH(t1.name) AGAINST('string') AS relevance DROP TABLE t1,t2; # End of 4.1 tests + +# +# BUG#25729 - boolean full text search is confused by NULLs produced by LEFT +# JOIN +# +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT, c TEXT, KEY(b)); +INSERT INTO t1 VALUES(1); +INSERT INTO t2(b,c) VALUES(2,'castle'),(3,'castle'); +SELECT * FROM t1 LEFT JOIN t2 ON a=b WHERE MATCH(c) AGAINST('+castle' IN BOOLEAN MODE); +DROP TABLE t1, t2; diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 4989199f3aa..778bfc9528f 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -800,6 +800,16 @@ select var_samp(e) as '0.5', var_pop(e) as '0.25' from bug22555; drop table bug22555; +# +# Bug #21976: Unnecessary warning with count(decimal) +# + +create table t1 (a decimal(20)); +insert into t1 values (12345678901234567890); +select count(a) from t1; +select count(distinct a) from t1; +drop table t1; + # # Bug #23184: SELECT causes server crash # @@ -824,5 +834,4 @@ SELECT a,AVG(DISTINCT b) AS average FROM t1 GROUP BY a HAVING average > 50; DROP TABLE t1; -### --echo End of 5.0 tests diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 849d39cfc32..ca78ced134b 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1145,6 +1145,10 @@ INSERT INTO `t1` (`id`, `tire`) VALUES ('A', 0), ('B', 1),('C', 2); SELECT REPEAT( '#', tire ) AS A, REPEAT( '#', tire % 999 ) AS B, tire FROM `t1`; +SELECT REPEAT('0', CAST(0 AS UNSIGNED)); +SELECT REPEAT('0', -2); +SELECT REPEAT('0', 2); + DROP TABLE t1; # diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index a3952dbc3da..3845bdcb983 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -492,6 +492,75 @@ DESCRIBE v2; DROP VIEW v1,v2; DROP TABLE t1; +# +# Bug#24563: MBROverlaps does not seem to function propertly +# Bug#54888: MBROverlaps missing in 5.1? +# + +# Test all MBR* functions and their non-MBR-prefixed aliases, +# using shifted squares to verify the spatial relations. + +create table t1 (name VARCHAR(100), square GEOMETRY); + +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); + +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); + +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); + +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); + +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); + +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); + +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; + +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; + +# Overlaps needs a few more tests, with point and line dimensions + +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); + +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +SELECT Overlaps(@horiz1, @point2) FROM DUAL; + +DROP TABLE t1; + +--echo End of 5.0 tests + + # # Bug #11335 View redefines column types # @@ -501,3 +570,4 @@ desc v1; drop view v1; drop table t1; +--echo End of 5.1 tests diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 9417ac687d4..0008c37646c 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -986,3 +986,15 @@ disconnect con1; connection default; --echo End of 5.0 tests + +# +# Bug#21432: Database/Table name limited to 64 bytes, not chars, problems with multi-byte +# +set names utf8; +grant select on test.* to юзер_юзер@localhost; +--exec $MYSQL --default-character-set=utf8 --user=юзер_юзер -e "select user()" +revoke all on test.* from юзер_юзер@localhost; +drop user юзер_юзер@localhost; +--error 1573 +grant select on test.* to очень_длинный_юзер@localhost; +set names default; diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 09a588c9195..a49044e63c1 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1042,5 +1042,39 @@ select user,db from information_schema.processlist; connection default; drop user user3148@localhost; ---echo End of 5.1 tests. +# +# Bug #26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS +# in Event (see also openssl_1.test) +# +--disable_warnings +DROP TABLE IF EXISTS server_status; +DROP EVENT IF EXISTS event_status; +--enable_warnings +SET GLOBAL event_scheduler=1; + +DELIMITER $$; + +CREATE EVENT event_status + ON SCHEDULE AT NOW() + ON COMPLETION NOT PRESERVE + DO +BEGIN + CREATE TABLE server_status + SELECT variable_name + FROM information_schema.global_status + WHERE variable_name LIKE 'ABORTED_CONNECTS' OR + variable_name LIKE 'BINLOG_CACHE_DISK_USE'; +END$$ + +DELIMITER ;$$ + +let $wait_condition=select count(*) = 0 from information_schema.events where event_name='event_status'; +--source include/wait_condition.inc + +SELECT variable_name FROM server_status; + +DROP TABLE server_status; +SET GLOBAL event_scheduler=0; + +--echo End of 5.1 tests. diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 0937b4fd30d..75f2796abc6 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1810,7 +1810,6 @@ select a,hex(s1) from t1; select hex(s1) from t2; drop table t2,t1; - # Ensure that _ibfk_0 is not mistreated as a # generated foreign key identifier. (Bug #16387) @@ -2293,6 +2292,34 @@ DELETE CASCADE ON UPDATE CASCADE; SHOW CREATE TABLE t2; DROP TABLE t2, t1; +# +# Bug #25927: Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns +# for which there is a foreign key constraint ON ... SET NULL. +# + +CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB; +CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; +--replace_regex /'\.\/test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1025 +ALTER TABLE t2 MODIFY a INT NOT NULL; +DELETE FROM t1; +DROP TABLE t2,t1; + +# +# Bug #26835: table corruption after delete+insert +# + +CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY) +ENGINE=InnoDB; +INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4); +DELETE FROM t1; +INSERT INTO t1 VALUES ('DDD'); +SELECT * FROM t1; +DROP TABLE t1; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 5729ff0748d..6a6e59f6173 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -140,6 +140,22 @@ eval select load_file("$MYSQL_TEST_DIR/t/loaddata.test"); # cleanup drop table t1, t2; +# +# Bug#27586: Wrong autoinc value assigned by LOAD DATA in the +# NO_AUTO_VALUE_ON_ZERO mode +# +create table t1(f1 int); +insert into t1 values(1),(null); +create table t2(f2 int auto_increment primary key); +disable_query_log; +eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t1' from t1; +SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t2; +enable_query_log; +select * from t2; +--exec rm $MYSQLTEST_VARDIR/tmp/t1 +SET @@SQL_MODE=@OLD_SQL_MODE; +drop table t1,t2; # End of 5.0 tests diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test index e772089ce7a..16f466e9b54 100644 --- a/mysql-test/t/log_state.test +++ b/mysql-test/t/log_state.test @@ -136,4 +136,3 @@ disconnect con1; # Remove the log files that was created in the "default location" # i.e var/run --remove_file $MYSQLTEST_VARDIR/run/master.log ---remove_file $MYSQLTEST_VARDIR/run/master-slow.log diff --git a/mysql-test/t/log_tables-big-master.opt b/mysql-test/t/log_tables-big-master.opt new file mode 100644 index 00000000000..35ff7911705 --- /dev/null +++ b/mysql-test/t/log_tables-big-master.opt @@ -0,0 +1 @@ +--log-slow-queries diff --git a/mysql-test/t/log_tables-big.test b/mysql-test/t/log_tables-big.test new file mode 100644 index 00000000000..8c956fa6f55 --- /dev/null +++ b/mysql-test/t/log_tables-big.test @@ -0,0 +1,35 @@ +# this test needs multithreaded mysqltest +-- source include/not_embedded.inc + +# Test sleeps for long times +--source include/big_test.inc + +# check that CSV engine was compiled in +--source include/have_csv.inc + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); + +# +# Bug #27638: slow logging to CSV table inserts bad query_time and lock_time values +# +connection con1; +set session long_query_time=10; +select get_lock('bug27638', 1); +connection con2; +set session long_query_time=1; +truncate table mysql.slow_log; +select get_lock('bug27638', 2); +select if (query_time between '00:00:01' and '00:00:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +truncate table mysql.slow_log; +select get_lock('bug27638', 60); +select if (query_time between '00:00:59' and '00:01:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +truncate table mysql.slow_log; +select get_lock('bug27638', 101); +select if (query_time between '00:01:40' and '00:01:50', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +connection con1; +select release_lock('bug27638'); +connection default; + +disconnect con1; +disconnect con2; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index a73d7a40d8b..e4cbd2938fb 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -204,8 +204,8 @@ load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8 select hex(a) from t1; drop table t1; flush logs; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR ---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000010 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000010 --echo End of 5.0 tests diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index d9372ad35c1..49adda73f2d 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -919,7 +919,7 @@ port=1234 EOF --exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 --exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1 ---remov_file $MYSQLTEST_VARDIR/tmp/tmp.cnf +--remove_file $MYSQLTEST_VARDIR/tmp/tmp.cnf --echo # --echo # Test of fix to BUG 12597 @@ -1431,6 +1431,72 @@ INSERT INTO t1 VALUES(1,0xff00fef0); DROP TABLE t1; + + +--echo # +--echo # Bug#26346: stack + buffer overrun in mysqldump +--echo # + +CREATE TABLE t1(a int); +INSERT INTO t1 VALUES (1), (2); + +# too long a file path causes an error +--error 1 +--exec $MYSQL_DUMP --tab=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test 2>&1 + +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-optionally-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --lines-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test + +--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql +--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt + +DROP TABLE t1; + +# +# Bug #25993: crashe with a merge table and -c +# + +CREATE TABLE t2 (a int); +CREATE TABLE t3 (a int); +CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3); +--exec $MYSQL_DUMP --skip-comments -c test +DROP TABLE t1, t2, t3; + +--echo # +--echo # Bug #23491: MySQLDump prefix function call in a view by database name +--echo # + +# Setup +create database bug23491_original; +create database bug23491_restore; +use bug23491_original; +create table t1 (c1 int); +create view v1 as select * from t1; +create procedure p1() select 1; +create function f1() returns int return 1; +create view v2 as select f1(); +create function f2() returns int return f1(); +create view v3 as select bug23491_original.f1(); + +# Backup. +--exec $MYSQL_DUMP --skip-comments -uroot --opt --routines bug23491_original > $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql + +# Restore. +--exec $MYSQL bug23491_restore < $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql + +# Verify +use bug23491_restore; +show create view bug23491_restore.v2; +show create view bug23491_restore.v3; + +# Cleanup +drop database bug23491_original; +drop database bug23491_restore; +use test; + --echo # --echo # End of 5.0 tests --echo # diff --git a/mysql-test/t/ndb_autodiscover3.test b/mysql-test/t/ndb_autodiscover3.test index ae6d669c3b8..d0b9d0983e9 100644 --- a/mysql-test/t/ndb_autodiscover3.test +++ b/mysql-test/t/ndb_autodiscover3.test @@ -1,5 +1,6 @@ -- source include/have_ndb.inc -- source include/have_multi_ndb.inc +-- source include/ndb_default_cluster.inc -- source include/not_embedded.inc # see bug#21563 @@ -9,6 +10,11 @@ drop table if exists t1, t2; --enable_warnings +# Workaround for Bug#27644 +# ndb: connecting api node/mysqld may "steal" node_id from running mysqld +# - let ndb_waiter use a fixed node id so "steal" cannot happen +--let connect_str = "nodeid=6;$NDB_CONNECTSTRING" + # # Transaction ongoing while cluster is restarted # @@ -19,7 +25,7 @@ begin; insert into t1 values (1); --exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT # Wait for mysqld to reconnect and exit from readonly mode # Should preferrably be a "while (!"select ndb_readonly")" loop sleep 2; @@ -39,7 +45,7 @@ insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10, select * from t2 order by a limit 3; --exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT # to ensure mysqld has connected again, and recreated system tables --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT sleep 2; @@ -58,7 +64,7 @@ select * from t2 order by a limit 3; reset master; --exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT # to ensure mysqld has connected again, and recreated system tables --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT sleep 2; diff --git a/mysql-test/t/ndb_dd_basic.test b/mysql-test/t/ndb_dd_basic.test index 5d43d7997b0..81286d3121f 100644 --- a/mysql-test/t/ndb_dd_basic.test +++ b/mysql-test/t/ndb_dd_basic.test @@ -7,6 +7,10 @@ # Change Date: 2006-01-11 # Change: Cleanup and test rename ################################# +# Change Author: Guangbao Ni +# Change Date: 2007-03-20 +# Change: Test insert data when no datafile in spacetable +################################# -- source include/have_ndb.inc @@ -216,6 +220,42 @@ ENGINE = NDB; DROP TABLE t1; +create tablespace ts2 +add datafile 'datafile2_1.dat' +use logfile group lg1 +initial_size 12M +engine ndb; + +CREATE TABLE City ( + ID int(11) NOT NULL AUTO_INCREMENT, + Name char(35) NOT NULL, + CountryCode char(3) NOT NULL, + District char(20) NOT NULL, + Population int(11) NOT NULL, + PRIMARY KEY (ID) +) ENGINE=ndbcluster +tablespace ts2 +storage disk; + +alter tablespace ts2 +drop datafile 'datafile2_1.dat' +engine ndb; + +#It will give error messages: NoDatafile in tablespace +--error ER_GET_ERRMSG +insert +into City (Name,CountryCode,District,Population) +values ('BeiJing','CN','Beijing',2000); + +--error ER_DROP_FILEGROUP_FAILED +drop tablespace ts2 +engine ndb; + +drop table City; + +drop tablespace ts2 +engine ndb; + ############################ # Test update of mm/dd part ############################ diff --git a/mysql-test/t/ndb_partition_error2-master.opt b/mysql-test/t/ndb_partition_error2-master.opt new file mode 100644 index 00000000000..955f7692c8b --- /dev/null +++ b/mysql-test/t/ndb_partition_error2-master.opt @@ -0,0 +1 @@ +--ndbcluster diff --git a/mysql-test/t/ndb_partition_error2.test b/mysql-test/t/ndb_partition_error2.test new file mode 100644 index 00000000000..afedd0e3c5c --- /dev/null +++ b/mysql-test/t/ndb_partition_error2.test @@ -0,0 +1,14 @@ +disable_query_log; +--require r/true.require +select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; +enable_query_log; + +--disable_warnings +drop table if exists t1; +--enable_warnings +# +# Bug #27359 Partitions: memory allocation error message +# +--error ER_PARTITION_NOT_DEFINED_ERROR +create table t1 (s1 int) engine=ndbcluster; + diff --git a/mysql-test/t/ndb_trigger.test b/mysql-test/t/ndb_trigger.test index 7a4e58033a9..586fdc0ac97 100644 --- a/mysql-test/t/ndb_trigger.test +++ b/mysql-test/t/ndb_trigger.test @@ -110,5 +110,112 @@ drop trigger t4_au; drop trigger t4_ad; drop table t1, t2, t3, t4, t5; +# Test for bug#26242 +# Verify that AFTER UPDATE/DELETE triggers are executed +# after the change has actually taken place + +CREATE TABLE t1 ( + id INT NOT NULL PRIMARY KEY, + xy INT +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (1, 0); + +DELIMITER //; +CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // +DELIMITER ;// + +CREATE TABLE t2 ( + id INT NOT NULL PRIMARY KEY, + xy INT +) ENGINE=ndbcluster; + +INSERT INTO t2 VALUES (2, 0); + +CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; + +INSERT INTO t3 VALUES (1); + +CREATE TABLE t4 LIKE t1; + +DELIMITER //; +CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // +DELIMITER ;// + +CREATE TABLE t5 LIKE t2; + +UPDATE t1 SET xy = 3 WHERE id = 1; +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; + +UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; + +INSERT INTO t4 SELECT * FROM t1; +INSERT INTO t5 SELECT * FROM t2; +UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; +SELECT xy FROM t4 where id = 1; +SELECT xy FROM t5 where id = 1; + +UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; +SELECT xy FROM t4 where id = 1; +SELECT xy FROM t5 where id = 1; + +INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; + +DROP TRIGGER t1_update; +DROP TRIGGER t4_update; + +DELIMITER //; +CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // +DELIMITER ;// + +DELIMITER //; +CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // +DELIMITER ;// + +INSERT INTO t1 VALUES (5, 0),(6,0); +INSERT INTO t2 VALUES (5, 1),(6,1); +INSERT INTO t3 VALUES (5); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; + +INSERT INTO t1 VALUES (5,0); +UPDATE t2 SET xy = 1 WHERE id = 6; +TRUNCATE t4; +INSERT INTO t4 SELECT * FROM t1; +TRUNCATE t5; +INSERT INTO t5 SELECT * FROM t2; +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +SELECT * FROM t4 order by id; +SELECT * FROM t5 order by id; +DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +SELECT * FROM t4 order by id; +SELECT * FROM t5 order by id; + +INSERT INTO t1 VALUES (5, 0); +REPLACE INTO t2 VALUES (6,1); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +REPLACE INTO t1 VALUES (5, 1); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; + +DROP TRIGGER t1_delete; +DROP TRIGGER t4_delete; +DROP TABLE t1, t2, t3, t4, t5; --echo End of 5.1 tests diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index 8772b8157e3..fd562089483 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -96,4 +96,49 @@ drop table t1; --error 1 --exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 +# +# Bug#25309 SSL connections without CA certificate broken since MySQL 5.0.23 +# +# Test that we can open encrypted connection to server without +# verification of servers certificate by setting both ca certificate +# and ca path to NULL +# +--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1 +--echo End of 5.0 tests +# +# Bug #26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in +# Event (see also information_schema.test for the other part of test for +# this bug). +# +--disable_warnings +DROP TABLE IF EXISTS thread_status; +DROP EVENT IF EXISTS event_status; +--enable_warnings + +SET GLOBAL event_scheduler=1; + +DELIMITER $$; + +CREATE EVENT event_status + ON SCHEDULE AT NOW() + ON COMPLETION NOT PRESERVE + DO +BEGIN + CREATE TABLE thread_status + SELECT variable_name, variable_value + FROM information_schema.session_status + WHERE variable_name LIKE 'SSL_ACCEPTS' OR + variable_name LIKE 'SSL_CALLBACK_CACHE_HITS'; +END$$ + +DELIMITER ;$$ + +let $wait_condition=select count(*) = 0 from information_schema.events where event_name='event_status'; +--source include/wait_condition.inc + +SELECT variable_name, variable_value FROM thread_status; + +DROP TABLE thread_status; +SET GLOBAL event_scheduler=0; +--echo End of 5.1 tests diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 5093263b864..c2669856bf4 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -617,7 +617,6 @@ UPDATE bug25126 SET MissingCol = val ORDER BY MissingCol; UPDATE bug25126 SET MissingCol = MissingCol ORDER BY MissingCol; DROP TABLE bug25126; - # # Bug #25427: crash when order by expression contains a name # that cannot be resolved unambiguously @@ -633,6 +632,41 @@ SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1; DROP TABLE t1; +# +# Bug #27532: ORDER/GROUP BY expressions with IN/BETWEEN and NOT IN/BETWEEN +# + +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (3), (2), (4), (1); + +SELECT a, IF(a IN (2,3), a, a+10) FROM t1 + ORDER BY IF(a IN (2,3), a, a+10); +SELECT a, IF(a NOT IN (2,3), a, a+10) FROM t1 + ORDER BY IF(a NOT IN (2,3), a, a+10); +SELECT a, IF(a IN (2,3), a, a+10) FROM t1 + ORDER BY IF(a NOT IN (2,3), a, a+10); + +SELECT a, IF(a BETWEEN 2 AND 3, a, a+10) FROM t1 + ORDER BY IF(a BETWEEN 2 AND 3, a, a+10); +SELECT a, IF(a NOT BETWEEN 2 AND 3, a, a+10) FROM t1 + ORDER BY IF(a NOT BETWEEN 2 AND 3, a, a+10); +SELECT a, IF(a BETWEEN 2 AND 3, a, a+10) FROM t1 + ORDER BY IF(a NOT BETWEEN 2 AND 3, a, a+10); + +SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 + FROM t1 GROUP BY x1, x2; +SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 + FROM t1 GROUP BY x1, IF(a NOT IN (1,2), a, ''); + +# The remaining queries are for better coverage +SELECT a, a IN (1,2) FROM t1 ORDER BY a IN (1,2); +SELECT a FROM t1 ORDER BY a IN (1,2); +SELECT a+10 FROM t1 ORDER BY a IN (1,2); +SELECT a, IF(a IN (1,2), a, a+10) FROM t1 + ORDER BY IF(a IN (3,4), a, a+10); +DROP TABLE t1; + +# End of 4.1 create table t1 (a int not null, b int not null, c int not null); insert t1 values (1,1,1),(1,1,2),(1,2,1); select a, b from t1 group by a, b order by sum(c); diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 7d7ef95626a..399f3c4a41d 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1463,4 +1463,33 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified' drop table t1, t2; +# +# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables +# + +disable_query_log; +eval create table t2 (i int ) +partition by range (i) +( + partition p01 values less than (1000) + data directory="$MYSQLTEST_VARDIR/master-data/test/" + index directory="$MYSQLTEST_VARDIR/master-data/test/" +); +enable_query_log; + +set @org_mode=@@sql_mode; +set @@sql_mode='NO_DIR_IN_CREATE'; +select @@sql_mode; +create table t1 (i int ) +partition by range (i) +( + partition p01 values less than (1000) + data directory='/not/existing' + index directory='/not/existing' +); + +show create table t2; +DROP TABLE t1, t2; +set @@sql_mode=@org_mode; + --echo End of 5.1 tests diff --git a/mysql-test/t/partition_grant.test b/mysql-test/t/partition_grant.test index ee7c71b497a..0d30ad01c7a 100644 --- a/mysql-test/t/partition_grant.test +++ b/mysql-test/t/partition_grant.test @@ -52,8 +52,30 @@ disconnect conn3; connection default; revoke select,alter,drop on mysqltest_1.* from mysqltest_1@localhost; -drop user mysqltest_1@localhost; drop table t1; + +# +# Bug #23675 Partitions: possible security breach via alter +# + +create table t1 (s1 int); +insert into t1 values (1); +grant alter on mysqltest_1.* to mysqltest_1@localhost; +connect (conn4,localhost,mysqltest_1,,mysqltest_1); +connection conn4; +--error 1514 +alter table t1 partition by list (s1) (partition p1 values in (2)); +connection default; +grant select, alter on mysqltest_1.* to mysqltest_1@localhost; +disconnect conn4; +connect (conn5,localhost,mysqltest_1,,mysqltest_1); +--error 1514 +alter table t1 partition by list (s1) (partition p1 values in (2)); +disconnect conn5; +connection default; +drop table t1; + +drop user mysqltest_1@localhost; drop schema mysqltest_1; --echo End of 5.1 tests diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 9f670f9973f..44f9bf350b2 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -2324,7 +2324,7 @@ drop event if exists xyz; #drop event xyz; #drop procedure proc_1; delimiter |; ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end| delimiter ;| --error ER_SP_DOES_NOT_EXIST diff --git a/mysql-test/t/rpl_ignore_table.test b/mysql-test/t/rpl_ignore_table.test index 10c75db0b70..fd4ae64165a 100644 --- a/mysql-test/t/rpl_ignore_table.test +++ b/mysql-test/t/rpl_ignore_table.test @@ -27,8 +27,118 @@ SELECT * FROM t4; connection master; DROP TABLE t1; DROP TABLE t4; + sync_slave_with_master; + +# +# Bug#25482 GRANT statements are not replicated if +# you use "replicate-ignore-table" +# + +--echo **** Test case for BUG#25482 **** +--echo **** Adding GRANTS on master **** + +connection master; +create table test.t1(a int); +create table test.t4(a int); + +# Simple user that should not replicate +GRANT SELECT ON test.t1 TO mysqltest1@localhost; + +# Partial replicate +GRANT INSERT ON test.t4 TO mysqltest2@localhost; +GRANT select, update, insert, references on t1 + to mysqltest2@localhost; + +# Partial replicate 2 +GRANT SELECT ON test.* TO mysqltest3@localhost; +GRANT INSERT ON test.t4 TO mysqltest3@localhost; +GRANT select(a), update(a), insert(a), references(a) on t4 + to mysqltest3@localhost; + +# Create another database and table +create database mysqltest2; +create table mysqltest2.t2 (id int); +# Create a grant that should replicate +GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; + +# Create a grant manually +insert into mysql.user (user, host) values ("mysqltest5", "somehost"); + +# Partial replicate 3 with *.* +GRANT SELECT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON test.* TO mysqltest6@localhost; +GRANT INSERT ON test.t1 TO mysqltest6@localhost; + +show grants for mysqltest1@localhost; +show grants for mysqltest2@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; +show grants for mysqltest6@localhost; + +flush privileges; +show grants for mysqltest5@somehost; + + +sync_slave_with_master; + +--echo **** Checking grants on slave **** + +# Check that grants are replicated to slave +show grants for mysqltest2@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; +show grants for mysqltest5@somehost; +show grants for mysqltest6@localhost; + +# mysqltest1 should not be on slave +--error 1141 +show grants for mysqltest1@localhost; + +--echo **** Revoking grants on master **** +connection master; +REVOKE SELECT ON test.t1 FROM mysqltest1@localhost; +REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; +REVOKE select(a) on t4 + from mysqltest3@localhost; + +show grants for mysqltest1@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; + +sync_slave_with_master; + +--echo **** Checking grants on slave **** + +# mysqltest1 should not be on slave +--error 1141 +show grants for mysqltest1@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; + +# Cleanup +connection master; +drop table t1, t4, mysqltest2.t2; +drop database mysqltest2; +delete from mysql.user where user like "mysqltest%"; +delete from mysql.db where user like "mysqltest%"; +# +# BUG 27606 causes failure to replicate this statement +# move it to slave instead +#delete from mysql.tables_priv where user like "mysqltest%"; +delete from mysql.columns_priv where user like "mysqltest%"; +sync_slave_with_master; + +#BUG27606 +delete from mysql.tables_priv where user like "mysqltest%"; + +connection master; + +#BUG27606 +delete from mysql.tables_priv where user like "mysqltest%"; + # # bug#22877 replication character sets get out of sync # using replicate-wild-ignore-table diff --git a/mysql-test/t/rpl_packet.test b/mysql-test/t/rpl_packet.test index db6f475dc94..9bda014f0e3 100644 --- a/mysql-test/t/rpl_packet.test +++ b/mysql-test/t/rpl_packet.test @@ -29,6 +29,8 @@ connection slave; sync_with_master; eval select count(*) from `$db`.`t1` /* must be 1 */; +SHOW STATUS LIKE 'Slave_running'; +select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; connection master; eval drop database $db; save_master_pos; @@ -68,5 +70,11 @@ connection slave; sleep 2; SHOW STATUS LIKE 'Slave_running'; +# cleanup +#connection master; +#drop table t1; +#connection slave; +#drop table t1; + # End of tests diff --git a/mysql-test/t/rpl_ssl.test b/mysql-test/t/rpl_ssl.test index 9f25f71525a..dd03d5533b0 100644 --- a/mysql-test/t/rpl_ssl.test +++ b/mysql-test/t/rpl_ssl.test @@ -54,7 +54,16 @@ while ($i) start slave; enable_query_log; connection master; +# INSERT one more record to make sure +# the sync has something to do +insert into t1 values (NULL); sync_slave_with_master; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # query_vertical show slave status; + +connection master; +drop user replssl@localhost; +drop table t1; +sync_slave_with_master; + diff --git a/mysql-test/t/rpl_openssl.test b/mysql-test/t/rpl_ssl1.test similarity index 66% rename from mysql-test/t/rpl_openssl.test rename to mysql-test/t/rpl_ssl1.test index edef603f617..6ca1484bb17 100644 --- a/mysql-test/t/rpl_openssl.test +++ b/mysql-test/t/rpl_ssl1.test @@ -46,7 +46,7 @@ select * from t1; #checking show slave status --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -show slave status; +query_vertical show slave status; #checking if replication works without ssl also performing clean up stop slave; @@ -60,6 +60,38 @@ connection slave; sync_with_master; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -show slave status; +query_vertical show slave status; # End of 4.1 tests + +# Start replication with ssl_verify_server_cert turned on +connection slave; +stop slave; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval change master to + master_host="localhost", + master_ssl=1 , + master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', + master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', + master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem', + master_ssl_verify_server_cert=1; +start slave; + +connection master; +create table t1 (t int); +insert into t1 values (1); + +sync_slave_with_master; + +echo on slave; +#checking that replication is ok +select * from t1; + +#checking show slave status +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # +query_vertical show slave status; + +connection master; +drop table t1; +sync_slave_with_master; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index d49f36fd6d7..f776be40864 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -706,9 +706,11 @@ begin insert into test.t1 values (concat(x, "2"), y+2); end| ---system rm -f $MYSQLTEST_VARDIR/tmp/spout +# Remove spout file if it exists +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/spout call into_outfile("ofile", 1)| ---system rm -f $MYSQLTEST_VARDIR/tmp/spout +--remove_file $MYSQLTEST_VARDIR/tmp/spout delete from t1| drop procedure into_outfile| @@ -723,9 +725,11 @@ begin insert into test.t1 values (concat(x, "2"), y+2); end| ---system rm -f $MYSQLTEST_VARDIR/tmp/spdump +# Remove spdump file if it exists +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/spdump call into_dumpfile("dfile", 1)| ---system rm -f $MYSQLTEST_VARDIR/tmp/spdump +--remove_file $MYSQLTEST_VARDIR/tmp/spdump delete from t1| drop procedure into_dumpfile| @@ -7018,9 +7022,54 @@ SELECT SUM(f2), bug25373(f1) FROM t3 GROUP BY bug25373(f1) WITH ROLLUP| DROP FUNCTION bug25373| DROP TABLE t3| # -# NOTE: The delimiter is `|`, and not `;`. It is changed to `;` -# at the end of the file! -# +# Bug#20777: Function w BIGINT UNSIGNED shows diff. behaviour --ps-protocol +--disable_warnings +drop function if exists bug20777| +drop table if exists examplebug20777| +--enabled_warnings +create function bug20777(f1 bigint unsigned) returns bigint unsigned +begin + set f1 = (f1 - 10); set f1 = (f1 + 10); +return f1; +end| +delimiter ;| +select bug20777(9223372036854775803) as '9223372036854775803 2**63-5'; +select bug20777(9223372036854775804) as '9223372036854775804 2**63-4'; +select bug20777(9223372036854775805) as '9223372036854775805 2**63-3'; +select bug20777(9223372036854775806) as '9223372036854775806 2**63-2'; +select bug20777(9223372036854775807) as '9223372036854775807 2**63-1'; +select bug20777(9223372036854775808) as '9223372036854775808 2**63+0'; +select bug20777(9223372036854775809) as '9223372036854775809 2**63+1'; +select bug20777(9223372036854775810) as '9223372036854775810 2**63+2'; +select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; +select bug20777(9223372036854775807) as 'upper bounds signed bigint'; +select bug20777(0) as 'lower bounds unsigned bigint'; +select bug20777(18446744073709551615) as 'upper bounds unsigned bigint'; +select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; +select bug20777(-1) as 'lower bounds unsigned bigint - 1'; + +create table examplebug20777 as select + 0 as 'i', + bug20777(9223372036854775806) as '2**63-2', + bug20777(9223372036854775807) as '2**63-1', + bug20777(9223372036854775808) as '2**63', + bug20777(9223372036854775809) as '2**63+1', + bug20777(18446744073709551614) as '2**64-2', + bug20777(18446744073709551615) as '2**64-1', + bug20777(18446744073709551616) as '2**64', + bug20777(0) as '0', + bug20777(-1) as '-1'; +insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); +show create table examplebug20777; +select * from examplebug20777 order by i; + +drop table examplebug20777; +select bug20777(18446744073709551613)+1; +drop function bug20777; +delimiter |; + +### +--echo End of 5.0 tests. # # BUG#NNNN: New bug synopsis @@ -7029,8 +7078,13 @@ DROP TABLE t3| #drop procedure if exists bugNNNN| #--enable_warnings #create procedure bugNNNN... - +# # Add bugs above this line. Use existing tables t1 and t2 when -# practical, or create table t3, t4 etc temporarily (and drop them). +# practical, or create table t3,t4 etc temporarily (and drop them). +# NOTE: The delimiter is `|`, and not `;`. It is changed to `;` +# at the end of the file! +# + delimiter ;| drop table t1,t2; + diff --git a/mysql-test/t/ssl_des-master.opt b/mysql-test/t/ssl_des-master.opt deleted file mode 100644 index 0b2b8cb85ac..00000000000 --- a/mysql-test/t/ssl_des-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose_ssl-cert=std_data/server-cert-des.pem --loose_ssl-key=std_data/server-key-des.pem diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index 2f35bbf22f2..3ff84c35f16 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -14,7 +14,6 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (col1 date); INSERT INTO t1 VALUES('2004-01-01'),('2004-02-29'); ---error 1292 INSERT INTO t1 VALUES('0000-10-31'); # All test cases expected to fail should return @@ -100,7 +99,6 @@ set @@sql_mode='ansi,traditional'; CREATE TABLE t1 (col1 datetime); INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('2004-02-29 15:30:00'); ---error 1292 INSERT INTO t1 VALUES('0000-10-31 15:30:00'); # All test cases expected to fail should return @@ -194,7 +192,6 @@ INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); --error 1292 @@ -216,7 +213,6 @@ INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); --error 1292 @@ -271,7 +267,6 @@ INSERT INTO t1 (col3) VALUES (CAST('2004-10-15 10:15' AS DATETIME)); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col1) VALUES(CAST('0000-10-31' AS DATE)); --error 1292 @@ -299,7 +294,6 @@ INSERT INTO t1 (col1) VALUES(CAST('0000-00-00' AS DATE)); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col2) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); --error 1292 @@ -367,7 +361,6 @@ INSERT INTO t1 (col3) VALUES (CONVERT('2004-10-15 10:15',DATETIME)); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col1) VALUES(CONVERT('0000-10-31' , DATE)); --error 1292 @@ -394,7 +387,6 @@ INSERT INTO t1 (col1) VALUES(CONVERT('0000-00-00',DATE)); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col2) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); --error 1292 @@ -1208,3 +1200,53 @@ create table t1 (i int) comment '123456789*123456789*123456789*123456789*123456789*123456789*'; show create table t1; drop table t1; + +# +# Bug #26359: Strings becoming truncated and converted to numbers under STRICT mode +# +set sql_mode= 'traditional'; +create table t1(col1 tinyint, col2 tinyint unsigned, + col3 smallint, col4 smallint unsigned, + col5 mediumint, col6 mediumint unsigned, + col7 int, col8 int unsigned, + col9 bigint, col10 bigint unsigned); +--error 1366 +insert into t1(col1) values('-'); +--error 1366 +insert into t1(col2) values('+'); +--error 1366 +insert into t1(col3) values('-'); +--error 1366 +insert into t1(col4) values('+'); +--error 1366 +insert into t1(col5) values('-'); +--error 1366 +insert into t1(col6) values('+'); +--error 1366 +insert into t1(col7) values('-'); +--error 1366 +insert into t1(col8) values('+'); +--error 1366 +insert into t1(col9) values('-'); +--error 1366 +insert into t1(col10) values('+'); +drop table t1; + +# +# Bug #27176: Assigning a string to an year column has unexpected results +# +set sql_mode='traditional'; +create table t1(a year); +--error 1366 +insert into t1 values ('-'); +--error 1366 +insert into t1 values ('+'); +--error 1366 +insert into t1 values (''); +--error 1265 +insert into t1 values ('2000a'); +--error 1265 +insert into t1 values ('2E3x'); +drop table t1; + +--echo End of 5.0 tests diff --git a/mysql-test/t/type_set.test b/mysql-test/t/type_set.test index 56df3328246..b1c816f3371 100644 --- a/mysql-test/t/type_set.test +++ b/mysql-test/t/type_set.test @@ -39,3 +39,20 @@ SELECT c FROM t1 ORDER BY concat(c); DROP TABLE t1; # End of 4.1 tests + +# +# Bug#27069 set with identical elements are created +# +--error 1097 +create table t1(f1 +set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', +'18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', +'34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', +'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','128')); +create table t1(f1 +set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', +'18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', +'34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', +'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1')); +show create table t1; +drop table t1; diff --git a/mysql-test/t/type_year.test b/mysql-test/t/type_year.test index 9744da24c02..0e174a556d6 100644 --- a/mysql-test/t/type_year.test +++ b/mysql-test/t/type_year.test @@ -21,4 +21,12 @@ insert into t1 values (now()); select if(y = now(), 1, 0) from t1; drop table t1; -# End of 4.1 tests +# +# Bug #27176: Assigning a string to an year column has unexpected results +# +create table t1(a year); +insert into t1 values (2000.5), ('2000.5'), ('2001a'), ('2.001E3'); +select * from t1; +drop table t1; + +--echo End of 5.0 tests diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test index a10d54b5452..efdf0963b80 100644 --- a/mysql-test/t/windows.test +++ b/mysql-test/t/windows.test @@ -1,5 +1,6 @@ # Windows-specific tests --source include/windows.inc +-- source include/have_innodb.inc # # Bug 9148: Denial of service @@ -49,3 +50,23 @@ execute abc; execute abc; deallocate prepare abc; +# +# Bug #26074 Mysql crash when creating partitions +# + +CREATE TABLE t1 ( + `pkid` int(11) NOT NULL AUTO_INCREMENT, + `SALES_DATE` date NOT NULL DEFAULT '0000-00-00', + KEY `pkid` (`pkid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +PARTITION BY RANGE (MONTH(SALES_DATE)) +( + PARTITION p0 VALUES LESS THAN (2) ENGINE=INNODB + data DIRECTORY='c:/tmp/' + index DIRECTORY = 'c:/tmp/', + PARTITION p1 VALUES LESS THAN (3) ENGINE=INNODB + data DIRECTORY='c:/tmp/' + index DIRECTORY = 'c:/tmp/' +); + +DROP TABLE t1; diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c index 6c412157937..c1108f85054 100644 --- a/mysys/mf_tempfile.c +++ b/mysys/mf_tempfile.c @@ -22,15 +22,36 @@ #include #endif -#ifdef HAVE_TEMPNAM -#if !defined(__NETWARE__) -extern char **environ; -#endif -#endif + /* - Create a temporary file in a given directory - This function should be used instead of my_tempnam() ! + @brief + Create a temporary file with unique name in a given directory + + @details + create_temp_file + to pointer to buffer where temporary filename will be stored + dir directory where to create the file + prefix prefix the filename with this + mode Flags to use for my_create/my_open + MyFlags Magic flags + + @return + File descriptor of opened file if success + -1 and sets errno if fails. + + @note + The behaviour of this function differs a lot between + implementation, it's main use is to generate a file with + a name that does not already exist. + + When passing O_TEMPORARY flag in "mode" the file should + be automatically deleted + + The implementation using mkstemp should be considered the + reference implementation when adding a new or modifying an + existing one + */ File create_temp_file(char *to, const char *dir, const char *prefix, @@ -38,41 +59,33 @@ File create_temp_file(char *to, const char *dir, const char *prefix, myf MyFlags __attribute__((unused))) { File file= -1; + DBUG_ENTER("create_temp_file"); -#if defined(_MSC_VER) + DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix)); +#if defined (__WIN__) + + /* + Use GetTempFileName to generate a unique filename, create + the file and release it's handle + - uses up to the first three letters from prefix + */ + if (GetTempFileName(dir, prefix, 0, to) == 0) + DBUG_RETURN(-1); + + DBUG_PRINT("info", ("name: %s", to)); + + /* + Open the file without the "open only if file doesn't already exist" + since the file has already been created by GetTempFileName + */ + if ((file= my_open(to, (mode & ~O_EXCL), MyFlags)) < 0) { - char temp[FN_REFLEN],*end,*res,**old_env,*temp_env[1]; - old_env=environ; - if (dir) - { - end=strend(dir)-1; - if (!dir[0]) - { /* Change empty string to current dir */ - to[0]= FN_CURLIB; - to[1]= 0; - dir=to; - } - else if (*end == FN_DEVCHAR) - { /* Get current dir for drive */ - _fullpath(temp,dir,FN_REFLEN); - dir=to; - } - else if (*end == FN_LIBCHAR && dir < end && end[-1] != FN_DEVCHAR) - { - strmake(to,dir,(uint) (end-dir)); /* Copy and remove last '\' */ - dir=to; - } - environ=temp_env; /* Force use of dir (dir not checked) */ - temp_env[0]=0; - } - if ((res=tempnam((char*) dir,(char *) prefix))) - { - strmake(to,res,FN_REFLEN-1); - (*free)(res); - file=my_create(to,0, mode | O_EXCL | O_NOFOLLOW, MyFlags); - } - environ=old_env; + /* Open failed, remove the file created by GetTempFileName */ + int tmp= my_errno; + (void) my_delete(to, MYF(0)); + my_errno= tmp; } + #elif defined(_ZTC__) if (!dir) dir=getenv("TMPDIR"); @@ -101,6 +114,8 @@ File create_temp_file(char *to, const char *dir, const char *prefix, } strmov(convert_dirname(to,dir,NullS),prefix_buff); org_file=mkstemp(to); + if (mode & O_TEMPORARY) + (void) my_delete(to, MYF(MY_WME | ME_NOINPUT)); file=my_register_filename(org_file, to, FILE_BY_MKSTEMP, EE_CANTCREATEFILE, MyFlags); /* If we didn't manage to register the name, remove the temp file */ @@ -113,6 +128,10 @@ File create_temp_file(char *to, const char *dir, const char *prefix, } #elif defined(HAVE_TEMPNAM) { +#if !defined(__NETWARE__) + extern char **environ; +#endif + char *res,**old_env,*temp_env[1]; if (dir && !dir[0]) { /* Change empty string to current dir */ @@ -147,40 +166,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, #endif } #else - { - register long uniq; - register int length; - my_string pos,end_pos; - /* Make an unique number */ - pthread_mutex_lock(&THR_LOCK_open); - uniq= ((long) getpid() << 20) + (long) _my_tempnam_used++ ; - pthread_mutex_unlock(&THR_LOCK_open); - if (!dir && !(dir=getenv("TMPDIR"))) /* Use this if possibly */ - dir=P_tmpdir; /* Use system default */ - length=strlen(dir)+strlen(pfx)+1; - - DBUG_PRINT("test",("mallocing %d byte",length+8+sizeof(TMP_EXT)+1)); - if (length+8+sizeof(TMP_EXT)+1 > FN_REFLENGTH) - errno=my_errno= ENAMETOOLONG; - else - { - end_pos=strmov(to,dir); - if (end_pos != to && end_pos[-1] != FN_LIBCHAR) - *end_pos++=FN_LIBCHAR; - end_pos=strmov(end_pos,pfx); - - for (length=0 ; length < 8 && uniq ; length++) - { - *end_pos++= _dig_vec_upper[(int) (uniq & 31)]; - uniq >>= 5; - } - (void) strmov(end_pos,TMP_EXT); - file=my_create(to,0, - (int) (O_RDWR | O_BINARY | O_TRUNC | O_EXCL | O_NOFOLLOW | - O_TEMPORARY | O_SHORT_LIVED), - MYF(MY_WME)); - } - } +#error No implementation found for create_temp_file #endif if (file >= 0) thread_safe_increment(my_tmp_file_created,&THR_LOCK_open); diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index 3601a533480..b0e775177a6 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -37,7 +37,7 @@ gptr my_malloc(unsigned int size, myf my_flags) if (my_flags & MY_FAE) error_handler_hook=fatal_error_handler_hook; if (my_flags & (MY_FAE+MY_WME)) - my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG),size); + my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH),size); if (my_flags & MY_FAE) exit(1); } diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index d8182b67442..aba3e47d754 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -29,7 +29,7 @@ #define SCHED_POLICY SCHED_OTHER #endif -uint thd_lib_detected; +uint thd_lib_detected= 0; #ifndef my_pthread_setprio void my_pthread_setprio(pthread_t thread_id,int prior) diff --git a/mysys/my_static.c b/mysys/my_static.c index 95521c49ab7..42dd9d71490 100644 --- a/mysys/my_static.c +++ b/mysys/my_static.c @@ -67,11 +67,6 @@ uint my_once_extra=ONCE_ALLOC_INIT; /* Memory to alloc / block */ #ifdef HAVE_LARGE_PAGES my_bool my_use_large_pages= 0; uint my_large_page_size= 0; -#endif - - /* from my_tempnam */ -#if !defined(HAVE_TEMPNAM) || defined(HPUX11) -int _my_tempnam_used=0; #endif /* from safe_malloc */ diff --git a/mysys/my_static.h b/mysys/my_static.h index cbd293a0431..b438c936225 100644 --- a/mysys/my_static.h +++ b/mysys/my_static.h @@ -60,10 +60,6 @@ extern const char *soundex_map; extern USED_MEM* my_once_root_block; extern uint my_once_extra; -#if !defined(HAVE_TEMPNAM) || defined(HPUX11) -extern int _my_tempnam_used; -#endif - extern byte *sf_min_adress,*sf_max_adress; extern uint sf_malloc_count; extern struct st_irem *sf_malloc_root; diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c index da15b02345b..f2a4c280610 100644 --- a/mysys/safemalloc.c +++ b/mysys/safemalloc.c @@ -150,11 +150,11 @@ gptr _mymalloc(uint size, const char *filename, uint lineno, myf MyFlags) char buff[SC_MAXWIDTH]; my_errno=errno; sprintf(buff,"Out of memory at line %d, '%s'", lineno, filename); - my_message(EE_OUTOFMEMORY,buff,MYF(ME_BELL+ME_WAITTANG)); + my_message(EE_OUTOFMEMORY, buff, MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH)); sprintf(buff,"needed %d byte (%ldk), memory in use: %ld bytes (%ldk)", size, (size + 1023L) / 1024L, sf_malloc_max_memory, (sf_malloc_max_memory + 1023L) / 1024L); - my_message(EE_OUTOFMEMORY,buff,MYF(ME_BELL+ME_WAITTANG)); + my_message(EE_OUTOFMEMORY, buff, MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH)); } DBUG_PRINT("error",("Out of memory, in use: %ld at line %d, '%s'", sf_malloc_max_memory,lineno, filename)); diff --git a/mysys/typelib.c b/mysys/typelib.c index 4fab6f20493..dc9f0850bbc 100644 --- a/mysys/typelib.c +++ b/mysys/typelib.c @@ -42,7 +42,7 @@ >0 Offset+1 in typelib for matched string */ -int find_type(my_string x, TYPELIB *typelib, uint full_name) +int find_type(char *x, const TYPELIB *typelib, uint full_name) { int find,pos,findpos; reg1 my_string i; diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index 146dcad95f1..1cd4141f532 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -302,6 +302,7 @@ cp mysql-test/std_data/*.cnf $DESTDIR/mysql-test/std_data/ cp mysql-test/std_data/*.dat $DESTDIR/mysql-test/std_data/ cp mysql-test/std_data/*.frm $DESTDIR/mysql-test/std_data/ cp mysql-test/std_data/*.pem $DESTDIR/mysql-test/std_data/ +cp mysql-test/std_data/*.MY* $DESTDIR/mysql-test/std_data/ cp mysql-test/t/*.opt $DESTDIR/mysql-test/t/ cp mysql-test/t/*.sh $DESTDIR/mysql-test/t/ cp mysql-test/t/*.slave-mi $DESTDIR/mysql-test/t/ diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index da2438c606c..808179c0750 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -135,6 +135,17 @@ else fi fi +# Check that no previous MySQL installation exist +if test -f "$ldata/mysql/db.frm" +then + echo "FATAL ERROR: Found already existing MySQL system tables" + echo "in $ldata." + echo "If you are upgrading from a previous MySQL version you" + echo "should run '$bindir/mysql_upgrade', " + echo "to upgrade all tables for this version of MySQL" + exit 1; +fi + # Find SQL scripts needed for bootstrap fill_help_tables="fill_help_tables.sql" create_system_tables="mysql_system_tables.sql" @@ -181,7 +192,6 @@ then fi # Find executables and paths -mdata=$ldata/mysql mysqld=$execdir/mysqld mysqld_opt="" scriptdir=$bindir @@ -264,12 +274,6 @@ if test -w / -a ! -z "$user"; then chown $user $ldata $ldata/mysql $ldata/test; fi -# Check is "db" table already exist -if test ! -f $mdata/db.frm -then - db_table_already_exist="yes" -fi - if test -n "$user"; then args="$args --user=$user" fi @@ -322,16 +326,6 @@ then echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'" echo "See the manual for more instructions." - # Print message about upgrading unless we have created a new db table. - if test -z "$db_table_already_exist" - then - echo - echo "NOTE: If you are upgrading from a previous MySQL verision you " - echo "should run '$bindir/mysql_upgrade', to make sure all tables have " - echo "been upgraded for this version of MySQL" - fi - echo - if test "$in_rpm" = "0" then echo "You can start the MySQL daemon with:" diff --git a/sql-common/client.c b/sql-common/client.c index 12a2483e54d..89d69b4bd1f 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2948,7 +2948,7 @@ mysql_fetch_lengths(MYSQL_RES *res) int STDCALL -mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) +mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) { DBUG_ENTER("mysql_option"); DBUG_PRINT("enter",("option: %d",(int) option)); @@ -3022,7 +3022,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) mysql->reconnect= *(my_bool *) arg; break; case MYSQL_OPT_SSL_VERIFY_SERVER_CERT: - if (!arg || test(*(uint*) arg)) + if (*(my_bool*) arg) mysql->options.client_flag|= CLIENT_SSL_VERIFY_SERVER_CERT; else mysql->options.client_flag&= ~CLIENT_SSL_VERIFY_SERVER_CERT; diff --git a/sql-common/my_time.c b/sql-common/my_time.c index e62003d13ed..0530482237e 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -85,8 +85,7 @@ my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, (!(flags & TIME_INVALID_DATES) && ltime->month && ltime->day > days_in_month[ltime->month-1] && (ltime->month != 2 || calc_days_in_year(ltime->year) != 366 || - ltime->day != 29)) || - (ltime->year == 0 && (ltime->month != 0 || ltime->day != 0))) + ltime->day != 29))) { *was_cut= 2; return TRUE; @@ -410,9 +409,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, if (number_of_fields < 3 || l_time->year > 9999 || l_time->month > 12 || l_time->day > 31 || l_time->hour > 23 || - l_time->minute > 59 || l_time->second > 59 || - (l_time->year == 0 && l_time->month == 0 && l_time->day == 0 && - (l_time->hour != 0 || l_time->minute != 0 || l_time->second != 0))) + l_time->minute > 59 || l_time->second > 59) { /* Only give warning for a zero date if there is some garbage after */ if (!not_zero_date) /* If zero date */ diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index a3fb9a284d5..3d2a5b277fe 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -20,8 +20,6 @@ #include "event_db_repository.h" #include "sp_head.h" -/* That's a provisional solution */ -extern Event_db_repository events_event_db_repository; #define EVEX_MAX_INTERVAL_VALUE 1000000000L @@ -81,7 +79,7 @@ Event_queue_element_for_exec::~Event_queue_element_for_exec() RETURN VALUE Address or NULL in case of error - + NOTE Created on THD's mem_root */ @@ -101,8 +99,9 @@ Event_parse_data::new_instance(THD *thd) */ Event_parse_data::Event_parse_data() - :on_completion(Event_basic::ON_COMPLETION_DROP), - status(Event_basic::ENABLED), do_not_create(FALSE), + :on_completion(Event_basic::ON_COMPLETION_DROP), + status(Event_basic::ENABLED), + do_not_create(FALSE), item_starts(NULL), item_ends(NULL), item_execute_at(NULL), starts_null(TRUE), ends_null(TRUE), execute_at_null(TRUE), item_expression(NULL), expression(0) @@ -169,13 +168,13 @@ Event_parse_data::init_body(THD *thd) (long) body_begin, (long) thd->lex->ptr)); body.length= thd->lex->ptr - body_begin; - const uchar *body_end= body_begin + body.length - 1; + const char *body_end= body_begin + body.length - 1; /* Trim nuls or close-comments ('*'+'/') or spaces at the end */ while (body_begin < body_end) { - if ((*body_end == '\0') || + if ((*body_end == '\0') || (my_isspace(thd->variables.character_set_client, *body_end))) { /* consume NULs and meaningless whitespace */ --body.length; @@ -187,7 +186,7 @@ Event_parse_data::init_body(THD *thd) consume closing comments This is arguably wrong, but it's the best we have until the parser is - changed to be smarter. FIXME PARSER + changed to be smarter. FIXME PARSER See also the sp_head code, where something like this is done also. @@ -216,7 +215,7 @@ Event_parse_data::init_body(THD *thd) ++body_begin; --body.length; } - body.str= thd->strmake((char *)body_begin, body.length); + body.str= thd->strmake(body_begin, body.length); DBUG_VOID_RETURN; } @@ -297,7 +296,7 @@ Event_parse_data::init_execute_at(THD *thd) if (item_execute_at->fix_fields(thd, &item_execute_at)) goto wrong_value; - + /* no starts and/or ends in case of execute_at */ DBUG_PRINT("info", ("starts_null && ends_null should be 1 is %d", (starts_null && ends_null))); @@ -589,6 +588,7 @@ Event_parse_data::check_parse_data(THD *thd) init_name(thd, identifier); init_definer(thd); + ret= init_execute_at(thd) || init_interval(thd) || init_starts(thd) || init_ends(thd); check_originator_id(thd); @@ -638,7 +638,7 @@ Event_parse_data::init_definer(THD *thd) } -/* +/** Set the originator id of the event to the server_id if executing on the master or set to the server_id of the master if executing on the slave. If executing on slave, also set status to SLAVESIDE_DISABLED. @@ -720,7 +720,7 @@ Event_basic::load_string_fields(Field **fields, ...) va_start(args, fields); field_name= (enum enum_events_table_field) va_arg(args, int); - while (field_name != ET_FIELD_COUNT) + while (field_name < ET_FIELD_COUNT) { field_value= va_arg(args, LEX_STRING *); if ((field_value->str= get_field(&mem_root, fields[field_name])) == NullS) @@ -728,7 +728,7 @@ Event_basic::load_string_fields(Field **fields, ...) ret= TRUE; break; } - field_value->length= strlen(field_value->str); + field_value->length= strlen(field_value->str); field_name= (enum enum_events_table_field) va_arg(args, int); } @@ -804,7 +804,7 @@ Event_timed::Event_timed(): */ Event_timed::~Event_timed() -{ +{ } @@ -884,13 +884,19 @@ Event_job_data::load_from_row(THD *thd, TABLE *table) if (!table) goto error; - if (table->s->fields != ET_FIELD_COUNT) + if (table->s->fields < ET_FIELD_COUNT) goto error; LEX_STRING tz_name; - load_string_fields(table->field, ET_FIELD_DB, &dbname, ET_FIELD_NAME, &name, - ET_FIELD_BODY, &body, ET_FIELD_DEFINER, &definer, - ET_FIELD_TIME_ZONE, &tz_name, ET_FIELD_COUNT); + if (load_string_fields(table->field, + ET_FIELD_DB, &dbname, + ET_FIELD_NAME, &name, + ET_FIELD_BODY, &body, + ET_FIELD_DEFINER, &definer, + ET_FIELD_TIME_ZONE, &tz_name, + ET_FIELD_COUNT)) + goto error; + if (load_time_zone(thd, tz_name)) goto error; @@ -936,19 +942,24 @@ Event_queue_element::load_from_row(THD *thd, TABLE *table) { char *ptr; TIME time; + LEX_STRING tz_name; DBUG_ENTER("Event_queue_element::load_from_row"); if (!table) goto error; - if (table->s->fields != ET_FIELD_COUNT) + if (table->s->fields < ET_FIELD_COUNT) + goto error; + + if (load_string_fields(table->field, + ET_FIELD_DB, &dbname, + ET_FIELD_NAME, &name, + ET_FIELD_DEFINER, &definer, + ET_FIELD_TIME_ZONE, &tz_name, + ET_FIELD_COUNT)) goto error; - LEX_STRING tz_name; - load_string_fields(table->field, ET_FIELD_DB, &dbname, ET_FIELD_NAME, &name, - ET_FIELD_DEFINER, &definer, - ET_FIELD_TIME_ZONE, &tz_name, ET_FIELD_COUNT); if (load_time_zone(thd, tz_name)) goto error; @@ -1032,6 +1043,7 @@ Event_queue_element::load_from_row(THD *thd, TABLE *table) status = Event_queue_element::SLAVESIDE_DISABLED; break; case 'D' : + default: status = Event_queue_element::DISABLED; break; } @@ -1080,7 +1092,11 @@ Event_timed::load_from_row(THD *thd, TABLE *table) if (Event_queue_element::load_from_row(thd, table)) goto error; - load_string_fields(table->field, ET_FIELD_BODY, &body, ET_FIELD_COUNT); + if (load_string_fields(table->field, + ET_FIELD_BODY, &body, + ET_FIELD_COUNT)) + goto error; + ptr= strchr(definer.str, '@'); @@ -1423,7 +1439,6 @@ Event_queue_element::compute_next_execution_time() DBUG_PRINT("info", ("Dropped: %d", dropped)); status= Event_queue_element::DISABLED; status_changed= TRUE; - dropped= TRUE; goto ret; } @@ -1615,7 +1630,7 @@ Event_queue_element::mark_last_executed(THD *thd) last_executed= (my_time_t) thd->query_start(); last_executed_changed= TRUE; - + execution_count++; } @@ -1636,10 +1651,8 @@ Event_queue_element::mark_last_executed(THD *thd) bool Event_queue_element::update_timing_fields(THD *thd) { - TABLE *table; - Field **fields; - Open_tables_state backup; - int ret= FALSE; + Event_db_repository *db_repository= Events::get_db_repository(); + int ret; DBUG_ENTER("Event_queue_element::update_timing_fields"); @@ -1649,53 +1662,13 @@ Event_queue_element::update_timing_fields(THD *thd) if (!(status_changed || last_executed_changed)) DBUG_RETURN(0); - thd->reset_n_backup_open_tables_state(&backup); - - if (events_event_db_repository.open_event_table(thd, TL_WRITE, &table)) - { - ret= TRUE; - goto done; - } - fields= table->field; - if ((ret= events_event_db_repository. - find_named_event(thd, dbname, name, table))) - goto done; - - store_record(table,record[1]); - /* Don't update create on row update. */ - table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; - - if (last_executed_changed) - { - TIME time; - my_tz_UTC->gmt_sec_to_TIME(&time, last_executed); - - fields[ET_FIELD_LAST_EXECUTED]->set_notnull(); - fields[ET_FIELD_LAST_EXECUTED]->store_time(&time, - MYSQL_TIMESTAMP_DATETIME); - last_executed_changed= FALSE; - } - if (status_changed) - { - fields[ET_FIELD_STATUS]->set_notnull(); - fields[ET_FIELD_STATUS]->store((longlong)status, TRUE); - status_changed= FALSE; - } - - /* - Turn off row binlogging of event timing updates. These are not used - for RBR of events replicated to the slave. - */ - if (thd->current_stmt_binlog_row_based) - thd->clear_current_stmt_binlog_row_based(); - - if ((table->file->ha_update_row(table->record[1], table->record[0]))) - ret= TRUE; - -done: - close_thread_tables(thd); - thd->restore_backup_open_tables_state(&backup); - + ret= db_repository->update_timing_fields_for_event(thd, + dbname, name, + last_executed_changed, + last_executed, + status_changed, + (ulonglong) status); + last_executed_changed= status_changed= FALSE; DBUG_RETURN(ret); } @@ -1780,7 +1753,7 @@ Event_timed::get_create_event(THD *thd, String *buf) if (status == Event_timed::ENABLED) buf->append(STRING_WITH_LEN("ENABLE")); else if (status == Event_timed::SLAVESIDE_DISABLED) - buf->append(STRING_WITH_LEN("SLAVESIDE_DISABLE")); + buf->append(STRING_WITH_LEN("DISABLE ON SLAVE")); else buf->append(STRING_WITH_LEN("DISABLE")); @@ -1812,7 +1785,7 @@ Event_timed::get_create_event(THD *thd, String *buf) */ int -Event_job_data::get_fake_create_event(THD *thd, String *buf) +Event_job_data::get_fake_create_event(String *buf) { DBUG_ENTER("Event_job_data::get_create_event"); /* FIXME: "EVERY 3337 HOUR" is asking for trouble. */ @@ -1838,7 +1811,7 @@ Event_job_data::get_fake_create_event(THD *thd, String *buf) */ int -Event_job_data::execute(THD *thd) +Event_job_data::execute(THD *thd, bool drop) { Security_context save_ctx; /* this one is local and not needed after exec */ @@ -1878,6 +1851,17 @@ Event_job_data::execute(THD *thd) definer_host.str, dbname.str)); ret= -99; } + if (drop) + { + sql_print_information("Event Scheduler: Dropping %s.%s", + dbname.str, name.str); + /* + We must do it here since here we're under the right authentication + ID of the event definer + */ + if (Events::drop_event(thd, dbname, name, FALSE)) + ret= 1; + } event_restore_security_context(thd, &save_ctx); done: @@ -1903,7 +1887,7 @@ done: RETURN VALUE 0 success EVEX_COMPILE_ERROR error during compilation - EVEX_MICROSECOND_UNSUP mysql.event was tampered + EVEX_MICROSECOND_UNSUP mysql.event was tampered */ int @@ -1928,7 +1912,7 @@ Event_job_data::compile(THD *thd, MEM_ROOT *mem_root) show_create.length(0); - switch (get_fake_create_event(thd, &show_create)) { + switch (get_fake_create_event(&show_create)) { case EVEX_MICROSECOND_UNSUP: DBUG_RETURN(EVEX_MICROSECOND_UNSUP); case 0: @@ -1970,16 +1954,17 @@ Event_job_data::compile(THD *thd, MEM_ROOT *mem_root) event_change_security_context(thd, definer_user, definer_host, dbname, &save_ctx); thd->lex= &lex; - mysql_init_query(thd, (uchar*) thd->query, thd->query_length); + mysql_init_query(thd, thd->query, thd->query_length); if (MYSQLparse((void *)thd) || thd->is_fatal_error) { DBUG_PRINT("error", ("error during compile or thd->is_fatal_error: %d", thd->is_fatal_error)); lex.unit.cleanup(); - sql_print_error("SCHEDULER: Error during compilation of %s.%s or " - "thd->is_fatal_error: %d", - dbname.str, name.str, thd->is_fatal_error); + sql_print_error("Event Scheduler: " + "%serror during compilation of %s.%s", + thd->is_fatal_error ? "fatal " : "", + dbname.str, name.str); ret= EVEX_COMPILE_ERROR; goto done; @@ -2093,7 +2078,7 @@ event_change_security_context(THD *thd, LEX_STRING user, LEX_STRING host, thd->security_ctx= &thd->main_security_ctx; #endif DBUG_RETURN(FALSE); -} +} /* diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h index d1d213901f0..eb851c98065 100644 --- a/sql/event_data_objects.h +++ b/sql/event_data_objects.h @@ -18,7 +18,6 @@ #define EVEX_GET_FIELD_FAILED -2 #define EVEX_COMPILE_ERROR -3 -#define EVEX_GENERAL_ERROR -4 #define EVEX_BAD_PARAMS -5 #define EVEX_MICROSECOND_UNSUP -6 @@ -132,24 +131,6 @@ public: bool update_timing_fields(THD *thd); - - static void *operator new(size_t size) - { - void *p; - DBUG_ENTER("Event_queue_element::new(size)"); - p= my_malloc(size, MYF(0)); - DBUG_PRINT("info", ("alloc_ptr: 0x%lx", (long) p)); - DBUG_RETURN(p); - } - - static void operator delete(void *ptr, size_t size) - { - DBUG_ENTER("Event_queue_element::delete(ptr,size)"); - DBUG_PRINT("enter", ("free_ptr: 0x%lx", (long) ptr)); - TRASH(ptr, size); - my_free((gptr) ptr, MYF(0)); - DBUG_VOID_RETURN; - } }; @@ -196,8 +177,6 @@ public: ulong sql_mode; - uint execution_count; - Event_job_data(); virtual ~Event_job_data(); @@ -205,13 +184,13 @@ public: load_from_row(THD *thd, TABLE *table); int - execute(THD *thd); + execute(THD *thd, bool drop); int compile(THD *thd, MEM_ROOT *mem_root); private: int - get_fake_create_event(THD *thd, String *buf); + get_fake_create_event(String *buf); Event_job_data(const Event_job_data &); /* Prevent use of these */ void operator=(Event_job_data &); @@ -231,7 +210,7 @@ public: */ bool do_not_create; - const uchar *body_begin; + const char *body_begin; LEX_STRING dbname; LEX_STRING name; diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index 6b411212ddb..e3b45d5e0b2 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -18,12 +18,6 @@ #include "event_data_objects.h" #include "events.h" #include "sql_show.h" -#include "sp.h" -#include "sp_head.h" - - -static -time_t mysql_event_last_create_time= 0L; static const TABLE_FIELD_W_TYPE event_table_fields[ET_FIELD_COUNT] = @@ -132,26 +126,21 @@ const TABLE_FIELD_W_TYPE event_table_fields[ET_FIELD_COUNT] = }; -/* +/** Puts some data common to CREATE and ALTER EVENT into a row. - SYNOPSIS - mysql_event_fill_row() - thd THD - table The row to fill out - et Event's data - is_update CREATE EVENT or ALTER EVENT + Used both when an event is created and when it is altered. - RETURN VALUE - 0 OK - EVEX_GENERAL_ERROR Bad data - EVEX_GET_FIELD_FAILED Field count does not match. table corrupted? + @param thd THD + @param table The row to fill out + @param et Event's data + @param is_update CREATE EVENT or ALTER EVENT - DESCRIPTION - Used both when an event is created and when it is altered. + @retval FALSE success + @retval TRUE error */ -static int +static bool mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, my_bool is_update) { @@ -165,6 +154,17 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, DBUG_PRINT("info", ("name =[%s]", et->name.str)); DBUG_PRINT("info", ("body =[%s]", et->body.str)); + if (table->s->fields < ET_FIELD_COUNT) + { + /* + Safety: this can only happen if someone started the server + and then altered mysql.event. + */ + my_error(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED, MYF(0), table->alias, + (int) ET_FIELD_COUNT, table->s->fields); + DBUG_RETURN(TRUE); + } + if (fields[f_num= ET_FIELD_DEFINER]-> store(et->definer.str, et->definer.length, scs)) goto err_truncate; @@ -186,7 +186,7 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, /* Change the SQL_MODE only if body was present in an ALTER EVENT and of course always during CREATE EVENT. - */ + */ if (et->body.str) { fields[ET_FIELD_SQL_MODE]->store((longlong)thd->variables.sql_mode, TRUE); @@ -245,7 +245,7 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, fields[ET_FIELD_TRANSIENT_INTERVAL]->set_null(); fields[ET_FIELD_STARTS]->set_null(); fields[ET_FIELD_ENDS]->set_null(); - + TIME time; my_tz_UTC->gmt_sec_to_TIME(&time, et->execute_at); @@ -261,7 +261,7 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, this is an error if the action is create. something is borked */ } - + ((Field_timestamp *)fields[ET_FIELD_MODIFIED])->set_time(); if (et->comment.str) @@ -271,11 +271,11 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, goto err_truncate; } - DBUG_RETURN(0); + DBUG_RETURN(FALSE); err_truncate: my_error(ER_EVENT_DATA_TOO_LONG, MYF(0), fields[f_num]->field_name); - DBUG_RETURN(EVEX_GENERAL_ERROR); + DBUG_RETURN(TRUE); } @@ -310,38 +310,52 @@ Event_db_repository::index_read_for_db_for_i_s(THD *thd, TABLE *schema_table, DBUG_PRINT("info", ("Using prefix scanning on PK")); event_table->file->ha_index_init(0, 1); - event_table->field[ET_FIELD_DB]->store(db, strlen(db), scs); key_info= event_table->key_info; + + if (key_info->key_parts == 0 || + key_info->key_part[0].field != event_table->field[ET_FIELD_DB]) + { + /* Corrupted table: no index or index on a wrong column */ + my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "event"); + ret= 1; + goto end; + } + + event_table->field[ET_FIELD_DB]->store(db, strlen(db), scs); key_len= key_info->key_part[0].store_length; if (!(key_buf= (byte *)alloc_root(thd->mem_root, key_len))) { - ret= 1; /* Don't send error, it would be done by sql_alloc_error_handler() */ + ret= 1; + goto end; } - else + + key_copy(key_buf, event_table->record[0], key_info, key_len); + if (!(ret= event_table->file->index_read(event_table->record[0], key_buf, + (key_part_map)1, HA_READ_PREFIX))) { - key_copy(key_buf, event_table->record[0], key_info, key_len); - if (!(ret= event_table->file->index_read(event_table->record[0], key_buf, - (key_part_map)1, HA_READ_PREFIX))) + DBUG_PRINT("info",("Found rows. Let's retrieve them. ret=%d", ret)); + do { - DBUG_PRINT("info",("Found rows. Let's retrieve them. ret=%d", ret)); - do - { - ret= copy_event_to_schema_table(thd, schema_table, event_table); - if (ret == 0) - ret= event_table->file->index_next_same(event_table->record[0], - key_buf, key_len); - } while (ret == 0); - } - DBUG_PRINT("info", ("Scan finished. ret=%d", ret)); + ret= copy_event_to_schema_table(thd, schema_table, event_table); + if (ret == 0) + ret= event_table->file->index_next_same(event_table->record[0], + key_buf, key_len); + } while (ret == 0); } - event_table->file->ha_index_end(); + DBUG_PRINT("info", ("Scan finished. ret=%d", ret)); + /* ret is guaranteed to be != 0 */ if (ret == HA_ERR_END_OF_FILE || ret == HA_ERR_KEY_NOT_FOUND) - DBUG_RETURN(FALSE); + ret= 0; + else + event_table->file->print_error(ret, MYF(0)); - DBUG_RETURN(TRUE); +end: + event_table->file->ha_index_end(); + + DBUG_RETURN(test(ret)); } @@ -389,40 +403,33 @@ Event_db_repository::table_scan_all_for_i_s(THD *thd, TABLE *schema_table, } -/* +/** Fills I_S.EVENTS with data loaded from mysql.event. Also used by SHOW EVENTS - SYNOPSIS - Event_db_repository::fill_schema_events() - thd Thread - tables The schema table - db If not NULL then get events only from this schema + The reason we reset and backup open tables here is that this + function may be called from any query that accesses + INFORMATION_SCHEMA - including a query that is issued from + a pre-locked statement, one that already has open and locked + tables. - RETURN VALUE - FALSE OK - TRUE Error + @retval FALSE success + @retval TRUE error */ -int +bool Event_db_repository::fill_schema_events(THD *thd, TABLE_LIST *tables, const char *db) { TABLE *schema_table= tables->table; TABLE *event_table= NULL; - Open_tables_state backup; int ret= 0; DBUG_ENTER("Event_db_repository::fill_schema_events"); DBUG_PRINT("info",("db=%s", db? db:"(null)")); - thd->reset_n_backup_open_tables_state(&backup); if (open_event_table(thd, TL_READ, &event_table)) - { - sql_print_error("Table mysql.event is damaged."); - thd->restore_backup_open_tables_state(&backup); - DBUG_RETURN(1); - } + DBUG_RETURN(TRUE); /* 1. SELECT I_S => use table scan. I_S.EVENTS does not guarantee order @@ -439,163 +446,100 @@ Event_db_repository::fill_schema_events(THD *thd, TABLE_LIST *tables, ret= table_scan_all_for_i_s(thd, schema_table, event_table); close_thread_tables(thd); - thd->restore_backup_open_tables_state(&backup); DBUG_PRINT("info", ("Return code=%d", ret)); DBUG_RETURN(ret); } -/* - Open mysql.event table for read +/** + Open mysql.event table for read. - SYNOPSIS - Events::open_event_table() - thd [in] Thread context - lock_type [in] How to lock the table - table [out] We will store the open table here + It's assumed that the caller knows what they are doing: + - whether it was necessary to reset-and-backup the open tables state + - whether the requested lock does not lead to a deadlock + - whether this open mode would work under LOCK TABLES, or inside a + stored function or trigger. - RETURN VALUE - 1 Cannot lock table - 2 The table is corrupted - different number of fields - 0 OK + @param[in] thd Thread context + @param[in] lock_type How to lock the table + @param[out] table We will store the open table here + + @retval TRUE open and lock failed - an error message is pushed into the + stack + @retval FALSE success */ -int +bool Event_db_repository::open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table) { TABLE_LIST tables; DBUG_ENTER("Event_db_repository::open_event_table"); - bzero((char*) &tables, sizeof(tables)); - tables.db= (char*) "mysql"; - tables.table_name= tables.alias= (char*) "event"; - tables.lock_type= lock_type; + tables.init_one_table("mysql", "event", lock_type); if (simple_open_n_lock_tables(thd, &tables)) - DBUG_RETURN(1); + DBUG_RETURN(TRUE); - if (table_check_intact(tables.table, ET_FIELD_COUNT, - event_table_fields, - &mysql_event_last_create_time, - ER_CANNOT_LOAD_FROM_TABLE)) - { - close_thread_tables(thd); - DBUG_RETURN(2); - } *table= tables.table; tables.table->use_all_columns(); - DBUG_RETURN(0); + DBUG_RETURN(FALSE); } -/* - Checks parameters which we got from the parsing phase. +/** + Creates an event record in mysql.event table. - SYNOPSIS - check_parse_params() - thd Thread context - parse_data Event's data - - RETURN VALUE - FALSE OK - TRUE Error (reported) -*/ + Creates an event. Relies on mysql_event_fill_row which is shared with + ::update_event. -static int -check_parse_params(THD *thd, Event_parse_data *parse_data) -{ - DBUG_ENTER("check_parse_params"); + @pre All semantic checks must be performed outside. This function + only creates a record on disk. + @pre The thread handle has no open tables. - if (parse_data->check_parse_data(thd)) - DBUG_RETURN(EVEX_BAD_PARAMS); + @param[in,out] THD + @param[in] parse_data Parsed event definition + @param[in] create_if_not TRUE if IF NOT EXISTS clause was provided + to CREATE EVENT statement - if (!parse_data->dbname.str || - (thd->lex->sql_command == SQLCOM_ALTER_EVENT && thd->lex->spname && - !thd->lex->spname->m_db.str)) - { - my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0)); - DBUG_RETURN(EVEX_BAD_PARAMS); - } - - if (check_access(thd, EVENT_ACL, parse_data->dbname.str, 0, 0, 0, - is_schema_db(parse_data->dbname.str)) || - (thd->lex->sql_command == SQLCOM_ALTER_EVENT && thd->lex->spname && - (check_access(thd, EVENT_ACL, thd->lex->spname->m_db.str, 0, 0, 0, - is_schema_db(thd->lex->spname->m_db.str))))) - DBUG_RETURN(EVEX_BAD_PARAMS); - - DBUG_RETURN(0); -} - - -/* - Creates an event in mysql.event - - SYNOPSIS - Event_db_repository::create_event() - thd [in] THD - parse_data [in] Object containing info about the event - create_if_not [in] Whether to generate anwarning in case event exists - - RETURN VALUE - 0 OK - EVEX_GENERAL_ERROR Failure - - DESCRIPTION - Creates an event. Relies on mysql_event_fill_row which is shared with - ::update_event. The name of the event is inside "et". + @retval FALSE success + @retval TRUE error */ bool Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, my_bool create_if_not) { - int ret= 0; + int ret= 1; TABLE *table= NULL; - char old_db_buf[NAME_LEN+1]; - LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) }; - bool dbchanged= FALSE; DBUG_ENTER("Event_db_repository::create_event"); - if (check_parse_params(thd, parse_data)) - goto err; - if (parse_data->do_not_create) - goto ok; - DBUG_PRINT("info", ("open mysql.event for update")); + if (open_event_table(thd, TL_WRITE, &table)) - { - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - goto err; - } + goto end; DBUG_PRINT("info", ("name: %.*s", parse_data->name.length, parse_data->name.str)); DBUG_PRINT("info", ("check existance of an event with the same name")); - if (!find_named_event(thd, parse_data->dbname, parse_data->name, table)) + if (!find_named_event(parse_data->dbname, parse_data->name, table)) { if (create_if_not) { push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_EVENT_ALREADY_EXISTS, ER(ER_EVENT_ALREADY_EXISTS), parse_data->name.str); - goto ok; + ret= 0; } - my_error(ER_EVENT_ALREADY_EXISTS, MYF(0), parse_data->name.str); - goto err; + else + my_error(ER_EVENT_ALREADY_EXISTS, MYF(0), parse_data->name.str); + goto end; } - DBUG_PRINT("info", ("non-existant, go forward")); - - if ((ret= sp_use_new_db(thd, parse_data->dbname, &old_db, 0, &dbchanged))) - { - my_error(ER_BAD_DB_ERROR, MYF(0)); - goto err; - } + DBUG_PRINT("info", ("non-existent, go forward")); restore_record(table, s->default_values); // Get default values for fields @@ -605,7 +549,7 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, table->field[ET_FIELD_DB]->char_length()) { my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->dbname.str); - goto err; + goto end; } if (system_charset_info->cset-> @@ -614,20 +558,13 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, table->field[ET_FIELD_NAME]->char_length()) { my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->name.str); - goto err; + goto end; } if (parse_data->body.length > table->field[ET_FIELD_BODY]->field_length) { my_error(ER_TOO_LONG_BODY, MYF(0), parse_data->name.str); - goto err; - } - - if (!(parse_data->expression) && !(parse_data->execute_at)) - { - DBUG_PRINT("error", ("neither expression nor execute_at are set!")); - my_error(ER_EVENT_NEITHER_M_EXPR_NOR_M_AT, MYF(0)); - goto err; + goto end; } ((Field_timestamp *)table->field[ET_FIELD_CREATED])->set_time(); @@ -636,95 +573,71 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, mysql_event_fill_row() calls my_error() in case of error so no need to handle it here */ - if ((ret= mysql_event_fill_row(thd, table, parse_data, FALSE))) - goto err; + if (mysql_event_fill_row(thd, table, parse_data, FALSE)) + goto end; table->field[ET_FIELD_STATUS]->store((longlong)parse_data->status, TRUE); - /* Close active transaction only if We are going to modify disk */ - if (end_active_trans(thd)) - goto err; - - if (table->file->ha_write_row(table->record[0])) + if ((ret= table->file->ha_write_row(table->record[0]))) { - my_error(ER_EVENT_STORE_FAILED, MYF(0), parse_data->name.str, ret); - goto err; + table->file->print_error(ret, MYF(0)); + goto end; } + ret= 0; -ok: - if (dbchanged) - (void) mysql_change_db(thd, old_db.str, 1); - /* - This statement may cause a spooky valgrind warning at startup - inside init_key_cache on my system (ahristov, 2006/08/10) - */ - close_thread_tables(thd); - DBUG_RETURN(FALSE); - -err: - if (dbchanged) - (void) mysql_change_db(thd, old_db.str, 1); +end: if (table) close_thread_tables(thd); - DBUG_RETURN(TRUE); + DBUG_RETURN(test(ret)); } -/* +/** Used to execute ALTER EVENT. Pendant to Events::update_event(). - SYNOPSIS - Event_db_repository::update_event() - thd THD - sp_name the name of the event to alter - et event's data + @param[in,out] thd thread handle + @param[in] parse_data parsed event definition + @paran[in[ new_dbname not NULL if ALTER EVENT RENAME + points at a new database name + @param[in] new_name not NULL if ALTER EVENT RENAME + points at a new event name - RETURN VALUE - FALSE OK - TRUE Error (reported) + @pre All semantic checks are performed outside this function, + it only updates the event definition on disk. + @pre We don't have any tables open in the given thread. - NOTES - sp_name is passed since this is the name of the event to - alter in case of RENAME TO. + @retval FALSE success + @retval TRUE error (reported) */ bool Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data, - LEX_STRING *new_dbname, LEX_STRING *new_name) + LEX_STRING *new_dbname, + LEX_STRING *new_name) { CHARSET_INFO *scs= system_charset_info; TABLE *table= NULL; + int ret= 1; DBUG_ENTER("Event_db_repository::update_event"); - if (open_event_table(thd, TL_WRITE, &table)) - { - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - goto err; - } + /* None or both must be set */ + DBUG_ASSERT(new_dbname && new_name || new_dbname == new_name); - if (check_parse_params(thd, parse_data) || parse_data->do_not_create) - goto err; + if (open_event_table(thd, TL_WRITE, &table)) + goto end; DBUG_PRINT("info", ("dbname: %s", parse_data->dbname.str)); DBUG_PRINT("info", ("name: %s", parse_data->name.str)); DBUG_PRINT("info", ("user: %s", parse_data->definer.str)); - if (new_dbname) - DBUG_PRINT("info", ("rename to: %s@%s", new_dbname->str, new_name->str)); /* first look whether we overwrite */ if (new_name) { - if (!sortcmp_lex_string(parse_data->name, *new_name, scs) && - !sortcmp_lex_string(parse_data->dbname, *new_dbname, scs)) - { - my_error(ER_EVENT_SAME_NAME, MYF(0), parse_data->name.str); - goto err; - } - - if (!find_named_event(thd, *new_dbname, *new_name, table)) + DBUG_PRINT("info", ("rename to: %s@%s", new_dbname->str, new_name->str)); + if (!find_named_event(*new_dbname, *new_name, table)) { my_error(ER_EVENT_ALREADY_EXISTS, MYF(0), new_name->str); - goto err; + goto end; } } /* @@ -733,10 +646,10 @@ Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data, overwrite the key and SE will tell us that it cannot find the already found row (copied into record[1] later */ - if (find_named_event(thd, parse_data->dbname, parse_data->name, table)) + if (find_named_event(parse_data->dbname, parse_data->name, table)) { my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), parse_data->name.str); - goto err; + goto end; } store_record(table,record[1]); @@ -749,7 +662,7 @@ Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data, handle it here */ if (mysql_event_fill_row(thd, table, parse_data, TRUE)) - goto err; + goto end; if (new_dbname) { @@ -757,42 +670,32 @@ Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data, table->field[ET_FIELD_NAME]->store(new_name->str, new_name->length, scs); } - /* Close active transaction only if We are going to modify disk */ - if (end_active_trans(thd)) - goto err; - - int res; - if ((res= table->file->ha_update_row(table->record[1], table->record[0]))) + if ((ret= table->file->ha_update_row(table->record[1], table->record[0]))) { - my_error(ER_EVENT_STORE_FAILED, MYF(0), parse_data->name.str, res); - goto err; + table->file->print_error(ret, MYF(0)); + goto end; } + ret= 0; - /* close mysql.event or we crash later when loading the event from disk */ - close_thread_tables(thd); - DBUG_RETURN(FALSE); - -err: +end: if (table) close_thread_tables(thd); - DBUG_RETURN(TRUE); + DBUG_RETURN(test(ret)); } -/* - Drops an event +/** + Delete event record from mysql.event table. - SYNOPSIS - Event_db_repository::drop_event() - thd [in] THD - db [in] Database name - name [in] Event's name - drop_if_exists [in] If set and the event not existing => warning - onto the stack + @param[in,out] thd thread handle + @param[in] db Database name + @param[in] name Event name + @param[in] drop_if_exists DROP IF EXISTS clause was specified. + If set, and the event does not exist, + the error is downgraded to a warning. - RETURN VALUE - FALSE OK - TRUE Error (reported) + @retval FALSE success + @retval TRUE error (reported) */ bool @@ -800,66 +703,59 @@ Event_db_repository::drop_event(THD *thd, LEX_STRING db, LEX_STRING name, bool drop_if_exists) { TABLE *table= NULL; - Open_tables_state backup; - int ret; + int ret= 1; DBUG_ENTER("Event_db_repository::drop_event"); DBUG_PRINT("enter", ("%s@%s", db.str, name.str)); - thd->reset_n_backup_open_tables_state(&backup); - if ((ret= open_event_table(thd, TL_WRITE, &table))) + if (open_event_table(thd, TL_WRITE, &table)) + goto end; + + if (!find_named_event(db, name, table)) { - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - goto done; + if ((ret= table->file->ha_delete_row(table->record[0]))) + table->file->print_error(ret, MYF(0)); + goto end; } - if (!(ret= find_named_event(thd, db, name, table))) + /* Event not found */ + if (!drop_if_exists) { - /* Close active transaction only if we are actually going to modify disk */ - if (!(ret= end_active_trans(thd)) && - (ret= table->file->ha_delete_row(table->record[0]))) - my_error(ER_EVENT_CANNOT_DELETE, MYF(0)); - } - else - { - if (drop_if_exists) - { - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, - ER_SP_DOES_NOT_EXIST, ER(ER_SP_DOES_NOT_EXIST), - "Event", name.str); - ret= 0; - } else - my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name.str); + my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name.str); + goto end; } -done: + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, + ER_SP_DOES_NOT_EXIST, ER(ER_SP_DOES_NOT_EXIST), + "Event", name.str); + ret= 0; + +end: if (table) close_thread_tables(thd); - thd->restore_backup_open_tables_state(&backup); - DBUG_RETURN(ret); + DBUG_RETURN(test(ret)); } -/* +/** Positions the internal pointer of `table` to the place where (db, name) is stored. - SYNOPSIS - Event_db_repository::find_named_event() - thd Thread - db Schema - name Event name - table Opened mysql.event + In case search succeeded, the table cursor points at the found row. - RETURN VALUE - FALSE OK - TRUE No such event + @param[in] db database name + @param[in] name event name + @param[in,out] table mysql.event table + + + @retval FALSE an event with such db/name key exists + @reval TRUE no record found or an error occured. */ bool -Event_db_repository::find_named_event(THD *thd, LEX_STRING db, LEX_STRING name, - TABLE *table) +Event_db_repository::find_named_event(LEX_STRING db, LEX_STRING name, + TABLE *table) { byte key[MAX_KEY_LENGTH]; DBUG_ENTER("Event_db_repository::find_named_event"); @@ -911,39 +807,30 @@ Event_db_repository::drop_schema_events(THD *thd, LEX_STRING schema) } -/* - Drops all events by field which has specific value of the field +/** + Drops all events which have a specific value of a field. - SYNOPSIS - Event_db_repository::drop_events_by_field() - thd Thread - table mysql.event TABLE - field Which field of the row to use for matching - field_value The value that should match + @pre The thread handle has no open tables. + + @param[in,out] thd Thread + @param[in,out] table mysql.event TABLE + @param[in] field Which field of the row to use for matching + @param[in] field_value The value that should match */ void -Event_db_repository::drop_events_by_field(THD *thd, +Event_db_repository::drop_events_by_field(THD *thd, enum enum_events_table_field field, LEX_STRING field_value) { int ret= 0; TABLE *table= NULL; READ_RECORD read_record_info; - DBUG_ENTER("Event_db_repository::drop_events_by_field"); + DBUG_ENTER("Event_db_repository::drop_events_by_field"); DBUG_PRINT("enter", ("field=%d field_value=%s", field, field_value.str)); if (open_event_table(thd, TL_WRITE, &table)) - { - /* - Currently being used only for DROP DATABASE - In this case we don't need - error message since the OK packet has been sent. But for DROP USER we - could need it. - - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - */ DBUG_VOID_RETURN; - } /* only enabled events are in memory, so we go now and delete the rest */ init_read_record(&read_record_info, thd, table, NULL, 1, 0); @@ -951,14 +838,20 @@ Event_db_repository::drop_events_by_field(THD *thd, { char *et_field= get_field(thd->mem_root, table->field[field]); - LEX_STRING et_field_lex= { et_field, strlen(et_field) }; - DBUG_PRINT("info", ("Current event %s name=%s", et_field, - get_field(thd->mem_root, table->field[ET_FIELD_NAME]))); - - if (!sortcmp_lex_string(et_field_lex, field_value, system_charset_info)) + /* et_field may be NULL if the table is corrupted or out of memory */ + if (et_field) { - DBUG_PRINT("info", ("Dropping")); - ret= table->file->ha_delete_row(table->record[0]); + LEX_STRING et_field_lex= { et_field, strlen(et_field) }; + DBUG_PRINT("info", ("Current event %s name=%s", et_field, + get_field(thd->mem_root, + table->field[ET_FIELD_NAME]))); + + if (!sortcmp_lex_string(et_field_lex, field_value, system_charset_info)) + { + DBUG_PRINT("info", ("Dropping")); + if ((ret= table->file->ha_delete_row(table->record[0]))) + table->file->print_error(ret, MYF(0)); + } } } end_read_record(&read_record_info); @@ -968,20 +861,14 @@ Event_db_repository::drop_events_by_field(THD *thd, } -/* +/** Looks for a named event in mysql.event and then loads it from - the table, compiles and inserts it into the cache. + the table. - SYNOPSIS - Event_db_repository::load_named_event() - thd [in] Thread context - dbname [in] Event's db name - name [in] Event's name - etn [out] The loaded event + @pre The given thread does not have open tables. - RETURN VALUE - FALSE OK - TRUE Error (reported) + @retval FALSE success + @retval TRUE error */ bool @@ -989,26 +876,176 @@ Event_db_repository::load_named_event(THD *thd, LEX_STRING dbname, LEX_STRING name, Event_basic *etn) { TABLE *table= NULL; - int ret= 0; - Open_tables_state backup; + bool ret; DBUG_ENTER("Event_db_repository::load_named_event"); DBUG_PRINT("enter",("thd: 0x%lx name: %*s", (long) thd, name.length, name.str)); - thd->reset_n_backup_open_tables_state(&backup); + if (!(ret= open_event_table(thd, TL_READ, &table))) + { + if ((ret= find_named_event(dbname, name, table))) + my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name.str); + else if ((ret= etn->load_from_row(thd, table))) + my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "event"); - if ((ret= open_event_table(thd, TL_READ, &table))) - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - else if ((ret= find_named_event(thd, dbname, name, table))) - my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name.str); - else if ((ret= etn->load_from_row(thd, table))) - my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "event"); - - if (table) close_thread_tables(thd); + } - thd->restore_backup_open_tables_state(&backup); - /* In this case no memory was allocated so we don't need to clean */ DBUG_RETURN(ret); } + + +/** + Update the event record in mysql.event table with a changed status + and/or last execution time. + + @pre The thread handle does not have open tables. +*/ + +bool +Event_db_repository:: +update_timing_fields_for_event(THD *thd, + LEX_STRING event_db_name, + LEX_STRING event_name, + bool update_last_executed, + my_time_t last_executed, + bool update_status, + ulonglong status) +{ + TABLE *table= NULL; + Field **fields; + int ret= 1; + + DBUG_ENTER("Event_db_repository::update_timing_fields_for_event"); + + /* + Turn off row binlogging of event timing updates. These are not used + for RBR of events replicated to the slave. + */ + if (thd->current_stmt_binlog_row_based) + thd->clear_current_stmt_binlog_row_based(); + + if (open_event_table(thd, TL_WRITE, &table)) + goto end; + + fields= table->field; + + if (find_named_event(event_db_name, event_name, table)) + goto end; + + store_record(table, record[1]); + /* Don't update create on row update. */ + table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; + + if (update_last_executed) + { + TIME time; + my_tz_UTC->gmt_sec_to_TIME(&time, last_executed); + + fields[ET_FIELD_LAST_EXECUTED]->set_notnull(); + fields[ET_FIELD_LAST_EXECUTED]->store_time(&time, + MYSQL_TIMESTAMP_DATETIME); + } + if (update_status) + { + fields[ET_FIELD_STATUS]->set_notnull(); + fields[ET_FIELD_STATUS]->store(status, TRUE); + } + + if ((ret= table->file->ha_update_row(table->record[1], table->record[0]))) + { + table->file->print_error(ret, MYF(0)); + goto end; + } + + ret= 0; + +end: + if (table) + close_thread_tables(thd); + + DBUG_RETURN(test(ret)); +} + + +/** + Open mysql.db, mysql.user and mysql.event and check whether: + - mysql.db exists and is up to date (or from a newer version of MySQL), + - mysql.user has column Event_priv at an expected position, + - mysql.event exists and is up to date (or from a newer version of + MySQL) + + This function is called only when the server is started. + @pre The passed in thread handle has no open tables. + + @retval FALSE OK + @retval TRUE Error, an error message is output to the error log. +*/ + +bool +Event_db_repository::check_system_tables(THD *thd) +{ + TABLE_LIST tables; + int ret= FALSE; + const unsigned int event_priv_column_position= 29; + + DBUG_ENTER("Event_db_repository::check_system_tables"); + DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); + + + /* Check mysql.db */ + tables.init_one_table("mysql", "db", TL_READ); + + if (simple_open_n_lock_tables(thd, &tables)) + { + ret= 1; + sql_print_error("Cannot open mysql.db"); + } + else + { + if (table_check_intact(tables.table, MYSQL_DB_FIELD_COUNT, + mysql_db_table_fields)) + ret= 1; + /* in case of an error, the message is printed inside table_check_intact */ + + close_thread_tables(thd); + } + /* Check mysql.user */ + tables.init_one_table("mysql", "user", TL_READ); + + if (simple_open_n_lock_tables(thd, &tables)) + { + ret= 1; + sql_print_error("Cannot open mysql.user"); + } + else + { + if (tables.table->s->fields < event_priv_column_position || + strncmp(tables.table->field[event_priv_column_position]->field_name, + STRING_WITH_LEN("Event_priv"))) + { + sql_print_error("mysql.user has no `Event_priv` column at position %d", + event_priv_column_position); + ret= 1; + } + close_thread_tables(thd); + } + /* Check mysql.event */ + tables.init_one_table("mysql", "event", TL_READ); + + if (simple_open_n_lock_tables(thd, &tables)) + { + ret= 1; + sql_print_error("Cannot open mysql.event"); + } + else + { + if (table_check_intact(tables.table, ET_FIELD_COUNT, event_table_fields)) + ret= 1; + /* in case of an error, the message is printed inside table_check_intact */ + close_thread_tables(thd); + } + + DBUG_RETURN(test(ret)); +} diff --git a/sql/event_db_repository.h b/sql/event_db_repository.h index 0c2fcf9542d..64e19854933 100644 --- a/sql/event_db_repository.h +++ b/sql/event_db_repository.h @@ -15,7 +15,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define EVEX_OPEN_TABLE_FAILED -1 +/* + @file + This is a private header file of Events module. Please do not include it + directly. All public declarations of Events module should be stored in + events.h and event_data_objects.h. +*/ enum enum_events_table_field { @@ -63,24 +68,35 @@ public: update_event(THD *thd, Event_parse_data *parse_data, LEX_STRING *new_dbname, LEX_STRING *new_name); - bool + bool drop_event(THD *thd, LEX_STRING db, LEX_STRING name, bool drop_if_exists); void drop_schema_events(THD *thd, LEX_STRING schema); bool - find_named_event(THD *thd, LEX_STRING db, LEX_STRING name, TABLE *table); + find_named_event(LEX_STRING db, LEX_STRING name, TABLE *table); bool load_named_event(THD *thd, LEX_STRING dbname, LEX_STRING name, Event_basic *et); - int + bool open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table); - int + bool fill_schema_events(THD *thd, TABLE_LIST *tables, const char *db); + bool + update_timing_fields_for_event(THD *thd, + LEX_STRING event_db_name, + LEX_STRING event_name, + bool update_last_executed, + my_time_t last_executed, + bool update_status, + ulonglong status); +public: + static bool + check_system_tables(THD *thd); private: void drop_events_by_field(THD *thd, enum enum_events_table_field field, @@ -92,12 +108,10 @@ private: bool table_scan_all_for_i_s(THD *thd, TABLE *schema_table, TABLE *event_table); - static bool - check_system_tables(THD *thd); - +private: /* Prevent use of these */ Event_db_repository(const Event_db_repository &); void operator=(Event_db_repository &); }; - + #endif /* _EVENT_DB_REPOSITORY_H_ */ diff --git a/sql/event_queue.cc b/sql/event_queue.cc index b9c7af1a1a2..9b14d3cda7e 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -32,16 +32,6 @@ #define LOCK_QUEUE_DATA() lock_data(SCHED_FUNC, __LINE__) #define UNLOCK_QUEUE_DATA() unlock_data(SCHED_FUNC, __LINE__) -struct event_queue_param -{ - THD *thd; - Event_queue *queue; - pthread_mutex_t LOCK_loaded; - pthread_cond_t COND_loaded; - bool loading_finished; -}; - - /* Compares the execute_at members of two Event_queue_element instances. Used as callback for the prioritized queue when shifting @@ -62,7 +52,7 @@ struct event_queue_param execute_at.second_part is not considered during comparison */ -static int +static int event_queue_element_compare_q(void *vptr, byte* a, byte *b) { my_time_t lhs = ((Event_queue_element *)a)->execute_at; @@ -82,39 +72,21 @@ event_queue_element_compare_q(void *vptr, byte* a, byte *b) Event_queue::Event_queue() :mutex_last_unlocked_at_line(0), mutex_last_locked_at_line(0), mutex_last_attempted_lock_at_line(0), - mutex_queue_data_locked(FALSE), mutex_queue_data_attempting_lock(FALSE) + mutex_queue_data_locked(FALSE), + mutex_queue_data_attempting_lock(FALSE), + next_activation_at(0) { mutex_last_unlocked_in_func= mutex_last_locked_in_func= mutex_last_attempted_lock_in_func= ""; - next_activation_at= 0; -} - -/* - Inits mutexes. - - SYNOPSIS - Event_queue::init_mutexes() -*/ - -void -Event_queue::init_mutexes() -{ pthread_mutex_init(&LOCK_event_queue, MY_MUTEX_INIT_FAST); pthread_cond_init(&COND_queue_state, NULL); } -/* - Destroys mutexes. - - SYNOPSIS - Event_queue::deinit_mutexes() -*/ - -void -Event_queue::deinit_mutexes() +Event_queue::~Event_queue() { + deinit_queue(); pthread_mutex_destroy(&LOCK_event_queue); pthread_cond_destroy(&COND_queue_state); } @@ -148,7 +120,7 @@ Event_queue::init_queue(THD *thd) 0 /*max_on_top*/, event_queue_element_compare_q, NULL, EVENT_QUEUE_EXTENT)) { - sql_print_error("SCHEDULER: Can't initialize the execution queue"); + sql_print_error("Event Scheduler: Can't initialize the execution queue"); goto err; } @@ -183,37 +155,50 @@ Event_queue::deinit_queue() } -/* +/** Adds an event to the queue. - SYNOPSIS - Event_queue::create_event() - dbname The schema of the new event - name The name of the new event + Compute the next execution time for an event, and if it is still + active, add it to the queue. Otherwise delete it. + The object is left intact in case of an error. Otherwise + the queue container assumes ownership of it. + + @param[in] thd thread handle + @param[in] new_element a new element to add to the queue + @param[out] created set to TRUE if no error and the element is + added to the queue, FALSE otherwise + + @retval TRUE an error occured. The value of created is undefined, + the element was not deleted. + @retval FALSE success */ -void -Event_queue::create_event(THD *thd, Event_queue_element *new_element) +bool +Event_queue::create_event(THD *thd, Event_queue_element *new_element, + bool *created) { DBUG_ENTER("Event_queue::create_event"); DBUG_PRINT("enter", ("thd: 0x%lx et=%s.%s", (long) thd, new_element->dbname.str, new_element->name.str)); - if ((new_element->status == Event_queue_element::DISABLED) - || (new_element->status == Event_queue_element::SLAVESIDE_DISABLED)) - delete new_element; - else + /* Will do nothing if the event is disabled */ + new_element->compute_next_execution_time(); + if (new_element->status != Event_queue_element::ENABLED) { - new_element->compute_next_execution_time(); - DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element)); - - LOCK_QUEUE_DATA(); - queue_insert_safe(&queue, (byte *) new_element); - dbug_dump_queue(thd->query_start()); - pthread_cond_broadcast(&COND_queue_state); - UNLOCK_QUEUE_DATA(); + delete new_element; + *created= FALSE; + DBUG_RETURN(FALSE); } - DBUG_VOID_RETURN; + + DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element)); + + LOCK_QUEUE_DATA(); + *created= (queue_insert_safe(&queue, (byte *) new_element) == FALSE); + dbug_dump_queue(thd->query_start()); + pthread_cond_broadcast(&COND_queue_state); + UNLOCK_QUEUE_DATA(); + + DBUG_RETURN(!*created); } @@ -258,7 +243,7 @@ Event_queue::update_event(THD *thd, LEX_STRING dbname, LEX_STRING name, { DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element)); queue_insert_safe(&queue, (byte *) new_element); - pthread_cond_broadcast(&COND_queue_state); + pthread_cond_broadcast(&COND_queue_state); } dbug_dump_queue(thd->query_start()); @@ -289,7 +274,7 @@ Event_queue::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name) find_n_remove_event(dbname, name); dbug_dump_queue(thd->query_start()); UNLOCK_QUEUE_DATA(); - + /* We don't signal here because the scheduler will catch the change next time it wakes up. @@ -311,7 +296,7 @@ Event_queue::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name) RETURN VALUE >=0 Number of dropped events - + NOTE Expected is the caller to acquire lock on LOCK_event_queue */ @@ -343,7 +328,7 @@ Event_queue::drop_matching_events(THD *thd, LEX_STRING pattern, i++; } /* - We don't call pthread_cond_broadcast(&COND_queue_state); + We don't call pthread_cond_broadcast(&COND_queue_state); If we remove the top event: 1. The queue is empty. The scheduler will wake up at some time and realize that the queue is empty. If create_event() comes inbetween @@ -465,7 +450,8 @@ Event_queue::empty_queue() uint i; DBUG_ENTER("Event_queue::empty_queue"); DBUG_PRINT("enter", ("Purging the queue. %u element(s)", queue.elements)); - sql_print_information("SCHEDULER: Purging queue. %u events", queue.elements); + sql_print_information("Event Scheduler: Purging the queue. %u events", + queue.elements); /* empty the queue */ for (i= 0; i < queue.elements; ++i) { @@ -598,7 +584,7 @@ Event_queue::get_top_for_execution_if_time(THD *thd, if (top->status == Event_queue_element::DISABLED) { DBUG_PRINT("info", ("removing from the queue")); - sql_print_information("SCHEDULER: Last execution of %s.%s. %s", + sql_print_information("Event Scheduler: Last execution of %s.%s. %s", top->dbname.str, top->name.str, top->dropped? "Dropping.":""); delete top; diff --git a/sql/event_queue.h b/sql/event_queue.h index 338a6c8f903..04bb8b93b06 100644 --- a/sql/event_queue.h +++ b/sql/event_queue.h @@ -25,23 +25,16 @@ class Event_queue { public: Event_queue(); - - void - init_mutexes(); - - void - deinit_mutexes(); + ~Event_queue(); bool init_queue(THD *thd); - - void - deinit_queue(); /* Methods for queue management follow */ - void - create_event(THD *thd, Event_queue_element *new_element); + bool + create_event(THD *thd, Event_queue_element *new_element, + bool *created); void update_event(THD *thd, LEX_STRING dbname, LEX_STRING name, @@ -64,9 +57,23 @@ public: void dump_internal_status(); +private: void empty_queue(); -protected: + + void + deinit_queue(); + /* helper functions for working with mutexes & conditionals */ + void + lock_data(const char *func, uint line); + + void + unlock_data(const char *func, uint line); + + void + cond_wait(THD *thd, struct timespec *abstime, const char* msg, + const char *func, uint line); + void find_n_remove_event(LEX_STRING db, LEX_STRING name); @@ -98,16 +105,6 @@ protected: bool mutex_queue_data_attempting_lock; bool waiting_on_cond; - /* helper functions for working with mutexes & conditionals */ - void - lock_data(const char *func, uint line); - - void - unlock_data(const char *func, uint line); - - void - cond_wait(THD *thd, struct timespec *abstime, const char* msg, - const char *func, uint line); }; #endif /* _EVENT_QUEUE_H_ */ diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index 3c8ecf6ca3a..0603a299079 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -37,7 +37,6 @@ extern pthread_attr_t connection_attrib; Event_db_repository *Event_worker_thread::db_repository; -Events *Event_worker_thread::events_facade; static @@ -78,13 +77,13 @@ Event_worker_thread::print_warnings(THD *thd, Event_job_data *et) char prefix_buf[5 * STRING_BUFFER_USUAL_SIZE]; String prefix(prefix_buf, sizeof(prefix_buf), system_charset_info); prefix.length(0); - prefix.append("SCHEDULER: ["); + prefix.append("Event Scheduler: ["); - append_identifier(thd, &prefix, et->definer.str, et->definer.length); + prefix.append(et->definer.str, et->definer.length, system_charset_info); prefix.append("][", 2); - append_identifier(thd,&prefix, et->dbname.str, et->dbname.length); + prefix.append(et->dbname.str, et->dbname.length, system_charset_info); prefix.append('.'); - append_identifier(thd,&prefix, et->name.str, et->name.length); + prefix.append(et->name.str, et->name.length, system_charset_info); prefix.append("] ", 2); List_iterator_fast it(thd->warn_list); @@ -95,7 +94,6 @@ Event_worker_thread::print_warnings(THD *thd, Event_job_data *et) err_msg.length(0); err_msg.append(prefix); err_msg.append(err->msg, strlen(err->msg), system_charset_info); - err_msg.append("]"); DBUG_ASSERT(err->level < 3); (sql_print_message_handlers[err->level])("%*s", err_msg.length(), err_msg.c_ptr()); @@ -156,8 +154,6 @@ deinit_event_thread(THD *thd) thread_running--; delete thd; pthread_mutex_unlock(&LOCK_thread_count); - - my_thread_end(); } @@ -233,14 +229,13 @@ event_scheduler_thread(void *arg) if (!res) scheduler->run(thd); - deinit_event_thread(thd); - pthread_exit(0); + my_thread_end(); DBUG_RETURN(0); // Against gcc warnings } -/* - Function that executes an event in a child thread. Setups the +/** + Function that executes an event in a child thread. Setups the environment for the event execution and cleans after that. SYNOPSIS @@ -254,7 +249,7 @@ event_scheduler_thread(void *arg) pthread_handler_t event_worker_thread(void *arg) { - THD *thd; + THD *thd; Event_queue_element_for_exec *event= (Event_queue_element_for_exec *)arg; thd= event->thd; @@ -262,12 +257,13 @@ event_worker_thread(void *arg) Event_worker_thread worker_thread; worker_thread.run(thd, event); + my_thread_end(); return 0; // Can't return anything here } -/* - Function that executes an event in a child thread. Setups the +/** + Function that executes an event in a child thread. Setups the environment for the event execution and cleans after that. SYNOPSIS @@ -304,108 +300,68 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event) goto end; } - sql_print_information("SCHEDULER: [%s.%s of %s] executing in thread %lu. ", + sql_print_information("Event Scheduler: " + "[%s.%s of %s] executing in thread %lu. ", job_data->dbname.str, job_data->name.str, job_data->definer.str, thd->thread_id); thd->enable_slow_log= TRUE; - ret= job_data->execute(thd); + ret= job_data->execute(thd, event->dropped); print_warnings(thd, job_data); - sql_print_information("SCHEDULER: [%s.%s of %s] executed in thread %lu. " - "RetCode=%d", job_data->dbname.str, job_data->name.str, - job_data->definer.str, thd->thread_id, ret); - if (ret == EVEX_COMPILE_ERROR) - sql_print_information("SCHEDULER: COMPILE ERROR for event %s.%s of %s", + switch (ret) { + case 0: + sql_print_information("Event Scheduler: " + "[%s].[%s.%s] executed successfully in thread %lu.", + job_data->definer.str, job_data->dbname.str, job_data->name.str, - job_data->definer.str); - else if (ret == EVEX_MICROSECOND_UNSUP) - sql_print_information("SCHEDULER: MICROSECOND is not supported"); + thd->thread_id); + break; + case EVEX_COMPILE_ERROR: + sql_print_information("Event Scheduler: " + "[%s].[%s.%s] event compilation failed.", + job_data->definer.str, + job_data->dbname.str, job_data->name.str); + break; + default: + sql_print_information("Event Scheduler: " + "[%s].[%s.%s] event execution failed.", + job_data->definer.str, + job_data->dbname.str, job_data->name.str); + break; + } end: delete job_data; - if (event->dropped) - { - sql_print_information("SCHEDULER: Dropping %s.%s", event->dbname.str, - event->name.str); - /* - Using db_repository can lead to a race condition because we access - the table without holding LOCK_metadata. - Scenario: - 1. CREATE EVENT xyz AT ... (conn thread) - 2. execute xyz (worker) - 3. CREATE EVENT XYZ EVERY ... (conn thread) - 4. drop xyz (worker) - 5. XYZ was just created on disk but `drop xyz` of the worker dropped it. - A consequent load to create Event_queue_element will fail. - - If all operations are performed under LOCK_metadata there is no such - problem. However, this comes at the price of introduction bi-directional - association between class Events and class Event_worker_thread. - */ - events_facade->drop_event(thd, event->dbname, event->name, FALSE); - } DBUG_PRINT("info", ("Done with Event %s.%s", event->dbname.str, event->name.str)); delete event; deinit_event_thread(thd); - pthread_exit(0); + /* + Do not pthread_exit since we want local destructors for stack objects + to be invoked. + */ } -/* - Performs initialization of the scheduler data, outside of the - threading primitives. - - SYNOPSIS - Event_scheduler::init_scheduler() -*/ - -void -Event_scheduler::init_scheduler(Event_queue *q) -{ - LOCK_DATA(); - queue= q; - started_events= 0; - scheduler_thd= NULL; - state= INITIALIZED; - UNLOCK_DATA(); -} - - -void -Event_scheduler::deinit_scheduler() {} - - -/* - Inits scheduler's threading primitives. - - SYNOPSIS - Event_scheduler::init_mutexes() -*/ - -void -Event_scheduler::init_mutexes() +Event_scheduler::Event_scheduler(Event_queue *queue_arg) + :state(UNINITIALIZED), + scheduler_thd(NULL), + queue(queue_arg), + started_events(0) { pthread_mutex_init(&LOCK_scheduler_state, MY_MUTEX_INIT_FAST); pthread_cond_init(&COND_state, NULL); } -/* - Deinits scheduler's threading primitives. - - SYNOPSIS - Event_scheduler::deinit_mutexes() -*/ - -void -Event_scheduler::deinit_mutexes() +Event_scheduler::~Event_scheduler() { + stop(); /* does nothing if not running */ pthread_mutex_destroy(&LOCK_scheduler_state); pthread_cond_destroy(&COND_state); } @@ -442,7 +398,7 @@ Event_scheduler::start() if (!(new_thd= new THD)) { - sql_print_error("SCHEDULER: Cannot init manager event thread"); + sql_print_error("Event Scheduler: Cannot initialize the scheduler thread"); ret= TRUE; goto end; } @@ -458,7 +414,7 @@ Event_scheduler::start() scheduler_thd= new_thd; DBUG_PRINT("info", ("Setting state go RUNNING")); state= RUNNING; - DBUG_PRINT("info", ("Forking new thread for scheduduler. THD: 0x%lx", (long) new_thd)); + DBUG_PRINT("info", ("Forking new thread for scheduler. THD: 0x%lx", (long) new_thd)); if (pthread_create(&th, &connection_attrib, event_scheduler_thread, (void*)scheduler_param_value)) { @@ -501,7 +457,7 @@ Event_scheduler::run(THD *thd) int res= FALSE; DBUG_ENTER("Event_scheduler::run"); - sql_print_information("SCHEDULER: Manager thread started with id %lu", + sql_print_information("Event Scheduler: scheduler thread started with id %lu", thd->thread_id); /* Recalculate the values in the queue because there could have been stops @@ -516,7 +472,8 @@ Event_scheduler::run(THD *thd) /* Gets a minimized version */ if (queue->get_top_for_execution_if_time(thd, &event_name)) { - sql_print_information("SCHEDULER: Serious error during getting next " + sql_print_information("Event Scheduler: " + "Serious error during getting next " "event to execute. Stopping"); break; } @@ -525,7 +482,7 @@ Event_scheduler::run(THD *thd) "event_name=0x%lx", (long) event_name)); if (event_name) { - if ((res= execute_top(thd, event_name))) + if ((res= execute_top(event_name))) break; } else @@ -535,12 +492,14 @@ Event_scheduler::run(THD *thd) } DBUG_PRINT("info", ("state=%s", scheduler_states_names[state].str)); } + LOCK_DATA(); - DBUG_PRINT("info", ("Signalling back to the stopper COND_state")); + deinit_event_thread(thd); + scheduler_thd= NULL; state= INITIALIZED; + DBUG_PRINT("info", ("Signalling back to the stopper COND_state")); pthread_cond_signal(&COND_state); UNLOCK_DATA(); - sql_print_information("SCHEDULER: Stopped"); DBUG_RETURN(res); } @@ -559,7 +518,7 @@ Event_scheduler::run(THD *thd) */ bool -Event_scheduler::execute_top(THD *thd, Event_queue_element_for_exec *event_name) +Event_scheduler::execute_top(Event_queue_element_for_exec *event_name) { THD *new_thd; pthread_t th; @@ -631,10 +590,13 @@ Event_scheduler::is_running() } -/* +/** Stops the scheduler (again). Waits for acknowledgement from the scheduler that it has stopped - synchronous stopping. + Already running events will not be stopped. If the user needs + them stopped manual intervention is needed. + SYNOPSIS Event_scheduler::stop() @@ -657,8 +619,8 @@ Event_scheduler::stop() /* Guarantee we don't catch spurious signals */ do { - DBUG_PRINT("info", ("Waiting for COND_started_or_stopped from the manager " - "thread. Current value of state is %s . " + DBUG_PRINT("info", ("Waiting for COND_started_or_stopped from " + "the scheduler thread. Current value of state is %s . " "workers count=%d", scheduler_states_names[state].str, workers_count())); /* @@ -672,31 +634,24 @@ Event_scheduler::stop() */ state= STOPPING; - DBUG_PRINT("info", ("Manager thread has id %lu", scheduler_thd->thread_id)); + DBUG_PRINT("info", ("Scheduler thread has id %lu", + scheduler_thd->thread_id)); /* Lock from delete */ pthread_mutex_lock(&scheduler_thd->LOCK_delete); /* This will wake up the thread if it waits on Queue's conditional */ - sql_print_information("SCHEDULER: Killing manager thread %lu", + sql_print_information("Event Scheduler: Killing the scheduler thread, " + "thread id %lu", scheduler_thd->thread_id); scheduler_thd->awake(THD::KILL_CONNECTION); pthread_mutex_unlock(&scheduler_thd->LOCK_delete); /* thd could be 0x0, when shutting down */ - sql_print_information("SCHEDULER: Waiting the manager thread to reply"); + sql_print_information("Event Scheduler: " + "Waiting for the scheduler thread to reply"); COND_STATE_WAIT(thd, NULL, "Waiting scheduler to stop"); } while (state == STOPPING); - DBUG_PRINT("info", ("Manager thread has cleaned up. Set state to INIT")); - /* - The rationale behind setting it to NULL here but not destructing it - beforehand is because the THD will be deinited in event_scheduler_thread(). - It's more clear when the post_init and the deinit is done in one function. - Here we just mark that the scheduler doesn't have a THD anymore. Though for - milliseconds the old thread could exist we can't use it anymore. When we - unlock the mutex in this function a little later the state will be - INITIALIZED. Therefore, a connection thread could enter the critical section - and will create a new THD object. - */ - scheduler_thd= NULL; + DBUG_PRINT("info", ("Scheduler thread has cleaned up. Set state to INIT")); + sql_print_information("Event Scheduler: Stopped"); end: UNLOCK_DATA(); DBUG_RETURN(FALSE); @@ -715,7 +670,7 @@ Event_scheduler::workers_count() { THD *tmp; uint count= 0; - + DBUG_ENTER("Event_scheduler::workers_count"); pthread_mutex_lock(&LOCK_thread_count); // For unlink from list I_List_iterator it(threads); diff --git a/sql/event_scheduler.h b/sql/event_scheduler.h index 2ab21464057..70635196745 100644 --- a/sql/event_scheduler.h +++ b/sql/event_scheduler.h @@ -15,6 +15,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/** + @file + This file is internal to Events module. Please do not include it directly. + All public declarations of Events module are in events.h and + event_data_objects.h. +*/ + class Event_queue; class Event_job_data; @@ -31,14 +38,13 @@ void deinit_event_thread(THD *thd); -class Event_worker_thread +class Event_worker_thread { public: static void - init(Events *events, Event_db_repository *db_repo) + init(Event_db_repository *db_repository_arg) { - db_repository= db_repo; - events_facade= events; + db_repository= db_repository_arg; } void @@ -49,15 +55,15 @@ private: print_warnings(THD *thd, Event_job_data *et); static Event_db_repository *db_repository; - static Events *events_facade; }; class Event_scheduler { public: - Event_scheduler():state(UNINITIALIZED){} - ~Event_scheduler(){} + Event_scheduler(Event_queue *event_queue_arg); + ~Event_scheduler(); + /* State changing methods follow */ @@ -74,17 +80,6 @@ public: bool run(THD *thd); - void - init_scheduler(Event_queue *queue); - - void - deinit_scheduler(); - - void - init_mutexes(); - - void - deinit_mutexes(); /* Information retrieving methods follow */ bool @@ -99,7 +94,7 @@ private: /* helper functions */ bool - execute_top(THD *thd, Event_queue_element_for_exec *event_name); + execute_top(Event_queue_element_for_exec *event_name); /* helper functions for working with mutexes & conditionals */ void diff --git a/sql/events.cc b/sql/events.cc index df2f1124f38..7a6323a9a63 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -19,7 +19,6 @@ #include "event_db_repository.h" #include "event_queue.h" #include "event_scheduler.h" -#include "sp_head.h" /* TODO list : @@ -49,7 +48,7 @@ counterpart. 1. CREATE EVENT the_name ON SCHEDULE EVERY 1 SECOND DISABLE DO SELECT 1; 2. DROP EVENT the_name - + In other words, the first one will create a row in mysql.event . In the second step because there will be a line, disk based drop will pass and the scheduler will remove the memory counterpart. The reason is that @@ -66,7 +65,7 @@ static const char *opt_event_scheduler_state_names[]= { "OFF", "ON", "0", "1", "DISABLED", NullS }; -TYPELIB Events::opt_typelib= +const TYPELIB Events::opt_typelib= { array_elements(opt_event_scheduler_state_names)-1, "", @@ -82,7 +81,7 @@ TYPELIB Events::opt_typelib= */ static const char *var_event_scheduler_state_names[]= { "OFF", "ON", NullS }; -TYPELIB Events::var_typelib= +const TYPELIB Events::var_typelib= { array_elements(var_event_scheduler_state_names)-1, "", @@ -90,20 +89,13 @@ TYPELIB Events::var_typelib= NULL }; - -static -Event_queue events_event_queue; - -static -Event_scheduler events_event_scheduler; - - -Event_db_repository events_event_db_repository; - -Events Events::singleton; - -enum Events::enum_opt_event_scheduler Events::opt_event_scheduler= - Events::EVENTS_OFF; +Event_queue *Events::event_queue; +Event_scheduler *Events::scheduler; +Event_db_repository *Events::db_repository; +enum Events::enum_opt_event_scheduler +Events::opt_event_scheduler= Events::EVENTS_OFF; +pthread_mutex_t Events::LOCK_event_metadata; +bool Events::check_system_tables_error= FALSE; /* @@ -128,25 +120,89 @@ int sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs) } -/* - Accessor for the singleton instance. +/** + @brief Initialize the start up option of the Events scheduler. - SYNOPSIS - Events::get_instance() + Do not initialize the scheduler subsystem yet - the initialization + is split into steps as it has to fit into the common MySQL + initialization framework. + No locking as this is called only at start up. - RETURN VALUE - address + @param[in,out] argument The value of the argument. If this value + is found in the typelib, the argument is + updated. + + @retval TRUE unknown option value + @retval FALSE success */ -Events * -Events::get_instance() +bool +Events::set_opt_event_scheduler(char *argument) { - DBUG_ENTER("Events::get_instance"); - DBUG_RETURN(&singleton); + if (argument == NULL) + opt_event_scheduler= Events::EVENTS_DISABLED; + else + { + int type; + /* + type= 1 2 3 4 5 + (OFF | ON) - (0 | 1) (DISABLE ) + */ + const static enum enum_opt_event_scheduler type2state[]= + { EVENTS_OFF, EVENTS_ON, EVENTS_OFF, EVENTS_ON, EVENTS_DISABLED }; + + type= find_type(argument, &opt_typelib, 1); + + DBUG_ASSERT(type >= 0 && type <= 5); /* guaranteed by find_type */ + + if (type == 0) + { + fprintf(stderr, "Unknown option to event-scheduler: %s\n", argument); + return TRUE; + } + opt_event_scheduler= type2state[type-1]; + } + return FALSE; } -/* +/** + Return a string representation of the current scheduler mode. +*/ + +const char * +Events::get_opt_event_scheduler_str() +{ + const char *str; + + pthread_mutex_lock(&LOCK_event_metadata); + str= opt_typelib.type_names[(int) opt_event_scheduler]; + pthread_mutex_unlock(&LOCK_event_metadata); + + return str; +} + + +/** + Push an error into the error stack if the system tables are + not up to date. +*/ + +bool Events::check_if_system_tables_error() +{ + DBUG_ENTER("Events::check_if_system_tables_error"); + + if (check_system_tables_error) + { + my_error(ER_EVENTS_DB_ERROR, MYF(0)); + DBUG_RETURN(TRUE); + } + + DBUG_RETURN(FALSE); +} + + +/** Reconstructs interval expression from interval type and expression value that is in form of a value of the smalles entity: For @@ -278,52 +334,65 @@ common_1_lev_code: return 0; } -/* - Constructor of Events class. It's called when events.o - is loaded. Assigning addressed of static variables in this - object file. - SYNOPSIS - Events::Events() -*/ +/** + Create a new event. -Events::Events() -{ - scheduler= &events_event_scheduler; - event_queue= &events_event_queue; - db_repository= &events_event_db_repository; -} + @param[in,out] thd THD + @param[in] parse_data Event's data from parsing stage + @param[in] if_not_exists Whether IF NOT EXISTS was + specified + In case there is an event with the same name (db) and + IF NOT EXISTS is specified, an warning is put into the stack. + @sa Events::drop_event for the notes about locking, pre-locking + and Events DDL. - -/* - The function exported to the world for creating of events. - - SYNOPSIS - Events::create_event() - thd [in] THD - parse_data [in] Event's data from parsing stage - if_not_exists [in] Whether IF NOT EXISTS was specified in the DDL - - RETURN VALUE - FALSE OK - TRUE Error (Reported) - - NOTES - In case there is an event with the same name (db) and - IF NOT EXISTS is specified, an warning is put into the stack. + @retval FALSE OK + @retval TRUE Error (reported) */ bool -Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) +Events::create_event(THD *thd, Event_parse_data *parse_data, + bool if_not_exists) { int ret; DBUG_ENTER("Events::create_event"); - if (unlikely(check_system_tables_error)) + + /* + Let's commit the transaction first - MySQL manual specifies + that a DDL issues an implicit commit, and it doesn't say "successful + DDL", so that an implicit commit is a property of any successfully + parsed DDL statement. + */ + if (end_active_trans(thd)) + DBUG_RETURN(TRUE); + + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); + + /* + Perform semantic checks outside of Event_db_repository: + once CREATE EVENT is supported in prepared statements, the + checks will be moved to PREPARE phase. + */ + if (parse_data->check_parse_data(thd)) + DBUG_RETURN(TRUE); + + /* At create, one of them must be set */ + DBUG_ASSERT(parse_data->expression || parse_data->execute_at); + + if (check_access(thd, EVENT_ACL, parse_data->dbname.str, 0, 0, 0, + is_schema_db(parse_data->dbname.str))) + DBUG_RETURN(TRUE); + + if (check_db_dir_existence(parse_data->dbname.str)) { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); + my_error(ER_BAD_DB_ERROR, MYF(0), parse_data->dbname.str); DBUG_RETURN(TRUE); } + if (parse_data->do_not_create) + DBUG_RETURN(FALSE); /* Turn off row binlogging of this statement and use statement-based so that all supporting tables are updated for CREATE EVENT command. @@ -334,8 +403,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) pthread_mutex_lock(&LOCK_event_metadata); /* On error conditions my_error() is called so no need to handle here */ - if (!(ret= db_repository->create_event(thd, parse_data, if_not_exists)) && - !parse_data->do_not_create) + if (!(ret= db_repository->create_event(thd, parse_data, if_not_exists))) { Event_queue_element *new_element; @@ -345,12 +413,17 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) parse_data->name, new_element))) { - DBUG_ASSERT(ret == OP_LOAD_ERROR); + db_repository->drop_event(thd, parse_data->dbname, parse_data->name, + TRUE); delete new_element; } - else /* Binlog the create event. */ + else { - event_queue->create_event(thd, new_element); + /* TODO: do not ignore the out parameter and a possible OOM error! */ + bool created; + if (event_queue) + event_queue->create_event(thd, new_element, &created); + /* Binlog the create event. */ if (mysql_bin_log.is_open() && (thd->query_length > 0)) { thd->clear_error(); @@ -362,41 +435,82 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) pthread_mutex_unlock(&LOCK_event_metadata); DBUG_RETURN(ret); - } -/* - The function exported to the world for alteration of events. +/** + Alter an event. - SYNOPSIS - Events::update_event() - thd [in] THD - parse_data [in] Event's data from parsing stage - rename_to [in] Set in case of RENAME TO. + @param[in,out] thd THD + @param[in] parse_data Event's data from parsing stage + @param[in] new_dbname A new schema name for the event. Set in the case of + ALTER EVENT RENAME, otherwise is NULL. + @param[in] new_name A new name for the event. Set in the case of + ALTER EVENT RENAME - RETURN VALUE - FALSE OK - TRUE Error + Parameter 'et' contains data about dbname and event name. + Parameter 'new_name' is the new name of the event, if not null + this means that RENAME TO was specified in the query + @sa Events::drop_event for the locking notes. - NOTES - et contains data about dbname and event name. - new_name is the new name of the event, if not null this means - that RENAME TO was specified in the query + @retval FALSE OK + @retval TRUE error (reported) */ bool -Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to) +Events::update_event(THD *thd, Event_parse_data *parse_data, + LEX_STRING *new_dbname, LEX_STRING *new_name) { int ret; Event_queue_element *new_element; + DBUG_ENTER("Events::update_event"); - LEX_STRING *new_dbname= rename_to ? &rename_to->m_db : NULL; - LEX_STRING *new_name= rename_to ? &rename_to->m_name : NULL; - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); + + /* + For consistency, implicit COMMIT should be the first thing in the + execution chain. + */ + if (end_active_trans(thd)) DBUG_RETURN(TRUE); + + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); + + if (parse_data->check_parse_data(thd) || parse_data->do_not_create) + DBUG_RETURN(TRUE); + + if (check_access(thd, EVENT_ACL, parse_data->dbname.str, 0, 0, 0, + is_schema_db(parse_data->dbname.str))) + DBUG_RETURN(TRUE); + + if (new_dbname) /* It's a rename */ + { + /* Check that the new and the old names differ. */ + if ( !sortcmp_lex_string(parse_data->dbname, *new_dbname, + system_charset_info) && + !sortcmp_lex_string(parse_data->name, *new_name, + system_charset_info)) + { + my_error(ER_EVENT_SAME_NAME, MYF(0), parse_data->name.str); + DBUG_RETURN(TRUE); + } + + /* + And the user has sufficient privileges to use the target database. + Do it before checking whether the database exists: we don't want + to tell the user that a database doesn't exist if they can not + access it. + */ + if (check_access(thd, EVENT_ACL, new_dbname->str, 0, 0, 0, + is_schema_db(new_dbname->str))) + DBUG_RETURN(TRUE); + + /* Check that the target database exists */ + if (check_db_dir_existence(new_dbname->str)) + { + my_error(ER_BAD_DB_ERROR, MYF(0), new_dbname->str); + DBUG_RETURN(TRUE); + } } /* @@ -409,7 +523,8 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to) pthread_mutex_lock(&LOCK_event_metadata); /* On error conditions my_error() is called so no need to handle here */ - if (!(ret= db_repository->update_event(thd, parse_data, new_dbname, new_name))) + if (!(ret= db_repository->update_event(thd, parse_data, + new_dbname, new_name))) { LEX_STRING dbname= new_dbname ? *new_dbname : parse_data->dbname; LEX_STRING name= new_name ? *new_name : parse_data->name; @@ -420,12 +535,20 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to) new_element))) { DBUG_ASSERT(ret == OP_LOAD_ERROR); - delete new_element; + delete new_element; } - else /* Binlog the alter event. */ + else { - event_queue->update_event(thd, parse_data->dbname, parse_data->name, - new_element); + /* + TODO: check if an update actually has inserted an entry + into the queue. + If not, and the element is ON COMPLETION NOT PRESERVE, delete + it right away. + */ + if (event_queue) + event_queue->update_event(thd, parse_data->dbname, parse_data->name, + new_element); + /* Binlog the alter event. */ if (mysql_bin_log.is_open() && (thd->query_length > 0)) { thd->clear_error(); @@ -440,20 +563,28 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to) } -/* +/** Drops an event - SYNOPSIS - Events::drop_event() - thd [in] THD - dbname [in] Event's schema - name [in] Event's name - if_exists [in] When set and the event does not exist => - warning onto the stack + @param[in,out] thd THD + @param[in] dbname Event's schema + @param[in] name Event's name + @param[in] if_exists When this is set and the event does not exist + a warning is pushed into the warning stack. + Otherwise the operation produces an error. - RETURN VALUE - FALSE OK - TRUE Error (reported) + @note Similarly to DROP PROCEDURE, we do not allow DROP EVENT + under LOCK TABLES mode, unless table mysql.event is locked. To + ensure that, we do not reset & backup the open tables state in + this function - if in LOCK TABLES or pre-locking mode, this will + lead to an error 'Table mysql.event is not locked with LOCK + TABLES' unless it _is_ locked. In pre-locked mode there is + another barrier - DROP EVENT commits the current transaction, + and COMMIT/ROLLBACK is not allowed in stored functions and + triggers. + + @retval FALSE OK + @retval TRUE Error (reported) */ bool @@ -461,14 +592,30 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) { int ret; DBUG_ENTER("Events::drop_event"); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } - /* - Turn off row binlogging of this statement and use statement-based so + /* + In MySQL, DDL must always commit: since mysql.* tables are + non-transactional, we must modify them outside a transaction + to not break atomicity. + But the second and more important reason to commit here + regardless whether we're actually changing mysql.event table + or not is replication: end_active_trans syncs the binary log, + and unless we run DDL in it's own transaction it may simply + never appear on the slave in case the outside transaction + rolls back. + */ + if (end_active_trans(thd)) + DBUG_RETURN(TRUE); + + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); + + if (check_access(thd, EVENT_ACL, dbname.str, 0, 0, 0, + is_schema_db(dbname.str))) + DBUG_RETURN(TRUE); + + /* + Turn off row binlogging of this statement and use statement-based so that all supporting tables are updated for DROP EVENT command. */ if (thd->current_stmt_binlog_row_based) @@ -478,7 +625,8 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) /* On error conditions my_error() is called so no need to handle here */ if (!(ret= db_repository->drop_event(thd, dbname, name, if_exists))) { - event_queue->drop_event(thd, dbname, name); + if (event_queue) + event_queue->drop_event(thd, dbname, name); /* Binlog the drop event. */ if (mysql_bin_log.is_open() && (thd->query_length > 0)) { @@ -492,30 +640,33 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) } -/* +/** Drops all events from a schema - SYNOPSIS - Events::drop_schema_events() - thd Thread - db ASCIIZ schema name + @note We allow to drop all events in a schema even if the + scheduler is disabled. This is to not produce any warnings + in case of DROP DATABASE and a disabled scheduler. + + @param[in,out] thd Thread + @param[in] db ASCIIZ schema name */ void Events::drop_schema_events(THD *thd, char *db) { LEX_STRING const db_lex= { db, strlen(db) }; - - DBUG_ENTER("Events::drop_schema_events"); + + DBUG_ENTER("Events::drop_schema_events"); DBUG_PRINT("enter", ("dropping events from %s", db)); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_VOID_RETURN; - } + + /* + sic: no check if the scheduler is disabled or system tables + are damaged, as intended. + */ pthread_mutex_lock(&LOCK_event_metadata); - event_queue->drop_schema_events(thd, db_lex); + if (event_queue) + event_queue->drop_schema_events(thd, db_lex); db_repository->drop_schema_events(thd, db_lex); pthread_mutex_unlock(&LOCK_event_metadata); @@ -523,115 +674,137 @@ Events::drop_schema_events(THD *thd, char *db) } -/* - SHOW CREATE EVENT +/** + A helper function to generate SHOW CREATE EVENT output from + a named event +*/ + +static bool +send_show_create_event(THD *thd, Event_timed *et, Protocol *protocol) +{ + char show_str_buf[10 * STRING_BUFFER_USUAL_SIZE]; + String show_str(show_str_buf, sizeof(show_str_buf), system_charset_info); + List field_list; + LEX_STRING sql_mode; + const String *tz_name; + + DBUG_ENTER("send_show_create_event"); + + show_str.length(0); + if (et->get_create_event(thd, &show_str)) + DBUG_RETURN(TRUE); + + field_list.push_back(new Item_empty_string("Event", NAME_CHAR_LEN)); + + if (sys_var_thd_sql_mode::symbolic_mode_representation(thd, et->sql_mode, + &sql_mode)) + DBUG_RETURN(TRUE); + + field_list.push_back(new Item_empty_string("sql_mode", sql_mode.length)); + + tz_name= et->time_zone->get_name(); + + field_list.push_back(new Item_empty_string("time_zone", + tz_name->length())); + + field_list.push_back(new Item_empty_string("Create Event", + show_str.length())); + + if (protocol->send_fields(&field_list, + Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) + DBUG_RETURN(TRUE); + + protocol->prepare_for_resend(); + + protocol->store(et->name.str, et->name.length, system_charset_info); + protocol->store(sql_mode.str, sql_mode.length, system_charset_info); + protocol->store(tz_name->ptr(), tz_name->length(), system_charset_info); + protocol->store(show_str.c_ptr(), show_str.length(), system_charset_info); + + if (protocol->write()) + DBUG_RETURN(TRUE); + + send_eof(thd); + + DBUG_RETURN(FALSE); +} + + +/** + Implement SHOW CREATE EVENT statement - SYNOPSIS - Events::show_create_event() thd Thread context spn The name of the event (db, name) - RETURN VALUE - FALSE OK - TRUE Error during writing to the wire + @retval FALSE OK + @retval TRUE error (reported) */ bool Events::show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name) { - CHARSET_INFO *scs= system_charset_info; - int ret; - Event_timed *et= new Event_timed(); + Open_tables_state open_tables_backup; + Event_timed et; + bool ret; DBUG_ENTER("Events::show_create_event"); DBUG_PRINT("enter", ("name: %s@%s", dbname.str, name.str)); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } - ret= db_repository->load_named_event(thd, dbname, name, et); + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); + + if (check_access(thd, EVENT_ACL, dbname.str, 0, 0, 0, + is_schema_db(dbname.str))) + DBUG_RETURN(TRUE); + + /* + We would like to allow SHOW CREATE EVENT under LOCK TABLES and + in pre-locked mode. mysql.event table is marked as a system table. + This flag reduces the set of its participation scenarios in LOCK TABLES + operation, and therefore an out-of-bound open of this table + for reading like the one below (sic, only for reading) is + more or less deadlock-free. For additional information about when a + deadlock can occur please refer to the description of 'system table' + flag. + */ + thd->reset_n_backup_open_tables_state(&open_tables_backup); + ret= db_repository->load_named_event(thd, dbname, name, &et); + thd->restore_backup_open_tables_state(&open_tables_backup); if (!ret) - { - Protocol *protocol= thd->protocol; - char show_str_buf[10 * STRING_BUFFER_USUAL_SIZE]; - String show_str(show_str_buf, sizeof(show_str_buf), scs); - List field_list; - byte *sql_mode_str; - ulong sql_mode_len=0; + ret= send_show_create_event(thd, &et, thd->protocol); - show_str.length(0); - show_str.set_charset(system_charset_info); - - if (et->get_create_event(thd, &show_str)) - goto err; - - field_list.push_back(new Item_empty_string("Event", NAME_LEN)); - - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, et->sql_mode, - &sql_mode_len); - - field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len)); - - const String *tz_name= et->time_zone->get_name(); - field_list.push_back(new Item_empty_string("time_zone", - tz_name->length())); - - field_list.push_back(new Item_empty_string("Create Event", - show_str.length())); - - if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | - Protocol::SEND_EOF)) - goto err; - - protocol->prepare_for_resend(); - protocol->store(et->name.str, et->name.length, scs); - - protocol->store((char*) sql_mode_str, sql_mode_len, scs); - - protocol->store((char*) tz_name->ptr(), tz_name->length(), scs); - - protocol->store(show_str.c_ptr(), show_str.length(), scs); - ret= protocol->write(); - send_eof(thd); - } - delete et; DBUG_RETURN(ret); -err: - delete et; - DBUG_RETURN(TRUE); } -/* - Proxy for Event_db_repository::fill_schema_events. - Callback for I_S from sql_show.cc +/** + Check access rights and fill INFORMATION_SCHEMA.events table. - SYNOPSIS - Events::fill_schema_events() - thd Thread context - tables The schema table + @param[in,out] thd Thread context + @param[in] table The temporary table to fill. cond Unused - RETURN VALUE - 0 OK - !0 Error + In MySQL INFORMATION_SCHEMA tables are temporary tables that are + created and filled on demand. In this function, we fill + INFORMATION_SCHEMA.events. It is a callback for I_S module, invoked from + sql_show.cc + + @return Has to be integer, as such is the requirement of the I_S API + @retval 0 success + @retval 1 an error, pushed into the error stack */ int Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */) { char *db= NULL; + int ret; + Open_tables_state open_tables_backup; DBUG_ENTER("Events::fill_schema_events"); - Events *myself= get_instance(); - if (unlikely(myself->check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } + + if (check_if_system_tables_error()) + DBUG_RETURN(1); /* If it's SHOW EVENTS then thd->lex->select_lex.db is guaranteed not to @@ -645,7 +818,17 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */) DBUG_RETURN(1); db= thd->lex->select_lex.db; } - DBUG_RETURN(myself->db_repository->fill_schema_events(thd, tables, db)); + /* + Reset and backup of the currently open tables in this thread + is a way to allow SELECTs from INFORMATION_SCHEMA.events under + LOCK TABLES and in pre-locked mode. See also + Events::show_create_event for additional comments. + */ + thd->reset_n_backup_open_tables_state(&open_tables_backup); + ret= db_repository->fill_schema_events(thd, tables, db); + thd->restore_backup_open_tables_state(&open_tables_backup); + + DBUG_RETURN(ret); } @@ -664,14 +847,17 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */) */ bool -Events::init() +Events::init(my_bool opt_noacl) { THD *thd; bool res= FALSE; + DBUG_ENTER("Events::init"); - if (opt_event_scheduler == Events::EVENTS_DISABLED) - DBUG_RETURN(FALSE); + /* Disable the scheduler if running with --skip-grant-tables */ + if (opt_noacl) + opt_event_scheduler= EVENTS_DISABLED; + /* We need a temporary THD during boot */ if (!(thd= new THD())) @@ -687,30 +873,67 @@ Events::init() thd->thread_stack= (char*) &thd; thd->store_globals(); - if (check_system_tables(thd)) + /* + We will need Event_db_repository anyway, even if the scheduler is + disabled - to perform events DDL. + */ + if (!(db_repository= new Event_db_repository)) { + res= TRUE; /* fatal error: request unireg_abort */ + goto end; + } + + /* + Since we allow event DDL even if the scheduler is disabled, + check the system tables, as we might need them. + */ + if (Event_db_repository::check_system_tables(thd)) + { + sql_print_error("Event Scheduler: An error occurred when initializing " + "system tables.%s", + opt_event_scheduler == EVENTS_DISABLED ? + "" : " Disabling the Event Scheduler."); + + /* Disable the scheduler since the system tables are not up to date */ + opt_event_scheduler= EVENTS_DISABLED; check_system_tables_error= TRUE; - sql_print_error("SCHEDULER: The system tables are damaged. " - "The scheduler subsystem will be unusable during this run."); - goto end; - } - check_system_tables_error= FALSE; - - if (event_queue->init_queue(thd) || load_events_from_db(thd)) - { - sql_print_error("SCHEDULER: Error while loading from disk."); goto end; } - scheduler->init_scheduler(event_queue); + /* + Was disabled explicitly from the command line, or because we're running + with --skip-grant-tables, or because we have no system tables. + */ + if (opt_event_scheduler == Events::EVENTS_DISABLED) + goto end; + DBUG_ASSERT(opt_event_scheduler == Events::EVENTS_ON || opt_event_scheduler == Events::EVENTS_OFF); - if (opt_event_scheduler == Events::EVENTS_ON) - res= scheduler->start(); - Event_worker_thread::init(this, db_repository); + if (!(event_queue= new Event_queue) || + !(scheduler= new Event_scheduler(event_queue))) + { + res= TRUE; /* fatal error: request unireg_abort */ + goto end; + } + + if (event_queue->init_queue(thd) || load_events_from_db(thd) || + opt_event_scheduler == EVENTS_ON && scheduler->start()) + { + sql_print_error("Event Scheduler: Error while loading from disk."); + res= TRUE; /* fatal error: request unireg_abort */ + goto end; + } + Event_worker_thread::init(db_repository); + end: + if (res) + { + delete db_repository; + delete event_queue; + delete scheduler; + } delete thd; /* Remember that we don't have a THD */ my_pthread_setspecific_ptr(THR_THD, NULL); @@ -733,19 +956,23 @@ void Events::deinit() { DBUG_ENTER("Events::deinit"); - if (likely(!check_system_tables_error)) - { - scheduler->stop(); - scheduler->deinit_scheduler(); - event_queue->deinit_queue(); + if (opt_event_scheduler != EVENTS_DISABLED) + { + delete scheduler; + scheduler= NULL; /* safety */ + delete event_queue; + event_queue= NULL; /* safety */ } + delete db_repository; + db_repository= NULL; /* safety */ + DBUG_VOID_RETURN; } -/* +/** Inits Events mutexes SYNOPSIS @@ -757,8 +984,6 @@ void Events::init_mutexes() { pthread_mutex_init(&LOCK_event_metadata, MY_MUTEX_INIT_FAST); - event_queue->init_mutexes(); - scheduler->init_mutexes(); } @@ -772,8 +997,6 @@ Events::init_mutexes() void Events::destroy_mutexes() { - event_queue->deinit_mutexes(); - scheduler->deinit_mutexes(); pthread_mutex_destroy(&LOCK_event_metadata); } @@ -796,282 +1019,163 @@ Events::dump_internal_status() puts("LLA = Last Locked At LUA = Last Unlocked At"); puts("WOC = Waiting On Condition DL = Data Locked"); - scheduler->dump_internal_status(); - event_queue->dump_internal_status(); + pthread_mutex_lock(&LOCK_event_metadata); + if (opt_event_scheduler == EVENTS_DISABLED) + puts("The Event Scheduler is disabled"); + else + { + scheduler->dump_internal_status(); + event_queue->dump_internal_status(); + } + pthread_mutex_unlock(&LOCK_event_metadata); DBUG_VOID_RETURN; } -/* - Starts execution of events by the scheduler +/** + Starts or stops the event scheduler thread. - SYNOPSIS - Events::start_execution_of_events() - - RETURN VALUE - FALSE OK - TRUE Error + @retval FALSE success + @retval TRUE error */ bool -Events::start_execution_of_events() +Events::switch_event_scheduler_state(enum_opt_event_scheduler new_state) { - DBUG_ENTER("Events::start_execution_of_events"); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } - DBUG_RETURN(scheduler->start()); -} - - -/* - Stops execution of events by the scheduler. - Already running events will not be stopped. If the user needs - them stopped manual intervention is needed. - - SYNOPSIS - Events::stop_execution_of_events() - - RETURN VALUE - FALSE OK - TRUE Error -*/ - -bool -Events::stop_execution_of_events() -{ - DBUG_ENTER("Events::stop_execution_of_events"); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } - DBUG_RETURN(scheduler->stop()); -} - - -/* - Checks whether the scheduler is running or not. - - SYNOPSIS - Events::is_started() - - RETURN VALUE - TRUE Yes - FALSE No -*/ - -bool -Events::is_execution_of_events_started() -{ - DBUG_ENTER("Events::is_execution_of_events_started"); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(FALSE); - } - DBUG_RETURN(scheduler->is_running()); -} - - - -/* - Opens mysql.db and mysql.user and checks whether: - 1. mysql.db has column Event_priv at column 20 (0 based); - 2. mysql.user has column Event_priv at column 29 (0 based); - - SYNOPSIS - Events::check_system_tables() - thd Thread - - RETURN VALUE - FALSE OK - TRUE Error -*/ - -bool -Events::check_system_tables(THD *thd) -{ - TABLE_LIST tables; - Open_tables_state backup; bool ret= FALSE; - DBUG_ENTER("Events::check_system_tables"); - DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); + DBUG_ENTER("Events::switch_event_scheduler_state"); - thd->reset_n_backup_open_tables_state(&backup); + DBUG_ASSERT(new_state == Events::EVENTS_ON || + new_state == Events::EVENTS_OFF); - bzero((char*) &tables, sizeof(tables)); - tables.db= (char*) "mysql"; - tables.table_name= tables.alias= (char*) "db"; - tables.lock_type= TL_READ; + /* + If the scheduler was disabled because there are no/bad + system tables, produce a more meaningful error message + than ER_OPTION_PREVENTS_STATEMENT + */ + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); - if ((ret= simple_open_n_lock_tables(thd, &tables))) + pthread_mutex_lock(&LOCK_event_metadata); + + if (opt_event_scheduler == EVENTS_DISABLED) { - sql_print_error("SCHEDULER: Cannot open mysql.db"); + my_error(ER_OPTION_PREVENTS_STATEMENT, + MYF(0), "--event-scheduler=DISABLED or --skip-grant-tables"); ret= TRUE; + goto end; } - ret= table_check_intact(tables.table, MYSQL_DB_FIELD_COUNT, - mysql_db_table_fields, &mysql_db_table_last_check, - ER_CANNOT_LOAD_FROM_TABLE); - close_thread_tables(thd); - bzero((char*) &tables, sizeof(tables)); - tables.db= (char*) "mysql"; - tables.table_name= tables.alias= (char*) "user"; - tables.lock_type= TL_READ; - - if (simple_open_n_lock_tables(thd, &tables)) - { - sql_print_error("SCHEDULER: Cannot open mysql.user"); - ret= TRUE; - } + if (new_state == EVENTS_ON) + ret= scheduler->start(); else + ret= scheduler->stop(); + + if (ret) { - if (tables.table->s->fields < 29 || - strncmp(tables.table->field[29]->field_name, - STRING_WITH_LEN("Event_priv"))) - { - sql_print_error("mysql.user has no `Event_priv` column at position %d", - 29); - ret= TRUE; - } - close_thread_tables(thd); + my_error(ER_EVENT_SET_VAR_ERROR, MYF(0)); + goto end; } - thd->restore_backup_open_tables_state(&backup); + opt_event_scheduler= new_state; +end: + pthread_mutex_unlock(&LOCK_event_metadata); DBUG_RETURN(ret); } -/* - Loads all ENABLED events from mysql.event into the prioritized - queue. Called during scheduler main thread initialization. Compiles - the events. Creates Event_queue_element instances for every ENABLED event - from mysql.event. +/** + Loads all ENABLED events from mysql.event into a prioritized + queue. - SYNOPSIS - Events::load_events_from_db() - thd Thread context. Used for memory allocation in some cases. + This function is called during the server start up. It reads + every event, computes the next execution time, and if the event + needs execution, adds it to a prioritized queue. Otherwise, if + ON COMPLETION DROP is specified, the event is automatically + removed from the table. - RETURN VALUE - 0 OK - !0 Error (EVEX_OPEN_TABLE_FAILED, EVEX_MICROSECOND_UNSUP, - EVEX_COMPILE_ERROR) - in all these cases mysql.event was - tampered. + @param[in,out] thd Thread context. Used for memory allocation in some cases. - NOTES - Reports the error to the console + @retval FALSE success + @retval TRUE error, the load is aborted + + @note Reports the error to the console */ -int +bool Events::load_events_from_db(THD *thd) { TABLE *table; READ_RECORD read_record_info; - int ret= -1; + bool ret= TRUE; uint count= 0; - bool clean_the_queue= TRUE; DBUG_ENTER("Events::load_events_from_db"); DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); - if ((ret= db_repository->open_event_table(thd, TL_READ, &table))) + if (db_repository->open_event_table(thd, TL_WRITE, &table)) { - sql_print_error("SCHEDULER: Table mysql.event is damaged. Can not open"); - DBUG_RETURN(EVEX_OPEN_TABLE_FAILED); + sql_print_error("Event Scheduler: Failed to open table mysql.event"); + DBUG_RETURN(TRUE); } - init_read_record(&read_record_info, thd, table ,NULL,1,0); + init_read_record(&read_record_info, thd, table, NULL, 0, 1); while (!(read_record_info.read_record(&read_record_info))) { Event_queue_element *et; + bool created; + bool drop_on_completion; + if (!(et= new Event_queue_element)) - { - DBUG_PRINT("info", ("Out of memory")); - break; - } + goto end; + DBUG_PRINT("info", ("Loading event from row.")); - if ((ret= et->load_from_row(thd, table))) - { - sql_print_error("SCHEDULER: Error while loading from mysql.event. " - "Table probably corrupted"); - break; - } - if (et->status != Event_queue_element::ENABLED) - { - DBUG_PRINT("info",("%s is disabled",et->name.str)); - delete et; - continue; - } - - /* let's find when to be executed */ - if (et->compute_next_execution_time()) - { - sql_print_error("SCHEDULER: Error while computing execution time of %s.%s." - " Skipping", et->dbname.str, et->name.str); - continue; - } - - { - Event_job_data temp_job_data; - DBUG_PRINT("info", ("Event %s loaded from row. ", et->name.str)); - - temp_job_data.load_from_row(thd, table); - - /* - We load only on scheduler root just to check whether the body - compiles. - */ - switch (ret= temp_job_data.compile(thd, thd->mem_root)) { - case EVEX_MICROSECOND_UNSUP: - sql_print_error("SCHEDULER: mysql.event is tampered. MICROSECOND is not " - "supported but found in mysql.event"); - break; - case EVEX_COMPILE_ERROR: - sql_print_error("SCHEDULER: Error while compiling %s.%s. Aborting load", - et->dbname.str, et->name.str); - break; - default: - break; - } - thd->end_statement(); - thd->cleanup_after_query(); - } - if (ret) + if (et->load_from_row(thd, table)) { + sql_print_error("Event Scheduler: " + "Error while loading events from mysql.event. " + "The table probably contains bad data or is corrupted"); delete et; goto end; } + drop_on_completion= (et->on_completion == + Event_queue_element::ON_COMPLETION_DROP); - DBUG_PRINT("load_events_from_db", ("Adding 0x%lx to the exec list.", - (long) et)); - event_queue->create_event(thd, et); - count++; + + if (event_queue->create_event(thd, et, &created)) + { + /* Out of memory */ + delete et; + goto end; + } + if (created) + count++; + else if (drop_on_completion) + { + /* + If not created, a stale event - drop if immediately if + ON COMPLETION NOT PRESERVE + */ + int rc= table->file->ha_delete_row(table->record[0]); + if (rc) + { + table->file->print_error(rc, MYF(0)); + goto end; + } + } } - clean_the_queue= FALSE; + sql_print_information("Event Scheduler: Loaded %d event%s", + count, (count == 1) ? "" : "s"); + ret= FALSE; + end: end_read_record(&read_record_info); - if (clean_the_queue) - { - event_queue->empty_queue(); - ret= -1; - } - else - { - ret= 0; - sql_print_information("SCHEDULER: Loaded %d event%s", count, - (count == 1)?"":"s"); - } - close_thread_tables(thd); - DBUG_PRINT("info", ("Status code %d. Loaded %d event(s)", ret, count)); DBUG_RETURN(ret); } diff --git a/sql/events.h b/sql/events.h index 35ee3c569d0..1b99b072fd7 100644 --- a/sql/events.h +++ b/sql/events.h @@ -15,11 +15,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -class sp_name; +/* + @file + A public interface of Events Scheduler module. +*/ + class Event_parse_data; class Event_db_repository; class Event_queue; -class Event_queue_element; class Event_scheduler; /* Return codes */ @@ -38,6 +41,26 @@ enum enum_events_error_code int sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs); +/** + @class Events -- a facade to the functionality of the Event Scheduler. + + Every public operation against the scheduler has to be executed via the + interface provided by a static method of this class. No instance of this + class is ever created and it has no non-static data members. + + The life cycle of the Events module is the following: + + At server start up: + set_opt_event_scheduler() -> init_mutexes() -> init() + When the server is running: + create_event(), drop_event(), start_or_stop_event_scheduler(), etc + At shutdown: + deinit(), destroy_mutexes(). + + The peculiar initialization and shutdown cycle is an adaptation to the + outside server startup/shutdown framework and mimics the rest of MySQL + subsystems (ACL, time zone tables, etc). +*/ class Events { @@ -50,47 +73,48 @@ public: EVENTS_DISABLED= 4 }; - static enum_opt_event_scheduler opt_event_scheduler; - static TYPELIB opt_typelib; - static TYPELIB var_typelib; + /* Possible values of @@event_scheduler variable */ + static const TYPELIB var_typelib; - bool - init(); + static bool + set_opt_event_scheduler(char *argument); - void + static const char * + get_opt_event_scheduler_str(); + + /* A hack needed for Event_queue_element */ + static Event_db_repository * + get_db_repository() { return db_repository; } + + static bool + init(my_bool opt_noacl); + + static void deinit(); - void + static void init_mutexes(); - void + static void destroy_mutexes(); - bool - start_execution_of_events(); + static bool + switch_event_scheduler_state(enum enum_opt_event_scheduler new_state); - bool - stop_execution_of_events(); - - bool - is_execution_of_events_started(); - - static Events * - get_instance(); - - bool + static bool create_event(THD *thd, Event_parse_data *parse_data, bool if_exists); - bool - update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to); + static bool + update_event(THD *thd, Event_parse_data *parse_data, + LEX_STRING *new_dbname, LEX_STRING *new_name); - bool + static bool drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists); - void + static void drop_schema_events(THD *thd, char *db); - bool + static bool show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name); /* Needed for both SHOW CREATE EVENT and INFORMATION_SCHEMA */ @@ -101,31 +125,28 @@ public: static int fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */); - void + static void dump_internal_status(); private: - bool - check_system_tables(THD *thd); + static bool check_if_system_tables_error(); - int + static bool load_events_from_db(THD *thd); - /* Singleton DP is used */ - Events(); - ~Events(){} - - /* Singleton instance */ - static Events singleton; - - Event_queue *event_queue; - Event_scheduler *scheduler; - Event_db_repository *db_repository; - - pthread_mutex_t LOCK_event_metadata; - - bool check_system_tables_error; +private: + /* Command line option names */ + static const TYPELIB opt_typelib; + static pthread_mutex_t LOCK_event_metadata; + static Event_queue *event_queue; + static Event_scheduler *scheduler; + static Event_db_repository *db_repository; + /* Current state of Event Scheduler */ + static enum enum_opt_event_scheduler opt_event_scheduler; + /* Set to TRUE if an error at start up */ + static bool check_system_tables_error; +private: /* Prevent use of these */ Events(const Events &); void operator=(Events &); diff --git a/sql/field.cc b/sql/field.cc index 250a9e3c1b9..a48a3ff7bcd 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -967,6 +967,31 @@ static Item_result field_types_result_type [FIELDTYPE_NUM]= }; +/* + Test if the given string contains important data: + not spaces for character string, + or any data for binary string. + + SYNOPSIS + test_if_important_data() + cs Character set + str String to test + strend String end + + RETURN + FALSE - If string does not have important data + TRUE - If string has some important data +*/ + +static bool +test_if_important_data(CHARSET_INFO *cs, const char *str, const char *strend) +{ + if (cs != &my_charset_bin) + str+= cs->cset->scan(cs, str, strend, MY_SEQ_SPACES); + return (str < strend); +} + + /* Detect Item_result by given field type of UNION merge result @@ -1055,65 +1080,114 @@ void Field_num::prepend_zeros(String *value) } /* - Test if given number is a int (or a fixed format float with .000) + Test if given number is a int. SYNOPSIS - test_if_int() + Field_num::check_int + cs Character set str String to test end Pointer to char after last used digit - cs Character set + length String length + error Error returned by strntoull10rnd() - NOTES - This is called after one has called my_strntol() or similar function. - This is only used to give warnings in ALTER TABLE or LOAD DATA... - - TODO - Make this multi-byte-character safe + NOTE + This is called after one has called strntoull10rnd() function. RETURN - 0 OK - 1 error. A warning is pushed if field_name != 0 + 0 ok + 1 error: empty string or wrong integer. + 2 error: garbage at the end of string. */ -bool Field::check_int(const char *str, int length, const char *int_end, - CHARSET_INFO *cs) +int Field_num::check_int(CHARSET_INFO *cs, const char *str, int length, + const char *int_end, int error) { - const char *end; - if (str == int_end) + /* Test if we get an empty string or wrong integer */ + if (str == int_end || error == MY_ERRNO_EDOM) { char buff[128]; - String tmp(buff,(uint32) sizeof(buff), system_charset_info); + String tmp(buff, (uint32) sizeof(buff), system_charset_info); tmp.copy(str, length, system_charset_info); push_warning_printf(table->in_use, MYSQL_ERROR::WARN_LEVEL_WARN, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD, ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD), "integer", tmp.c_ptr(), field_name, (ulong) table->in_use->row_count); - return 1; // Empty string + return 1; } - end= str+length; - if ((str= int_end) == end) - return 0; // OK; All digits was used - - /* Allow end .0000 */ - if (*str == '.') + /* Test if we have garbage at the end of the given string. */ + if (test_if_important_data(cs, int_end, str + length)) { - for (str++ ; str != end && *str == '0'; str++) - ; - } - /* Allow end space */ - for ( ; str != end ; str++) - { - if (!my_isspace(cs,*str)) - { - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1); - return 1; - } + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1); + return 2; } return 0; } +/* + Conver a string to an integer then check bounds. + + SYNOPSIS + Field_num::get_int + cs Character set + from String to convert + len Length of the string + rnd OUT longlong value + unsigned_max max unsigned value + signed_min min signed value + signed_max max signed value + + DESCRIPTION + The function calls strntoull10rnd() to get an integer value then + check bounds and errors returned. In case of any error a warning + is raised. + + RETURN + 0 ok + 1 error +*/ + +bool Field_num::get_int(CHARSET_INFO *cs, const char *from, uint len, + longlong *rnd, ulonglong unsigned_max, + longlong signed_min, longlong signed_max) +{ + char *end; + int error; + + *rnd= (longlong) cs->cset->strntoull10rnd(cs, from, len, unsigned_flag, &end, + &error); + if (unsigned_flag) + { + + if (((ulonglong) *rnd > unsigned_max) && (*rnd= (longlong) unsigned_max) || + error == MY_ERRNO_ERANGE) + { + goto out_of_range; + } + } + else + { + if (*rnd < signed_min) + { + *rnd= signed_min; + goto out_of_range; + } + else if (*rnd > signed_max) + { + *rnd= signed_max; + goto out_of_range; + } + } + if (table->in_use->count_cuted_fields && check_int(cs, from, len, end, error)) + return 1; + return 0; + +out_of_range: + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); + return 1; +} + /* Process decimal library return codes and issue warnings for overflow and truncation. @@ -2569,45 +2643,11 @@ uint Field_new_decimal::is_equal(create_field *new_field) int Field_tiny::store(const char *from,uint len,CHARSET_INFO *cs) { ASSERT_COLUMN_MARKED_FOR_WRITE; - char *end; int error; - - if (unsigned_flag) - { - ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end, &error); - if (error == MY_ERRNO_ERANGE || tmp > 255) - { - set_if_smaller(tmp, 255); - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - ptr[0]= (char) tmp; - } - else - { - longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (tmp < -128) - { - tmp= -128; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (tmp >= 128) - { - tmp= 127; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - ptr[0]= (char) tmp; - } + longlong rnd; + + error= get_int(cs, from, len, &rnd, 255, -128, 127); + ptr[0]= unsigned_flag ? (char) (ulonglong) rnd : (char) rnd; return error; } @@ -2778,59 +2818,20 @@ void Field_tiny::sql_type(String &res) const int Field_short::store(const char *from,uint len,CHARSET_INFO *cs) { ASSERT_COLUMN_MARKED_FOR_WRITE; - char *end; + int store_tmp; int error; - - if (unsigned_flag) - { - ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end, &error); - if (error == MY_ERRNO_ERANGE || tmp > UINT_MAX16) - { - set_if_smaller(tmp, UINT_MAX16); - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; + longlong rnd; + + error= get_int(cs, from, len, &rnd, UINT_MAX16, INT_MIN16, INT_MAX16); + store_tmp= unsigned_flag ? (int) (ulonglong) rnd : (int) rnd; #ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) - { - int2store(ptr,tmp); - } - else -#endif - shortstore(ptr,(short) tmp); + if (table->s->db_low_byte_first) + { + int2store(ptr, store_tmp); } else - { - longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (tmp < INT_MIN16) - { - tmp= INT_MIN16; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (tmp > INT_MAX16) - { - tmp=INT_MAX16; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; -#ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) - { - int2store(ptr,tmp); - } - else #endif - shortstore(ptr,(short) tmp); - } + shortstore(ptr, (short) store_tmp); return error; } @@ -3064,45 +3065,13 @@ void Field_short::sql_type(String &res) const int Field_medium::store(const char *from,uint len,CHARSET_INFO *cs) { ASSERT_COLUMN_MARKED_FOR_WRITE; - char *end; + int store_tmp; int error; - - if (unsigned_flag) - { - ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end, &error); - if (error == MY_ERRNO_ERANGE || tmp > UINT_MAX24) - { - set_if_smaller(tmp, UINT_MAX24); - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - int3store(ptr,tmp); - } - else - { - longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (tmp < INT_MIN24) - { - tmp= INT_MIN24; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (tmp > INT_MAX24) - { - tmp=INT_MAX24; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - int3store(ptr,tmp); - } + longlong rnd; + + error= get_int(cs, from, len, &rnd, UINT_MAX24, INT_MIN24, INT_MAX24); + store_tmp= unsigned_flag ? (int) (ulonglong) rnd : (int) rnd; + int3store(ptr, store_tmp); return error; } @@ -3288,45 +3257,10 @@ int Field_long::store(const char *from,uint len,CHARSET_INFO *cs) ASSERT_COLUMN_MARKED_FOR_WRITE; long store_tmp; int error; - char *end; - - if (unsigned_flag) - { - ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end, &error); - if (error == MY_ERRNO_ERANGE || tmp > (ulonglong) UINT_MAX32) - { - set_if_smaller(tmp, (ulonglong) UINT_MAX32); - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - store_tmp= (long) tmp; - } - else - { - longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (tmp < INT_MIN32) - { - tmp= INT_MIN32; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (tmp > INT_MAX32) - { - tmp=INT_MAX32; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - store_tmp= (long) tmp; - } - + longlong rnd; + + error= get_int(cs, from, len, &rnd, UINT_MAX32, INT_MIN32, INT_MAX32); + store_tmp= unsigned_flag ? (long) (ulonglong) rnd : (long) rnd; #ifdef WORDS_BIGENDIAN if (table->s->db_low_byte_first) { @@ -3578,7 +3512,8 @@ int Field_longlong::store(const char *from,uint len,CHARSET_INFO *cs) set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); error= 1; } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) + else if (table->in_use->count_cuted_fields && + check_int(cs, from, len, end, error)) error= 1; else error= 0; @@ -5116,16 +5051,25 @@ int Field_year::store(const char *from, uint len,CHARSET_INFO *cs) ASSERT_COLUMN_MARKED_FOR_WRITE; char *end; int error; - long nr= my_strntol(cs, from, len, 10, &end, &error); + longlong nr= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (nr < 0 || nr >= 100 && nr <= 1900 || nr > 2155 || error) + if (nr < 0 || nr >= 100 && nr <= 1900 || nr > 2155 || + error == MY_ERRNO_ERANGE) { *ptr=0; set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); return 1; } - if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) + if (table->in_use->count_cuted_fields && + (error= check_int(cs, from, len, end, error))) + { + if (error == 1) /* empty or incorrect string */ + { + *ptr= 0; + return 1; + } error= 1; + } if (nr != 0 || len != 4) { @@ -6034,31 +5978,6 @@ report_data_too_long(Field_str *field) } -/* - Test if the given string contains important data: - not spaces for character string, - or any data for binary string. - - SYNOPSIS - test_if_important_data() - cs Character set - str String to test - strend String end - - RETURN - FALSE - If string does not have important data - TRUE - If string has some important data -*/ - -static bool -test_if_important_data(CHARSET_INFO *cs, const char *str, const char *strend) -{ - if (cs != &my_charset_bin) - str+= cs->cset->scan(cs, str, strend, MY_SEQ_SPACES); - return (str < strend); -} - - /* Copy a string and fill with space */ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs) @@ -8981,11 +8900,6 @@ bool create_field::init(THD *thd, char *fld_name, enum_field_types fld_type, break; case MYSQL_TYPE_SET: { - if (fld_interval_list->elements > sizeof(longlong)*8) - { - my_error(ER_TOO_BIG_SET, MYF(0), fld_name); /* purecov: inspected */ - DBUG_RETURN(TRUE); - } pack_length= get_set_pack_length(fld_interval_list->elements); List_iterator it(*fld_interval_list); diff --git a/sql/field.h b/sql/field.h index b2169dac5b6..3d1ac7528c1 100644 --- a/sql/field.h +++ b/sql/field.h @@ -358,8 +358,6 @@ public: virtual void set_derivation(enum Derivation derivation_arg) { } bool set_warning(MYSQL_ERROR::enum_warning_level, unsigned int code, int cuted_increment); - bool check_int(const char *str, int length, const char *int_end, - CHARSET_INFO *cs); void set_datetime_warning(MYSQL_ERROR::enum_warning_level, uint code, const char *str, uint str_len, timestamp_type ts_type, int cuted_increment); @@ -445,6 +443,11 @@ public: int store_decimal(const my_decimal *); my_decimal *val_decimal(my_decimal *); uint is_equal(create_field *new_field); + int check_int(CHARSET_INFO *cs, const char *str, int length, + const char *int_end, int error); + bool get_int(CHARSET_INFO *cs, const char *from, uint len, + longlong *rnd, ulonglong unsigned_max, + longlong signed_min, longlong signed_max); }; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 25d68968b55..d12f94c6967 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2999,8 +2999,13 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data) if (thd->slave_thread) op->setAnyValue(thd->server_id); - // Execute update operation - if (!cursor && execute_no_commit(this,trans,FALSE) != 0) { + /* + Execute update operation if we are not doing a scan for update + and there exist UPDATE AFTER triggers + */ + + if ((!cursor || m_update_cannot_batch) && + execute_no_commit(this,trans,false) != 0) { no_uncommitted_rows_execute_failure(); DBUG_RETURN(ndb_err(trans)); } @@ -3057,7 +3062,7 @@ int ha_ndbcluster::delete_row(const byte *record) if (thd->slave_thread) ((NdbOperation *)trans->getLastDefinedOperation())->setAnyValue(thd->server_id); - if (!m_primary_key_update) + if (!(m_primary_key_update || m_delete_cannot_batch)) // If deleting from cursor, NoCommit will be handled in next_result DBUG_RETURN(0); } @@ -3121,11 +3126,22 @@ void ndb_unpack_record(TABLE *table, NdbValue *value, my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set); DBUG_ENTER("ndb_unpack_record"); - // Set null flag(s) - bzero(buf, table->s->null_bytes); + /* + Set the filler bits of the null byte, since they are + not touched in the code below. + + The filler bits are the MSBs in the last null byte + */ + if (table->s->null_bytes > 0) + buf[table->s->null_bytes - 1]|= 256U - (1U << + table->s->last_null_bit_pos); + /* + Set null flag(s) + */ for ( ; field; p_field++, value++, field= *p_field) { + field->set_notnull(row_offset); if ((*value).ptr) { if (!(field->flags & BLOB_FLAG)) @@ -3135,7 +3151,7 @@ void ndb_unpack_record(TABLE *table, NdbValue *value, { if (is_null > 0) { - DBUG_PRINT("info",("[%u] NULL", + DBUG_PRINT("info",("[%u] NULL", (*value).rec->getColumn()->getColumnNo())); field->set_null(row_offset); } @@ -3898,6 +3914,14 @@ int ha_ndbcluster::extra(enum ha_extra_function operation) DBUG_PRINT("info", ("Turning OFF use of write instead of insert")); m_use_write= FALSE; break; + case HA_EXTRA_DELETE_CANNOT_BATCH: + DBUG_PRINT("info", ("HA_EXTRA_DELETE_CANNOT_BATCH")); + m_delete_cannot_batch= TRUE; + break; + case HA_EXTRA_UPDATE_CANNOT_BATCH: + DBUG_PRINT("info", ("HA_EXTRA_UPDATE_CANNOT_BATCH")); + m_update_cannot_batch= TRUE; + break; default: break; } @@ -3922,6 +3946,8 @@ int ha_ndbcluster::reset() m_ignore_dup_key= FALSE; m_use_write= FALSE; m_ignore_no_key= FALSE; + m_delete_cannot_batch= FALSE; + m_update_cannot_batch= FALSE; DBUG_RETURN(0); } @@ -4140,6 +4166,8 @@ THR_LOCK_DATA **ha_ndbcluster::store_lock(THD *thd, extern MASTER_INFO *active_mi; static int ndbcluster_update_apply_status(THD *thd, int do_update) { + return 0; + Thd_ndb *thd_ndb= get_thd_ndb(thd); Ndb *ndb= thd_ndb->ndb; NDBDICT *dict= ndb->getDictionary(); @@ -4440,7 +4468,9 @@ static int ndbcluster_commit(handlerton *hton, THD *thd, bool all) DBUG_PRINT("transaction",("%s", trans == thd_ndb->stmt ? "stmt" : "all")); - DBUG_ASSERT(ndb && trans); + DBUG_ASSERT(ndb); + if (trans == NULL) + DBUG_RETURN(0); #ifdef HAVE_NDB_BINLOG if (thd->slave_thread) @@ -5918,6 +5948,8 @@ ha_ndbcluster::ha_ndbcluster(handlerton *hton, TABLE_SHARE *table_arg): m_bulk_insert_rows((ha_rows) 1024), m_rows_changed((ha_rows) 0), m_bulk_insert_not_flushed(FALSE), + m_delete_cannot_batch(FALSE), + m_update_cannot_batch(FALSE), m_ops_pending(0), m_skip_auto_increment(TRUE), m_blobs_pending(0), @@ -6442,7 +6474,7 @@ int ndb_create_table_from_engine(THD *thd, const char *db, LEX *old_lex= thd->lex, newlex; thd->lex= &newlex; newlex.current_select= NULL; - lex_start(thd, (const uchar*) "", 0); + lex_start(thd, "", 0); int res= ha_create_table_from_engine(thd, db, table_name); thd->lex= old_lex; return res; @@ -10768,6 +10800,36 @@ bool ha_ndbcluster::check_if_incompatible_data(HA_CREATE_INFO *create_info, if (field->flags & FIELD_IN_ADD_INDEX) ai=1; } + + char tablespace_name[FN_LEN]; + if (get_tablespace_name(current_thd, tablespace_name, FN_LEN)) + { + if (create_info->tablespace) + { + if (strcmp(create_info->tablespace, tablespace_name)) + { + DBUG_PRINT("info", ("storage media is changed, old tablespace=%s, new tablespace=%s", + tablespace_name, create_info->tablespace)); + DBUG_RETURN(COMPATIBLE_DATA_NO); + } + } + else + { + DBUG_PRINT("info", ("storage media is changed, old is DISK and tablespace=%s, new is MEM", + tablespace_name)); + DBUG_RETURN(COMPATIBLE_DATA_NO); + } + } + else + { + if (create_info->storage_media != HA_SM_MEMORY) + { + DBUG_PRINT("info", ("storage media is changed, old is MEM, new is DISK and tablespace=%s", + create_info->tablespace)); + DBUG_RETURN(COMPATIBLE_DATA_NO); + } + } + if (table_changes != IS_EQUAL_YES) DBUG_RETURN(COMPATIBLE_DATA_NO); diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index 98f6efe15d8..fe79135a47d 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -964,6 +964,8 @@ private: ha_rows m_bulk_insert_rows; ha_rows m_rows_changed; bool m_bulk_insert_not_flushed; + bool m_delete_cannot_batch; + bool m_update_cannot_batch; ha_rows m_ops_pending; bool m_skip_auto_increment; bool m_blobs_pending; diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index d1c2ad15894..1c5db73ef6e 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -2273,9 +2273,11 @@ int ndb_add_ndb_binlog_index(THD *thd, void *_row) break; } - // Set all fields non-null. - if(ndb_binlog_index->s->null_bytes > 0) - bzero(ndb_binlog_index->record[0], ndb_binlog_index->s->null_bytes); + /* + Intialize ndb_binlog_index->record[0] + */ + empty_record(ndb_binlog_index); + ndb_binlog_index->field[0]->store(row.master_log_pos); ndb_binlog_index->field[1]->store(row.master_log_file, strlen(row.master_log_file), @@ -3909,9 +3911,11 @@ restart: IF_DBUG(int ret=) trans.use_table(::server_id, tbl); DBUG_ASSERT(ret == 0); - // Set all fields non-null. - if(table->s->null_bytes > 0) - bzero(table->record[0], table->s->null_bytes); + /* + Intialize table->record[0] + */ + empty_record(table); + table->field[0]->store((longlong)::server_id); table->field[1]->store((longlong)gci); table->field[2]->store("", 0, &my_charset_bin); diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index d3979fa0718..3c25dcd202f 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1781,7 +1781,8 @@ int ha_partition::set_up_table_before_create(TABLE *table, } table->s->max_rows= part_elem->part_max_rows; table->s->min_rows= part_elem->part_min_rows; - partition_name= strrchr(partition_name_with_path, FN_LIBCHAR); + /* Here we have unified path so should always look for '/', not FN_LIBCHAR */ + partition_name= strrchr(partition_name_with_path, '/'); if ((part_elem->index_file_name && (error= append_file_to_dir(thd, (const char**)&part_elem->index_file_name, diff --git a/sql/handler.h b/sql/handler.h index 5c42dc670ee..cfa86358fa1 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1472,6 +1472,17 @@ public: virtual void free_foreign_key_create_info(char* str) {} /* The following can be called without an open handler */ virtual const char *table_type() const =0; + /* + If frm_error() is called then we will use this to find out what file + extentions exist for the storage engine. This is also used by the default + rename_table and delete_table method in handler.cc. + + For engines that have two file name extentions (separate meta/index file + and data file), the order of elements is relevant. First element of engine + file name extentions array should be meta/index file extention. Second + element - data file extention. This order is assumed by + prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued. + */ virtual const char **bas_ext() const =0; virtual int get_default_no_partitions(HA_CREATE_INFO *info) { return 1;} diff --git a/sql/item.h b/sql/item.h index bf662b98732..429a1d33041 100644 --- a/sql/item.h +++ b/sql/item.h @@ -735,12 +735,11 @@ public: virtual bool get_date_result(TIME *ltime,uint fuzzydate) { return get_date(ltime,fuzzydate); } /* - This function is used only in Item_func_isnull/Item_func_isnotnull - (implementations of IS NULL/IS NOT NULL clauses). Item_func_is{not}null - calls this method instead of one of val/result*() methods, which - normally will set null_value. This allows to determine nullness of - a complex expression without fully evaluating it. - Any new item which can be NULL must implement this call. + The method allows to determine nullness of a complex expression + without fully evaluating it, instead of calling val/result*() then + checking null_value. Used in Item_func_isnull/Item_func_isnotnull + and Item_sum_count/Item_sum_count_distinct. + Any new item which can be NULL must implement this method. */ virtual bool is_null() { return 0; } diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index ffa6b4caf2a..36326b46be6 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1127,6 +1127,26 @@ longlong Item_func_strcmp::val_int() } +bool Item_func_opt_neg::eq(const Item *item, bool binary_cmp) const +{ + /* Assume we don't have rtti */ + if (this == item) + return 1; + if (item->type() != FUNC_ITEM) + return 0; + Item_func *item_func=(Item_func*) item; + if (arg_count != item_func->arg_count || + functype() != item_func->functype()) + return 0; + if (negated != ((Item_func_opt_neg *) item_func)->negated) + return 0; + for (uint i=0; i < arg_count ; i++) + if (!args[i]->eq(item_func->arguments()[i], binary_cmp)) + return 0; + return 1; +} + + void Item_func_interval::fix_length_and_dec() { use_decimal_comparison= ((row->element_index(0)->result_type() == diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index edc905d50ff..d6fc1e3dda0 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -563,6 +563,7 @@ public: negated= !negated; return this; } + bool eq(const Item *item, bool binary_cmp) const; bool subst_argument_checker(byte **arg) { return TRUE; } }; diff --git a/sql/item_create.cc b/sql/item_create.cc index 6a1e87a3aae..8ff78ef1b48 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -167,7 +167,7 @@ class Create_sp_func : public Create_qfunc { public: virtual Item* create(THD *thd, LEX_STRING db, LEX_STRING name, - List *item_list); + bool use_explicit_name, List *item_list); static Create_sp_func s_singleton; @@ -2316,7 +2316,7 @@ Create_qfunc::create(THD *thd, LEX_STRING name, List *item_list) if (thd->copy_db_to(&db.str, &db.length)) return NULL; - return create(thd, db, name, item_list); + return create(thd, db, name, false, item_list); } @@ -2433,7 +2433,7 @@ Create_sp_func Create_sp_func::s_singleton; Item* Create_sp_func::create(THD *thd, LEX_STRING db, LEX_STRING name, - List *item_list) + bool use_explicit_name, List *item_list) { int arg_count= 0; Item *func= NULL; @@ -2458,7 +2458,7 @@ Create_sp_func::create(THD *thd, LEX_STRING db, LEX_STRING name, if (item_list != NULL) arg_count= item_list->elements; - qname= new (thd->mem_root) sp_name(db, name); + qname= new (thd->mem_root) sp_name(db, name, use_explicit_name); qname->init_qname(thd); sp_add_used_routine(lex, thd, qname, TYPE_ENUM_FUNCTION); @@ -4792,6 +4792,12 @@ static Native_func_registry func_array[] = { C_STRING_WITH_LEN("MAKE_SET"), BUILDER(Create_func_make_set)}, { C_STRING_WITH_LEN("MASTER_POS_WAIT"), BUILDER(Create_func_master_pos_wait)}, { C_STRING_WITH_LEN("MBRCONTAINS"), GEOM_BUILDER(Create_func_contains)}, + { C_STRING_WITH_LEN("MBRDISJOINT"), GEOM_BUILDER(Create_func_disjoint)}, + { C_STRING_WITH_LEN("MBREQUAL"), GEOM_BUILDER(Create_func_equals)}, + { C_STRING_WITH_LEN("MBRINTERSECTS"), GEOM_BUILDER(Create_func_intersects)}, + { C_STRING_WITH_LEN("MBROVERLAPS"), GEOM_BUILDER(Create_func_overlaps)}, + { C_STRING_WITH_LEN("MBRTOUCHES"), GEOM_BUILDER(Create_func_touches)}, + { C_STRING_WITH_LEN("MBRWITHIN"), GEOM_BUILDER(Create_func_within)}, { C_STRING_WITH_LEN("MD5"), BUILDER(Create_func_md5)}, { C_STRING_WITH_LEN("MLINEFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, { C_STRING_WITH_LEN("MLINEFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, diff --git a/sql/item_create.h b/sql/item_create.h index 985c4428d8f..0a668b3e67f 100644 --- a/sql/item_create.h +++ b/sql/item_create.h @@ -87,11 +87,12 @@ public: @param thd The current thread @param db The database name @param name The function name + @param use_explicit_name Should the function be represented as 'db.name'? @param item_list The list of arguments to the function, can be NULL @return An item representing the parsed function call */ virtual Item* create(THD *thd, LEX_STRING db, LEX_STRING name, - List *item_list) = 0; + bool use_explicit_name, List *item_list) = 0; protected: /** Constructor. */ diff --git a/sql/item_func.cc b/sql/item_func.cc index b7a708686a8..5c4e83d0e17 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4608,14 +4608,14 @@ void Item_func_match::init_search(bool no_order) fields.push_back(new Item_string(" ",1, cmp_collation.collation)); for (uint i=1; i < arg_count; i++) fields.push_back(args[i]); - concat=new Item_func_concat_ws(fields); + concat_ws=new Item_func_concat_ws(fields); /* Above function used only to get value and do not need fix_fields for it: Item_string - basic constant fields - fix_fields() was already called for this arguments Item_func_concat_ws - do not need fix_fields() to produce value */ - concat->quick_fix_field(); + concat_ws->quick_fix_field(); } if (master) @@ -4830,8 +4830,8 @@ double Item_func_match::val_real() if (key == NO_SUCH_KEY) { - String *a= concat->val_str(&value); - if ((null_value= (a == 0))) + String *a= concat_ws->val_str(&value); + if ((null_value= (a == 0)) || !a->length()) DBUG_RETURN(0); DBUG_RETURN(ft_handler->please->find_relevance(ft_handler, (byte *)a->ptr(), a->length())); @@ -4988,10 +4988,10 @@ longlong Item_func_row_count::val_int() } -Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, - sp_name *name_arg) - :Item_func(), context(context_arg), m_name(name_arg), m_sp(NULL), - result_field(NULL) + + +Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, sp_name *name) + :Item_func(), context(context_arg), m_name(name), m_sp(NULL), sp_result_field(NULL) { maybe_null= 1; m_name->init_qname(current_thd); @@ -5001,9 +5001,8 @@ Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, - sp_name *name_arg, List &list) - :Item_func(list), context(context_arg), m_name(name_arg), m_sp(NULL), - result_field(NULL) + sp_name *name, List &list) + :Item_func(list), context(context_arg), m_name(name), m_sp(NULL),sp_result_field(NULL) { maybe_null= 1; m_name->init_qname(current_thd); @@ -5015,10 +5014,10 @@ Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, void Item_func_sp::cleanup() { - if (result_field) + if (sp_result_field) { - delete result_field; - result_field= NULL; + delete sp_result_field; + sp_result_field= NULL; } m_sp= NULL; dummy_table->alias= NULL; @@ -5030,7 +5029,7 @@ Item_func_sp::func_name() const { THD *thd= current_thd; /* Calculate length to avoid reallocation of string for sure */ - uint len= ((m_name->m_db.length + + uint len= ((m_name->m_explicit_name ? m_name->m_db.length : 0 + m_name->m_name.length)*2 + //characters*quoting 2 + // ` and ` 1 + // . @@ -5040,88 +5039,128 @@ Item_func_sp::func_name() const system_charset_info); qname.length(0); - append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length); - qname.append('.'); + if (m_name->m_explicit_name) + { + append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length); + qname.append('.'); + } append_identifier(thd, &qname, m_name->m_name.str, m_name->m_name.length); return qname.ptr(); } -Field * -Item_func_sp::sp_result_field(void) const + +/** + @brief Initialize the result field by creating a temporary dummy table + and assign it to a newly created field object. Meta data used to + create the field is fetched from the sp_head belonging to the stored + proceedure found in the stored procedure functon cache. + + @note This function should be called from fix_fields to init the result + field. It is some what related to Item_field. + + @see Item_field + + @param thd A pointer to the session and thread context. + + @return Function return error status. + @retval TRUE is returned on an error + @retval FALSE is returned on success. +*/ +bool +Item_func_sp::init_result_field(THD *thd) { - Field *field; - DBUG_ENTER("Item_func_sp::sp_result_field"); - DBUG_PRINT("info", ("sp: %s, flags: %x, level: %lu", - (m_sp ? "YES" : "NO"), - (m_sp ? m_sp->m_flags : (uint)0), - (m_sp ? m_sp->m_recursion_level : (ulong)0))); + DBUG_ENTER("Item_func_sp::init_result_field"); - if (!m_sp) - { - THD *thd= current_thd; - if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, - &thd->sp_func_cache, TRUE))) - { - my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str); - DBUG_RETURN(0); - } - } - if (!dummy_table->alias) - { - char *empty_name= (char *) ""; - dummy_table->alias= empty_name; - dummy_table->maybe_null= maybe_null; - dummy_table->in_use= current_thd; - dummy_table->copy_blobs= TRUE; - dummy_table->s->table_cache_key.str = empty_name; - dummy_table->s->table_name.str= empty_name; - dummy_table->s->db.str= empty_name; - } - if (!(field= m_sp->create_result_field(max_length, name, dummy_table))) - my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); + LEX_STRING empty_name= { C_STRING_WITH_LEN("") }; + + TABLE_SHARE *share; - DBUG_RETURN(field); + DBUG_ASSERT(m_sp == NULL); + DBUG_ASSERT(sp_result_field == NULL); + + if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, + &thd->sp_func_cache, TRUE))) + { + my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str); + context->process_error(thd); + DBUG_RETURN(TRUE); + } + + /* + A Field need to be attached to a Table. + Below we "create" a dummy table by initializing + the needed pointers. + */ + + share= dummy_table->s; + dummy_table->alias = ""; + dummy_table->maybe_null = maybe_null; + dummy_table->in_use= thd; + dummy_table->copy_blobs= TRUE; + share->table_cache_key = empty_name; + share->table_name = empty_name; + + if (!(sp_result_field= m_sp->create_result_field(max_length, name, dummy_table))) + { + DBUG_RETURN(TRUE); + } + + if (sp_result_field->pack_length() > sizeof(result_buf)) + { + sp_result_field->move_field(sql_alloc(sp_result_field->pack_length())); + } else { + sp_result_field->move_field(result_buf); + } + + sp_result_field->null_ptr= (uchar *) &null_value; + sp_result_field->null_bit= 1; + + + DBUG_RETURN(FALSE); } +/** + @brief Initialize local members with values from the Field interface. -/* - Execute function & store value in field + @note called from Item::fix_fields. +*/ +void Item_func_sp::fix_length_and_dec() +{ + DBUG_ENTER("Item_func_sp::fix_length_and_dec"); - RETURN - 0 value <> NULL - 1 value = NULL or error + DBUG_ASSERT(sp_result_field); + decimals= sp_result_field->decimals(); + max_length= sp_result_field->field_length; + collation.set(sp_result_field->charset()); + maybe_null= 1; + unsigned_flag= test(sp_result_field->flags & UNSIGNED_FLAG); + + DBUG_VOID_RETURN; +} + +/** + @brief Execute function & store value in field. + + @return Function returns error status. + @retval FALSE on success. + @retval TRUE if an error occurred. */ bool -Item_func_sp::execute(Field **flp) +Item_func_sp::execute() { THD *thd= current_thd; - Field *f; - + /* Get field in virtual tmp table to store result. Create the field if invoked first time. */ - - if (!(f= *flp)) - { - if (!(*flp= f= sp_result_field())) - { - /* Error set by sp_result_field() */ - null_value= 1; - return TRUE; - } - f->move_field((f->pack_length() > sizeof(result_buf)) ? - sql_alloc(f->pack_length()) : result_buf); - f->null_ptr= (uchar *)&null_value; - f->null_bit= 1; - } /* Execute function and store the return value in the field. */ - if (execute_impl(thd, f)) + if (execute_impl(thd)) { null_value= 1; context->process_error(thd); @@ -5130,14 +5169,24 @@ Item_func_sp::execute(Field **flp) /* Check that the field (the value) is not NULL. */ - null_value= f->is_null(); + null_value= sp_result_field->is_null(); return null_value; } +/** + @brief Execute function and store the return value in the field. + + @note This function was intended to be the concrete implementation of + the interface function execute. This was never realized. + + @return The error state. + @retval FALSE on success + @retval TRUE if an error occurred. +*/ bool -Item_func_sp::execute_impl(THD *thd, Field *return_value_fld) +Item_func_sp::execute_impl(THD *thd) { bool err_status= TRUE; Sub_statement_state statement_state; @@ -5154,7 +5203,7 @@ Item_func_sp::execute_impl(THD *thd, Field *return_value_fld) thd->security_ctx= context->security_ctx; } #endif - if (find_and_check_access(thd)) + if (sp_check_access(thd)) goto error; /* @@ -5175,7 +5224,7 @@ Item_func_sp::execute_impl(THD *thd, Field *return_value_fld) function call into binlog. */ thd->reset_sub_statement_state(&statement_state, SUB_STMT_FUNCTION); - err_status= m_sp->execute_function(thd, args, arg_count, return_value_fld); + err_status= m_sp->execute_function(thd, args, arg_count, sp_result_field); thd->restore_sub_statement_state(&statement_state); error: @@ -5190,15 +5239,9 @@ error: void Item_func_sp::make_field(Send_field *tmp_field) { - Field *field; DBUG_ENTER("Item_func_sp::make_field"); - if ((field= sp_result_field())) - { - field->make_field(tmp_field); - delete field; - DBUG_VOID_RETURN; - } - init_make_field(tmp_field, MYSQL_TYPE_VARCHAR); + DBUG_ASSERT(sp_result_field); + sp_result_field->make_field(tmp_field); DBUG_VOID_RETURN; } @@ -5206,67 +5249,20 @@ Item_func_sp::make_field(Send_field *tmp_field) enum enum_field_types Item_func_sp::field_type() const { - Field *field; DBUG_ENTER("Item_func_sp::field_type"); - - if (result_field) - DBUG_RETURN(result_field->type()); - if ((field= sp_result_field())) - { - enum_field_types result= field->type(); - delete field; - DBUG_RETURN(result); - } - DBUG_RETURN(MYSQL_TYPE_VARCHAR); + DBUG_ASSERT(sp_result_field); + DBUG_RETURN(sp_result_field->type()); } - Item_result Item_func_sp::result_type() const { - Field *field; DBUG_ENTER("Item_func_sp::result_type"); - DBUG_PRINT("info", ("m_sp: 0x%lx", (long) m_sp)); - - if (result_field) - DBUG_RETURN(result_field->result_type()); - if ((field= sp_result_field())) - { - Item_result result= field->result_type(); - delete field; - DBUG_RETURN(result); - } - DBUG_RETURN(STRING_RESULT); + DBUG_PRINT("info", ("m_sp = %p", m_sp)); + DBUG_ASSERT(sp_result_field); + DBUG_RETURN(sp_result_field->result_type()); } -void -Item_func_sp::fix_length_and_dec() -{ - Field *field; - DBUG_ENTER("Item_func_sp::fix_length_and_dec"); - - if (result_field) - { - decimals= result_field->decimals(); - max_length= result_field->field_length; - collation.set(result_field->charset()); - DBUG_VOID_RETURN; - } - - if (!(field= sp_result_field())) - { - context->process_error(current_thd); - DBUG_VOID_RETURN; - } - decimals= field->decimals(); - max_length= field->field_length; - collation.set(field->charset()); - maybe_null= 1; - delete field; - DBUG_VOID_RETURN; -} - - longlong Item_func_found_rows::val_int() { DBUG_ASSERT(fixed == 1); @@ -5277,57 +5273,39 @@ longlong Item_func_found_rows::val_int() Field * Item_func_sp::tmp_table_field(TABLE *t_arg) { - Field *field= 0; DBUG_ENTER("Item_func_sp::tmp_table_field"); - if (m_sp) - field= m_sp->create_result_field(max_length, (const char*) name, t_arg); - - if (!field) - field= Item_func::tmp_table_field(t_arg); - - if (!field) - my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); - - DBUG_RETURN(field); + DBUG_ASSERT(sp_result_field); + DBUG_RETURN(sp_result_field); } -/* - Find the function and check access rights to the function - - SYNOPSIS - find_and_check_access() - thd thread handler - - RETURN - FALSE Access granted - TRUE Requested access can't be granted or function doesn't exists - - NOTES - Checks if requested access to function can be granted to user. +/** + @brief Checks if requested access to function can be granted to user. If function isn't found yet, it searches function first. If function can't be found or user don't have requested access error is raised. + + @param thd thread handler + + @return Indication if the access was granted or not. + @retval FALSE Access is granted. + @retval TRUE Requested access can't be granted or function doesn't exists. + */ bool -Item_func_sp::find_and_check_access(THD *thd) +Item_func_sp::sp_check_access(THD *thd) { - if (! m_sp && ! (m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, - &thd->sp_func_cache, TRUE))) - { - my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str); - return TRUE; - } - + DBUG_ENTER("Item_func_sp::sp_check_access"); + DBUG_ASSERT(m_sp); #ifndef NO_EMBEDDED_ACCESS_CHECKS if (check_routine_access(thd, EXECUTE_ACL, m_sp->m_db.str, m_sp->m_name.str, 0, FALSE)) - return TRUE; + DBUG_RETURN(TRUE); #endif - return FALSE; + DBUG_RETURN(FALSE); } @@ -5335,9 +5313,25 @@ bool Item_func_sp::fix_fields(THD *thd, Item **ref) { bool res; + DBUG_ENTER("Item_func_sp::fix_fields"); DBUG_ASSERT(fixed == 0); + + /* + We must call init_result_field before Item_func::fix_fields() + to make m_sp and result_field members available to fix_length_and_dec(), + which is called from Item_func::fix_fields(). + */ + res= init_result_field(thd); + + if (res) + DBUG_RETURN(res); + res= Item_func::fix_fields(thd, ref); - if (!res && thd->lex->view_prepare_mode) + + if (res) + DBUG_RETURN(res); + + if (thd->lex->view_prepare_mode) { /* Here we check privileges of the stored routine only during view @@ -5349,15 +5343,17 @@ Item_func_sp::fix_fields(THD *thd, Item **ref) good idea especially if the view has SQL SECURITY DEFINER and the used stored procedure has SQL SECURITY DEFINER. */ - res= find_and_check_access(thd); + res= sp_check_access(thd); #ifndef NO_EMBEDDED_ACCESS_CHECKS + /* + Try to set and restore the security context to see whether it's valid + */ Security_context *save_secutiry_ctx; - if (!res && !(res= set_routine_security_ctx(thd, m_sp, false, - &save_secutiry_ctx))) - { + res= set_routine_security_ctx(thd, m_sp, false, &save_secutiry_ctx); + if (!res) sp_restore_security_context(thd, save_secutiry_ctx); - } + #endif /* ! NO_EMBEDDED_ACCESS_CHECKS */ } - return res; + DBUG_RETURN(res); } diff --git a/sql/item_func.h b/sql/item_func.h index 3306b059097..610b47d4fca 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1337,12 +1337,12 @@ public: FT_INFO *ft_handler; TABLE *table; Item_func_match *master; // for master-slave optimization - Item *concat; // Item_func_concat_ws - String value; // value of concat + Item *concat_ws; // Item_func_concat_ws + String value; // value of concat_ws String search_value; // key_item()'s value converted to cmp_collation Item_func_match(List &a, uint b): Item_real_func(a), key(0), flags(b), - join_key(0), ft_handler(0), table(0), master(0), concat(0) { } + join_key(0), ft_handler(0), table(0), master(0), concat_ws(0) { } void cleanup() { DBUG_ENTER("Item_func_match"); @@ -1350,7 +1350,7 @@ public: if (!master && ft_handler) ft_handler->please->close_search(ft_handler); ft_handler= 0; - concat= 0; + concat_ws= 0; DBUG_VOID_RETURN; } enum Functype functype() const { return FT_FUNC; } @@ -1434,12 +1434,15 @@ private: sp_name *m_name; mutable sp_head *m_sp; TABLE *dummy_table; - Field *result_field; char result_buf[64]; + /* + The result field of the concrete stored function. + */ + Field *sp_result_field; - bool execute(Field **flp); - bool execute_impl(THD *thd, Field *return_value_fld); - Field *sp_result_field(void) const; + bool execute(); + bool execute_impl(THD *thd); + bool init_result_field(THD *thd); public: @@ -1465,23 +1468,23 @@ public: longlong val_int() { - if (execute(&result_field)) + if (execute()) return (longlong) 0; - return result_field->val_int(); + return sp_result_field->val_int(); } double val_real() { - if (execute(&result_field)) + if (execute()) return 0.0; - return result_field->val_real(); + return sp_result_field->val_real(); } my_decimal *val_decimal(my_decimal *dec_buf) { - if (execute(&result_field)) + if (execute()) return NULL; - return result_field->val_decimal(dec_buf); + return sp_result_field->val_decimal(dec_buf); } String *val_str(String *str) @@ -1490,7 +1493,7 @@ public: char buff[20]; buf.set(buff, 20, str->charset()); buf.length(0); - if (execute(&result_field)) + if (execute()) return NULL; /* result_field will set buf pointing to internal buffer @@ -1498,7 +1501,7 @@ public: when SP is executed. In order to prevent occasional corruption of returned value, we make here a copy. */ - result_field->val_str(&buf); + sp_result_field->val_str(&buf); str->copy(buf); return str; } @@ -1506,11 +1509,11 @@ public: virtual bool change_context_processor(byte *cntx) { context= (Name_resolution_context *)cntx; return FALSE; } - void fix_length_and_dec(); - bool find_and_check_access(THD * thd); + bool sp_check_access(THD * thd); virtual enum Functype functype() const { return FUNC_SP; } bool fix_fields(THD *thd, Item **ref); + void fix_length_and_dec(void); bool is_expensive() { return 1; } }; diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index e6f951bfc7b..4e28967b2b0 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2348,7 +2348,7 @@ String *Item_func_repeat::val_str(String *str) goto err; // string and/or delim are null null_value= 0; - if (count == 0 || count < 0 && !args[1]->unsigned_flag) + if (count <= 0 && (count == 0 || !args[1]->unsigned_flag)) return &my_empty_string; /* Assumes that the maximum length of a String is < INT_MAX32. */ diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 628b51a70d7..1bf8dfbfe7e 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -426,8 +426,8 @@ public: bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec() { - max_length= ((USERNAME_LENGTH + HOSTNAME_LENGTH + 1) * - system_charset_info->mbmaxlen); + max_length= (USERNAME_LENGTH + + (HOSTNAME_LENGTH + 1) * SYSTEM_CHARSET_MBMAXLEN); } const char *func_name() const { return "user"; } const char *fully_qualified_func_name() const { return "user()"; } diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 7c3762d4785..f217a6ea953 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1090,14 +1090,8 @@ void Item_sum_count::clear() bool Item_sum_count::add() { - if (!args[0]->maybe_null) + if (!args[0]->maybe_null || !args[0]->is_null()) count++; - else - { - args[0]->update_null_value(); - if (!args[0]->null_value) - count++; - } return 0; } @@ -1940,14 +1934,8 @@ void Item_sum_count::reset_field() char *res=result_field->ptr; longlong nr=0; - if (!args[0]->maybe_null) + if (!args[0]->maybe_null || !args[0]->is_null()) nr=1; - else - { - args[0]->update_null_value(); - if (!args[0]->null_value) - nr=1; - } int8store(res,nr); } @@ -2050,14 +2038,8 @@ void Item_sum_count::update_field() char *res=result_field->ptr; nr=sint8korr(res); - if (!args[0]->maybe_null) + if (!args[0]->maybe_null || !args[0]->is_null()) nr++; - else - { - args[0]->update_null_value(); - if (!args[0]->null_value) - nr++; - } int8store(res,nr); } @@ -2481,12 +2463,8 @@ bool Item_sum_count_distinct::setup(THD *thd) Item *item=args[i]; if (list.push_back(item)) return TRUE; // End of memory - if (item->const_item()) - { - item->update_null_value(); - if (item->null_value) - always_null=1; - } + if (item->const_item() && item->is_null()) + always_null= 1; } if (always_null) return FALSE; diff --git a/sql/lex.h b/sql/lex.h index 45155da7692..e311379120d 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -312,6 +312,7 @@ static SYMBOL symbols[] = { { "MASTER_SSL_CERT", SYM(MASTER_SSL_CERT_SYM)}, { "MASTER_SSL_CIPHER",SYM(MASTER_SSL_CIPHER_SYM)}, { "MASTER_SSL_KEY", SYM(MASTER_SSL_KEY_SYM)}, + { "MASTER_SSL_VERIFY_SERVER_CERT", SYM(MASTER_SSL_VERIFY_SERVER_CERT_SYM)}, { "MASTER_USER", SYM(MASTER_USER_SYM)}, { "MATCH", SYM(MATCH)}, { "MAX_CONNECTIONS_PER_HOUR", SYM(MAX_CONNECTIONS_PER_HOUR)}, diff --git a/sql/log.cc b/sql/log.cc index fe3a4f7df5e..3cfcabd8363 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -569,11 +569,21 @@ bool Log_to_csv_event_handler:: if (query_start_arg) { + /* + A TIME field can not hold the full longlong range; query_time or + lock_time may be truncated without warning here, if greater than + 839 hours (~35 days) + */ + TIME t; + t.neg= 0; + /* fill in query_time field */ - if (table->field[2]->store(query_time, TRUE)) + calc_time_from_sec(&t, (long) min(query_time, (longlong) TIME_MAX_VALUE_SECONDS), 0); + if (table->field[2]->store_time(&t, MYSQL_TIMESTAMP_TIME)) goto err; /* lock_time */ - if (table->field[3]->store(lock_time, TRUE)) + calc_time_from_sec(&t, (long) min(lock_time, (longlong) TIME_MAX_VALUE_SECONDS), 0); + if (table->field[3]->store_time(&t, MYSQL_TIMESTAMP_TIME)) goto err; /* rows_sent */ if (table->field[4]->store((longlong) thd->sent_row_count, TRUE)) @@ -1714,7 +1724,7 @@ err: #ifdef __NT__ static int eventSource = 0; -void setup_windows_event_source() +static void setup_windows_event_source() { HKEY hRegKey= NULL; DWORD dwError= 0; @@ -4218,38 +4228,6 @@ static bool test_if_number(register const char *str, } /* test_if_number */ -void print_buffer_to_file(enum loglevel level, const char *buffer) -{ - time_t skr; - struct tm tm_tmp; - struct tm *start; - DBUG_ENTER("print_buffer_to_file"); - DBUG_PRINT("enter",("buffer: %s", buffer)); - - VOID(pthread_mutex_lock(&LOCK_error_log)); - - skr=time(NULL); - localtime_r(&skr, &tm_tmp); - start=&tm_tmp; - - fprintf(stderr, "%02d%02d%02d %2d:%02d:%02d [%s] %s\n", - start->tm_year % 100, - start->tm_mon+1, - start->tm_mday, - start->tm_hour, - start->tm_min, - start->tm_sec, - (level == ERROR_LEVEL ? "ERROR" : level == WARNING_LEVEL ? - "Warning" : "Note"), - buffer); - - fflush(stderr); - - VOID(pthread_mutex_unlock(&LOCK_error_log)); - DBUG_VOID_RETURN; -} - - void sql_perror(const char *message) { #ifdef HAVE_STRERROR @@ -4316,23 +4294,15 @@ void MYSQL_BIN_LOG::signal_update() } #ifdef __NT__ -void print_buffer_to_nt_eventlog(enum loglevel level, char *buff, - uint length, int buffLen) +static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff, + size_t length, size_t buffLen) { HANDLE event; - char *buffptr; - LPCSTR *buffmsgptr; + char *buffptr= buff; DBUG_ENTER("print_buffer_to_nt_eventlog"); - buffptr= buff; - if (length > (uint)(buffLen-5)) - { - char *newBuff= new char[length + 5]; - strcpy(newBuff, buff); - buffptr= newBuff; - } - strmov(buffptr+length, "\r\n\r\n"); - buffmsgptr= (LPCSTR*) &buffptr; // Keep windows happy + /* Add ending CR/LF's to string, overwrite last chars if necessary */ + strmov(buffptr+min(length, buffLen-5), "\r\n\r\n"); setup_windows_event_source(); if ((event= RegisterEventSource(NULL,"MySQL"))) @@ -4340,24 +4310,20 @@ void print_buffer_to_nt_eventlog(enum loglevel level, char *buff, switch (level) { case ERROR_LEVEL: ReportEvent(event, EVENTLOG_ERROR_TYPE, 0, MSG_DEFAULT, NULL, 1, 0, - buffmsgptr, NULL); + (LPCSTR*)&buffptr, NULL); break; case WARNING_LEVEL: ReportEvent(event, EVENTLOG_WARNING_TYPE, 0, MSG_DEFAULT, NULL, 1, 0, - buffmsgptr, NULL); + (LPCSTR*) &buffptr, NULL); break; case INFORMATION_LEVEL: ReportEvent(event, EVENTLOG_INFORMATION_TYPE, 0, MSG_DEFAULT, NULL, 1, - 0, buffmsgptr, NULL); + 0, (LPCSTR*) &buffptr, NULL); break; } DeregisterEventSource(event); } - /* if we created a string buffer, then delete it */ - if (buffptr != buff) - delete[] buffptr; - DBUG_VOID_RETURN; } #endif /* __NT__ */ @@ -4394,14 +4360,45 @@ int vprint_msg_to_log(enum loglevel level __attribute__((unused)), DBUG_RETURN(0); } #else /*!EMBEDDED_LIBRARY*/ +static void print_buffer_to_file(enum loglevel level, const char *buffer) +{ + time_t skr; + struct tm tm_tmp; + struct tm *start; + DBUG_ENTER("print_buffer_to_file"); + DBUG_PRINT("enter",("buffer: %s", buffer)); + + VOID(pthread_mutex_lock(&LOCK_error_log)); + + skr=time(NULL); + localtime_r(&skr, &tm_tmp); + start=&tm_tmp; + + fprintf(stderr, "%02d%02d%02d %2d:%02d:%02d [%s] %s\n", + start->tm_year % 100, + start->tm_mon+1, + start->tm_mday, + start->tm_hour, + start->tm_min, + start->tm_sec, + (level == ERROR_LEVEL ? "ERROR" : level == WARNING_LEVEL ? + "Warning" : "Note"), + buffer); + + fflush(stderr); + + VOID(pthread_mutex_unlock(&LOCK_error_log)); + DBUG_VOID_RETURN; +} + + int vprint_msg_to_log(enum loglevel level, const char *format, va_list args) { char buff[1024]; - uint length; + size_t length; DBUG_ENTER("vprint_msg_to_log"); - /* "- 5" is because of print_buffer_to_nt_eventlog() */ - length= my_vsnprintf(buff, sizeof(buff) - 5, format, args); + length= my_vsnprintf(buff, sizeof(buff), format, args); print_buffer_to_file(level, buff); #ifdef __NT__ diff --git a/sql/log_event.cc b/sql/log_event.cc index e3c94b5e1c9..593328c4bf2 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -784,19 +784,34 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet, LOG_READ_TOO_LARGE); goto end; } - packet->append(buf, sizeof(buf)); + + /* Append the log event header to packet */ + if (packet->append(buf, sizeof(buf))) + { + /* Failed to allocate packet */ + result= LOG_READ_MEM; + goto end; + } data_len-= LOG_EVENT_MINIMAL_HEADER_LEN; if (data_len) { + /* Append rest of event, read directly from file into packet */ if (packet->append(file, data_len)) { /* - Here if we hit EOF it's really an error: as data_len is >=0 - there's supposed to be more bytes available. - EOF means we are reading the event partially, which should - never happen: either we read badly or the binlog is truncated. + Fatal error occured when appending rest of the event + to packet, possible failures: + 1. EOF occured when reading from file, it's really an error + as data_len is >=0 there's supposed to be more bytes available. + file->error will have been set to number of bytes left to read + 2. Read was interrupted, file->error would normally be set to -1 + 3. Failed to allocate memory for packet, my_errno + will be ENOMEM(file->error shuold be 0, but since the + memory allocation occurs before the call to read it might + be uninitialized) */ - result= file->error >= 0 ? LOG_READ_TRUNC: LOG_READ_IO; + result= (my_errno == ENOMEM ? LOG_READ_MEM : + (file->error >= 0 ? LOG_READ_TRUNC: LOG_READ_IO)); /* Implicit goto end; */ } } diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index bb5c2f51a76..6ac12b90d9a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -367,7 +367,7 @@ MY_LOCALE *my_locale_by_number(uint number); Maximum length of time zone name that we support (Time zone name is char(64) in db). mysqlbinlog needs it. */ -#define MAX_TIME_ZONE_NAME_LENGTH 72 +#define MAX_TIME_ZONE_NAME_LENGTH (NAME_LEN + 1) /* The rest of the file is included in the server only */ #ifndef MYSQL_CLIENT @@ -600,7 +600,7 @@ class THD; void close_thread_tables(THD *thd, bool locked=0, bool skip_derived=0); bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *tables); bool check_single_table_access(THD *thd, ulong privilege, - TABLE_LIST *tables); + TABLE_LIST *tables, bool no_errors); bool check_routine_access(THD *thd,ulong want_access,char *db,char *name, bool is_proc, bool no_errors); bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table); @@ -623,8 +623,11 @@ void get_default_definer(THD *thd, LEX_USER *definer); LEX_USER *create_default_definer(THD *thd); LEX_USER *create_definer(THD *thd, LEX_STRING *user_name, LEX_STRING *host_name); LEX_USER *get_current_user(THD *thd, LEX_USER *user); -bool check_string_length(LEX_STRING *str, - const char *err_msg, uint max_length); +bool check_string_byte_length(LEX_STRING *str, const char *err_msg, + uint max_byte_length); +bool check_string_char_length(LEX_STRING *str, const char *err_msg, + uint max_char_length, CHARSET_INFO *cs, + bool no_error); enum enum_mysql_completiontype { ROLLBACK_RELEASE=-2, ROLLBACK=1, ROLLBACK_AND_CHAIN=7, @@ -843,7 +846,7 @@ bool is_update_query(enum enum_sql_command command); bool alloc_query(THD *thd, const char *packet, uint packet_length); void mysql_init_select(LEX *lex); void mysql_reset_thd_for_next_command(THD *thd); -void mysql_init_query(THD *thd, uchar *buf, uint length); +void mysql_init_query(THD *thd, const char *buf, uint length); bool mysql_new_select(LEX *lex, bool move_down); void create_select_for_variable(const char *var_name); void mysql_init_multi_delete(LEX *lex); @@ -1008,6 +1011,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table,List &fields, bool ignore); int check_that_all_fields_are_given_values(THD *thd, TABLE *entry, TABLE_LIST *table_list); +void prepare_triggers_for_insert_stmt(TABLE *table); bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds); bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order, ha_rows rows, ulonglong options, @@ -1165,7 +1169,7 @@ void mysql_ha_mark_tables_for_reopen(THD *thd, TABLE *table); /* sql_base.cc */ #define TMP_TABLE_KEY_EXTRA 8 void set_item_name(Item *item,char *pos,uint length); -bool add_field_to_list(THD *thd, char *field_name, enum enum_field_types type, +bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum enum_field_types type, char *length, char *decimal, uint type_modifier, Item *default_value, Item *on_update_value, @@ -1566,8 +1570,10 @@ extern bool check_reserved_words(LEX_STRING *name); /* strfunc.cc */ ulonglong find_set(TYPELIB *lib, const char *x, uint length, CHARSET_INFO *cs, char **err_pos, uint *err_len, bool *set_warning); -uint find_type(TYPELIB *lib, const char *find, uint length, bool part_match); -uint find_type2(TYPELIB *lib, const char *find, uint length, CHARSET_INFO *cs); +uint find_type(const TYPELIB *lib, const char *find, uint length, + bool part_match); +uint find_type2(const TYPELIB *lib, const char *find, uint length, + CHARSET_INFO *cs); void unhex_type2(TYPELIB *lib); uint check_word(TYPELIB *lib, const char *val, const char *end, const char **end_of_word); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 7c7d9dc923f..382f6683bf6 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -888,7 +888,7 @@ static void close_connections(void) } (void) pthread_mutex_unlock(&LOCK_thread_count); // For unlink from list - Events::get_instance()->deinit(); + Events::deinit(); end_slave(); if (thread_count) @@ -1333,7 +1333,7 @@ static void clean_up_mutexes() (void) pthread_mutex_destroy(&LOCK_bytes_sent); (void) pthread_mutex_destroy(&LOCK_bytes_received); (void) pthread_mutex_destroy(&LOCK_user_conn); - Events::get_instance()->destroy_mutexes(); + Events::destroy_mutexes(); #ifdef HAVE_OPENSSL (void) pthread_mutex_destroy(&LOCK_des_key_file); #ifndef HAVE_YASSL @@ -3069,7 +3069,7 @@ static int init_thread_environment() (void) pthread_mutex_init(&LOCK_server_started, MY_MUTEX_INIT_FAST); (void) pthread_cond_init(&COND_server_started,NULL); sp_cache_init(); - Events::get_instance()->init_mutexes(); + Events::init_mutexes(); /* Parameter for threads created for connections */ (void) pthread_attr_init(&connection_attrib); (void) pthread_attr_setdetachstate(&connection_attrib, @@ -3855,21 +3855,15 @@ we force server id to 2, but this MySQL server will not act as a slave."); create_shutdown_thread(); create_maintenance_thread(); + if (Events::init(opt_noacl)) + unireg_abort(1); + sql_print_information(ER(ER_STARTUP),my_progname,server_version, ((unix_sock == INVALID_SOCKET) ? (char*) "" : mysqld_unix_port), mysqld_port, MYSQL_COMPILATION_COMMENT); - if (!opt_noacl) - { - if (Events::get_instance()->init()) - unireg_abort(1); - } - else - { - Events::opt_event_scheduler = Events::EVENTS_DISABLED; - } /* Signal threads waiting for server to be started */ pthread_mutex_lock(&LOCK_server_started); @@ -6530,10 +6524,11 @@ static int show_rpl_status(THD *thd, SHOW_VAR *var, char *buff) static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff) { - var->type= SHOW_CHAR; + var->type= SHOW_MY_BOOL; pthread_mutex_lock(&LOCK_active_mi); - var->value= const_cast((active_mi && active_mi->slave_running && - active_mi->rli.slave_running) ? "ON" : "OFF"); + var->value= buff; + *((my_bool *)buff)= (my_bool) (active_mi && active_mi->slave_running && + active_mi->rli.slave_running); pthread_mutex_unlock(&LOCK_active_mi); return 0; } @@ -6749,12 +6744,20 @@ static int show_ssl_ctx_get_session_cache_mode(THD *thd, SHOW_VAR *var, char *bu return 0; } -/* Functions relying on SSL */ +/* + Functions relying on SSL + Note: In the show_ssl_* functions, we need to check if we have a + valid vio-object since this isn't always true, specifically + when session_status or global_status is requested from + inside an Event. + */ static int show_ssl_get_version(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_CHAR; - var->value= const_cast(thd->net.vio->ssl_arg ? - SSL_get_version((SSL*) thd->net.vio->ssl_arg) : ""); + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + var->value= const_cast(SSL_get_version((SSL*) thd->net.vio->ssl_arg)); + else + var->value= (char *)""; return 0; } @@ -6762,9 +6765,10 @@ static int show_ssl_session_reused(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_LONG; var->value= buff; - *((long *)buff)= (long)thd->net.vio->ssl_arg ? - SSL_session_reused((SSL*) thd->net.vio->ssl_arg) : - 0; + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + *((long *)buff)= (long)SSL_session_reused((SSL*) thd->net.vio->ssl_arg); + else + *((long *)buff)= 0; return 0; } @@ -6772,9 +6776,10 @@ static int show_ssl_get_default_timeout(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_LONG; var->value= buff; - *((long *)buff)= (long)thd->net.vio->ssl_arg ? - SSL_get_default_timeout((SSL*)thd->net.vio->ssl_arg) : - 0; + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + *((long *)buff)= (long)SSL_get_default_timeout((SSL*)thd->net.vio->ssl_arg); + else + *((long *)buff)= 0; return 0; } @@ -6782,9 +6787,10 @@ static int show_ssl_get_verify_mode(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_LONG; var->value= buff; - *((long *)buff)= (long)thd->net.vio->ssl_arg ? - SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg) : - 0; + if( thd->net.vio && thd->net.vio->ssl_arg ) + *((long *)buff)= (long)SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg); + else + *((long *)buff)= 0; return 0; } @@ -6792,17 +6798,20 @@ static int show_ssl_get_verify_depth(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_LONG; var->value= buff; - *((long *)buff)= (long)thd->net.vio->ssl_arg ? - SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg) : - 0; + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + *((long *)buff)= (long)SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg); + else + *((long *)buff)= 0; return 0; } static int show_ssl_get_cipher(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_CHAR; - var->value= const_cast(thd->net.vio->ssl_arg ? - SSL_get_cipher((SSL*) thd->net.vio->ssl_arg) : ""); + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + var->value= const_cast(SSL_get_cipher((SSL*) thd->net.vio->ssl_arg)); + else + var->value= (char *)""; return 0; } @@ -6810,7 +6819,7 @@ static int show_ssl_get_cipher_list(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_CHAR; var->value= buff; - if (thd->net.vio->ssl_arg) + if (thd->vio_ok() && thd->net.vio->ssl_arg) { int i; const char *p; @@ -7350,6 +7359,18 @@ static void mysql_init_variables(void) /* Allow Win32 and NetWare users to move MySQL anywhere */ { char prg_dev[LIBLEN]; +#if defined __WIN__ + char executing_path_name[LIBLEN]; + if (!test_if_hard_path(my_progname)) + { + // we don't want to use GetModuleFileName inside of my_path since + // my_path is a generic path dereferencing function and here we care + // only about the executing binary. + GetModuleFileName(NULL, executing_path_name, sizeof(executing_path_name)); + my_path(prg_dev, executing_path_name, NULL); + } + else +#endif my_path(prg_dev,my_progname,"mysql/bin"); strcat(prg_dev,"/../"); // Remove 'bin' to get base dir cleanup_dirname(mysql_home,prg_dev); @@ -7588,32 +7609,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), } #endif case OPT_EVENT_SCHEDULER: - if (!argument) - Events::opt_event_scheduler= Events::EVENTS_DISABLED; - else - { - int type; - /* - type= 5 1 2 3 4 - (DISABLE ) - (OFF | ON) - (0 | 1) - */ - switch ((type=find_type(argument, &Events::opt_typelib, 1))) { - case 0: - fprintf(stderr, "Unknown option to event-scheduler: %s\n",argument); - exit(1); - case 5: /* OPT_DISABLED */ - Events::opt_event_scheduler= Events::EVENTS_DISABLED; - break; - case 2: /* OPT_ON */ - case 4: /* 1 */ - Events::opt_event_scheduler= Events::EVENTS_ON; - break; - case 1: /* OPT_OFF */ - case 3: /* 0 */ - Events::opt_event_scheduler= Events::EVENTS_OFF; - break; - } - } + if (Events::set_opt_event_scheduler(argument)) + exit(1); break; case (int) OPT_SKIP_NEW: opt_specialflag|= SPECIAL_NO_NEW_FUNC; diff --git a/sql/parse_file.cc b/sql/parse_file.cc index f5b62e3afe2..f06c7c15202 100644 --- a/sql/parse_file.cc +++ b/sql/parse_file.cc @@ -733,14 +733,18 @@ nlist_err: /* parse parameters - + SYNOPSIS File_parser::parse() base base address for parameter writing (structure like TABLE) mem_root MEM_ROOT for parameters allocation parameters parameters description - required number of required parameters in above list + required number of parameters in the above list. If the file + contains more parameters than "required", they will + be ignored. If the file contains less parameters + then "required", non-existing parameters will + remain their values. hook hook called for unknown keys hook_data some data specific for the hook @@ -923,6 +927,13 @@ list_err: } } } + + /* + NOTE: if we read less than "required" parameters, it is still Ok. + Probably, we've just read the file of the previous version, which + contains less parameters. + */ + DBUG_RETURN(FALSE); } diff --git a/sql/partition_info.cc b/sql/partition_info.cc index a7f9bd413c6..3e0257f5b1d 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -187,8 +187,14 @@ bool partition_info::set_up_default_partitions(handler *file, my_error(ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0), error_string); goto end; } - if (no_parts == 0) - no_parts= file->get_default_no_partitions(info); + + if ((no_parts == 0) && + ((no_parts= file->get_default_no_partitions(info)) == 0)) + { + my_error(ER_PARTITION_NOT_DEFINED_ERROR, MYF(0), "partitions"); + goto end; + } + if (unlikely(no_parts > MAX_PARTITIONS)) { my_error(ER_TOO_MANY_PARTITIONS_ERROR, MYF(0)); @@ -753,7 +759,11 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, } if (unlikely(set_up_defaults_for_partitioning(file, info, (uint)0))) goto end; - tot_partitions= get_tot_partitions(); + if (!(tot_partitions= get_tot_partitions())) + { + my_error(ER_PARTITION_NOT_DEFINED_ERROR, MYF(0), "partitions"); + goto end; + } if (unlikely(tot_partitions > MAX_PARTITIONS)) { my_error(ER_TOO_MANY_PARTITIONS_ERROR, MYF(0)); @@ -776,6 +786,8 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, partition_element *part_elem= part_it++; if (part_elem->engine_type == NULL) part_elem->engine_type= default_engine_type; + if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE) + part_elem->data_file_name= part_elem->index_file_name= 0; if (!is_sub_partitioned()) { if (check_table_name(part_elem->partition_name, @@ -849,15 +861,27 @@ void partition_info::print_no_partition_found(TABLE *table) { char buf[100]; char *buf_ptr= (char*)&buf; - my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); + TABLE_LIST table_list; - if (part_expr->null_value) - buf_ptr= (char*)"NULL"; + bzero(&table_list, sizeof(table_list)); + table_list.db= table->s->db.str; + table_list.table_name= table->s->table_name.str; + + if (check_single_table_access(current_thd, + SELECT_ACL, &table_list, TRUE)) + my_message(ER_NO_PARTITION_FOR_GIVEN_VALUE, + ER(ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT), MYF(0)); else - longlong2str(err_value, buf, - part_expr->unsigned_flag ? 10 : -10); - my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), buf_ptr); - dbug_tmp_restore_column_map(table->read_set, old_map); + { + my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); + if (part_expr->null_value) + buf_ptr= (char*)"NULL"; + else + longlong2str(err_value, buf, + part_expr->unsigned_flag ? 10 : -10); + my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), buf_ptr); + dbug_tmp_restore_column_map(table->read_set, old_map); + } } /* Set up buffers and arrays for fields requiring preparation diff --git a/sql/partition_info.h b/sql/partition_info.h index 8bcc769054f..6c21002c184 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -156,7 +156,7 @@ public: char *part_func_string; char *subpart_func_string; - uchar *part_state; + const char *part_state; partition_element *curr_part_elem; partition_element *current_partition; diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 934a6821514..73fdc3a3aee 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -692,12 +692,16 @@ int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi) #ifdef HAVE_OPENSSL if (mi->ssl) + { mysql_ssl_set(mysql, mi->ssl_key[0]?mi->ssl_key:0, mi->ssl_cert[0]?mi->ssl_cert:0, mi->ssl_ca[0]?mi->ssl_ca:0, mi->ssl_capath[0]?mi->ssl_capath:0, mi->ssl_cipher[0]?mi->ssl_cipher:0); + mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, + &mi->ssl_verify_server_cert); + } #endif mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset_info->csname); diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc index 1c426eff768..354a97cefde 100644 --- a/sql/rpl_mi.cc +++ b/sql/rpl_mi.cc @@ -29,12 +29,13 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f, MASTER_INFO::MASTER_INFO() :ssl(0), fd(-1), io_thd(0), inited(0), - abort_slave(0),slave_running(0), slave_run_id(0) + abort_slave(0),slave_running(0), slave_run_id(0), + ssl_verify_server_cert(0) { host[0] = 0; user[0] = 0; password[0] = 0; ssl_ca[0]= 0; ssl_capath[0]= 0; ssl_cert[0]= 0; ssl_cipher[0]= 0; ssl_key[0]= 0; - + bzero((char*) &file, sizeof(file)); pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST); pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST); @@ -80,12 +81,21 @@ void init_master_info_with_options(MASTER_INFO* mi) strmake(mi->ssl_cipher, master_ssl_cipher, sizeof(mi->ssl_cipher)-1); if (master_ssl_key) strmake(mi->ssl_key, master_ssl_key, sizeof(mi->ssl_key)-1); + /* Intentionally init ssl_verify_server_cert to 0, no option available */ + mi->ssl_verify_server_cert= 0; DBUG_VOID_RETURN; } -#define LINES_IN_MASTER_INFO_WITH_SSL 14 +enum { + LINES_IN_MASTER_INFO_WITH_SSL= 14, + /* 5.1.16 added value of master_ssl_verify_server_cert */ + LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT= 15, + + /* Number of lines currently used when saving master info file */ + LINES_IN_MASTER_INFO= LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT +}; int init_master_info(MASTER_INFO* mi, const char* master_info_fname, const char* slave_info_fname, @@ -184,7 +194,8 @@ file '%s')", fname); } mi->fd = fd; - int port, connect_retry, master_log_pos, ssl= 0, lines; + int port, connect_retry, master_log_pos, lines; + int ssl= 0, ssl_verify_server_cert= 0; char *first_non_digit; /* @@ -195,7 +206,8 @@ file '%s')", fname); file since versions before 4.1.x could generate files with more lines than needed. If first line doesn't contain a number or contain number less than - 14 then such file is treated like file from pre 4.1.1 version. + LINES_IN_MASTER_INFO_WITH_SSL then such file is treated like file + from pre 4.1.1 version. There is no ambiguity when reading an old master.info, as before 4.1.1, the first line contained the binlog's name, which is either empty or has an extension (contains a '.'), so can't be confused @@ -219,7 +231,8 @@ file '%s')", fname); if (mi->master_log_name[0]!='\0' && *first_non_digit=='\0' && lines >= LINES_IN_MASTER_INFO_WITH_SSL) - { // Seems to be new format + { + /* Seems to be new format => read master log name from next line */ if (init_strvar_from_file(mi->master_log_name, sizeof(mi->master_log_name), &mi->file, "")) goto errwithmsg; @@ -245,19 +258,31 @@ file '%s')", fname); slave will try connect to master, so in this case warning is printed. */ - if (lines >= LINES_IN_MASTER_INFO_WITH_SSL && - (init_intvar_from_file(&ssl, &mi->file, master_ssl) || - init_strvar_from_file(mi->ssl_ca, sizeof(mi->ssl_ca), - &mi->file, master_ssl_ca) || - init_strvar_from_file(mi->ssl_capath, sizeof(mi->ssl_capath), - &mi->file, master_ssl_capath) || - init_strvar_from_file(mi->ssl_cert, sizeof(mi->ssl_cert), - &mi->file, master_ssl_cert) || - init_strvar_from_file(mi->ssl_cipher, sizeof(mi->ssl_cipher), - &mi->file, master_ssl_cipher) || - init_strvar_from_file(mi->ssl_key, sizeof(mi->ssl_key), - &mi->file, master_ssl_key))) - goto errwithmsg; + if (lines >= LINES_IN_MASTER_INFO_WITH_SSL) + { + if (init_intvar_from_file(&ssl, &mi->file, master_ssl) || + init_strvar_from_file(mi->ssl_ca, sizeof(mi->ssl_ca), + &mi->file, master_ssl_ca) || + init_strvar_from_file(mi->ssl_capath, sizeof(mi->ssl_capath), + &mi->file, master_ssl_capath) || + init_strvar_from_file(mi->ssl_cert, sizeof(mi->ssl_cert), + &mi->file, master_ssl_cert) || + init_strvar_from_file(mi->ssl_cipher, sizeof(mi->ssl_cipher), + &mi->file, master_ssl_cipher) || + init_strvar_from_file(mi->ssl_key, sizeof(mi->ssl_key), + &mi->file, master_ssl_key)) + goto errwithmsg; + + /* + Starting from 5.1.16 ssl_verify_server_cert might be + in the file + */ + if (lines >= LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT && + init_intvar_from_file(&ssl_verify_server_cert, &mi->file, 0)) + goto errwithmsg; + + } + #ifndef HAVE_OPENSSL if (ssl) sql_print_warning("SSL information in the master info file " @@ -273,6 +298,7 @@ file '%s')", fname); mi->port= (uint) port; mi->connect_retry= (uint) connect_retry; mi->ssl= (my_bool) ssl; + mi->ssl_verify_server_cert= ssl_verify_server_cert; } DBUG_PRINT("master_info",("log_file_name: %s position: %ld", mi->master_log_name, @@ -315,6 +341,7 @@ int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache) { IO_CACHE* file = &mi->file; char lbuf[22]; + DBUG_ENTER("flush_master_info"); DBUG_PRINT("enter",("master_pos: %ld", (long) mi->master_log_pos)); @@ -352,13 +379,14 @@ int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache) */ my_b_seek(file, 0L); - my_b_printf(file, "%u\n%s\n%s\n%s\n%s\n%s\n%d\n%d\n%d\n%s\n%s\n%s\n%s\n%s\n", - LINES_IN_MASTER_INFO_WITH_SSL, + my_b_printf(file, + "%u\n%s\n%s\n%s\n%s\n%s\n%d\n%d\n%d\n%s\n%s\n%s\n%s\n%s\n%d\n", + LINES_IN_MASTER_INFO, mi->master_log_name, llstr(mi->master_log_pos, lbuf), mi->host, mi->user, mi->password, mi->port, mi->connect_retry, (int)(mi->ssl), mi->ssl_ca, mi->ssl_capath, mi->ssl_cert, - mi->ssl_cipher, mi->ssl_key); + mi->ssl_cipher, mi->ssl_key, mi->ssl_verify_server_cert); DBUG_RETURN(-flush_io_cache(file)); } diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h index ae77e64d93a..c39a89a35b3 100644 --- a/sql/rpl_mi.h +++ b/sql/rpl_mi.h @@ -65,6 +65,7 @@ class MASTER_INFO my_bool ssl; // enables use of SSL connection if true char ssl_ca[FN_REFLEN], ssl_capath[FN_REFLEN], ssl_cert[FN_REFLEN]; char ssl_cipher[FN_REFLEN], ssl_key[FN_REFLEN]; + my_bool ssl_verify_server_cert; my_off_t master_log_pos; File fd; // we keep the file open, so we need to remember the file pointer diff --git a/sql/set_var.cc b/sql/set_var.cc index f7376a502fc..8ffa0f92594 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1686,7 +1686,7 @@ byte *sys_var_thd_bool::value_ptr(THD *thd, enum_var_type type, } -bool sys_var::check_enum(THD *thd, set_var *var, TYPELIB *enum_names) +bool sys_var::check_enum(THD *thd, set_var *var, const TYPELIB *enum_names) { char buff[STRING_BUFFER_USUAL_SIZE]; const char *value; @@ -3651,21 +3651,18 @@ bool sys_var_thd_table_type::update(THD *thd, set_var *var) SYNOPSIS thd in thread handler val in sql_mode value - len out pointer on length of string - - RETURN - pointer to string with sql_mode representation + rep out pointer pointer to string with sql_mode representation */ -byte *sys_var_thd_sql_mode::symbolic_mode_representation(THD *thd, - ulonglong val, - ulong *len) +bool +sys_var_thd_sql_mode:: +symbolic_mode_representation(THD *thd, ulonglong val, LEX_STRING *rep) { - char buff[256]; + char buff[STRING_BUFFER_USUAL_SIZE*8]; String tmp(buff, sizeof(buff), &my_charset_latin1); - ulong length; tmp.length(0); + for (uint i= 0; val; val>>= 1, i++) { if (val & 1) @@ -3676,20 +3673,25 @@ byte *sys_var_thd_sql_mode::symbolic_mode_representation(THD *thd, } } - if ((length= tmp.length())) - length--; - *len= length; - return (byte*) thd->strmake(tmp.ptr(), length); + if (tmp.length()) + tmp.length(tmp.length() - 1); /* trim the trailing comma */ + + rep->str= thd->strmake(tmp.ptr(), tmp.length()); + + rep->length= rep->str ? tmp.length() : 0; + + return rep->length != tmp.length(); } byte *sys_var_thd_sql_mode::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { + LEX_STRING sql_mode; ulonglong val= ((type == OPT_GLOBAL) ? global_system_variables.*offset : thd->variables.*offset); - ulong length_unused; - return symbolic_mode_representation(thd, val, &length_unused); + (void) symbolic_mode_representation(thd, val, &sql_mode); + return (byte *) sql_mode.str; } @@ -4020,24 +4022,13 @@ sys_var_event_scheduler::update(THD *thd, set_var *var) int res; /* here start the thread if not running. */ DBUG_ENTER("sys_var_event_scheduler::update"); - if (Events::opt_event_scheduler == Events::EVENTS_DISABLED) - { - my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--event-scheduler=DISABLED or --skip-grant-tables"); - DBUG_RETURN(TRUE); - } - DBUG_PRINT("info", ("new_value: %d", (int) var->save_result.ulong_value)); - if (var->save_result.ulong_value == Events::EVENTS_ON) - res= Events::get_instance()->start_execution_of_events(); - else if (var->save_result.ulong_value == Events::EVENTS_OFF) - res= Events::get_instance()->stop_execution_of_events(); - else - { - assert(0); // Impossible - } - if (res) - my_error(ER_EVENT_SET_VAR_ERROR, MYF(0)); + enum Events::enum_opt_event_scheduler + new_state= + (enum Events::enum_opt_event_scheduler) var->save_result.ulong_value; + + res= Events::switch_event_scheduler_state(new_state); DBUG_RETURN((bool) res); } @@ -4046,15 +4037,7 @@ sys_var_event_scheduler::update(THD *thd, set_var *var) byte *sys_var_event_scheduler::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { - int state; - if (Events::opt_event_scheduler == Events::EVENTS_DISABLED) - state= Events::EVENTS_DISABLED; // This should be DISABLED - else if (Events::get_instance()->is_execution_of_events_started()) - state= Events::EVENTS_ON; // This should be ON - else - state= Events::EVENTS_OFF; // This should be OFF - - return (byte*) Events::opt_typelib.type_names[state]; + return (byte *) Events::get_opt_event_scheduler_str(); } diff --git a/sql/set_var.h b/sql/set_var.h index eac03fce610..a3963171192 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -61,7 +61,7 @@ public: sys_vars++; } virtual bool check(THD *thd, set_var *var); - bool check_enum(THD *thd, set_var *var, TYPELIB *enum_names); + bool check_enum(THD *thd, set_var *var, const TYPELIB *enum_names); bool check_set(THD *thd, set_var *var, TYPELIB *enum_names); virtual bool update(THD *thd, set_var *var)=0; virtual void set_default(THD *thd_arg, enum_var_type type) {} @@ -450,8 +450,8 @@ public: } void set_default(THD *thd, enum_var_type type); byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); - static byte *symbolic_mode_representation(THD *thd, ulonglong sql_mode, - ulong *length); + static bool symbolic_mode_representation(THD *thd, ulonglong sql_mode, + LEX_STRING *rep); }; diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index a42f94760ab..03990bbad0e 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -100,155 +100,155 @@ ER_CANT_CREATE_TABLE swe "Kan inte skapa tabellen '%-.200s' (Felkod: %d)" ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÔÁÂÌÉÃÀ '%-.200s' (ÐÏÍÉÌËÁ: %d)" ER_CANT_CREATE_DB - cze "Nemohu vytvo-Bøit databázi '%-.64s' (chybový kód: %d)" - dan "Kan ikke oprette databasen '%-.64s' (Fejlkode: %d)" - nla "Kan database '%-.64s' niet aanmaken (Errcode: %d)" - eng "Can't create database '%-.64s' (errno: %d)" - jps "'%-.64s' ƒf[ƒ^ƒx[ƒX‚ªì‚ê‚Ü‚¹‚ñ (errno: %d)", - est "Ei suuda luua andmebaasi '%-.64s' (veakood: %d)" - fre "Ne peut créer la base '%-.64s' (Erreur %d)" - ger "Kann Datenbank '%-.64s' nicht erzeugen (Fehler: %d)" - greek "Áäýíáôç ç äçìéïõñãßá ôçò âÜóçò äåäïìÝíùí '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Az '%-.64s' adatbazis nem hozhato letre (hibakod: %d)" - ita "Impossibile creare il database '%-.64s' (errno: %d)" - jpn "'%-.64s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ºî¤ì¤Þ¤»¤ó (errno: %d)" - kor "µ¥ÀÌŸº£À̽º '%-.64s'¸¦ ¸¸µéÁö ¸øÇß½À´Ï´Ù.. (¿¡·¯¹øÈ£: %d)" - nor "Kan ikke opprette databasen '%-.64s' (Feilkode: %d)" - norwegian-ny "Kan ikkje opprette databasen '%-.64s' (Feilkode: %d)" - pol "Nie mo¿na stworzyæ bazy danych '%-.64s' (Kod b³êdu: %d)" - por "Não pode criar o banco de dados '%-.64s' (erro no. %d)" - rum "Nu pot sa creez baza de date '%-.64s' (Eroare: %d)" - rus "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da kreiram bazu '%-.64s' (errno: %d)" - slo "Nemô¾em vytvori» databázu '%-.64s' (chybový kód: %d)" - spa "No puedo crear base de datos '%-.64s' (Error: %d)" - swe "Kan inte skapa databasen '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Nemohu vytvo-Bøit databázi '%-.192s' (chybový kód: %d)" + dan "Kan ikke oprette databasen '%-.192s' (Fejlkode: %d)" + nla "Kan database '%-.192s' niet aanmaken (Errcode: %d)" + eng "Can't create database '%-.192s' (errno: %d)" + jps "'%-.192s' ƒf[ƒ^ƒx[ƒX‚ªì‚ê‚Ü‚¹‚ñ (errno: %d)", + est "Ei suuda luua andmebaasi '%-.192s' (veakood: %d)" + fre "Ne peut créer la base '%-.192s' (Erreur %d)" + ger "Kann Datenbank '%-.192s' nicht erzeugen (Fehler: %d)" + greek "Áäýíáôç ç äçìéïõñãßá ôçò âÜóçò äåäïìÝíùí '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Az '%-.192s' adatbazis nem hozhato letre (hibakod: %d)" + ita "Impossibile creare il database '%-.192s' (errno: %d)" + jpn "'%-.192s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ºî¤ì¤Þ¤»¤ó (errno: %d)" + kor "µ¥ÀÌŸº£À̽º '%-.192s'¸¦ ¸¸µéÁö ¸øÇß½À´Ï´Ù.. (¿¡·¯¹øÈ£: %d)" + nor "Kan ikke opprette databasen '%-.192s' (Feilkode: %d)" + norwegian-ny "Kan ikkje opprette databasen '%-.192s' (Feilkode: %d)" + pol "Nie mo¿na stworzyæ bazy danych '%-.192s' (Kod b³êdu: %d)" + por "Não pode criar o banco de dados '%-.192s' (erro no. %d)" + rum "Nu pot sa creez baza de date '%-.192s' (Eroare: %d)" + rus "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da kreiram bazu '%-.192s' (errno: %d)" + slo "Nemô¾em vytvori» databázu '%-.192s' (chybový kód: %d)" + spa "No puedo crear base de datos '%-.192s' (Error: %d)" + swe "Kan inte skapa databasen '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_DB_CREATE_EXISTS - cze "Nemohu vytvo-Bøit databázi '%-.64s'; databáze ji¾ existuje" - dan "Kan ikke oprette databasen '%-.64s'; databasen eksisterer" - nla "Kan database '%-.64s' niet aanmaken; database bestaat reeds" - eng "Can't create database '%-.64s'; database exists" - jps "'%-.64s' ƒf[ƒ^ƒx[ƒX‚ªì‚ê‚Ü‚¹‚ñ.Šù‚É‚»‚̃f[ƒ^ƒx[ƒX‚ª‘¶Ý‚µ‚Ü‚·", - est "Ei suuda luua andmebaasi '%-.64s': andmebaas juba eksisteerib" - fre "Ne peut créer la base '%-.64s'; elle existe déjà" - ger "Kann Datenbank '%-.64s' nicht erzeugen. Datenbank existiert bereits" - greek "Áäýíáôç ç äçìéïõñãßá ôçò âÜóçò äåäïìÝíùí '%-.64s'; Ç âÜóç äåäïìÝíùí õðÜñ÷åé Þäç" - hun "Az '%-.64s' adatbazis nem hozhato letre Az adatbazis mar letezik" - ita "Impossibile creare il database '%-.64s'; il database esiste" - jpn "'%-.64s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ºî¤ì¤Þ¤»¤ó.´û¤Ë¤½¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬Â¸ºß¤·¤Þ¤¹" - kor "µ¥ÀÌŸº£À̽º '%-.64s'¸¦ ¸¸µéÁö ¸øÇß½À´Ï´Ù.. µ¥ÀÌŸº£À̽º°¡ Á¸ÀçÇÔ" - nor "Kan ikke opprette databasen '%-.64s'; databasen eksisterer" - norwegian-ny "Kan ikkje opprette databasen '%-.64s'; databasen eksisterer" - pol "Nie mo¿na stworzyæ bazy danych '%-.64s'; baza danych ju¿ istnieje" - por "Não pode criar o banco de dados '%-.64s'; este banco de dados já existe" - rum "Nu pot sa creez baza de date '%-.64s'; baza de date exista deja" - rus "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.64s'. âÁÚÁ ÄÁÎÎÙÈ ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Ne mogu da kreiram bazu '%-.64s'; baza veæ postoji." - slo "Nemô¾em vytvori» databázu '%-.64s'; databáza existuje" - spa "No puedo crear base de datos '%-.64s'; la base de datos ya existe" - swe "Databasen '%-.64s' existerar redan" - ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.64s'. âÁÚÁ ÄÁÎÎÉÈ ¦ÓÎÕ¤" + cze "Nemohu vytvo-Bøit databázi '%-.192s'; databáze ji¾ existuje" + dan "Kan ikke oprette databasen '%-.192s'; databasen eksisterer" + nla "Kan database '%-.192s' niet aanmaken; database bestaat reeds" + eng "Can't create database '%-.192s'; database exists" + jps "'%-.192s' ƒf[ƒ^ƒx[ƒX‚ªì‚ê‚Ü‚¹‚ñ.Šù‚É‚»‚̃f[ƒ^ƒx[ƒX‚ª‘¶Ý‚µ‚Ü‚·", + est "Ei suuda luua andmebaasi '%-.192s': andmebaas juba eksisteerib" + fre "Ne peut créer la base '%-.192s'; elle existe déjà" + ger "Kann Datenbank '%-.192s' nicht erzeugen. Datenbank existiert bereits" + greek "Áäýíáôç ç äçìéïõñãßá ôçò âÜóçò äåäïìÝíùí '%-.192s'; Ç âÜóç äåäïìÝíùí õðÜñ÷åé Þäç" + hun "Az '%-.192s' adatbazis nem hozhato letre Az adatbazis mar letezik" + ita "Impossibile creare il database '%-.192s'; il database esiste" + jpn "'%-.192s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ºî¤ì¤Þ¤»¤ó.´û¤Ë¤½¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬Â¸ºß¤·¤Þ¤¹" + kor "µ¥ÀÌŸº£À̽º '%-.192s'¸¦ ¸¸µéÁö ¸øÇß½À´Ï´Ù.. µ¥ÀÌŸº£À̽º°¡ Á¸ÀçÇÔ" + nor "Kan ikke opprette databasen '%-.192s'; databasen eksisterer" + norwegian-ny "Kan ikkje opprette databasen '%-.192s'; databasen eksisterer" + pol "Nie mo¿na stworzyæ bazy danych '%-.192s'; baza danych ju¿ istnieje" + por "Não pode criar o banco de dados '%-.192s'; este banco de dados já existe" + rum "Nu pot sa creez baza de date '%-.192s'; baza de date exista deja" + rus "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.192s'. âÁÚÁ ÄÁÎÎÙÈ ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Ne mogu da kreiram bazu '%-.192s'; baza veæ postoji." + slo "Nemô¾em vytvori» databázu '%-.192s'; databáza existuje" + spa "No puedo crear base de datos '%-.192s'; la base de datos ya existe" + swe "Databasen '%-.192s' existerar redan" + ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.192s'. âÁÚÁ ÄÁÎÎÉÈ ¦ÓÎÕ¤" ER_DB_DROP_EXISTS - cze "Nemohu zru-B¹it databázi '%-.64s', databáze neexistuje" - dan "Kan ikke slette (droppe) '%-.64s'; databasen eksisterer ikke" - nla "Kan database '%-.64s' niet verwijderen; database bestaat niet" - eng "Can't drop database '%-.64s'; database doesn't exist" - jps "'%-.64s' ƒf[ƒ^ƒx[ƒX‚ð”jŠü‚Å‚«‚Ü‚¹‚ñ. ‚»‚̃f[ƒ^ƒx[ƒX‚ª‚È‚¢‚̂ł·.", - est "Ei suuda kustutada andmebaasi '%-.64s': andmebaasi ei eksisteeri" - fre "Ne peut effacer la base '%-.64s'; elle n'existe pas" - ger "Kann Datenbank '%-.64s' nicht löschen; Datenbank nicht vorhanden" - greek "Áäýíáôç ç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí '%-.64s'. Ç âÜóç äåäïìÝíùí äåí õðÜñ÷åé" - hun "A(z) '%-.64s' adatbazis nem szuntetheto meg. Az adatbazis nem letezik" - ita "Impossibile cancellare '%-.64s'; il database non esiste" - jpn "'%-.64s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÇË´þ¤Ç¤­¤Þ¤»¤ó. ¤½¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬¤Ê¤¤¤Î¤Ç¤¹." - kor "µ¥ÀÌŸº£À̽º '%-.64s'¸¦ Á¦°ÅÇÏÁö ¸øÇß½À´Ï´Ù. µ¥ÀÌŸº£À̽º°¡ Á¸ÀçÇÏÁö ¾ÊÀ½ " - nor "Kan ikke fjerne (drop) '%-.64s'; databasen eksisterer ikke" - norwegian-ny "Kan ikkje fjerne (drop) '%-.64s'; databasen eksisterer ikkje" - pol "Nie mo¿na usun?æ bazy danych '%-.64s'; baza danych nie istnieje" - por "Não pode eliminar o banco de dados '%-.64s'; este banco de dados não existe" - rum "Nu pot sa drop baza de date '%-.64s'; baza da date este inexistenta" - rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.64s'. ôÁËÏÊ ÂÁÚÙ ÄÁÎÎÙÈ ÎÅÔ" - serbian "Ne mogu da izbrišem bazu '%-.64s'; baza ne postoji." - slo "Nemô¾em zmaza» databázu '%-.64s'; databáza neexistuje" - spa "No puedo eliminar base de datos '%-.64s'; la base de datos no existe" - swe "Kan inte radera databasen '%-.64s'; databasen finns inte" - ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.64s'. âÁÚÁ ÄÁÎÎÉÈ ÎÅ ¦ÓÎÕ¤" + cze "Nemohu zru-B¹it databázi '%-.192s', databáze neexistuje" + dan "Kan ikke slette (droppe) '%-.192s'; databasen eksisterer ikke" + nla "Kan database '%-.192s' niet verwijderen; database bestaat niet" + eng "Can't drop database '%-.192s'; database doesn't exist" + jps "'%-.192s' ƒf[ƒ^ƒx[ƒX‚ð”jŠü‚Å‚«‚Ü‚¹‚ñ. ‚»‚̃f[ƒ^ƒx[ƒX‚ª‚È‚¢‚̂ł·.", + est "Ei suuda kustutada andmebaasi '%-.192s': andmebaasi ei eksisteeri" + fre "Ne peut effacer la base '%-.192s'; elle n'existe pas" + ger "Kann Datenbank '%-.192s' nicht löschen; Datenbank nicht vorhanden" + greek "Áäýíáôç ç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí '%-.192s'. Ç âÜóç äåäïìÝíùí äåí õðÜñ÷åé" + hun "A(z) '%-.192s' adatbazis nem szuntetheto meg. Az adatbazis nem letezik" + ita "Impossibile cancellare '%-.192s'; il database non esiste" + jpn "'%-.192s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÇË´þ¤Ç¤­¤Þ¤»¤ó. ¤½¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬¤Ê¤¤¤Î¤Ç¤¹." + kor "µ¥ÀÌŸº£À̽º '%-.192s'¸¦ Á¦°ÅÇÏÁö ¸øÇß½À´Ï´Ù. µ¥ÀÌŸº£À̽º°¡ Á¸ÀçÇÏÁö ¾ÊÀ½ " + nor "Kan ikke fjerne (drop) '%-.192s'; databasen eksisterer ikke" + norwegian-ny "Kan ikkje fjerne (drop) '%-.192s'; databasen eksisterer ikkje" + pol "Nie mo¿na usun?æ bazy danych '%-.192s'; baza danych nie istnieje" + por "Não pode eliminar o banco de dados '%-.192s'; este banco de dados não existe" + rum "Nu pot sa drop baza de date '%-.192s'; baza da date este inexistenta" + rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.192s'. ôÁËÏÊ ÂÁÚÙ ÄÁÎÎÙÈ ÎÅÔ" + serbian "Ne mogu da izbrišem bazu '%-.192s'; baza ne postoji." + slo "Nemô¾em zmaza» databázu '%-.192s'; databáza neexistuje" + spa "No puedo eliminar base de datos '%-.192s'; la base de datos no existe" + swe "Kan inte radera databasen '%-.192s'; databasen finns inte" + ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.192s'. âÁÚÁ ÄÁÎÎÉÈ ÎÅ ¦ÓÎÕ¤" ER_DB_DROP_DELETE - cze "Chyba p-Bøi ru¹ení databáze (nemohu vymazat '%-.64s', chyba %d)" - dan "Fejl ved sletning (drop) af databasen (kan ikke slette '%-.64s', Fejlkode %d)" - nla "Fout bij verwijderen database (kan '%-.64s' niet verwijderen, Errcode: %d)" - eng "Error dropping database (can't delete '%-.64s', errno: %d)" - jps "ƒf[ƒ^ƒx[ƒX”jŠüƒGƒ‰[ ('%-.64s' ‚ð휂ł«‚Ü‚¹‚ñ, errno: %d)", - est "Viga andmebaasi kustutamisel (ei suuda kustutada faili '%-.64s', veakood: %d)" - fre "Ne peut effacer la base '%-.64s' (erreur %d)" - ger "Fehler beim Löschen der Datenbank ('%-.64s' kann nicht gelöscht werden, Fehler: %d)" - greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí (áäýíáôç ç äéáãñáöÞ '%-.64s', êùäéêüò ëÜèïõò: %d)" - hun "Adatbazis megszuntetesi hiba ('%-.64s' nem torolheto, hibakod: %d)" - ita "Errore durante la cancellazione del database (impossibile cancellare '%-.64s', errno: %d)" - jpn "¥Ç¡¼¥¿¥Ù¡¼¥¹ÇË´þ¥¨¥é¡¼ ('%-.64s' ¤òºï½ü¤Ç¤­¤Þ¤»¤ó, errno: %d)" - kor "µ¥ÀÌŸº£À̽º Á¦°Å ¿¡·¯('%-.64s'¸¦ »èÁ¦ÇÒ ¼ö ¾øÀ¾´Ï´Ù, ¿¡·¯¹øÈ£: %d)" - nor "Feil ved fjerning (drop) av databasen (kan ikke slette '%-.64s', feil %d)" - norwegian-ny "Feil ved fjerning (drop) av databasen (kan ikkje slette '%-.64s', feil %d)" - pol "B³?d podczas usuwania bazy danych (nie mo¿na usun?æ '%-.64s', b³?d %d)" - por "Erro ao eliminar banco de dados (não pode eliminar '%-.64s' - erro no. %d)" - rum "Eroare dropuind baza de date (nu pot sa sterg '%-.64s', Eroare: %d)" - rus "ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ ÂÁÚÙ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ '%-.64s', ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem '%-.64s', errno: %d)" - slo "Chyba pri mazaní databázy (nemô¾em zmaza» '%-.64s', chybový kód: %d)" - spa "Error eliminando la base de datos(no puedo borrar '%-.64s', error %d)" - swe "Fel vid radering av databasen (Kan inte radera '%-.64s'. Felkod: %d)" - ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ (îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ '%-.64s', ÐÏÍÉÌËÁ: %d)" + cze "Chyba p-Bøi ru¹ení databáze (nemohu vymazat '%-.192s', chyba %d)" + dan "Fejl ved sletning (drop) af databasen (kan ikke slette '%-.192s', Fejlkode %d)" + nla "Fout bij verwijderen database (kan '%-.192s' niet verwijderen, Errcode: %d)" + eng "Error dropping database (can't delete '%-.192s', errno: %d)" + jps "ƒf[ƒ^ƒx[ƒX”jŠüƒGƒ‰[ ('%-.192s' ‚ð휂ł«‚Ü‚¹‚ñ, errno: %d)", + est "Viga andmebaasi kustutamisel (ei suuda kustutada faili '%-.192s', veakood: %d)" + fre "Ne peut effacer la base '%-.192s' (erreur %d)" + ger "Fehler beim Löschen der Datenbank ('%-.192s' kann nicht gelöscht werden, Fehler: %d)" + greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí (áäýíáôç ç äéáãñáöÞ '%-.192s', êùäéêüò ëÜèïõò: %d)" + hun "Adatbazis megszuntetesi hiba ('%-.192s' nem torolheto, hibakod: %d)" + ita "Errore durante la cancellazione del database (impossibile cancellare '%-.192s', errno: %d)" + jpn "¥Ç¡¼¥¿¥Ù¡¼¥¹ÇË´þ¥¨¥é¡¼ ('%-.192s' ¤òºï½ü¤Ç¤­¤Þ¤»¤ó, errno: %d)" + kor "µ¥ÀÌŸº£À̽º Á¦°Å ¿¡·¯('%-.192s'¸¦ »èÁ¦ÇÒ ¼ö ¾øÀ¾´Ï´Ù, ¿¡·¯¹øÈ£: %d)" + nor "Feil ved fjerning (drop) av databasen (kan ikke slette '%-.192s', feil %d)" + norwegian-ny "Feil ved fjerning (drop) av databasen (kan ikkje slette '%-.192s', feil %d)" + pol "B³?d podczas usuwania bazy danych (nie mo¿na usun?æ '%-.192s', b³?d %d)" + por "Erro ao eliminar banco de dados (não pode eliminar '%-.192s' - erro no. %d)" + rum "Eroare dropuind baza de date (nu pot sa sterg '%-.192s', Eroare: %d)" + rus "ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ ÂÁÚÙ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ '%-.192s', ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem '%-.192s', errno: %d)" + slo "Chyba pri mazaní databázy (nemô¾em zmaza» '%-.192s', chybový kód: %d)" + spa "Error eliminando la base de datos(no puedo borrar '%-.192s', error %d)" + swe "Fel vid radering av databasen (Kan inte radera '%-.192s'. Felkod: %d)" + ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ (îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ '%-.192s', ÐÏÍÉÌËÁ: %d)" ER_DB_DROP_RMDIR - cze "Chyba p-Bøi ru¹ení databáze (nemohu vymazat adresáø '%-.64s', chyba %d)" - dan "Fejl ved sletting af database (kan ikke slette folderen '%-.64s', Fejlkode %d)" - nla "Fout bij verwijderen database (kan rmdir '%-.64s' niet uitvoeren, Errcode: %d)" - eng "Error dropping database (can't rmdir '%-.64s', errno: %d)" - jps "ƒf[ƒ^ƒx[ƒX”jŠüƒGƒ‰[ ('%-.64s' ‚ð rmdir ‚Å‚«‚Ü‚¹‚ñ, errno: %d)", - est "Viga andmebaasi kustutamisel (ei suuda kustutada kataloogi '%-.64s', veakood: %d)" - fre "Erreur en effaçant la base (rmdir '%-.64s', erreur %d)" - ger "Fehler beim Löschen der Datenbank (Verzeichnis '%-.64s' kann nicht gelöscht werden, Fehler: %d)" - greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí (áäýíáôç ç äéáãñáöÞ ôïõ öáêÝëëïõ '%-.64s', êùäéêüò ëÜèïõò: %d)" - hun "Adatbazis megszuntetesi hiba ('%-.64s' nem szuntetheto meg, hibakod: %d)" - ita "Errore durante la cancellazione del database (impossibile rmdir '%-.64s', errno: %d)" - jpn "¥Ç¡¼¥¿¥Ù¡¼¥¹ÇË´þ¥¨¥é¡¼ ('%-.64s' ¤ò rmdir ¤Ç¤­¤Þ¤»¤ó, errno: %d)" - kor "µ¥ÀÌŸº£À̽º Á¦°Å ¿¡·¯(rmdir '%-.64s'¸¦ ÇÒ ¼ö ¾øÀ¾´Ï´Ù, ¿¡·¯¹øÈ£: %d)" - nor "Feil ved sletting av database (kan ikke slette katalogen '%-.64s', feil %d)" - norwegian-ny "Feil ved sletting av database (kan ikkje slette katalogen '%-.64s', feil %d)" - pol "B³?d podczas usuwania bazy danych (nie mo¿na wykonaæ rmdir '%-.64s', b³?d %d)" - por "Erro ao eliminar banco de dados (não pode remover diretório '%-.64s' - erro no. %d)" - rum "Eroare dropuind baza de date (nu pot sa rmdir '%-.64s', Eroare: %d)" - rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ËÁÔÁÌÏÇ '%-.64s', ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem direktorijum '%-.64s', errno: %d)" - slo "Chyba pri mazaní databázy (nemô¾em vymaza» adresár '%-.64s', chybový kód: %d)" - spa "Error eliminando la base de datos (No puedo borrar directorio '%-.64s', error %d)" - swe "Fel vid radering av databasen (Kan inte radera biblioteket '%-.64s'. Felkod: %d)" - ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ (îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÔÅËÕ '%-.64s', ÐÏÍÉÌËÁ: %d)" + cze "Chyba p-Bøi ru¹ení databáze (nemohu vymazat adresáø '%-.192s', chyba %d)" + dan "Fejl ved sletting af database (kan ikke slette folderen '%-.192s', Fejlkode %d)" + nla "Fout bij verwijderen database (kan rmdir '%-.192s' niet uitvoeren, Errcode: %d)" + eng "Error dropping database (can't rmdir '%-.192s', errno: %d)" + jps "ƒf[ƒ^ƒx[ƒX”jŠüƒGƒ‰[ ('%-.192s' ‚ð rmdir ‚Å‚«‚Ü‚¹‚ñ, errno: %d)", + est "Viga andmebaasi kustutamisel (ei suuda kustutada kataloogi '%-.192s', veakood: %d)" + fre "Erreur en effaçant la base (rmdir '%-.192s', erreur %d)" + ger "Fehler beim Löschen der Datenbank (Verzeichnis '%-.192s' kann nicht gelöscht werden, Fehler: %d)" + greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí (áäýíáôç ç äéáãñáöÞ ôïõ öáêÝëëïõ '%-.192s', êùäéêüò ëÜèïõò: %d)" + hun "Adatbazis megszuntetesi hiba ('%-.192s' nem szuntetheto meg, hibakod: %d)" + ita "Errore durante la cancellazione del database (impossibile rmdir '%-.192s', errno: %d)" + jpn "¥Ç¡¼¥¿¥Ù¡¼¥¹ÇË´þ¥¨¥é¡¼ ('%-.192s' ¤ò rmdir ¤Ç¤­¤Þ¤»¤ó, errno: %d)" + kor "µ¥ÀÌŸº£À̽º Á¦°Å ¿¡·¯(rmdir '%-.192s'¸¦ ÇÒ ¼ö ¾øÀ¾´Ï´Ù, ¿¡·¯¹øÈ£: %d)" + nor "Feil ved sletting av database (kan ikke slette katalogen '%-.192s', feil %d)" + norwegian-ny "Feil ved sletting av database (kan ikkje slette katalogen '%-.192s', feil %d)" + pol "B³?d podczas usuwania bazy danych (nie mo¿na wykonaæ rmdir '%-.192s', b³?d %d)" + por "Erro ao eliminar banco de dados (não pode remover diretório '%-.192s' - erro no. %d)" + rum "Eroare dropuind baza de date (nu pot sa rmdir '%-.192s', Eroare: %d)" + rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ËÁÔÁÌÏÇ '%-.192s', ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem direktorijum '%-.192s', errno: %d)" + slo "Chyba pri mazaní databázy (nemô¾em vymaza» adresár '%-.192s', chybový kód: %d)" + spa "Error eliminando la base de datos (No puedo borrar directorio '%-.192s', error %d)" + swe "Fel vid radering av databasen (Kan inte radera biblioteket '%-.192s'. Felkod: %d)" + ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ (îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÔÅËÕ '%-.192s', ÐÏÍÉÌËÁ: %d)" ER_CANT_DELETE_FILE - cze "Chyba p-Bøi výmazu '%-.64s' (chybový kód: %d)" - dan "Fejl ved sletning af '%-.64s' (Fejlkode: %d)" - nla "Fout bij het verwijderen van '%-.64s' (Errcode: %d)" - eng "Error on delete of '%-.64s' (errno: %d)" - jps "'%-.64s' ‚Ì휂ªƒGƒ‰[ (errno: %d)", - est "Viga '%-.64s' kustutamisel (veakood: %d)" - fre "Erreur en effaçant '%-.64s' (Errcode: %d)" - ger "Fehler beim Löschen von '%-.64s' (Fehler: %d)" - greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Torlesi hiba: '%-.64s' (hibakod: %d)" - ita "Errore durante la cancellazione di '%-.64s' (errno: %d)" - jpn "'%-.64s' ¤Îºï½ü¤¬¥¨¥é¡¼ (errno: %d)" - kor "'%-.64s' »èÁ¦ Áß ¿¡·¯ (¿¡·¯¹øÈ£: %d)" - nor "Feil ved sletting av '%-.64s' (Feilkode: %d)" - norwegian-ny "Feil ved sletting av '%-.64s' (Feilkode: %d)" - pol "B³?d podczas usuwania '%-.64s' (Kod b³êdu: %d)" - por "Erro na remoção de '%-.64s' (erro no. %d)" - rum "Eroare incercind sa delete '%-.64s' (Eroare: %d)" - rus "ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Greška pri brisanju '%-.64s' (errno: %d)" - slo "Chyba pri mazaní '%-.64s' (chybový kód: %d)" - spa "Error en el borrado de '%-.64s' (Error: %d)" - swe "Kan inte radera filen '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Chyba p-Bøi výmazu '%-.192s' (chybový kód: %d)" + dan "Fejl ved sletning af '%-.192s' (Fejlkode: %d)" + nla "Fout bij het verwijderen van '%-.192s' (Errcode: %d)" + eng "Error on delete of '%-.192s' (errno: %d)" + jps "'%-.192s' ‚Ì휂ªƒGƒ‰[ (errno: %d)", + est "Viga '%-.192s' kustutamisel (veakood: %d)" + fre "Erreur en effaçant '%-.192s' (Errcode: %d)" + ger "Fehler beim Löschen von '%-.192s' (Fehler: %d)" + greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Torlesi hiba: '%-.192s' (hibakod: %d)" + ita "Errore durante la cancellazione di '%-.192s' (errno: %d)" + jpn "'%-.192s' ¤Îºï½ü¤¬¥¨¥é¡¼ (errno: %d)" + kor "'%-.192s' »èÁ¦ Áß ¿¡·¯ (¿¡·¯¹øÈ£: %d)" + nor "Feil ved sletting av '%-.192s' (Feilkode: %d)" + norwegian-ny "Feil ved sletting av '%-.192s' (Feilkode: %d)" + pol "B³?d podczas usuwania '%-.192s' (Kod b³êdu: %d)" + por "Erro na remoção de '%-.192s' (erro no. %d)" + rum "Eroare incercind sa delete '%-.192s' (Eroare: %d)" + rus "ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Greška pri brisanju '%-.192s' (errno: %d)" + slo "Chyba pri mazaní '%-.192s' (chybový kód: %d)" + spa "Error en el borrado de '%-.192s' (Error: %d)" + swe "Kan inte radera filen '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_CANT_FIND_SYSTEM_REC cze "Nemohu -Bèíst záznam v systémové tabulce" dan "Kan ikke læse posten i systemfolderen" @@ -400,78 +400,78 @@ ER_FILE_NOT_FOUND swe "Hittar inte filen '%-.200s' (Felkod: %d)" ukr "îÅ ÍÏÖÕ ÚÎÁÊÔÉ ÆÁÊÌ: '%-.200s' (ÐÏÍÉÌËÁ: %d)" ER_CANT_READ_DIR - cze "Nemohu -Bèíst adresáø '%-.64s' (chybový kód: %d)" - dan "Kan ikke læse folder '%-.64s' (Fejlkode: %d)" - nla "Kan de directory niet lezen van '%-.64s' (Errcode: %d)" - eng "Can't read dir of '%-.64s' (errno: %d)" - jps "'%-.64s' ƒfƒBƒŒƒNƒgƒŠ‚ª“ǂ߂܂¹‚ñ.(errno: %d)", - est "Ei suuda lugeda kataloogi '%-.64s' (veakood: %d)" - fre "Ne peut lire le répertoire de '%-.64s' (Errcode: %d)" - ger "Verzeichnis von '%-.64s' nicht lesbar (Fehler: %d)" - greek "Äåí åßíáé äõíáôü íá äéáâáóôåß ï öÜêåëëïò ôïõ '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "A(z) '%-.64s' konyvtar nem olvashato. (hibakod: %d)" - ita "Impossibile leggere la directory di '%-.64s' (errno: %d)" - jpn "'%-.64s' ¥Ç¥£¥ì¥¯¥È¥ê¤¬ÆÉ¤á¤Þ¤»¤ó.(errno: %d)" - kor "'%-.64s'µð·ºÅ丮¸¦ ÀÐÁö ¸øÇß½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)" - nor "Kan ikke lese katalogen '%-.64s' (Feilkode: %d)" - norwegian-ny "Kan ikkje lese katalogen '%-.64s' (Feilkode: %d)" - pol "Nie mo¿na odczytaæ katalogu '%-.64s' (Kod b³êdu: %d)" - por "Não pode ler o diretório de '%-.64s' (erro no. %d)" - rum "Nu pot sa citesc directorul '%-.64s' (Eroare: %d)" - rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ËÁÔÁÌÏÇ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da proèitam direktorijum '%-.64s' (errno: %d)" - slo "Nemô¾em èíta» adresár '%-.64s' (chybový kód: %d)" - spa "No puedo leer el directorio de '%-.64s' (Error: %d)" - swe "Kan inte läsa från bibliotek '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ÐÒÏÞÉÔÁÔÉ ÔÅËÕ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Nemohu -Bèíst adresáø '%-.192s' (chybový kód: %d)" + dan "Kan ikke læse folder '%-.192s' (Fejlkode: %d)" + nla "Kan de directory niet lezen van '%-.192s' (Errcode: %d)" + eng "Can't read dir of '%-.192s' (errno: %d)" + jps "'%-.192s' ƒfƒBƒŒƒNƒgƒŠ‚ª“ǂ߂܂¹‚ñ.(errno: %d)", + est "Ei suuda lugeda kataloogi '%-.192s' (veakood: %d)" + fre "Ne peut lire le répertoire de '%-.192s' (Errcode: %d)" + ger "Verzeichnis von '%-.192s' nicht lesbar (Fehler: %d)" + greek "Äåí åßíáé äõíáôü íá äéáâáóôåß ï öÜêåëëïò ôïõ '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "A(z) '%-.192s' konyvtar nem olvashato. (hibakod: %d)" + ita "Impossibile leggere la directory di '%-.192s' (errno: %d)" + jpn "'%-.192s' ¥Ç¥£¥ì¥¯¥È¥ê¤¬ÆÉ¤á¤Þ¤»¤ó.(errno: %d)" + kor "'%-.192s'µð·ºÅ丮¸¦ ÀÐÁö ¸øÇß½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)" + nor "Kan ikke lese katalogen '%-.192s' (Feilkode: %d)" + norwegian-ny "Kan ikkje lese katalogen '%-.192s' (Feilkode: %d)" + pol "Nie mo¿na odczytaæ katalogu '%-.192s' (Kod b³êdu: %d)" + por "Não pode ler o diretório de '%-.192s' (erro no. %d)" + rum "Nu pot sa citesc directorul '%-.192s' (Eroare: %d)" + rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ËÁÔÁÌÏÇ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da proèitam direktorijum '%-.192s' (errno: %d)" + slo "Nemô¾em èíta» adresár '%-.192s' (chybový kód: %d)" + spa "No puedo leer el directorio de '%-.192s' (Error: %d)" + swe "Kan inte läsa från bibliotek '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ÐÒÏÞÉÔÁÔÉ ÔÅËÕ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_CANT_SET_WD - cze "Nemohu zm-Bìnit adresáø na '%-.64s' (chybový kód: %d)" - dan "Kan ikke skifte folder til '%-.64s' (Fejlkode: %d)" - nla "Kan de directory niet veranderen naar '%-.64s' (Errcode: %d)" - eng "Can't change dir to '%-.64s' (errno: %d)" - jps "'%-.64s' ƒfƒBƒŒƒNƒgƒŠ‚É chdir ‚Å‚«‚Ü‚¹‚ñ.(errno: %d)", - est "Ei suuda siseneda kataloogi '%-.64s' (veakood: %d)" - fre "Ne peut changer le répertoire pour '%-.64s' (Errcode: %d)" - ger "Kann nicht in das Verzeichnis '%-.64s' wechseln (Fehler: %d)" - greek "Áäýíáôç ç áëëáãÞ ôïõ ôñÝ÷ïíôïò êáôáëüãïõ óå '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Konyvtarvaltas nem lehetseges a(z) '%-.64s'-ba. (hibakod: %d)" - ita "Impossibile cambiare la directory in '%-.64s' (errno: %d)" - jpn "'%-.64s' ¥Ç¥£¥ì¥¯¥È¥ê¤Ë chdir ¤Ç¤­¤Þ¤»¤ó.(errno: %d)" - kor "'%-.64s'µð·ºÅ丮·Î À̵¿ÇÒ ¼ö ¾ø¾ú½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)" - nor "Kan ikke skifte katalog til '%-.64s' (Feilkode: %d)" - norwegian-ny "Kan ikkje skifte katalog til '%-.64s' (Feilkode: %d)" - pol "Nie mo¿na zmieniæ katalogu na '%-.64s' (Kod b³êdu: %d)" - por "Não pode mudar para o diretório '%-.64s' (erro no. %d)" - rum "Nu pot sa schimb directorul '%-.64s' (Eroare: %d)" - rus "îÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÊÔÉ × ËÁÔÁÌÏÇ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da promenim direktorijum na '%-.64s' (errno: %d)" - slo "Nemô¾em vojs» do adresára '%-.64s' (chybový kód: %d)" - spa "No puedo cambiar al directorio de '%-.64s' (Error: %d)" - swe "Kan inte byta till '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ÐÅÒÅÊÔÉ Õ ÔÅËÕ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Nemohu zm-Bìnit adresáø na '%-.192s' (chybový kód: %d)" + dan "Kan ikke skifte folder til '%-.192s' (Fejlkode: %d)" + nla "Kan de directory niet veranderen naar '%-.192s' (Errcode: %d)" + eng "Can't change dir to '%-.192s' (errno: %d)" + jps "'%-.192s' ƒfƒBƒŒƒNƒgƒŠ‚É chdir ‚Å‚«‚Ü‚¹‚ñ.(errno: %d)", + est "Ei suuda siseneda kataloogi '%-.192s' (veakood: %d)" + fre "Ne peut changer le répertoire pour '%-.192s' (Errcode: %d)" + ger "Kann nicht in das Verzeichnis '%-.192s' wechseln (Fehler: %d)" + greek "Áäýíáôç ç áëëáãÞ ôïõ ôñÝ÷ïíôïò êáôáëüãïõ óå '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Konyvtarvaltas nem lehetseges a(z) '%-.192s'-ba. (hibakod: %d)" + ita "Impossibile cambiare la directory in '%-.192s' (errno: %d)" + jpn "'%-.192s' ¥Ç¥£¥ì¥¯¥È¥ê¤Ë chdir ¤Ç¤­¤Þ¤»¤ó.(errno: %d)" + kor "'%-.192s'µð·ºÅ丮·Î À̵¿ÇÒ ¼ö ¾ø¾ú½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)" + nor "Kan ikke skifte katalog til '%-.192s' (Feilkode: %d)" + norwegian-ny "Kan ikkje skifte katalog til '%-.192s' (Feilkode: %d)" + pol "Nie mo¿na zmieniæ katalogu na '%-.192s' (Kod b³êdu: %d)" + por "Não pode mudar para o diretório '%-.192s' (erro no. %d)" + rum "Nu pot sa schimb directorul '%-.192s' (Eroare: %d)" + rus "îÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÊÔÉ × ËÁÔÁÌÏÇ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da promenim direktorijum na '%-.192s' (errno: %d)" + slo "Nemô¾em vojs» do adresára '%-.192s' (chybový kód: %d)" + spa "No puedo cambiar al directorio de '%-.192s' (Error: %d)" + swe "Kan inte byta till '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ÐÅÒÅÊÔÉ Õ ÔÅËÕ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_CHECKREAD - cze "Z-Báznam byl zmìnìn od posledního ètení v tabulce '%-.64s'" - dan "Posten er ændret siden sidste læsning '%-.64s'" - nla "Record is veranderd sinds de laatste lees activiteit in de tabel '%-.64s'" - eng "Record has changed since last read in table '%-.64s'" - est "Kirje tabelis '%-.64s' on muutunud viimasest lugemisest saadik" - fre "Enregistrement modifié depuis sa dernière lecture dans la table '%-.64s'" - ger "Datensatz hat sich seit dem letzten Zugriff auf Tabelle '%-.64s' geändert" - greek "Ç åããñáöÞ Ý÷åé áëëÜîåé áðü ôçí ôåëåõôáßá öïñÜ ðïõ áíáóýñèçêå áðü ôïí ðßíáêá '%-.64s'" - hun "A(z) '%-.64s' tablaban talalhato rekord megvaltozott az utolso olvasas ota" - ita "Il record e` cambiato dall'ultima lettura della tabella '%-.64s'" - kor "Å×À̺í '%-.64s'¿¡¼­ ¸¶Áö¸·À¸·Î ÀÐÀº ÈÄ Record°¡ º¯°æµÇ¾ú½À´Ï´Ù." - nor "Posten har blitt endret siden den ble lest '%-.64s'" - norwegian-ny "Posten har vorte endra sidan den sist vart lesen '%-.64s'" - pol "Rekord zosta³ zmieniony od ostaniego odczytania z tabeli '%-.64s'" - por "Registro alterado desde a última leitura da tabela '%-.64s'" - rum "Cimpul a fost schimbat de la ultima citire a tabelei '%-.64s'" - rus "úÁÐÉÓØ ÉÚÍÅÎÉÌÁÓØ Ó ÍÏÍÅÎÔÁ ÐÏÓÌÅÄÎÅÊ ×ÙÂÏÒËÉ × ÔÁÂÌÉÃÅ '%-.64s'" - serbian "Slog je promenjen od zadnjeg èitanja tabele '%-.64s'" - slo "Záznam bol zmenený od posledného èítania v tabuµke '%-.64s'" - spa "El registro ha cambiado desde la ultima lectura de la tabla '%-.64s'" - swe "Posten har förändrats sedan den lästes i register '%-.64s'" - ukr "úÁÐÉÓ ÂÕÌÏ ÚͦÎÅÎÏ Ú ÞÁÓÕ ÏÓÔÁÎÎØÏÇÏ ÞÉÔÁÎÎÑ Ú ÔÁÂÌÉæ '%-.64s'" + cze "Z-Báznam byl zmìnìn od posledního ètení v tabulce '%-.192s'" + dan "Posten er ændret siden sidste læsning '%-.192s'" + nla "Record is veranderd sinds de laatste lees activiteit in de tabel '%-.192s'" + eng "Record has changed since last read in table '%-.192s'" + est "Kirje tabelis '%-.192s' on muutunud viimasest lugemisest saadik" + fre "Enregistrement modifié depuis sa dernière lecture dans la table '%-.192s'" + ger "Datensatz hat sich seit dem letzten Zugriff auf Tabelle '%-.192s' geändert" + greek "Ç åããñáöÞ Ý÷åé áëëÜîåé áðü ôçí ôåëåõôáßá öïñÜ ðïõ áíáóýñèçêå áðü ôïí ðßíáêá '%-.192s'" + hun "A(z) '%-.192s' tablaban talalhato rekord megvaltozott az utolso olvasas ota" + ita "Il record e` cambiato dall'ultima lettura della tabella '%-.192s'" + kor "Å×À̺í '%-.192s'¿¡¼­ ¸¶Áö¸·À¸·Î ÀÐÀº ÈÄ Record°¡ º¯°æµÇ¾ú½À´Ï´Ù." + nor "Posten har blitt endret siden den ble lest '%-.192s'" + norwegian-ny "Posten har vorte endra sidan den sist vart lesen '%-.192s'" + pol "Rekord zosta³ zmieniony od ostaniego odczytania z tabeli '%-.192s'" + por "Registro alterado desde a última leitura da tabela '%-.192s'" + rum "Cimpul a fost schimbat de la ultima citire a tabelei '%-.192s'" + rus "úÁÐÉÓØ ÉÚÍÅÎÉÌÁÓØ Ó ÍÏÍÅÎÔÁ ÐÏÓÌÅÄÎÅÊ ×ÙÂÏÒËÉ × ÔÁÂÌÉÃÅ '%-.192s'" + serbian "Slog je promenjen od zadnjeg èitanja tabele '%-.192s'" + slo "Záznam bol zmenený od posledného èítania v tabuµke '%-.192s'" + spa "El registro ha cambiado desde la ultima lectura de la tabla '%-.192s'" + swe "Posten har förändrats sedan den lästes i register '%-.192s'" + ukr "úÁÐÉÓ ÂÕÌÏ ÚͦÎÅÎÏ Ú ÞÁÓÕ ÏÓÔÁÎÎØÏÇÏ ÞÉÔÁÎÎÑ Ú ÔÁÂÌÉæ '%-.192s'" ER_DISK_FULL cze "Disk je pln-Bý (%s), èekám na uvolnìní nìjakého místa ..." dan "Ikke mere diskplads (%s). Venter på at få frigjort plads..." @@ -498,53 +498,53 @@ ER_DISK_FULL swe "Disken är full (%s). Väntar tills det finns ledigt utrymme..." ukr "äÉÓË ÚÁÐÏ×ÎÅÎÉÊ (%s). ÷ÉÞÉËÕÀ, ÄÏËÉ Ú×¦ÌØÎÉÔØÓÑ ÔÒÏÈÉ Í¦ÓÃÑ..." ER_DUP_KEY 23000 - cze "Nemohu zapsat, zdvojen-Bý klíè v tabulce '%-.64s'" - dan "Kan ikke skrive, flere ens nøgler i tabellen '%-.64s'" - nla "Kan niet schrijven, dubbele zoeksleutel in tabel '%-.64s'" - eng "Can't write; duplicate key in table '%-.64s'" - jps "table '%-.64s' ‚É key ‚ªd•¡‚µ‚Ä‚¢‚Ä‘‚«‚±‚߂܂¹‚ñ", - est "Ei saa kirjutada, korduv võti tabelis '%-.64s'" - fre "Ecriture impossible, doublon dans une clé de la table '%-.64s'" - ger "Kann nicht speichern, Grund: doppelter Schlüssel in Tabelle '%-.64s'" - greek "Äåí åßíáé äõíáôÞ ç êáôá÷þñçóç, ç ôéìÞ õðÜñ÷åé Þäç óôïí ðßíáêá '%-.64s'" - hun "Irasi hiba, duplikalt kulcs a '%-.64s' tablaban." - ita "Scrittura impossibile: chiave duplicata nella tabella '%-.64s'" - jpn "table '%-.64s' ¤Ë key ¤¬½ÅÊ£¤·¤Æ¤¤¤Æ½ñ¤­¤³¤á¤Þ¤»¤ó" - kor "±â·ÏÇÒ ¼ö ¾øÀ¾´Ï´Ù., Å×À̺í '%-.64s'¿¡¼­ Áߺ¹ Ű" - nor "Kan ikke skrive, flere like nøkler i tabellen '%-.64s'" - norwegian-ny "Kan ikkje skrive, flere like nyklar i tabellen '%-.64s'" - pol "Nie mo¿na zapisaæ, powtórzone klucze w tabeli '%-.64s'" - por "Não pode gravar. Chave duplicada na tabela '%-.64s'" - rum "Nu pot sa scriu (can't write), cheie duplicata in tabela '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÚÁÐÉÓØ, ÄÕÂÌÉÒÕÀÝÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉÃÅ '%-.64s'" - serbian "Ne mogu da pišem pošto postoji duplirani kljuè u tabeli '%-.64s'" - slo "Nemô¾em zapísa», duplikát kµúèa v tabuµke '%-.64s'" - spa "No puedo escribir, clave duplicada en la tabla '%-.64s'" - swe "Kan inte skriva, dubbel söknyckel i register '%-.64s'" - ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ, ÄÕÂÌÀÀÞÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉæ '%-.64s'" + cze "Nemohu zapsat, zdvojen-Bý klíè v tabulce '%-.192s'" + dan "Kan ikke skrive, flere ens nøgler i tabellen '%-.192s'" + nla "Kan niet schrijven, dubbele zoeksleutel in tabel '%-.192s'" + eng "Can't write; duplicate key in table '%-.192s'" + jps "table '%-.192s' ‚É key ‚ªd•¡‚µ‚Ä‚¢‚Ä‘‚«‚±‚߂܂¹‚ñ", + est "Ei saa kirjutada, korduv võti tabelis '%-.192s'" + fre "Ecriture impossible, doublon dans une clé de la table '%-.192s'" + ger "Kann nicht speichern, Grund: doppelter Schlüssel in Tabelle '%-.192s'" + greek "Äåí åßíáé äõíáôÞ ç êáôá÷þñçóç, ç ôéìÞ õðÜñ÷åé Þäç óôïí ðßíáêá '%-.192s'" + hun "Irasi hiba, duplikalt kulcs a '%-.192s' tablaban." + ita "Scrittura impossibile: chiave duplicata nella tabella '%-.192s'" + jpn "table '%-.192s' ¤Ë key ¤¬½ÅÊ£¤·¤Æ¤¤¤Æ½ñ¤­¤³¤á¤Þ¤»¤ó" + kor "±â·ÏÇÒ ¼ö ¾øÀ¾´Ï´Ù., Å×À̺í '%-.192s'¿¡¼­ Áߺ¹ Ű" + nor "Kan ikke skrive, flere like nøkler i tabellen '%-.192s'" + norwegian-ny "Kan ikkje skrive, flere like nyklar i tabellen '%-.192s'" + pol "Nie mo¿na zapisaæ, powtórzone klucze w tabeli '%-.192s'" + por "Não pode gravar. Chave duplicada na tabela '%-.192s'" + rum "Nu pot sa scriu (can't write), cheie duplicata in tabela '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÚÁÐÉÓØ, ÄÕÂÌÉÒÕÀÝÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉÃÅ '%-.192s'" + serbian "Ne mogu da pišem pošto postoji duplirani kljuè u tabeli '%-.192s'" + slo "Nemô¾em zapísa», duplikát kµúèa v tabuµke '%-.192s'" + spa "No puedo escribir, clave duplicada en la tabla '%-.192s'" + swe "Kan inte skriva, dubbel söknyckel i register '%-.192s'" + ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ, ÄÕÂÌÀÀÞÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉæ '%-.192s'" ER_ERROR_ON_CLOSE - cze "Chyba p-Bøi zavírání '%-.64s' (chybový kód: %d)" - dan "Fejl ved lukning af '%-.64s' (Fejlkode: %d)" - nla "Fout bij het sluiten van '%-.64s' (Errcode: %d)" - eng "Error on close of '%-.64s' (errno: %d)" - est "Viga faili '%-.64s' sulgemisel (veakood: %d)" - fre "Erreur a la fermeture de '%-.64s' (Errcode: %d)" - ger "Fehler beim Schließen von '%-.64s' (Fehler: %d)" - greek "ÐáñïõóéÜóôçêå ðñüâëçìá êëåßíïíôáò ôï '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Hiba a(z) '%-.64s' zarasakor. (hibakod: %d)" - ita "Errore durante la chiusura di '%-.64s' (errno: %d)" - kor "'%-.64s'´Ý´Â Áß ¿¡·¯ (¿¡·¯¹øÈ£: %d)" - nor "Feil ved lukking av '%-.64s' (Feilkode: %d)" - norwegian-ny "Feil ved lukking av '%-.64s' (Feilkode: %d)" - pol "B³?d podczas zamykania '%-.64s' (Kod b³êdu: %d)" - por "Erro ao fechar '%-.64s' (erro no. %d)" - rum "Eroare inchizind '%-.64s' (errno: %d)" - rus "ïÛÉÂËÁ ÐÒÉ ÚÁËÒÙÔÉÉ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Greška pri zatvaranju '%-.64s' (errno: %d)" - slo "Chyba pri zatváraní '%-.64s' (chybový kód: %d)" - spa "Error en el cierre de '%-.64s' (Error: %d)" - swe "Fick fel vid stängning av '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ÚÁËÒÉÔÉ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Chyba p-Bøi zavírání '%-.192s' (chybový kód: %d)" + dan "Fejl ved lukning af '%-.192s' (Fejlkode: %d)" + nla "Fout bij het sluiten van '%-.192s' (Errcode: %d)" + eng "Error on close of '%-.192s' (errno: %d)" + est "Viga faili '%-.192s' sulgemisel (veakood: %d)" + fre "Erreur a la fermeture de '%-.192s' (Errcode: %d)" + ger "Fehler beim Schließen von '%-.192s' (Fehler: %d)" + greek "ÐáñïõóéÜóôçêå ðñüâëçìá êëåßíïíôáò ôï '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Hiba a(z) '%-.192s' zarasakor. (hibakod: %d)" + ita "Errore durante la chiusura di '%-.192s' (errno: %d)" + kor "'%-.192s'´Ý´Â Áß ¿¡·¯ (¿¡·¯¹øÈ£: %d)" + nor "Feil ved lukking av '%-.192s' (Feilkode: %d)" + norwegian-ny "Feil ved lukking av '%-.192s' (Feilkode: %d)" + pol "B³?d podczas zamykania '%-.192s' (Kod b³êdu: %d)" + por "Erro ao fechar '%-.192s' (erro no. %d)" + rum "Eroare inchizind '%-.192s' (errno: %d)" + rus "ïÛÉÂËÁ ÐÒÉ ÚÁËÒÙÔÉÉ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Greška pri zatvaranju '%-.192s' (errno: %d)" + slo "Chyba pri zatváraní '%-.192s' (chybový kód: %d)" + spa "Error en el cierre de '%-.192s' (Error: %d)" + swe "Fick fel vid stängning av '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ÚÁËÒÉÔÉ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_ERROR_ON_READ cze "Chyba p-Bøi ètení souboru '%-.200s' (chybový kód: %d)" dan "Fejl ved læsning af '%-.200s' (Fejlkode: %d)" @@ -621,30 +621,30 @@ ER_ERROR_ON_WRITE swe "Fick fel vid skrivning till '%-.200s' (Felkod %d)" ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ ÆÁÊÌ '%-.200s' (ÐÏÍÉÌËÁ: %d)" ER_FILE_USED - cze "'%-.64s' je zam-Bèen proti zmìnám" - dan "'%-.64s' er låst mod opdateringer" - nla "'%-.64s' is geblokeerd tegen veranderingen" - eng "'%-.64s' is locked against change" - jps "'%-.64s' ‚̓ƒbƒN‚³‚ê‚Ä‚¢‚Ü‚·", - est "'%-.64s' on lukustatud muudatuste vastu" - fre "'%-.64s' est verrouillé contre les modifications" - ger "'%-.64s' ist für Änderungen gesperrt" - greek "'%-.64s' äåí åðéôñÝðïíôáé áëëáãÝò" - hun "'%-.64s' a valtoztatas ellen zarolva" - ita "'%-.64s' e` soggetto a lock contro i cambiamenti" - jpn "'%-.64s' ¤Ï¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤Þ¤¹" - kor "'%-.64s'°¡ º¯°æÇÒ ¼ö ¾øµµ·Ï Àá°ÜÀÖÀ¾´Ï´Ù." - nor "'%-.64s' er låst mot oppdateringer" - norwegian-ny "'%-.64s' er låst mot oppdateringar" - pol "'%-.64s' jest zablokowany na wypadek zmian" - por "'%-.64s' está com travamento contra alterações" - rum "'%-.64s' este blocat pentry schimbari (loccked against change)" - rus "'%-.64s' ÚÁÂÌÏËÉÒÏ×ÁÎ ÄÌÑ ÉÚÍÅÎÅÎÉÊ" - serbian "'%-.64s' je zakljuèan za upis" - slo "'%-.64s' je zamknutý proti zmenám" - spa "'%-.64s' esta bloqueado contra cambios" - swe "'%-.64s' är låst mot användning" - ukr "'%-.64s' ÚÁÂÌÏËÏ×ÁÎÉÊ ÎÁ ×ÎÅÓÅÎÎÑ ÚͦÎ" + cze "'%-.192s' je zam-Bèen proti zmìnám" + dan "'%-.192s' er låst mod opdateringer" + nla "'%-.192s' is geblokeerd tegen veranderingen" + eng "'%-.192s' is locked against change" + jps "'%-.192s' ‚̓ƒbƒN‚³‚ê‚Ä‚¢‚Ü‚·", + est "'%-.192s' on lukustatud muudatuste vastu" + fre "'%-.192s' est verrouillé contre les modifications" + ger "'%-.192s' ist für Änderungen gesperrt" + greek "'%-.192s' äåí åðéôñÝðïíôáé áëëáãÝò" + hun "'%-.192s' a valtoztatas ellen zarolva" + ita "'%-.192s' e` soggetto a lock contro i cambiamenti" + jpn "'%-.192s' ¤Ï¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤Þ¤¹" + kor "'%-.192s'°¡ º¯°æÇÒ ¼ö ¾øµµ·Ï Àá°ÜÀÖÀ¾´Ï´Ù." + nor "'%-.192s' er låst mot oppdateringer" + norwegian-ny "'%-.192s' er låst mot oppdateringar" + pol "'%-.192s' jest zablokowany na wypadek zmian" + por "'%-.192s' está com travamento contra alterações" + rum "'%-.192s' este blocat pentry schimbari (loccked against change)" + rus "'%-.192s' ÚÁÂÌÏËÉÒÏ×ÁÎ ÄÌÑ ÉÚÍÅÎÅÎÉÊ" + serbian "'%-.192s' je zakljuèan za upis" + slo "'%-.192s' je zamknutý proti zmenám" + spa "'%-.192s' esta bloqueado contra cambios" + swe "'%-.192s' är låst mot användning" + ukr "'%-.192s' ÚÁÂÌÏËÏ×ÁÎÉÊ ÎÁ ×ÎÅÓÅÎÎÑ ÚͦÎ" ER_FILSORT_ABORT cze "T-Bøídìní pøeru¹eno" dan "Sortering afbrudt" @@ -671,30 +671,30 @@ ER_FILSORT_ABORT swe "Sorteringen avbruten" ukr "óÏÒÔÕ×ÁÎÎÑ ÐÅÒÅÒ×ÁÎÏ" ER_FORM_NOT_FOUND - cze "Pohled '%-.64s' pro '%-.64s' neexistuje" - dan "View '%-.64s' eksisterer ikke for '%-.64s'" - nla "View '%-.64s' bestaat niet voor '%-.64s'" - eng "View '%-.64s' doesn't exist for '%-.64s'" - jps "View '%-.64s' ‚ª '%-.64s' ‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "Vaade '%-.64s' ei eksisteeri '%-.64s' jaoks" - fre "La vue (View) '%-.64s' n'existe pas pour '%-.64s'" - ger "View '%-.64s' existiert für '%-.64s' nicht" - greek "Ôï View '%-.64s' äåí õðÜñ÷åé ãéá '%-.64s'" - hun "A(z) '%-.64s' nezet nem letezik a(z) '%-.64s'-hoz" - ita "La view '%-.64s' non esiste per '%-.64s'" - jpn "View '%-.64s' ¤¬ '%-.64s' ¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "ºä '%-.64s'°¡ '%-.64s'¿¡¼­´Â Á¸ÀçÇÏÁö ¾ÊÀ¾´Ï´Ù." - nor "View '%-.64s' eksisterer ikke for '%-.64s'" - norwegian-ny "View '%-.64s' eksisterar ikkje for '%-.64s'" - pol "Widok '%-.64s' nie istnieje dla '%-.64s'" - por "Visão '%-.64s' não existe para '%-.64s'" - rum "View '%-.64s' nu exista pentru '%-.64s'" - rus "ðÒÅÄÓÔÁ×ÌÅÎÉÅ '%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ ÄÌÑ '%-.64s'" - serbian "View '%-.64s' ne postoji za '%-.64s'" - slo "Pohµad '%-.64s' neexistuje pre '%-.64s'" - spa "La vista '%-.64s' no existe para '%-.64s'" - swe "Formulär '%-.64s' finns inte i '%-.64s'" - ukr "÷ÉÇÌÑÄ '%-.64s' ÎÅ ¦ÓÎÕ¤ ÄÌÑ '%-.64s'" + cze "Pohled '%-.192s' pro '%-.192s' neexistuje" + dan "View '%-.192s' eksisterer ikke for '%-.192s'" + nla "View '%-.192s' bestaat niet voor '%-.192s'" + eng "View '%-.192s' doesn't exist for '%-.192s'" + jps "View '%-.192s' ‚ª '%-.192s' ‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "Vaade '%-.192s' ei eksisteeri '%-.192s' jaoks" + fre "La vue (View) '%-.192s' n'existe pas pour '%-.192s'" + ger "View '%-.192s' existiert für '%-.192s' nicht" + greek "Ôï View '%-.192s' äåí õðÜñ÷åé ãéá '%-.192s'" + hun "A(z) '%-.192s' nezet nem letezik a(z) '%-.192s'-hoz" + ita "La view '%-.192s' non esiste per '%-.192s'" + jpn "View '%-.192s' ¤¬ '%-.192s' ¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "ºä '%-.192s'°¡ '%-.192s'¿¡¼­´Â Á¸ÀçÇÏÁö ¾ÊÀ¾´Ï´Ù." + nor "View '%-.192s' eksisterer ikke for '%-.192s'" + norwegian-ny "View '%-.192s' eksisterar ikkje for '%-.192s'" + pol "Widok '%-.192s' nie istnieje dla '%-.192s'" + por "Visão '%-.192s' não existe para '%-.192s'" + rum "View '%-.192s' nu exista pentru '%-.192s'" + rus "ðÒÅÄÓÔÁ×ÌÅÎÉÅ '%-.192s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ ÄÌÑ '%-.192s'" + serbian "View '%-.192s' ne postoji za '%-.192s'" + slo "Pohµad '%-.192s' neexistuje pre '%-.192s'" + spa "La vista '%-.192s' no existe para '%-.192s'" + swe "Formulär '%-.192s' finns inte i '%-.192s'" + ukr "÷ÉÇÌÑÄ '%-.192s' ÎÅ ¦ÓÎÕ¤ ÄÌÑ '%-.192s'" ER_GET_ERRNO cze "Obsluha tabulky vr-Bátila chybu %d" dan "Modtog fejl %d fra tabel håndteringen" @@ -720,54 +720,54 @@ ER_GET_ERRNO swe "Fick felkod %d från databashanteraren" ukr "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ %d ×¦Ä ÄÅÓËÒÉÐÔÏÒÁ ÔÁÂÌÉæ" ER_ILLEGAL_HA - cze "Obsluha tabulky '%-.64s' nem-Bá tento parametr" - dan "Denne mulighed eksisterer ikke for tabeltypen '%-.64s'" - nla "Tabel handler voor '%-.64s' heeft deze optie niet" - eng "Table storage engine for '%-.64s' doesn't have this option" - est "Tabeli '%-.64s' handler ei toeta antud operatsiooni" - fre "Le handler de la table '%-.64s' n'a pas cette option" - ger "Diese Option gibt es nicht (Speicher-Engine für '%-.64s')" - greek "Ï ÷åéñéóôÞò ðßíáêá (table handler) ãéá '%-.64s' äåí äéáèÝôåé áõôÞ ôçí åðéëïãÞ" - hun "A(z) '%-.64s' tablakezelonek nincs ilyen opcioja" - ita "Il gestore delle tabelle per '%-.64s' non ha questa opzione" - jpn "Table handler for '%-.64s' doesn't have this option" - kor "'%-.64s'ÀÇ Å×À̺í handler´Â ÀÌ·¯ÇÑ ¿É¼ÇÀ» Á¦°øÇÏÁö ¾ÊÀ¾´Ï´Ù." - nor "Tabell håndtereren for '%-.64s' har ikke denne muligheten" - norwegian-ny "Tabell håndteraren for '%-.64s' har ikkje denne moglegheita" - pol "Obs³uga tabeli '%-.64s' nie posiada tej opcji" - por "Manipulador de tabela para '%-.64s' não tem esta opção" - rum "Handlerul tabelei pentru '%-.64s' nu are aceasta optiune" - rus "ïÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ '%-.64s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÜÔÕ ×ÏÚÍÏÖÎÏÓÔØ" - serbian "Handler tabela za '%-.64s' nema ovu opciju" - slo "Obsluha tabuµky '%-.64s' nemá tento parameter" - spa "El manejador de la tabla de '%-.64s' no tiene esta opcion" - swe "Tabellhanteraren for tabell '%-.64s' stödjer ej detta" - ukr "äÅÓËÒÉÐÔÏÒ ÔÁÂÌÉæ '%-.64s' ÎÅ ÍÁ¤ 椧 ×ÌÁÓÔÉ×ÏÓÔ¦" + cze "Obsluha tabulky '%-.192s' nem-Bá tento parametr" + dan "Denne mulighed eksisterer ikke for tabeltypen '%-.192s'" + nla "Tabel handler voor '%-.192s' heeft deze optie niet" + eng "Table storage engine for '%-.192s' doesn't have this option" + est "Tabeli '%-.192s' handler ei toeta antud operatsiooni" + fre "Le handler de la table '%-.192s' n'a pas cette option" + ger "Diese Option gibt es nicht (Speicher-Engine für '%-.192s')" + greek "Ï ÷åéñéóôÞò ðßíáêá (table handler) ãéá '%-.192s' äåí äéáèÝôåé áõôÞ ôçí åðéëïãÞ" + hun "A(z) '%-.192s' tablakezelonek nincs ilyen opcioja" + ita "Il gestore delle tabelle per '%-.192s' non ha questa opzione" + jpn "Table handler for '%-.192s' doesn't have this option" + kor "'%-.192s'ÀÇ Å×À̺í handler´Â ÀÌ·¯ÇÑ ¿É¼ÇÀ» Á¦°øÇÏÁö ¾ÊÀ¾´Ï´Ù." + nor "Tabell håndtereren for '%-.192s' har ikke denne muligheten" + norwegian-ny "Tabell håndteraren for '%-.192s' har ikkje denne moglegheita" + pol "Obs³uga tabeli '%-.192s' nie posiada tej opcji" + por "Manipulador de tabela para '%-.192s' não tem esta opção" + rum "Handlerul tabelei pentru '%-.192s' nu are aceasta optiune" + rus "ïÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ '%-.192s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÜÔÕ ×ÏÚÍÏÖÎÏÓÔØ" + serbian "Handler tabela za '%-.192s' nema ovu opciju" + slo "Obsluha tabuµky '%-.192s' nemá tento parameter" + spa "El manejador de la tabla de '%-.192s' no tiene esta opcion" + swe "Tabellhanteraren for tabell '%-.192s' stödjer ej detta" + ukr "äÅÓËÒÉÐÔÏÒ ÔÁÂÌÉæ '%-.192s' ÎÅ ÍÁ¤ 椧 ×ÌÁÓÔÉ×ÏÓÔ¦" ER_KEY_NOT_FOUND - cze "Nemohu naj-Bít záznam v '%-.64s'" - dan "Kan ikke finde posten i '%-.64s'" - nla "Kan record niet vinden in '%-.64s'" - eng "Can't find record in '%-.64s'" - jps "'%-.64s'‚̂Ȃ©‚ɃŒƒR[ƒh‚ªŒ©•t‚©‚è‚Ü‚¹‚ñ", - est "Ei suuda leida kirjet '%-.64s'-s" - fre "Ne peut trouver l'enregistrement dans '%-.64s'" - ger "Kann Datensatz in '%-.64s' nicht finden" - greek "Áäýíáôç ç áíåýñåóç åããñáöÞò óôï '%-.64s'" - hun "Nem talalhato a rekord '%-.64s'-ben" - ita "Impossibile trovare il record in '%-.64s'" - jpn "'%-.64s'¤Î¤Ê¤«¤Ë¥ì¥³¡¼¥É¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó" - kor "'%-.64s'¿¡¼­ ·¹Äڵ带 ãÀ» ¼ö ¾øÀ¾´Ï´Ù." - nor "Kan ikke finne posten i '%-.64s'" - norwegian-ny "Kan ikkje finne posten i '%-.64s'" - pol "Nie mo¿na znale¥æ rekordu w '%-.64s'" - por "Não pode encontrar registro em '%-.64s'" - rum "Nu pot sa gasesc recordul in '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÚÁÐÉÓØ × '%-.64s'" - serbian "Ne mogu da pronaðem slog u '%-.64s'" - slo "Nemô¾em nájs» záznam v '%-.64s'" - spa "No puedo encontrar el registro en '%-.64s'" - swe "Hittar inte posten '%-.64s'" - ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ Õ '%-.64s'" + cze "Nemohu naj-Bít záznam v '%-.192s'" + dan "Kan ikke finde posten i '%-.192s'" + nla "Kan record niet vinden in '%-.192s'" + eng "Can't find record in '%-.192s'" + jps "'%-.192s'‚̂Ȃ©‚ɃŒƒR[ƒh‚ªŒ©•t‚©‚è‚Ü‚¹‚ñ", + est "Ei suuda leida kirjet '%-.192s'-s" + fre "Ne peut trouver l'enregistrement dans '%-.192s'" + ger "Kann Datensatz in '%-.192s' nicht finden" + greek "Áäýíáôç ç áíåýñåóç åããñáöÞò óôï '%-.192s'" + hun "Nem talalhato a rekord '%-.192s'-ben" + ita "Impossibile trovare il record in '%-.192s'" + jpn "'%-.192s'¤Î¤Ê¤«¤Ë¥ì¥³¡¼¥É¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó" + kor "'%-.192s'¿¡¼­ ·¹Äڵ带 ãÀ» ¼ö ¾øÀ¾´Ï´Ù." + nor "Kan ikke finne posten i '%-.192s'" + norwegian-ny "Kan ikkje finne posten i '%-.192s'" + pol "Nie mo¿na znale¥æ rekordu w '%-.192s'" + por "Não pode encontrar registro em '%-.192s'" + rum "Nu pot sa gasesc recordul in '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÚÁÐÉÓØ × '%-.192s'" + serbian "Ne mogu da pronaðem slog u '%-.192s'" + slo "Nemô¾em nájs» záznam v '%-.192s'" + spa "No puedo encontrar el registro en '%-.192s'" + swe "Hittar inte posten '%-.192s'" + ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ Õ '%-.192s'" ER_NOT_FORM_FILE cze "Nespr-Bávná informace v souboru '%-.200s'" dan "Forkert indhold i: '%-.200s'" @@ -819,55 +819,55 @@ ER_NOT_KEYFILE swe "Fatalt fel vid hantering av register '%-.200s'; kör en reparation" ukr "èÉÂÎÉÊ ÆÁÊÌ ËÌÀÞÅÊ ÄÌÑ ÔÁÂÌÉæ: '%-.200s'; óÐÒÏÂÕÊÔÅ ÊÏÇÏ ×¦ÄÎÏ×ÉÔÉ" ER_OLD_KEYFILE - cze "Star-Bý klíèový soubor pro '%-.64s'; opravte ho." - dan "Gammel indeksfil for tabellen '%-.64s'; reparer den" - nla "Oude zoeksleutel file voor tabel '%-.64s'; repareer het!" - eng "Old key file for table '%-.64s'; repair it!" - jps "'%-.64s' ƒe[ƒuƒ‹‚͌¢Œ`Ž®‚Ì key file ‚̂悤‚Å‚·; C•œ‚ð‚µ‚Ä‚­‚¾‚³‚¢", - est "Tabeli '%-.64s' võtmefail on aegunud; paranda see!" - fre "Vieux fichier d'index pour la table '%-.64s'; réparez le!" - ger "Alte Index-Datei für Tabelle '%-.64s'. Bitte reparieren" - greek "Ðáëáéü áñ÷åßï ôáîéíüìéóçò (key file) ãéá ôïí ðßíáêá '%-.64s'; Ðáñáêáëþ, äéïñèþóôå ôï!" - hun "Regi kulcsfile a '%-.64s'tablahoz; probalja kijavitani!" - ita "File chiave vecchio per la tabella '%-.64s'; riparalo!" - jpn "'%-.64s' ¥Æ¡¼¥Ö¥ë¤Ï¸Å¤¤·Á¼°¤Î key file ¤Î¤è¤¦¤Ç¤¹; ½¤Éü¤ò¤·¤Æ¤¯¤À¤µ¤¤" - kor "'%-.64s' Å×À̺íÀÇ ÀÌÀü¹öÁ¯ÀÇ Å° Á¸Àç. ¼öÁ¤ÇϽÿÀ!" - nor "Gammel nøkkelfil for tabellen '%-.64s'; reparer den!" - norwegian-ny "Gammel nykkelfil for tabellen '%-.64s'; reparer den!" - pol "Plik kluczy dla tabeli '%-.64s' jest starego typu; napraw go!" - por "Arquivo de índice desatualizado para tabela '%-.64s'; repare-o!" - rum "Cheia fisierului e veche pentru tabela '%-.64s'; repar-o!" - rus "óÔÁÒÙÊ ÉÎÄÅËÓÎÙÊ ÆÁÊÌ ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'; ÏÔÒÅÍÏÎÔÉÒÕÊÔÅ ÅÇÏ!" - serbian "Zastareo key file za tabelu '%-.64s'; ispravite ga" - slo "Starý kµúèový súbor pre '%-.64s'; opravte ho!" - spa "Clave de archivo antigua para la tabla '%-.64s'; reparelo!" - swe "Gammal nyckelfil '%-.64s'; reparera registret" - ukr "óÔÁÒÉÊ ÆÁÊÌ ËÌÀÞÅÊ ÄÌÑ ÔÁÂÌÉæ '%-.64s'; ÷¦ÄÎÏ×¦ÔØ ÊÏÇÏ!" + cze "Star-Bý klíèový soubor pro '%-.192s'; opravte ho." + dan "Gammel indeksfil for tabellen '%-.192s'; reparer den" + nla "Oude zoeksleutel file voor tabel '%-.192s'; repareer het!" + eng "Old key file for table '%-.192s'; repair it!" + jps "'%-.192s' ƒe[ƒuƒ‹‚͌¢Œ`Ž®‚Ì key file ‚̂悤‚Å‚·; C•œ‚ð‚µ‚Ä‚­‚¾‚³‚¢", + est "Tabeli '%-.192s' võtmefail on aegunud; paranda see!" + fre "Vieux fichier d'index pour la table '%-.192s'; réparez le!" + ger "Alte Index-Datei für Tabelle '%-.192s'. Bitte reparieren" + greek "Ðáëáéü áñ÷åßï ôáîéíüìéóçò (key file) ãéá ôïí ðßíáêá '%-.192s'; Ðáñáêáëþ, äéïñèþóôå ôï!" + hun "Regi kulcsfile a '%-.192s'tablahoz; probalja kijavitani!" + ita "File chiave vecchio per la tabella '%-.192s'; riparalo!" + jpn "'%-.192s' ¥Æ¡¼¥Ö¥ë¤Ï¸Å¤¤·Á¼°¤Î key file ¤Î¤è¤¦¤Ç¤¹; ½¤Éü¤ò¤·¤Æ¤¯¤À¤µ¤¤" + kor "'%-.192s' Å×À̺íÀÇ ÀÌÀü¹öÁ¯ÀÇ Å° Á¸Àç. ¼öÁ¤ÇϽÿÀ!" + nor "Gammel nøkkelfil for tabellen '%-.192s'; reparer den!" + norwegian-ny "Gammel nykkelfil for tabellen '%-.192s'; reparer den!" + pol "Plik kluczy dla tabeli '%-.192s' jest starego typu; napraw go!" + por "Arquivo de índice desatualizado para tabela '%-.192s'; repare-o!" + rum "Cheia fisierului e veche pentru tabela '%-.192s'; repar-o!" + rus "óÔÁÒÙÊ ÉÎÄÅËÓÎÙÊ ÆÁÊÌ ÄÌÑ ÔÁÂÌÉÃÙ '%-.192s'; ÏÔÒÅÍÏÎÔÉÒÕÊÔÅ ÅÇÏ!" + serbian "Zastareo key file za tabelu '%-.192s'; ispravite ga" + slo "Starý kµúèový súbor pre '%-.192s'; opravte ho!" + spa "Clave de archivo antigua para la tabla '%-.192s'; reparelo!" + swe "Gammal nyckelfil '%-.192s'; reparera registret" + ukr "óÔÁÒÉÊ ÆÁÊÌ ËÌÀÞÅÊ ÄÌÑ ÔÁÂÌÉæ '%-.192s'; ÷¦ÄÎÏ×¦ÔØ ÊÏÇÏ!" ER_OPEN_AS_READONLY - cze "'%-.64s' je jen pro -Bètení" - dan "'%-.64s' er skrivebeskyttet" - nla "'%-.64s' is alleen leesbaar" - eng "Table '%-.64s' is read only" - jps "'%-.64s' ‚͓ǂݞ‚Ýê—p‚Å‚·", - est "Tabel '%-.64s' on ainult lugemiseks" - fre "'%-.64s' est en lecture seulement" - ger "Tabelle '%-.64s' ist nur lesbar" - greek "'%-.64s' åðéôñÝðåôáé ìüíï ç áíÜãíùóç" - hun "'%-.64s' irasvedett" - ita "'%-.64s' e` di sola lettura" - jpn "'%-.64s' ¤ÏÆÉ¤ß¹þ¤ßÀìÍѤǤ¹" - kor "Å×À̺í '%-.64s'´Â ÀбâÀü¿ë ÀÔ´Ï´Ù." - nor "'%-.64s' er skrivebeskyttet" - norwegian-ny "'%-.64s' er skrivetryggja" - pol "'%-.64s' jest tylko do odczytu" - por "Tabela '%-.64s' é somente para leitura" - rum "Tabela '%-.64s' e read-only" - rus "ôÁÂÌÉÃÁ '%-.64s' ÐÒÅÄÎÁÚÎÁÞÅÎÁ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ" - serbian "Tabelu '%-.64s' je dozvoljeno samo èitati" - slo "'%-.64s' is èíta» only" - spa "'%-.64s' es de solo lectura" - swe "'%-.64s' är skyddad mot förändring" - ukr "ôÁÂÌÉÃÑ '%-.64s' Ô¦ÌØËÉ ÄÌÑ ÞÉÔÁÎÎÑ" + cze "'%-.192s' je jen pro -Bètení" + dan "'%-.192s' er skrivebeskyttet" + nla "'%-.192s' is alleen leesbaar" + eng "Table '%-.192s' is read only" + jps "'%-.192s' ‚͓ǂݞ‚Ýê—p‚Å‚·", + est "Tabel '%-.192s' on ainult lugemiseks" + fre "'%-.192s' est en lecture seulement" + ger "Tabelle '%-.192s' ist nur lesbar" + greek "'%-.192s' åðéôñÝðåôáé ìüíï ç áíÜãíùóç" + hun "'%-.192s' irasvedett" + ita "'%-.192s' e` di sola lettura" + jpn "'%-.192s' ¤ÏÆÉ¤ß¹þ¤ßÀìÍѤǤ¹" + kor "Å×À̺í '%-.192s'´Â ÀбâÀü¿ë ÀÔ´Ï´Ù." + nor "'%-.192s' er skrivebeskyttet" + norwegian-ny "'%-.192s' er skrivetryggja" + pol "'%-.192s' jest tylko do odczytu" + por "Tabela '%-.192s' é somente para leitura" + rum "Tabela '%-.192s' e read-only" + rus "ôÁÂÌÉÃÁ '%-.192s' ÐÒÅÄÎÁÚÎÁÞÅÎÁ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ" + serbian "Tabelu '%-.192s' je dozvoljeno samo èitati" + slo "'%-.192s' is èíta» only" + spa "'%-.192s' es de solo lectura" + swe "'%-.192s' är skyddad mot förändring" + ukr "ôÁÂÌÉÃÑ '%-.192s' Ô¦ÌØËÉ ÄÌÑ ÞÉÔÁÎÎÑ" ER_OUTOFMEMORY HY001 S1001 cze "M-Bálo pamìti. Pøestartujte daemona a zkuste znovu (je potøeba %d bytù)" dan "Ikke mere hukommelse. Genstart serveren og prøv igen (mangler %d bytes)" @@ -919,30 +919,30 @@ ER_OUT_OF_SORTMEMORY HY001 S1001 swe "Sorteringsbufferten räcker inte till. Kontrollera startparametrarna" ukr "âÒÁË ÐÁÍ'ÑÔ¦ ÄÌÑ ÓÏÒÔÕ×ÁÎÎÑ. ôÒÅÂÁ ÚÂ¦ÌØÛÉÔÉ ÒÏÚÍ¦Ò ÂÕÆÅÒÁ ÓÏÒÔÕ×ÁÎÎÑ Õ ÓÅÒ×ÅÒÁ" ER_UNEXPECTED_EOF - cze "Neo-Bèekávaný konec souboru pøi ètení '%-.64s' (chybový kód: %d)" - dan "Uventet afslutning på fil (eof) ved læsning af filen '%-.64s' (Fejlkode: %d)" - nla "Onverwachte eof gevonden tijdens het lezen van file '%-.64s' (Errcode: %d)" - eng "Unexpected EOF found when reading file '%-.64s' (errno: %d)" - jps "'%-.64s' ƒtƒ@ƒCƒ‹‚ð“ǂݞ‚Ý’†‚É EOF ‚ª—\Šú‚¹‚ÊŠ‚ÅŒ»‚ê‚Ü‚µ‚½. (errno: %d)", - est "Ootamatu faililõpumärgend faili '%-.64s' lugemisel (veakood: %d)" - fre "Fin de fichier inattendue en lisant '%-.64s' (Errcode: %d)" - ger "Unerwartetes Ende beim Lesen der Datei '%-.64s' (Fehler: %d)" - greek "ÊáôÜ ôç äéÜñêåéá ôçò áíÜãíùóçò, âñÝèçêå áðñïóäüêçôá ôï ôÝëïò ôïõ áñ÷åßïõ '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Varatlan filevege-jel a '%-.64s'olvasasakor. (hibakod: %d)" - ita "Fine del file inaspettata durante la lettura del file '%-.64s' (errno: %d)" - jpn "'%-.64s' ¥Õ¥¡¥¤¥ë¤òÆÉ¤ß¹þ¤ßÃæ¤Ë EOF ¤¬Í½´ü¤»¤Ì½ê¤Ç¸½¤ì¤Þ¤·¤¿. (errno: %d)" - kor "'%-.64s' È­ÀÏÀ» Àд µµÁß À߸øµÈ eofÀ» ¹ß°ß (¿¡·¯¹øÈ£: %d)" - nor "Uventet slutt på fil (eof) ved lesing av filen '%-.64s' (Feilkode: %d)" - norwegian-ny "Uventa slutt på fil (eof) ved lesing av fila '%-.64s' (Feilkode: %d)" - pol "Nieoczekiwany 'eof' napotkany podczas czytania z pliku '%-.64s' (Kod b³êdu: %d)" - por "Encontrado fim de arquivo inesperado ao ler arquivo '%-.64s' (erro no. %d)" - rum "Sfirsit de fisier neasteptat in citirea fisierului '%-.64s' (errno: %d)" - rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Neoèekivani kraj pri èitanju file-a '%-.64s' (errno: %d)" - slo "Neoèakávaný koniec súboru pri èítaní '%-.64s' (chybový kód: %d)" - spa "Inesperado fin de ficheroU mientras leiamos el archivo '%-.64s' (Error: %d)" - swe "Oväntat filslut vid läsning från '%-.64s' (Felkod: %d)" - ukr "èÉÂÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Neo-Bèekávaný konec souboru pøi ètení '%-.192s' (chybový kód: %d)" + dan "Uventet afslutning på fil (eof) ved læsning af filen '%-.192s' (Fejlkode: %d)" + nla "Onverwachte eof gevonden tijdens het lezen van file '%-.192s' (Errcode: %d)" + eng "Unexpected EOF found when reading file '%-.192s' (errno: %d)" + jps "'%-.192s' ƒtƒ@ƒCƒ‹‚ð“ǂݞ‚Ý’†‚É EOF ‚ª—\Šú‚¹‚ÊŠ‚ÅŒ»‚ê‚Ü‚µ‚½. (errno: %d)", + est "Ootamatu faililõpumärgend faili '%-.192s' lugemisel (veakood: %d)" + fre "Fin de fichier inattendue en lisant '%-.192s' (Errcode: %d)" + ger "Unerwartetes Ende beim Lesen der Datei '%-.192s' (Fehler: %d)" + greek "ÊáôÜ ôç äéÜñêåéá ôçò áíÜãíùóçò, âñÝèçêå áðñïóäüêçôá ôï ôÝëïò ôïõ áñ÷åßïõ '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Varatlan filevege-jel a '%-.192s'olvasasakor. (hibakod: %d)" + ita "Fine del file inaspettata durante la lettura del file '%-.192s' (errno: %d)" + jpn "'%-.192s' ¥Õ¥¡¥¤¥ë¤òÆÉ¤ß¹þ¤ßÃæ¤Ë EOF ¤¬Í½´ü¤»¤Ì½ê¤Ç¸½¤ì¤Þ¤·¤¿. (errno: %d)" + kor "'%-.192s' È­ÀÏÀ» Àд µµÁß À߸øµÈ eofÀ» ¹ß°ß (¿¡·¯¹øÈ£: %d)" + nor "Uventet slutt på fil (eof) ved lesing av filen '%-.192s' (Feilkode: %d)" + norwegian-ny "Uventa slutt på fil (eof) ved lesing av fila '%-.192s' (Feilkode: %d)" + pol "Nieoczekiwany 'eof' napotkany podczas czytania z pliku '%-.192s' (Kod b³êdu: %d)" + por "Encontrado fim de arquivo inesperado ao ler arquivo '%-.192s' (erro no. %d)" + rum "Sfirsit de fisier neasteptat in citirea fisierului '%-.192s' (errno: %d)" + rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Neoèekivani kraj pri èitanju file-a '%-.192s' (errno: %d)" + slo "Neoèakávaný koniec súboru pri èítaní '%-.192s' (chybový kód: %d)" + spa "Inesperado fin de ficheroU mientras leiamos el archivo '%-.192s' (Error: %d)" + swe "Oväntat filslut vid läsning från '%-.192s' (Felkod: %d)" + ukr "èÉÂÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_CON_COUNT_ERROR 08004 cze "P-Bøíli¹ mnoho spojení" dan "For mange forbindelser (connections)" @@ -1041,53 +1041,53 @@ ER_HANDSHAKE_ERROR 08S01 swe "Fel vid initiering av kommunikationen med klienten" ukr "îÅצÒÎÁ ÕÓÔÁÎÏ×ËÁ Ú×'ÑÚËÕ" ER_DBACCESS_DENIED_ERROR 42000 - cze "P-Bøístup pro u¾ivatele '%-.32s'@'%-.64s' k databázi '%-.64s' není povolen" - dan "Adgang nægtet bruger: '%-.32s'@'%-.64s' til databasen '%-.64s'" - nla "Toegang geweigerd voor gebruiker: '%-.32s'@'%-.64s' naar database '%-.64s'" - eng "Access denied for user '%-.32s'@'%-.64s' to database '%-.64s'" - jps "ƒ†[ƒU[ '%-.32s'@'%-.64s' ‚Ì '%-.64s' ƒf[ƒ^ƒx[ƒX‚ւ̃AƒNƒZƒX‚ð‹‘”Û‚µ‚Ü‚·", - est "Ligipääs keelatud kasutajale '%-.32s'@'%-.64s' andmebaasile '%-.64s'" - fre "Accès refusé pour l'utilisateur: '%-.32s'@'@%-.64s'. Base '%-.64s'" - ger "Benutzer '%-.32s'@'%-.64s' hat keine Zugriffsberechtigung für Datenbank '%-.64s'" - greek "Äåí åðéôÝñåôáé ç ðñüóâáóç óôï ÷ñÞóôç: '%-.32s'@'%-.64s' óôç âÜóç äåäïìÝíùí '%-.64s'" - hun "A(z) '%-.32s'@'%-.64s' felhasznalo szamara tiltott eleres az '%-.64s' adabazishoz." - ita "Accesso non consentito per l'utente: '%-.32s'@'%-.64s' al database '%-.64s'" - jpn "¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ¤Î '%-.64s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ø¤Î¥¢¥¯¥»¥¹¤òµñÈݤ·¤Þ¤¹" - kor "'%-.32s'@'%-.64s' »ç¿ëÀÚ´Â '%-.64s' µ¥ÀÌŸº£À̽º¿¡ Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù." - nor "Tilgang nektet for bruker: '%-.32s'@'%-.64s' til databasen '%-.64s' nektet" - norwegian-ny "Tilgang ikkje tillate for brukar: '%-.32s'@'%-.64s' til databasen '%-.64s' nekta" - por "Acesso negado para o usuário '%-.32s'@'%-.64s' ao banco de dados '%-.64s'" - rum "Acces interzis pentru utilizatorul: '%-.32s'@'%-.64s' la baza de date '%-.64s'" - rus "äÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s'@'%-.64s' ÄÏÓÔÕÐ Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÚÁËÒÙÔ" - serbian "Pristup je zabranjen korisniku '%-.32s'@'%-.64s' za bazu '%-.64s'" - slo "Zakázaný prístup pre u¾ívateµa: '%-.32s'@'%-.64s' k databázi '%-.64s'" - spa "Acceso negado para usuario: '%-.32s'@'%-.64s' para la base de datos '%-.64s'" - swe "Användare '%-.32s'@'%-.64s' är ej berättigad att använda databasen %-.64s" - ukr "äÏÓÔÕÐ ÚÁÂÏÒÏÎÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ: '%-.32s'@'%-.64s' ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ '%-.64s'" + cze "P-Bøístup pro u¾ivatele '%-.48s'@'%-.64s' k databázi '%-.192s' není povolen" + dan "Adgang nægtet bruger: '%-.48s'@'%-.64s' til databasen '%-.192s'" + nla "Toegang geweigerd voor gebruiker: '%-.48s'@'%-.64s' naar database '%-.192s'" + eng "Access denied for user '%-.48s'@'%-.64s' to database '%-.192s'" + jps "ƒ†[ƒU[ '%-.48s'@'%-.64s' ‚Ì '%-.192s' ƒf[ƒ^ƒx[ƒX‚ւ̃AƒNƒZƒX‚ð‹‘”Û‚µ‚Ü‚·", + est "Ligipääs keelatud kasutajale '%-.48s'@'%-.64s' andmebaasile '%-.192s'" + fre "Accès refusé pour l'utilisateur: '%-.48s'@'@%-.64s'. Base '%-.192s'" + ger "Benutzer '%-.48s'@'%-.64s' hat keine Zugriffsberechtigung für Datenbank '%-.192s'" + greek "Äåí åðéôÝñåôáé ç ðñüóâáóç óôï ÷ñÞóôç: '%-.48s'@'%-.64s' óôç âÜóç äåäïìÝíùí '%-.192s'" + hun "A(z) '%-.48s'@'%-.64s' felhasznalo szamara tiltott eleres az '%-.192s' adabazishoz." + ita "Accesso non consentito per l'utente: '%-.48s'@'%-.64s' al database '%-.192s'" + jpn "¥æ¡¼¥¶¡¼ '%-.48s'@'%-.64s' ¤Î '%-.192s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ø¤Î¥¢¥¯¥»¥¹¤òµñÈݤ·¤Þ¤¹" + kor "'%-.48s'@'%-.64s' »ç¿ëÀÚ´Â '%-.192s' µ¥ÀÌŸº£À̽º¿¡ Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù." + nor "Tilgang nektet for bruker: '%-.48s'@'%-.64s' til databasen '%-.192s' nektet" + norwegian-ny "Tilgang ikkje tillate for brukar: '%-.48s'@'%-.64s' til databasen '%-.192s' nekta" + por "Acesso negado para o usuário '%-.48s'@'%-.64s' ao banco de dados '%-.192s'" + rum "Acces interzis pentru utilizatorul: '%-.48s'@'%-.64s' la baza de date '%-.192s'" + rus "äÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s'@'%-.64s' ÄÏÓÔÕÐ Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.192s' ÚÁËÒÙÔ" + serbian "Pristup je zabranjen korisniku '%-.48s'@'%-.64s' za bazu '%-.192s'" + slo "Zakázaný prístup pre u¾ívateµa: '%-.48s'@'%-.64s' k databázi '%-.192s'" + spa "Acceso negado para usuario: '%-.48s'@'%-.64s' para la base de datos '%-.192s'" + swe "Användare '%-.48s'@'%-.64s' är ej berättigad att använda databasen %-.192s" + ukr "äÏÓÔÕÐ ÚÁÂÏÒÏÎÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ: '%-.48s'@'%-.64s' ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ '%-.192s'" ER_ACCESS_DENIED_ERROR 28000 - cze "P-Bøístup pro u¾ivatele '%-.32s'@'%-.64s' (s heslem %s)" - dan "Adgang nægtet bruger: '%-.32s'@'%-.64s' (Bruger adgangskode: %s)" - nla "Toegang geweigerd voor gebruiker: '%-.32s'@'%-.64s' (Wachtwoord gebruikt: %s)" - eng "Access denied for user '%-.32s'@'%-.64s' (using password: %s)" - jps "ƒ†[ƒU[ '%-.32s'@'%-.64s' ‚ð‹‘”Û‚µ‚Ü‚·.uUsing password: %s)", - est "Ligipääs keelatud kasutajale '%-.32s'@'%-.64s' (kasutab parooli: %s)" - fre "Accès refusé pour l'utilisateur: '%-.32s'@'@%-.64s' (mot de passe: %s)" - ger "Benutzer '%-.32s'@'%-.64s' hat keine Zugriffsberechtigung (verwendetes Passwort: %s)" - greek "Äåí åðéôÝñåôáé ç ðñüóâáóç óôï ÷ñÞóôç: '%-.32s'@'%-.64s' (÷ñÞóç password: %s)" - hun "A(z) '%-.32s'@'%-.64s' felhasznalo szamara tiltott eleres. (Hasznalja a jelszot: %s)" - ita "Accesso non consentito per l'utente: '%-.32s'@'%-.64s' (Password: %s)" - jpn "¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ¤òµñÈݤ·¤Þ¤¹.uUsing password: %s)" - kor "'%-.32s'@'%-.64s' »ç¿ëÀÚ´Â Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù. (using password: %s)" - nor "Tilgang nektet for bruker: '%-.32s'@'%-.64s' (Bruker passord: %s)" - norwegian-ny "Tilgang ikke tillate for brukar: '%-.32s'@'%-.64s' (Brukar passord: %s)" - por "Acesso negado para o usuário '%-.32s'@'%-.64s' (senha usada: %s)" - rum "Acces interzis pentru utilizatorul: '%-.32s'@'%-.64s' (Folosind parola: %s)" - rus "äÏÓÔÕÐ ÚÁËÒÙÔ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s'@'%-.64s' (ÂÙÌ ÉÓÐÏÌØÚÏ×ÁÎ ÐÁÒÏÌØ: %s)" - serbian "Pristup je zabranjen korisniku '%-.32s'@'%-.64s' (koristi lozinku: '%s')" - slo "Zakázaný prístup pre u¾ívateµa: '%-.32s'@'%-.64s' (pou¾itie hesla: %s)" - spa "Acceso negado para usuario: '%-.32s'@'%-.64s' (Usando clave: %s)" - swe "Användare '%-.32s'@'%-.64s' är ej berättigad att logga in (Använder lösen: %s)" - ukr "äÏÓÔÕÐ ÚÁÂÏÒÏÎÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ: '%-.32s'@'%-.64s' (÷ÉËÏÒÉÓÔÁÎÏ ÐÁÒÏÌØ: %s)" + cze "P-Bøístup pro u¾ivatele '%-.48s'@'%-.64s' (s heslem %s)" + dan "Adgang nægtet bruger: '%-.48s'@'%-.64s' (Bruger adgangskode: %s)" + nla "Toegang geweigerd voor gebruiker: '%-.48s'@'%-.64s' (Wachtwoord gebruikt: %s)" + eng "Access denied for user '%-.48s'@'%-.64s' (using password: %s)" + jps "ƒ†[ƒU[ '%-.48s'@'%-.64s' ‚ð‹‘”Û‚µ‚Ü‚·.uUsing password: %s)", + est "Ligipääs keelatud kasutajale '%-.48s'@'%-.64s' (kasutab parooli: %s)" + fre "Accès refusé pour l'utilisateur: '%-.48s'@'@%-.64s' (mot de passe: %s)" + ger "Benutzer '%-.48s'@'%-.64s' hat keine Zugriffsberechtigung (verwendetes Passwort: %s)" + greek "Äåí åðéôÝñåôáé ç ðñüóâáóç óôï ÷ñÞóôç: '%-.48s'@'%-.64s' (÷ñÞóç password: %s)" + hun "A(z) '%-.48s'@'%-.64s' felhasznalo szamara tiltott eleres. (Hasznalja a jelszot: %s)" + ita "Accesso non consentito per l'utente: '%-.48s'@'%-.64s' (Password: %s)" + jpn "¥æ¡¼¥¶¡¼ '%-.48s'@'%-.64s' ¤òµñÈݤ·¤Þ¤¹.uUsing password: %s)" + kor "'%-.48s'@'%-.64s' »ç¿ëÀÚ´Â Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù. (using password: %s)" + nor "Tilgang nektet for bruker: '%-.48s'@'%-.64s' (Bruker passord: %s)" + norwegian-ny "Tilgang ikke tillate for brukar: '%-.48s'@'%-.64s' (Brukar passord: %s)" + por "Acesso negado para o usuário '%-.48s'@'%-.64s' (senha usada: %s)" + rum "Acces interzis pentru utilizatorul: '%-.48s'@'%-.64s' (Folosind parola: %s)" + rus "äÏÓÔÕÐ ÚÁËÒÙÔ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s'@'%-.64s' (ÂÙÌ ÉÓÐÏÌØÚÏ×ÁÎ ÐÁÒÏÌØ: %s)" + serbian "Pristup je zabranjen korisniku '%-.48s'@'%-.64s' (koristi lozinku: '%s')" + slo "Zakázaný prístup pre u¾ívateµa: '%-.48s'@'%-.64s' (pou¾itie hesla: %s)" + spa "Acceso negado para usuario: '%-.48s'@'%-.64s' (Usando clave: %s)" + swe "Användare '%-.48s'@'%-.64s' är ej berättigad att logga in (Använder lösen: %s)" + ukr "äÏÓÔÕÐ ÚÁÂÏÒÏÎÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ: '%-.48s'@'%-.64s' (÷ÉËÏÒÉÓÔÁÎÏ ÐÁÒÏÌØ: %s)" ER_NO_DB_ERROR 3D000 cze "Nebyla vybr-Bána ¾ádná databáze" dan "Ingen database valgt" @@ -1139,80 +1139,80 @@ ER_UNKNOWN_COM_ERROR 08S01 swe "Okänt commando" ukr "îÅצÄÏÍÁ ËÏÍÁÎÄÁ" ER_BAD_NULL_ERROR 23000 - cze "Sloupec '%-.64s' nem-Bù¾e být null" - dan "Kolonne '%-.64s' kan ikke være NULL" - nla "Kolom '%-.64s' kan niet null zijn" - eng "Column '%-.64s' cannot be null" - jps "Column '%-.64s' ‚Í null ‚ɂ͂ł«‚È‚¢‚̂ł·", - est "Tulp '%-.64s' ei saa omada nullväärtust" - fre "Le champ '%-.64s' ne peut être vide (null)" - ger "Feld '%-.64s' darf nicht NULL sein" - greek "Ôï ðåäßï '%-.64s' äåí ìðïñåß íá åßíáé êåíü (null)" - hun "A(z) '%-.64s' oszlop erteke nem lehet nulla" - ita "La colonna '%-.64s' non puo` essere nulla" - jpn "Column '%-.64s' ¤Ï null ¤Ë¤Ï¤Ç¤­¤Ê¤¤¤Î¤Ç¤¹" - kor "Ä®·³ '%-.64s'´Â ³Î(Null)ÀÌ µÇ¸é ¾ÈµË´Ï´Ù. " - nor "Kolonne '%-.64s' kan ikke vere null" - norwegian-ny "Kolonne '%-.64s' kan ikkje vere null" - pol "Kolumna '%-.64s' nie mo¿e byæ null" - por "Coluna '%-.64s' não pode ser vazia" - rum "Coloana '%-.64s' nu poate sa fie null" - rus "óÔÏÌÂÅà '%-.64s' ÎÅ ÍÏÖÅÔ ÐÒÉÎÉÍÁÔØ ×ÅÌÉÞÉÎÕ NULL" - serbian "Kolona '%-.64s' ne može biti NULL" - slo "Pole '%-.64s' nemô¾e by» null" - spa "La columna '%-.64s' no puede ser nula" - swe "Kolumn '%-.64s' får inte vara NULL" - ukr "óÔÏ×ÂÅÃØ '%-.64s' ÎÅ ÍÏÖÅ ÂÕÔÉ ÎÕÌØÏ×ÉÍ" + cze "Sloupec '%-.192s' nem-Bù¾e být null" + dan "Kolonne '%-.192s' kan ikke være NULL" + nla "Kolom '%-.192s' kan niet null zijn" + eng "Column '%-.192s' cannot be null" + jps "Column '%-.192s' ‚Í null ‚ɂ͂ł«‚È‚¢‚̂ł·", + est "Tulp '%-.192s' ei saa omada nullväärtust" + fre "Le champ '%-.192s' ne peut être vide (null)" + ger "Feld '%-.192s' darf nicht NULL sein" + greek "Ôï ðåäßï '%-.192s' äåí ìðïñåß íá åßíáé êåíü (null)" + hun "A(z) '%-.192s' oszlop erteke nem lehet nulla" + ita "La colonna '%-.192s' non puo` essere nulla" + jpn "Column '%-.192s' ¤Ï null ¤Ë¤Ï¤Ç¤­¤Ê¤¤¤Î¤Ç¤¹" + kor "Ä®·³ '%-.192s'´Â ³Î(Null)ÀÌ µÇ¸é ¾ÈµË´Ï´Ù. " + nor "Kolonne '%-.192s' kan ikke vere null" + norwegian-ny "Kolonne '%-.192s' kan ikkje vere null" + pol "Kolumna '%-.192s' nie mo¿e byæ null" + por "Coluna '%-.192s' não pode ser vazia" + rum "Coloana '%-.192s' nu poate sa fie null" + rus "óÔÏÌÂÅà '%-.192s' ÎÅ ÍÏÖÅÔ ÐÒÉÎÉÍÁÔØ ×ÅÌÉÞÉÎÕ NULL" + serbian "Kolona '%-.192s' ne može biti NULL" + slo "Pole '%-.192s' nemô¾e by» null" + spa "La columna '%-.192s' no puede ser nula" + swe "Kolumn '%-.192s' får inte vara NULL" + ukr "óÔÏ×ÂÅÃØ '%-.192s' ÎÅ ÍÏÖÅ ÂÕÔÉ ÎÕÌØÏ×ÉÍ" ER_BAD_DB_ERROR 42000 - cze "Nezn-Bámá databáze '%-.64s'" - dan "Ukendt database '%-.64s'" - nla "Onbekende database '%-.64s'" - eng "Unknown database '%-.64s'" - jps "'%-.64s' ‚È‚ñ‚ăf[ƒ^ƒx[ƒX‚Í’m‚è‚Ü‚¹‚ñ.", - est "Tundmatu andmebaas '%-.64s'" - fre "Base '%-.64s' inconnue" - ger "Unbekannte Datenbank '%-.64s'" - greek "Áãíùóôç âÜóç äåäïìÝíùí '%-.64s'" - hun "Ervenytelen adatbazis: '%-.64s'" - ita "Database '%-.64s' sconosciuto" - jpn "'%-.64s' ¤Ê¤ó¤Æ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÏÃΤê¤Þ¤»¤ó." - kor "µ¥ÀÌŸº£À̽º '%-.64s'´Â ¾Ë¼ö ¾øÀ½" - nor "Ukjent database '%-.64s'" - norwegian-ny "Ukjent database '%-.64s'" - pol "Nieznana baza danych '%-.64s'" - por "Banco de dados '%-.64s' desconhecido" - rum "Baza de data invalida '%-.64s'" - rus "îÅÉÚ×ÅÓÔÎÁÑ ÂÁÚÁ ÄÁÎÎÙÈ '%-.64s'" - serbian "Nepoznata baza '%-.64s'" - slo "Neznáma databáza '%-.64s'" - spa "Base de datos desconocida '%-.64s'" - swe "Okänd databas: '%-.64s'" - ukr "îÅצÄÏÍÁ ÂÁÚÁ ÄÁÎÎÉÈ '%-.64s'" + cze "Nezn-Bámá databáze '%-.192s'" + dan "Ukendt database '%-.192s'" + nla "Onbekende database '%-.192s'" + eng "Unknown database '%-.192s'" + jps "'%-.192s' ‚È‚ñ‚ăf[ƒ^ƒx[ƒX‚Í’m‚è‚Ü‚¹‚ñ.", + est "Tundmatu andmebaas '%-.192s'" + fre "Base '%-.192s' inconnue" + ger "Unbekannte Datenbank '%-.192s'" + greek "Áãíùóôç âÜóç äåäïìÝíùí '%-.192s'" + hun "Ervenytelen adatbazis: '%-.192s'" + ita "Database '%-.192s' sconosciuto" + jpn "'%-.192s' ¤Ê¤ó¤Æ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÏÃΤê¤Þ¤»¤ó." + kor "µ¥ÀÌŸº£À̽º '%-.192s'´Â ¾Ë¼ö ¾øÀ½" + nor "Ukjent database '%-.192s'" + norwegian-ny "Ukjent database '%-.192s'" + pol "Nieznana baza danych '%-.192s'" + por "Banco de dados '%-.192s' desconhecido" + rum "Baza de data invalida '%-.192s'" + rus "îÅÉÚ×ÅÓÔÎÁÑ ÂÁÚÁ ÄÁÎÎÙÈ '%-.192s'" + serbian "Nepoznata baza '%-.192s'" + slo "Neznáma databáza '%-.192s'" + spa "Base de datos desconocida '%-.192s'" + swe "Okänd databas: '%-.192s'" + ukr "îÅצÄÏÍÁ ÂÁÚÁ ÄÁÎÎÉÈ '%-.192s'" ER_TABLE_EXISTS_ERROR 42S01 - cze "Tabulka '%-.64s' ji-B¾ existuje" - dan "Tabellen '%-.64s' findes allerede" - nla "Tabel '%-.64s' bestaat al" - eng "Table '%-.64s' already exists" - jps "Table '%-.64s' ‚ÍŠù‚É‚ ‚è‚Ü‚·", - est "Tabel '%-.64s' juba eksisteerib" - fre "La table '%-.64s' existe déjà" - ger "Tabelle '%-.64s' bereits vorhanden" - greek "Ï ðßíáêáò '%-.64s' õðÜñ÷åé Þäç" - hun "A(z) '%-.64s' tabla mar letezik" - ita "La tabella '%-.64s' esiste gia`" - jpn "Table '%-.64s' ¤Ï´û¤Ë¤¢¤ê¤Þ¤¹" - kor "Å×À̺í '%-.64s'´Â ÀÌ¹Ì Á¸ÀçÇÔ" - nor "Tabellen '%-.64s' eksisterer allerede" - norwegian-ny "Tabellen '%-.64s' eksisterar allereide" - pol "Tabela '%-.64s' ju¿ istnieje" - por "Tabela '%-.64s' já existe" - rum "Tabela '%-.64s' exista deja" - rus "ôÁÂÌÉÃÁ '%-.64s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Tabela '%-.64s' veæ postoji" - slo "Tabuµka '%-.64s' u¾ existuje" - spa "La tabla '%-.64s' ya existe" - swe "Tabellen '%-.64s' finns redan" - ukr "ôÁÂÌÉÃÑ '%-.64s' ×ÖÅ ¦ÓÎÕ¤" + cze "Tabulka '%-.192s' ji-B¾ existuje" + dan "Tabellen '%-.192s' findes allerede" + nla "Tabel '%-.192s' bestaat al" + eng "Table '%-.192s' already exists" + jps "Table '%-.192s' ‚ÍŠù‚É‚ ‚è‚Ü‚·", + est "Tabel '%-.192s' juba eksisteerib" + fre "La table '%-.192s' existe déjà" + ger "Tabelle '%-.192s' bereits vorhanden" + greek "Ï ðßíáêáò '%-.192s' õðÜñ÷åé Þäç" + hun "A(z) '%-.192s' tabla mar letezik" + ita "La tabella '%-.192s' esiste gia`" + jpn "Table '%-.192s' ¤Ï´û¤Ë¤¢¤ê¤Þ¤¹" + kor "Å×À̺í '%-.192s'´Â ÀÌ¹Ì Á¸ÀçÇÔ" + nor "Tabellen '%-.192s' eksisterer allerede" + norwegian-ny "Tabellen '%-.192s' eksisterar allereide" + pol "Tabela '%-.192s' ju¿ istnieje" + por "Tabela '%-.192s' já existe" + rum "Tabela '%-.192s' exista deja" + rus "ôÁÂÌÉÃÁ '%-.192s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Tabela '%-.192s' veæ postoji" + slo "Tabuµka '%-.192s' u¾ existuje" + spa "La tabla '%-.192s' ya existe" + swe "Tabellen '%-.192s' finns redan" + ukr "ôÁÂÌÉÃÑ '%-.192s' ×ÖÅ ¦ÓÎÕ¤" ER_BAD_TABLE_ERROR 42S02 cze "Nezn-Bámá tabulka '%-.100s'" dan "Ukendt tabel '%-.100s'" @@ -1239,29 +1239,29 @@ ER_BAD_TABLE_ERROR 42S02 swe "Okänd tabell '%-.100s'" ukr "îÅצÄÏÍÁ ÔÁÂÌÉÃÑ '%-.100s'" ER_NON_UNIQ_ERROR 23000 - cze "Sloupec '%-.64s' v %-.64s nen-Bí zcela jasný" - dan "Felt: '%-.64s' i tabel %-.64s er ikke entydigt" - nla "Kolom: '%-.64s' in %-.64s is niet eenduidig" - eng "Column '%-.64s' in %-.64s is ambiguous" - est "Väli '%-.64s' %-.64s-s ei ole ühene" - fre "Champ: '%-.64s' dans %-.64s est ambigu" - ger "Feld '%-.64s' in %-.64s ist nicht eindeutig" - greek "Ôï ðåäßï: '%-.64s' óå %-.64s äåí Ý÷åé êáèïñéóôåß" - hun "A(z) '%-.64s' oszlop %-.64s-ben ketertelmu" - ita "Colonna: '%-.64s' di %-.64s e` ambigua" - jpn "Column: '%-.64s' in %-.64s is ambiguous" - kor "Ä®·³: '%-.64s' in '%-.64s' ÀÌ ¸ðÈ£ÇÔ" - nor "Felt: '%-.64s' i tabell %-.64s er ikke entydig" - norwegian-ny "Kolonne: '%-.64s' i tabell %-.64s er ikkje eintydig" - pol "Kolumna: '%-.64s' w %-.64s jest dwuznaczna" - por "Coluna '%-.64s' em '%-.64s' é ambígua" - rum "Coloana: '%-.64s' in %-.64s este ambigua" - rus "óÔÏÌÂÅà '%-.64s' × %-.64s ÚÁÄÁÎ ÎÅÏÄÎÏÚÎÁÞÎÏ" - serbian "Kolona '%-.64s' u %-.64s nije jedinstvena u kontekstu" - slo "Pole: '%-.64s' v %-.64s je nejasné" - spa "La columna: '%-.64s' en %-.64s es ambigua" - swe "Kolumn '%-.64s' i %-.64s är inte unik" - ukr "óÔÏ×ÂÅÃØ '%-.64s' Õ %-.64s ×ÉÚÎÁÞÅÎÉÊ ÎÅÏÄÎÏÚÎÁÞÎÏ" + cze "Sloupec '%-.192s' v %-.192s nen-Bí zcela jasný" + dan "Felt: '%-.192s' i tabel %-.192s er ikke entydigt" + nla "Kolom: '%-.192s' in %-.192s is niet eenduidig" + eng "Column '%-.192s' in %-.192s is ambiguous" + est "Väli '%-.192s' %-.192s-s ei ole ühene" + fre "Champ: '%-.192s' dans %-.192s est ambigu" + ger "Feld '%-.192s' in %-.192s ist nicht eindeutig" + greek "Ôï ðåäßï: '%-.192s' óå %-.192s äåí Ý÷åé êáèïñéóôåß" + hun "A(z) '%-.192s' oszlop %-.192s-ben ketertelmu" + ita "Colonna: '%-.192s' di %-.192s e` ambigua" + jpn "Column: '%-.192s' in %-.192s is ambiguous" + kor "Ä®·³: '%-.192s' in '%-.192s' ÀÌ ¸ðÈ£ÇÔ" + nor "Felt: '%-.192s' i tabell %-.192s er ikke entydig" + norwegian-ny "Kolonne: '%-.192s' i tabell %-.192s er ikkje eintydig" + pol "Kolumna: '%-.192s' w %-.192s jest dwuznaczna" + por "Coluna '%-.192s' em '%-.192s' é ambígua" + rum "Coloana: '%-.192s' in %-.192s este ambigua" + rus "óÔÏÌÂÅà '%-.192s' × %-.192s ÚÁÄÁÎ ÎÅÏÄÎÏÚÎÁÞÎÏ" + serbian "Kolona '%-.192s' u %-.192s nije jedinstvena u kontekstu" + slo "Pole: '%-.192s' v %-.192s je nejasné" + spa "La columna: '%-.192s' en %-.192s es ambigua" + swe "Kolumn '%-.192s' i %-.192s är inte unik" + ukr "óÔÏ×ÂÅÃØ '%-.192s' Õ %-.192s ×ÉÚÎÁÞÅÎÉÊ ÎÅÏÄÎÏÚÎÁÞÎÏ" ER_SERVER_SHUTDOWN 08S01 cze "Prob-Bíhá ukonèování práce serveru" dan "Database nedlukning er i gang" @@ -1288,77 +1288,77 @@ ER_SERVER_SHUTDOWN 08S01 swe "Servern går nu ned" ukr "úÁ×ÅÒÛÕ¤ÔØÓÑ ÒÁÂÏÔÁ ÓÅÒ×ÅÒÁ" ER_BAD_FIELD_ERROR 42S22 S0022 - cze "Nezn-Bámý sloupec '%-.64s' v %-.64s" - dan "Ukendt kolonne '%-.64s' i tabel %-.64s" - nla "Onbekende kolom '%-.64s' in %-.64s" - eng "Unknown column '%-.64s' in '%-.64s'" - jps "'%-.64s' column ‚Í '%-.64s' ‚ɂ͂ ‚è‚Ü‚¹‚ñ.", - est "Tundmatu tulp '%-.64s' '%-.64s'-s" - fre "Champ '%-.64s' inconnu dans %-.64s" - ger "Unbekanntes Tabellenfeld '%-.64s' in %-.64s" - greek "Áãíùóôï ðåäßï '%-.64s' óå '%-.64s'" - hun "A(z) '%-.64s' oszlop ervenytelen '%-.64s'-ben" - ita "Colonna sconosciuta '%-.64s' in '%-.64s'" - jpn "'%-.64s' column ¤Ï '%-.64s' ¤Ë¤Ï¤¢¤ê¤Þ¤»¤ó." - kor "Unknown Ä®·³ '%-.64s' in '%-.64s'" - nor "Ukjent kolonne '%-.64s' i tabell %-.64s" - norwegian-ny "Ukjent felt '%-.64s' i tabell %-.64s" - pol "Nieznana kolumna '%-.64s' w %-.64s" - por "Coluna '%-.64s' desconhecida em '%-.64s'" - rum "Coloana invalida '%-.64s' in '%-.64s'" - rus "îÅÉÚ×ÅÓÔÎÙÊ ÓÔÏÌÂÅà '%-.64s' × '%-.64s'" - serbian "Nepoznata kolona '%-.64s' u '%-.64s'" - slo "Neznáme pole '%-.64s' v '%-.64s'" - spa "La columna '%-.64s' en %-.64s es desconocida" - swe "Okänd kolumn '%-.64s' i %-.64s" - ukr "îÅצÄÏÍÉÊ ÓÔÏ×ÂÅÃØ '%-.64s' Õ '%-.64s'" + cze "Nezn-Bámý sloupec '%-.192s' v %-.192s" + dan "Ukendt kolonne '%-.192s' i tabel %-.192s" + nla "Onbekende kolom '%-.192s' in %-.192s" + eng "Unknown column '%-.192s' in '%-.192s'" + jps "'%-.192s' column ‚Í '%-.192s' ‚ɂ͂ ‚è‚Ü‚¹‚ñ.", + est "Tundmatu tulp '%-.192s' '%-.192s'-s" + fre "Champ '%-.192s' inconnu dans %-.192s" + ger "Unbekanntes Tabellenfeld '%-.192s' in %-.192s" + greek "Áãíùóôï ðåäßï '%-.192s' óå '%-.192s'" + hun "A(z) '%-.192s' oszlop ervenytelen '%-.192s'-ben" + ita "Colonna sconosciuta '%-.192s' in '%-.192s'" + jpn "'%-.192s' column ¤Ï '%-.192s' ¤Ë¤Ï¤¢¤ê¤Þ¤»¤ó." + kor "Unknown Ä®·³ '%-.192s' in '%-.192s'" + nor "Ukjent kolonne '%-.192s' i tabell %-.192s" + norwegian-ny "Ukjent felt '%-.192s' i tabell %-.192s" + pol "Nieznana kolumna '%-.192s' w %-.192s" + por "Coluna '%-.192s' desconhecida em '%-.192s'" + rum "Coloana invalida '%-.192s' in '%-.192s'" + rus "îÅÉÚ×ÅÓÔÎÙÊ ÓÔÏÌÂÅà '%-.192s' × '%-.192s'" + serbian "Nepoznata kolona '%-.192s' u '%-.192s'" + slo "Neznáme pole '%-.192s' v '%-.192s'" + spa "La columna '%-.192s' en %-.192s es desconocida" + swe "Okänd kolumn '%-.192s' i %-.192s" + ukr "îÅצÄÏÍÉÊ ÓÔÏ×ÂÅÃØ '%-.192s' Õ '%-.192s'" ER_WRONG_FIELD_WITH_GROUP 42000 S1009 - cze "Pou-B¾ité '%-.64s' nebylo v group by" - dan "Brugte '%-.64s' som ikke var i group by" - nla "Opdracht gebruikt '%-.64s' dat niet in de GROUP BY voorkomt" - eng "'%-.64s' isn't in GROUP BY" - jps "'%-.64s' isn't in GROUP BY", - est "'%-.64s' puudub GROUP BY klauslis" - fre "'%-.64s' n'est pas dans 'group by'" - ger "'%-.64s' ist nicht in GROUP BY vorhanden" - greek "×ñçóéìïðïéÞèçêå '%-.64s' ðïõ äåí õðÞñ÷å óôï group by" - hun "Used '%-.64s' with wasn't in group by" - ita "Usato '%-.64s' che non e` nel GROUP BY" - kor "'%-.64s'Àº GROUP BY¼Ó¿¡ ¾øÀ½" - nor "Brukte '%-.64s' som ikke var i group by" - norwegian-ny "Brukte '%-.64s' som ikkje var i group by" - pol "U¿yto '%-.64s' bez umieszczenia w group by" - por "'%-.64s' não está em 'GROUP BY'" - rum "'%-.64s' nu exista in clauza GROUP BY" - rus "'%-.64s' ÎÅ ÐÒÉÓÕÔÓÔ×ÕÅÔ × GROUP BY" - serbian "Entitet '%-.64s' nije naveden u komandi 'GROUP BY'" - slo "Pou¾ité '%-.64s' nebolo v 'group by'" - spa "Usado '%-.64s' el cual no esta group by" - swe "'%-.64s' finns inte i GROUP BY" - ukr "'%-.64s' ÎÅ ¤ Õ GROUP BY" + cze "Pou-B¾ité '%-.192s' nebylo v group by" + dan "Brugte '%-.192s' som ikke var i group by" + nla "Opdracht gebruikt '%-.192s' dat niet in de GROUP BY voorkomt" + eng "'%-.192s' isn't in GROUP BY" + jps "'%-.192s' isn't in GROUP BY", + est "'%-.192s' puudub GROUP BY klauslis" + fre "'%-.192s' n'est pas dans 'group by'" + ger "'%-.192s' ist nicht in GROUP BY vorhanden" + greek "×ñçóéìïðïéÞèçêå '%-.192s' ðïõ äåí õðÞñ÷å óôï group by" + hun "Used '%-.192s' with wasn't in group by" + ita "Usato '%-.192s' che non e` nel GROUP BY" + kor "'%-.192s'Àº GROUP BY¼Ó¿¡ ¾øÀ½" + nor "Brukte '%-.192s' som ikke var i group by" + norwegian-ny "Brukte '%-.192s' som ikkje var i group by" + pol "U¿yto '%-.192s' bez umieszczenia w group by" + por "'%-.192s' não está em 'GROUP BY'" + rum "'%-.192s' nu exista in clauza GROUP BY" + rus "'%-.192s' ÎÅ ÐÒÉÓÕÔÓÔ×ÕÅÔ × GROUP BY" + serbian "Entitet '%-.192s' nije naveden u komandi 'GROUP BY'" + slo "Pou¾ité '%-.192s' nebolo v 'group by'" + spa "Usado '%-.192s' el cual no esta group by" + swe "'%-.192s' finns inte i GROUP BY" + ukr "'%-.192s' ÎÅ ¤ Õ GROUP BY" ER_WRONG_GROUP_FIELD 42000 S1009 - cze "Nemohu pou-B¾ít group na '%-.64s'" - dan "Kan ikke gruppere på '%-.64s'" - nla "Kan '%-.64s' niet groeperen" - eng "Can't group on '%-.64s'" - est "Ei saa grupeerida '%-.64s' järgi" - fre "Ne peut regrouper '%-.64s'" - ger "Gruppierung über '%-.64s' nicht möglich" - greek "Áäýíáôç ç ïìáäïðïßçóç (group on) '%-.64s'" - hun "A group nem hasznalhato: '%-.64s'" - ita "Impossibile raggruppare per '%-.64s'" - kor "'%-.64s'¸¦ ±×·ìÇÒ ¼ö ¾øÀ½" - nor "Kan ikke gruppere på '%-.64s'" - norwegian-ny "Kan ikkje gruppere på '%-.64s'" - pol "Nie mo¿na grupowaæ po '%-.64s'" - por "Não pode agrupar em '%-.64s'" - rum "Nu pot sa grupez pe (group on) '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÇÒÕÐÐÉÒÏ×ËÕ ÐÏ '%-.64s'" - serbian "Ne mogu da grupišem po '%-.64s'" - slo "Nemô¾em pou¾i» 'group' na '%-.64s'" - spa "No puedo agrupar por '%-.64s'" - swe "Kan inte använda GROUP BY med '%-.64s'" - ukr "îÅ ÍÏÖÕ ÇÒÕÐÕ×ÁÔÉ ÐÏ '%-.64s'" + cze "Nemohu pou-B¾ít group na '%-.192s'" + dan "Kan ikke gruppere på '%-.192s'" + nla "Kan '%-.192s' niet groeperen" + eng "Can't group on '%-.192s'" + est "Ei saa grupeerida '%-.192s' järgi" + fre "Ne peut regrouper '%-.192s'" + ger "Gruppierung über '%-.192s' nicht möglich" + greek "Áäýíáôç ç ïìáäïðïßçóç (group on) '%-.192s'" + hun "A group nem hasznalhato: '%-.192s'" + ita "Impossibile raggruppare per '%-.192s'" + kor "'%-.192s'¸¦ ±×·ìÇÒ ¼ö ¾øÀ½" + nor "Kan ikke gruppere på '%-.192s'" + norwegian-ny "Kan ikkje gruppere på '%-.192s'" + pol "Nie mo¿na grupowaæ po '%-.192s'" + por "Não pode agrupar em '%-.192s'" + rum "Nu pot sa grupez pe (group on) '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÇÒÕÐÐÉÒÏ×ËÕ ÐÏ '%-.192s'" + serbian "Ne mogu da grupišem po '%-.192s'" + slo "Nemô¾em pou¾i» 'group' na '%-.192s'" + spa "No puedo agrupar por '%-.192s'" + swe "Kan inte använda GROUP BY med '%-.192s'" + ukr "îÅ ÍÏÖÕ ÇÒÕÐÕ×ÁÔÉ ÐÏ '%-.192s'" ER_WRONG_SUM_SELECT 42000 S1009 cze "P-Bøíkaz obsahuje zároveò funkci sum a sloupce" dan "Udtrykket har summer (sum) funktioner og kolonner i samme udtryk" @@ -1429,103 +1429,103 @@ ER_TOO_LONG_IDENT 42000 S1009 swe "Kolumnnamn '%-.100s' är för långt" ukr "¶Í'Ñ ¦ÄÅÎÔÉÆ¦ËÁÔÏÒÁ '%-.100s' ÚÁÄÏ×ÇÅ" ER_DUP_FIELDNAME 42S21 S1009 - cze "Zdvojen-Bé jméno sloupce '%-.64s'" - dan "Feltnavnet '%-.64s' findes allerede" - nla "Dubbele kolom naam '%-.64s'" - eng "Duplicate column name '%-.64s'" - jps "'%-.64s' ‚Æ‚¢‚¤ column –¼‚Íd•¡‚µ‚Ă܂·", - est "Kattuv tulba nimi '%-.64s'" - fre "Nom du champ '%-.64s' déjà utilisé" - ger "Doppelter Spaltenname: '%-.64s'" - greek "ÅðáíÜëçøç column name '%-.64s'" - hun "Duplikalt oszlopazonosito: '%-.64s'" - ita "Nome colonna duplicato '%-.64s'" - jpn "'%-.64s' ¤È¤¤¤¦ column ̾¤Ï½ÅÊ£¤·¤Æ¤Þ¤¹" - kor "Áߺ¹µÈ Ä®·³ À̸§: '%-.64s'" - nor "Feltnavnet '%-.64s' eksisterte fra før" - norwegian-ny "Feltnamnet '%-.64s' eksisterte frå før" - pol "Powtórzona nazwa kolumny '%-.64s'" - por "Nome da coluna '%-.64s' duplicado" - rum "Numele coloanei '%-.64s' e duplicat" - rus "äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ÓÔÏÌÂÃÁ '%-.64s'" - serbian "Duplirano ime kolone '%-.64s'" - slo "Opakované meno poµa '%-.64s'" - spa "Nombre de columna duplicado '%-.64s'" - swe "Kolumnnamn '%-.64s finns flera gånger" - ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ÓÔÏ×ÂÃÑ '%-.64s'" + cze "Zdvojen-Bé jméno sloupce '%-.192s'" + dan "Feltnavnet '%-.192s' findes allerede" + nla "Dubbele kolom naam '%-.192s'" + eng "Duplicate column name '%-.192s'" + jps "'%-.192s' ‚Æ‚¢‚¤ column –¼‚Íd•¡‚µ‚Ă܂·", + est "Kattuv tulba nimi '%-.192s'" + fre "Nom du champ '%-.192s' déjà utilisé" + ger "Doppelter Spaltenname: '%-.192s'" + greek "ÅðáíÜëçøç column name '%-.192s'" + hun "Duplikalt oszlopazonosito: '%-.192s'" + ita "Nome colonna duplicato '%-.192s'" + jpn "'%-.192s' ¤È¤¤¤¦ column ̾¤Ï½ÅÊ£¤·¤Æ¤Þ¤¹" + kor "Áߺ¹µÈ Ä®·³ À̸§: '%-.192s'" + nor "Feltnavnet '%-.192s' eksisterte fra før" + norwegian-ny "Feltnamnet '%-.192s' eksisterte frå før" + pol "Powtórzona nazwa kolumny '%-.192s'" + por "Nome da coluna '%-.192s' duplicado" + rum "Numele coloanei '%-.192s' e duplicat" + rus "äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ÓÔÏÌÂÃÁ '%-.192s'" + serbian "Duplirano ime kolone '%-.192s'" + slo "Opakované meno poµa '%-.192s'" + spa "Nombre de columna duplicado '%-.192s'" + swe "Kolumnnamn '%-.192s finns flera gånger" + ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ÓÔÏ×ÂÃÑ '%-.192s'" ER_DUP_KEYNAME 42000 S1009 - cze "Zdvojen-Bé jméno klíèe '%-.64s'" - dan "Indeksnavnet '%-.64s' findes allerede" - nla "Dubbele zoeksleutel naam '%-.64s'" - eng "Duplicate key name '%-.64s'" - jps "'%-.64s' ‚Æ‚¢‚¤ key ‚Ì–¼‘O‚Íd•¡‚µ‚Ä‚¢‚Ü‚·", - est "Kattuv võtme nimi '%-.64s'" - fre "Nom de clef '%-.64s' déjà utilisé" - ger "Doppelter Name für Schlüssel vorhanden: '%-.64s'" - greek "ÅðáíÜëçøç key name '%-.64s'" - hun "Duplikalt kulcsazonosito: '%-.64s'" - ita "Nome chiave duplicato '%-.64s'" - jpn "'%-.64s' ¤È¤¤¤¦ key ¤Î̾Á°¤Ï½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" - kor "Áߺ¹µÈ Ű À̸§ : '%-.64s'" - nor "Nøkkelnavnet '%-.64s' eksisterte fra før" - norwegian-ny "Nøkkelnamnet '%-.64s' eksisterte frå før" - pol "Powtórzony nazwa klucza '%-.64s'" - por "Nome da chave '%-.64s' duplicado" - rum "Numele cheiei '%-.64s' e duplicat" - rus "äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ËÌÀÞÁ '%-.64s'" - serbian "Duplirano ime kljuèa '%-.64s'" - slo "Opakované meno kµúèa '%-.64s'" - spa "Nombre de clave duplicado '%-.64s'" - swe "Nyckelnamn '%-.64s' finns flera gånger" - ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ËÌÀÞÁ '%-.64s'" + cze "Zdvojen-Bé jméno klíèe '%-.192s'" + dan "Indeksnavnet '%-.192s' findes allerede" + nla "Dubbele zoeksleutel naam '%-.192s'" + eng "Duplicate key name '%-.192s'" + jps "'%-.192s' ‚Æ‚¢‚¤ key ‚Ì–¼‘O‚Íd•¡‚µ‚Ä‚¢‚Ü‚·", + est "Kattuv võtme nimi '%-.192s'" + fre "Nom de clef '%-.192s' déjà utilisé" + ger "Doppelter Name für Schlüssel vorhanden: '%-.192s'" + greek "ÅðáíÜëçøç key name '%-.192s'" + hun "Duplikalt kulcsazonosito: '%-.192s'" + ita "Nome chiave duplicato '%-.192s'" + jpn "'%-.192s' ¤È¤¤¤¦ key ¤Î̾Á°¤Ï½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" + kor "Áߺ¹µÈ Ű À̸§ : '%-.192s'" + nor "Nøkkelnavnet '%-.192s' eksisterte fra før" + norwegian-ny "Nøkkelnamnet '%-.192s' eksisterte frå før" + pol "Powtórzony nazwa klucza '%-.192s'" + por "Nome da chave '%-.192s' duplicado" + rum "Numele cheiei '%-.192s' e duplicat" + rus "äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ËÌÀÞÁ '%-.192s'" + serbian "Duplirano ime kljuèa '%-.192s'" + slo "Opakované meno kµúèa '%-.192s'" + spa "Nombre de clave duplicado '%-.192s'" + swe "Nyckelnamn '%-.192s' finns flera gånger" + ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ËÌÀÞÁ '%-.192s'" ER_DUP_ENTRY 23000 S1009 - cze "Zdvojen-Bý klíè '%-.64s' (èíslo klíèe %d)" - dan "Ens værdier '%-.64s' for indeks %d" - nla "Dubbele ingang '%-.64s' voor zoeksleutel %d" - eng "Duplicate entry '%-.64s' for key %d" - jps "'%-.64s' ‚Í key %d ‚É‚¨‚¢‚Äd•¡‚µ‚Ä‚¢‚Ü‚·", - est "Kattuv väärtus '%-.64s' võtmele %d" - fre "Duplicata du champ '%-.64s' pour la clef %d" - ger "Doppelter Eintrag '%-.64s' für Schlüssel %d" - greek "ÄéðëÞ åããñáöÞ '%-.64s' ãéá ôï êëåéäß %d" - hun "Duplikalt bejegyzes '%-.64s' a %d kulcs szerint." - ita "Valore duplicato '%-.64s' per la chiave %d" - jpn "'%-.64s' ¤Ï key %d ¤Ë¤ª¤¤¤Æ½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" - kor "Áߺ¹µÈ ÀÔ·Â °ª '%-.64s': key %d" - nor "Like verdier '%-.64s' for nøkkel %d" - norwegian-ny "Like verdiar '%-.64s' for nykkel %d" - pol "Powtórzone wyst?pienie '%-.64s' dla klucza %d" - por "Entrada '%-.64s' duplicada para a chave %d" - rum "Cimpul '%-.64s' e duplicat pentru cheia %d" - rus "äÕÂÌÉÒÕÀÝÁÑÓÑ ÚÁÐÉÓØ '%-.64s' ÐÏ ËÌÀÞÕ %d" - serbian "Dupliran unos '%-.64s' za kljuè '%d'" - slo "Opakovaný kµúè '%-.64s' (èíslo kµúèa %d)" - spa "Entrada duplicada '%-.64s' para la clave %d" - swe "Dubbel nyckel '%-.64s' för nyckel %d" - ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.64s' ÄÌÑ ËÌÀÞÁ %d" + cze "Zdvojen-Bý klíè '%-.192s' (èíslo klíèe %d)" + dan "Ens værdier '%-.192s' for indeks %d" + nla "Dubbele ingang '%-.192s' voor zoeksleutel %d" + eng "Duplicate entry '%-.192s' for key %d" + jps "'%-.192s' ‚Í key %d ‚É‚¨‚¢‚Äd•¡‚µ‚Ä‚¢‚Ü‚·", + est "Kattuv väärtus '%-.192s' võtmele %d" + fre "Duplicata du champ '%-.192s' pour la clef %d" + ger "Doppelter Eintrag '%-.192s' für Schlüssel %d" + greek "ÄéðëÞ åããñáöÞ '%-.192s' ãéá ôï êëåéäß %d" + hun "Duplikalt bejegyzes '%-.192s' a %d kulcs szerint." + ita "Valore duplicato '%-.192s' per la chiave %d" + jpn "'%-.192s' ¤Ï key %d ¤Ë¤ª¤¤¤Æ½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" + kor "Áߺ¹µÈ ÀÔ·Â °ª '%-.192s': key %d" + nor "Like verdier '%-.192s' for nøkkel %d" + norwegian-ny "Like verdiar '%-.192s' for nykkel %d" + pol "Powtórzone wyst?pienie '%-.192s' dla klucza %d" + por "Entrada '%-.192s' duplicada para a chave %d" + rum "Cimpul '%-.192s' e duplicat pentru cheia %d" + rus "äÕÂÌÉÒÕÀÝÁÑÓÑ ÚÁÐÉÓØ '%-.192s' ÐÏ ËÌÀÞÕ %d" + serbian "Dupliran unos '%-.192s' za kljuè '%d'" + slo "Opakovaný kµúè '%-.192s' (èíslo kµúèa %d)" + spa "Entrada duplicada '%-.192s' para la clave %d" + swe "Dubbel nyckel '%-.192s' för nyckel %d" + ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.192s' ÄÌÑ ËÌÀÞÁ %d" ER_WRONG_FIELD_SPEC 42000 S1009 - cze "Chybn-Bá specifikace sloupce '%-.64s'" - dan "Forkert kolonnespecifikaton for felt '%-.64s'" - nla "Verkeerde kolom specificatie voor kolom '%-.64s'" - eng "Incorrect column specifier for column '%-.64s'" - est "Vigane tulba kirjeldus tulbale '%-.64s'" - fre "Mauvais paramètre de champ pour le champ '%-.64s'" - ger "Falsche Spezifikation für Feld '%-.64s'" - greek "ÅóöáëìÝíï column specifier ãéá ôï ðåäßï '%-.64s'" - hun "Rossz oszlopazonosito: '%-.64s'" - ita "Specifica errata per la colonna '%-.64s'" - kor "Ä®·³ '%-.64s'ÀÇ ºÎÁ¤È®ÇÑ Ä®·³ Á¤ÀÇÀÚ" - nor "Feil kolonne spesifikator for felt '%-.64s'" - norwegian-ny "Feil kolonne spesifikator for kolonne '%-.64s'" - pol "B³êdna specyfikacja kolumny dla kolumny '%-.64s'" - por "Especificador de coluna incorreto para a coluna '%-.64s'" - rum "Specificandul coloanei '%-.64s' este incorect" - rus "îÅËÏÒÒÅËÔÎÙÊ ÏÐÒÅÄÅÌÉÔÅÌØ ÓÔÏÌÂÃÁ ÄÌÑ ÓÔÏÌÂÃÁ '%-.64s'" - serbian "Pogrešan naziv kolone za kolonu '%-.64s'" - slo "Chyba v ¹pecifikácii poµa '%-.64s'" - spa "Especificador de columna erroneo para la columna '%-.64s'" - swe "Felaktigt kolumntyp för kolumn '%-.64s'" - ukr "îÅצÒÎÉÊ ÓÐÅÃÉÆ¦ËÁÔÏÒ ÓÔÏ×ÂÃÑ '%-.64s'" + cze "Chybn-Bá specifikace sloupce '%-.192s'" + dan "Forkert kolonnespecifikaton for felt '%-.192s'" + nla "Verkeerde kolom specificatie voor kolom '%-.192s'" + eng "Incorrect column specifier for column '%-.192s'" + est "Vigane tulba kirjeldus tulbale '%-.192s'" + fre "Mauvais paramètre de champ pour le champ '%-.192s'" + ger "Falsche Spezifikation für Feld '%-.192s'" + greek "ÅóöáëìÝíï column specifier ãéá ôï ðåäßï '%-.192s'" + hun "Rossz oszlopazonosito: '%-.192s'" + ita "Specifica errata per la colonna '%-.192s'" + kor "Ä®·³ '%-.192s'ÀÇ ºÎÁ¤È®ÇÑ Ä®·³ Á¤ÀÇÀÚ" + nor "Feil kolonne spesifikator for felt '%-.192s'" + norwegian-ny "Feil kolonne spesifikator for kolonne '%-.192s'" + pol "B³êdna specyfikacja kolumny dla kolumny '%-.192s'" + por "Especificador de coluna incorreto para a coluna '%-.192s'" + rum "Specificandul coloanei '%-.192s' este incorect" + rus "îÅËÏÒÒÅËÔÎÙÊ ÏÐÒÅÄÅÌÉÔÅÌØ ÓÔÏÌÂÃÁ ÄÌÑ ÓÔÏÌÂÃÁ '%-.192s'" + serbian "Pogrešan naziv kolone za kolonu '%-.192s'" + slo "Chyba v ¹pecifikácii poµa '%-.192s'" + spa "Especificador de columna erroneo para la columna '%-.192s'" + swe "Felaktigt kolumntyp för kolumn '%-.192s'" + ukr "îÅצÒÎÉÊ ÓÐÅÃÉÆ¦ËÁÔÏÒ ÓÔÏ×ÂÃÑ '%-.192s'" ER_PARSE_ERROR 42000 s1009 cze "%s bl-Bízko '%-.80s' na øádku %d" dan "%s nær '%-.80s' på linje %d" @@ -1577,53 +1577,53 @@ ER_EMPTY_QUERY 42000 swe "Frågan var tom" ukr "ðÕÓÔÉÊ ÚÁÐÉÔ" ER_NONUNIQ_TABLE 42000 S1009 - cze "Nejednozna-Bèná tabulka/alias: '%-.64s'" - dan "Tabellen/aliaset: '%-.64s' er ikke unikt" - nla "Niet unieke waarde tabel/alias: '%-.64s'" - eng "Not unique table/alias: '%-.64s'" - jps "'%-.64s' ‚͈êˆÓ‚Ì table/alias –¼‚ł͂ ‚è‚Ü‚¹‚ñ", - est "Ei ole unikaalne tabel/alias '%-.64s'" - fre "Table/alias: '%-.64s' non unique" - ger "Tabellenname/Alias '%-.64s' nicht eindeutig" - greek "Áäýíáôç ç áíåýñåóç unique table/alias: '%-.64s'" - hun "Nem egyedi tabla/alias: '%-.64s'" - ita "Tabella/alias non unico: '%-.64s'" - jpn "'%-.64s' ¤Ï°ì°Õ¤Î table/alias ̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" - kor "Unique ÇÏÁö ¾ÊÀº Å×À̺í/alias: '%-.64s'" - nor "Ikke unikt tabell/alias: '%-.64s'" - norwegian-ny "Ikkje unikt tabell/alias: '%-.64s'" - pol "Tabela/alias nie s? unikalne: '%-.64s'" - por "Tabela/alias '%-.64s' não única" - rum "Tabela/alias: '%-.64s' nu este unic" - rus "ðÏ×ÔÏÒÑÀÝÁÑÓÑ ÔÁÂÌÉÃÁ/ÐÓÅ×ÄÏÎÉÍ '%-.64s'" - serbian "Tabela ili alias nisu bili jedinstveni: '%-.64s'" - slo "Nie jednoznaèná tabuµka/alias: '%-.64s'" - spa "Tabla/alias: '%-.64s' es no unica" - swe "Icke unikt tabell/alias: '%-.64s'" - ukr "îÅÕΦËÁÌØÎÁ ÔÁÂÌÉÃÑ/ÐÓÅ×ÄÏΦÍ: '%-.64s'" + cze "Nejednozna-Bèná tabulka/alias: '%-.192s'" + dan "Tabellen/aliaset: '%-.192s' er ikke unikt" + nla "Niet unieke waarde tabel/alias: '%-.192s'" + eng "Not unique table/alias: '%-.192s'" + jps "'%-.192s' ‚͈êˆÓ‚Ì table/alias –¼‚ł͂ ‚è‚Ü‚¹‚ñ", + est "Ei ole unikaalne tabel/alias '%-.192s'" + fre "Table/alias: '%-.192s' non unique" + ger "Tabellenname/Alias '%-.192s' nicht eindeutig" + greek "Áäýíáôç ç áíåýñåóç unique table/alias: '%-.192s'" + hun "Nem egyedi tabla/alias: '%-.192s'" + ita "Tabella/alias non unico: '%-.192s'" + jpn "'%-.192s' ¤Ï°ì°Õ¤Î table/alias ̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" + kor "Unique ÇÏÁö ¾ÊÀº Å×À̺í/alias: '%-.192s'" + nor "Ikke unikt tabell/alias: '%-.192s'" + norwegian-ny "Ikkje unikt tabell/alias: '%-.192s'" + pol "Tabela/alias nie s? unikalne: '%-.192s'" + por "Tabela/alias '%-.192s' não única" + rum "Tabela/alias: '%-.192s' nu este unic" + rus "ðÏ×ÔÏÒÑÀÝÁÑÓÑ ÔÁÂÌÉÃÁ/ÐÓÅ×ÄÏÎÉÍ '%-.192s'" + serbian "Tabela ili alias nisu bili jedinstveni: '%-.192s'" + slo "Nie jednoznaèná tabuµka/alias: '%-.192s'" + spa "Tabla/alias: '%-.192s' es no unica" + swe "Icke unikt tabell/alias: '%-.192s'" + ukr "îÅÕΦËÁÌØÎÁ ÔÁÂÌÉÃÑ/ÐÓÅ×ÄÏΦÍ: '%-.192s'" ER_INVALID_DEFAULT 42000 S1009 - cze "Chybn-Bá defaultní hodnota pro '%-.64s'" - dan "Ugyldig standardværdi for '%-.64s'" - nla "Foutieve standaard waarde voor '%-.64s'" - eng "Invalid default value for '%-.64s'" - est "Vigane vaikeväärtus '%-.64s' jaoks" - fre "Valeur par défaut invalide pour '%-.64s'" - ger "Fehlerhafter Vorgabewert (DEFAULT) für '%-.64s'" - greek "ÅóöáëìÝíç ðñïêáèïñéóìÝíç ôéìÞ (default value) ãéá '%-.64s'" - hun "Ervenytelen ertek: '%-.64s'" - ita "Valore di default non valido per '%-.64s'" - kor "'%-.64s'ÀÇ À¯È¿ÇÏÁö ¸øÇÑ µðÆúÆ® °ªÀ» »ç¿ëÇϼ̽À´Ï´Ù." - nor "Ugyldig standardverdi for '%-.64s'" - norwegian-ny "Ugyldig standardverdi for '%-.64s'" - pol "Niew³a?ciwa warto?æ domy?lna dla '%-.64s'" - por "Valor padrão (default) inválido para '%-.64s'" - rum "Valoarea de default este invalida pentru '%-.64s'" - rus "îÅËÏÒÒÅËÔÎÏÅ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ '%-.64s'" - serbian "Loša default vrednost za '%-.64s'" - slo "Chybná implicitná hodnota pre '%-.64s'" - spa "Valor por defecto invalido para '%-.64s'" - swe "Ogiltigt DEFAULT värde för '%-.64s'" - ukr "îÅצÒÎÅ ÚÎÁÞÅÎÎÑ ÐÏ ÚÁÍÏ×ÞÕ×ÁÎÎÀ ÄÌÑ '%-.64s'" + cze "Chybn-Bá defaultní hodnota pro '%-.192s'" + dan "Ugyldig standardværdi for '%-.192s'" + nla "Foutieve standaard waarde voor '%-.192s'" + eng "Invalid default value for '%-.192s'" + est "Vigane vaikeväärtus '%-.192s' jaoks" + fre "Valeur par défaut invalide pour '%-.192s'" + ger "Fehlerhafter Vorgabewert (DEFAULT) für '%-.192s'" + greek "ÅóöáëìÝíç ðñïêáèïñéóìÝíç ôéìÞ (default value) ãéá '%-.192s'" + hun "Ervenytelen ertek: '%-.192s'" + ita "Valore di default non valido per '%-.192s'" + kor "'%-.192s'ÀÇ À¯È¿ÇÏÁö ¸øÇÑ µðÆúÆ® °ªÀ» »ç¿ëÇϼ̽À´Ï´Ù." + nor "Ugyldig standardverdi for '%-.192s'" + norwegian-ny "Ugyldig standardverdi for '%-.192s'" + pol "Niew³a?ciwa warto?æ domy?lna dla '%-.192s'" + por "Valor padrão (default) inválido para '%-.192s'" + rum "Valoarea de default este invalida pentru '%-.192s'" + rus "îÅËÏÒÒÅËÔÎÏÅ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ '%-.192s'" + serbian "Loša default vrednost za '%-.192s'" + slo "Chybná implicitná hodnota pre '%-.192s'" + spa "Valor por defecto invalido para '%-.192s'" + swe "Ogiltigt DEFAULT värde för '%-.192s'" + ukr "îÅצÒÎÅ ÚÎÁÞÅÎÎÑ ÐÏ ÚÁÍÏ×ÞÕ×ÁÎÎÀ ÄÌÑ '%-.192s'" ER_MULTIPLE_PRI_KEY 42000 S1009 cze "Definov-Báno více primárních klíèù" dan "Flere primærnøgler specificeret" @@ -1723,78 +1723,78 @@ ER_TOO_LONG_KEY 42000 S1009 swe "För lång nyckel. Högsta tillåtna nyckellängd är %d" ukr "úÁÚÎÁÞÅÎÉÊ ËÌÀÞ ÚÁÄÏ×ÇÉÊ. îÁÊÂ¦ÌØÛÁ ÄÏ×ÖÉÎÁ ËÌÀÞÁ %d ÂÁÊÔ¦×" ER_KEY_COLUMN_DOES_NOT_EXITS 42000 S1009 - cze "Kl-Bíèový sloupec '%-.64s' v tabulce neexistuje" - dan "Nøglefeltet '%-.64s' eksisterer ikke i tabellen" - nla "Zoeksleutel kolom '%-.64s' bestaat niet in tabel" - eng "Key column '%-.64s' doesn't exist in table" - jps "Key column '%-.64s' ‚ªƒe[ƒuƒ‹‚É‚ ‚è‚Ü‚¹‚ñ.", - est "Võtme tulp '%-.64s' puudub tabelis" - fre "La clé '%-.64s' n'existe pas dans la table" - ger "In der Tabelle gibt es kein Schlüsselfeld '%-.64s'" - greek "Ôï ðåäßï êëåéäß '%-.64s' äåí õðÜñ÷åé óôïí ðßíáêá" - hun "A(z) '%-.64s'kulcsoszlop nem letezik a tablaban" - ita "La colonna chiave '%-.64s' non esiste nella tabella" - jpn "Key column '%-.64s' ¤¬¥Æ¡¼¥Ö¥ë¤Ë¤¢¤ê¤Þ¤»¤ó." - kor "Key Ä®·³ '%-.64s'´Â Å×ÀÌºí¿¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." - nor "Nøkkel felt '%-.64s' eksiterer ikke i tabellen" - norwegian-ny "Nykkel kolonne '%-.64s' eksiterar ikkje i tabellen" - pol "Kolumna '%-.64s' zdefiniowana w kluczu nie istnieje w tabeli" - por "Coluna chave '%-.64s' não existe na tabela" - rum "Coloana cheie '%-.64s' nu exista in tabela" - rus "ëÌÀÞÅ×ÏÊ ÓÔÏÌÂÅà '%-.64s' × ÔÁÂÌÉÃÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Kljuèna kolona '%-.64s' ne postoji u tabeli" - slo "Kµúèový ståpec '%-.64s' v tabuµke neexistuje" - spa "La columna clave '%-.64s' no existe en la tabla" - swe "Nyckelkolumn '%-.64s' finns inte" - ukr "ëÌÀÞÏ×ÉÊ ÓÔÏ×ÂÅÃØ '%-.64s' ÎÅ ¦ÓÎÕ¤ Õ ÔÁÂÌÉæ" + cze "Kl-Bíèový sloupec '%-.192s' v tabulce neexistuje" + dan "Nøglefeltet '%-.192s' eksisterer ikke i tabellen" + nla "Zoeksleutel kolom '%-.192s' bestaat niet in tabel" + eng "Key column '%-.192s' doesn't exist in table" + jps "Key column '%-.192s' ‚ªƒe[ƒuƒ‹‚É‚ ‚è‚Ü‚¹‚ñ.", + est "Võtme tulp '%-.192s' puudub tabelis" + fre "La clé '%-.192s' n'existe pas dans la table" + ger "In der Tabelle gibt es kein Schlüsselfeld '%-.192s'" + greek "Ôï ðåäßï êëåéäß '%-.192s' äåí õðÜñ÷åé óôïí ðßíáêá" + hun "A(z) '%-.192s'kulcsoszlop nem letezik a tablaban" + ita "La colonna chiave '%-.192s' non esiste nella tabella" + jpn "Key column '%-.192s' ¤¬¥Æ¡¼¥Ö¥ë¤Ë¤¢¤ê¤Þ¤»¤ó." + kor "Key Ä®·³ '%-.192s'´Â Å×ÀÌºí¿¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." + nor "Nøkkel felt '%-.192s' eksiterer ikke i tabellen" + norwegian-ny "Nykkel kolonne '%-.192s' eksiterar ikkje i tabellen" + pol "Kolumna '%-.192s' zdefiniowana w kluczu nie istnieje w tabeli" + por "Coluna chave '%-.192s' não existe na tabela" + rum "Coloana cheie '%-.192s' nu exista in tabela" + rus "ëÌÀÞÅ×ÏÊ ÓÔÏÌÂÅà '%-.192s' × ÔÁÂÌÉÃÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Kljuèna kolona '%-.192s' ne postoji u tabeli" + slo "Kµúèový ståpec '%-.192s' v tabuµke neexistuje" + spa "La columna clave '%-.192s' no existe en la tabla" + swe "Nyckelkolumn '%-.192s' finns inte" + ukr "ëÌÀÞÏ×ÉÊ ÓÔÏ×ÂÅÃØ '%-.192s' ÎÅ ¦ÓÎÕ¤ Õ ÔÁÂÌÉæ" ER_BLOB_USED_AS_KEY 42000 S1009 - cze "Blob sloupec '%-.64s' nem-Bù¾e být pou¾it jako klíè" - dan "BLOB feltet '%-.64s' kan ikke bruges ved specifikation af indeks" - nla "BLOB kolom '%-.64s' kan niet gebruikt worden bij zoeksleutel specificatie" - eng "BLOB column '%-.64s' can't be used in key specification with the used table type" - est "BLOB-tüüpi tulpa '%-.64s' ei saa kasutada võtmena" - fre "Champ BLOB '%-.64s' ne peut être utilisé dans une clé" - ger "BLOB-Feld '%-.64s' kann beim verwendeten Tabellentyp nicht als Schlüssel verwendet werden" - greek "Ðåäßï ôýðïõ Blob '%-.64s' äåí ìðïñåß íá ÷ñçóéìïðïéçèåß óôïí ïñéóìü åíüò êëåéäéïý (key specification)" - hun "Blob objektum '%-.64s' nem hasznalhato kulcskent" - ita "La colonna BLOB '%-.64s' non puo` essere usata nella specifica della chiave" - kor "BLOB Ä®·³ '%-.64s'´Â Ű Á¤ÀÇ¿¡¼­ »ç¿ëµÉ ¼ö ¾ø½À´Ï´Ù." - nor "Blob felt '%-.64s' kan ikke brukes ved spesifikasjon av nøkler" - norwegian-ny "Blob kolonne '%-.64s' kan ikkje brukast ved spesifikasjon av nyklar" - pol "Kolumna typu Blob '%-.64s' nie mo¿e byæ u¿yta w specyfikacji klucza" - por "Coluna BLOB '%-.64s' não pode ser utilizada na especificação de chave para o tipo de tabela usado" - rum "Coloana de tip BLOB '%-.64s' nu poate fi folosita in specificarea cheii cu tipul de tabla folosit" - rus "óÔÏÌÂÅà ÔÉÐÁ BLOB '%-.64s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎ ËÁË ÚÎÁÞÅÎÉÅ ËÌÀÞÁ × ÔÁÂÌÉÃÅ ÔÁËÏÇÏ ÔÉÐÁ" - serbian "BLOB kolona '%-.64s' ne može biti upotrebljena za navoðenje kljuèa sa tipom tabele koji se trenutno koristi" - slo "Blob pole '%-.64s' nemô¾e by» pou¾ité ako kµúè" - spa "La columna Blob '%-.64s' no puede ser usada en una declaracion de clave" - swe "En BLOB '%-.64s' kan inte vara nyckel med den använda tabelltypen" - ukr "BLOB ÓÔÏ×ÂÅÃØ '%-.64s' ÎÅ ÍÏÖÅ ÂÕÔÉ ×ÉËÏÒÉÓÔÁÎÉÊ Õ ×ÉÚÎÁÞÅÎΦ ËÌÀÞÁ × ÃØÏÍÕ ÔÉЦ ÔÁÂÌÉæ" + cze "Blob sloupec '%-.192s' nem-Bù¾e být pou¾it jako klíè" + dan "BLOB feltet '%-.192s' kan ikke bruges ved specifikation af indeks" + nla "BLOB kolom '%-.192s' kan niet gebruikt worden bij zoeksleutel specificatie" + eng "BLOB column '%-.192s' can't be used in key specification with the used table type" + est "BLOB-tüüpi tulpa '%-.192s' ei saa kasutada võtmena" + fre "Champ BLOB '%-.192s' ne peut être utilisé dans une clé" + ger "BLOB-Feld '%-.192s' kann beim verwendeten Tabellentyp nicht als Schlüssel verwendet werden" + greek "Ðåäßï ôýðïõ Blob '%-.192s' äåí ìðïñåß íá ÷ñçóéìïðïéçèåß óôïí ïñéóìü åíüò êëåéäéïý (key specification)" + hun "Blob objektum '%-.192s' nem hasznalhato kulcskent" + ita "La colonna BLOB '%-.192s' non puo` essere usata nella specifica della chiave" + kor "BLOB Ä®·³ '%-.192s'´Â Ű Á¤ÀÇ¿¡¼­ »ç¿ëµÉ ¼ö ¾ø½À´Ï´Ù." + nor "Blob felt '%-.192s' kan ikke brukes ved spesifikasjon av nøkler" + norwegian-ny "Blob kolonne '%-.192s' kan ikkje brukast ved spesifikasjon av nyklar" + pol "Kolumna typu Blob '%-.192s' nie mo¿e byæ u¿yta w specyfikacji klucza" + por "Coluna BLOB '%-.192s' não pode ser utilizada na especificação de chave para o tipo de tabela usado" + rum "Coloana de tip BLOB '%-.192s' nu poate fi folosita in specificarea cheii cu tipul de tabla folosit" + rus "óÔÏÌÂÅà ÔÉÐÁ BLOB '%-.192s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎ ËÁË ÚÎÁÞÅÎÉÅ ËÌÀÞÁ × ÔÁÂÌÉÃÅ ÔÁËÏÇÏ ÔÉÐÁ" + serbian "BLOB kolona '%-.192s' ne može biti upotrebljena za navoðenje kljuèa sa tipom tabele koji se trenutno koristi" + slo "Blob pole '%-.192s' nemô¾e by» pou¾ité ako kµúè" + spa "La columna Blob '%-.192s' no puede ser usada en una declaracion de clave" + swe "En BLOB '%-.192s' kan inte vara nyckel med den använda tabelltypen" + ukr "BLOB ÓÔÏ×ÂÅÃØ '%-.192s' ÎÅ ÍÏÖÅ ÂÕÔÉ ×ÉËÏÒÉÓÔÁÎÉÊ Õ ×ÉÚÎÁÞÅÎΦ ËÌÀÞÁ × ÃØÏÍÕ ÔÉЦ ÔÁÂÌÉæ" ER_TOO_BIG_FIELDLENGTH 42000 S1009 - cze "P-Bøíli¹ velká délka sloupce '%-.64s' (nejvíce %d). Pou¾ijte BLOB" - dan "For stor feltlængde for kolonne '%-.64s' (maks = %d). Brug BLOB i stedet" - nla "Te grote kolomlengte voor '%-.64s' (max = %d). Maak hiervoor gebruik van het type BLOB" - eng "Column length too big for column '%-.64s' (max = %d); use BLOB or TEXT instead" - jps "column '%-.64s' ‚Í,Šm•Û‚·‚é column ‚̑傫‚³‚ª‘½‚·‚¬‚Ü‚·. (Å‘å %d ‚Ü‚Å). BLOB ‚ð‚©‚í‚è‚ÉŽg—p‚µ‚Ä‚­‚¾‚³‚¢.", - est "Tulba '%-.64s' pikkus on liiga pikk (maksimaalne pikkus: %d). Kasuta BLOB väljatüüpi" - fre "Champ '%-.64s' trop long (max = %d). Utilisez un BLOB" - ger "Feldlänge für Feld '%-.64s' zu groß (maximal %d). BLOB- oder TEXT-Spaltentyp verwenden!" - greek "Ðïëý ìåãÜëï ìÞêïò ãéá ôï ðåäßï '%-.64s' (max = %d). Ðáñáêáëþ ÷ñçóéìïðïéåßóôå ôïí ôýðï BLOB" - hun "A(z) '%-.64s' oszlop tul hosszu. (maximum = %d). Hasznaljon BLOB tipust inkabb." - ita "La colonna '%-.64s' e` troppo grande (max=%d). Utilizza un BLOB." - jpn "column '%-.64s' ¤Ï,³ÎÊݤ¹¤ë column ¤ÎÂ礭¤µ¤¬Â¿¤¹¤®¤Þ¤¹. (ºÇÂç %d ¤Þ¤Ç). BLOB ¤ò¤«¤ï¤ê¤Ë»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤." - kor "Ä®·³ '%-.64s'ÀÇ Ä®·³ ±æÀ̰¡ ³Ê¹« ±é´Ï´Ù (ÃÖ´ë = %d). ´ë½Å¿¡ BLOB¸¦ »ç¿ëÇϼ¼¿ä." - nor "For stor nøkkellengde for kolonne '%-.64s' (maks = %d). Bruk BLOB istedenfor" - norwegian-ny "For stor nykkellengde for felt '%-.64s' (maks = %d). Bruk BLOB istadenfor" - pol "Zbyt du¿a d³ugo?æ kolumny '%-.64s' (maks. = %d). W zamian u¿yj typu BLOB" - por "Comprimento da coluna '%-.64s' grande demais (max = %d); use BLOB em seu lugar" - rum "Lungimea coloanei '%-.64s' este prea lunga (maximum = %d). Foloseste BLOB mai bine" - rus "óÌÉÛËÏÍ ÂÏÌØÛÁÑ ÄÌÉÎÁ ÓÔÏÌÂÃÁ '%-.64s' (ÍÁËÓÉÍÕÍ = %d). éÓÐÏÌØÚÕÊÔÅ ÔÉÐ BLOB ÉÌÉ TEXT ×ÍÅÓÔÏ ÔÅËÕÝÅÇÏ" - serbian "Previše podataka za kolonu '%-.64s' (maksimum je %d). Upotrebite BLOB polje" - slo "Príli¹ veµká då¾ka pre pole '%-.64s' (maximum = %d). Pou¾ite BLOB" - spa "Longitud de columna demasiado grande para la columna '%-.64s' (maximo = %d).Usar BLOB en su lugar" - swe "För stor kolumnlängd angiven för '%-.64s' (max= %d). Använd en BLOB instället" - ukr "úÁÄÏ×ÇÁ ÄÏ×ÖÉÎÁ ÓÔÏ×ÂÃÑ '%-.64s' (max = %d). ÷ÉËÏÒÉÓÔÁÊÔÅ ÔÉÐ BLOB" + cze "P-Bøíli¹ velká délka sloupce '%-.192s' (nejvíce %d). Pou¾ijte BLOB" + dan "For stor feltlængde for kolonne '%-.192s' (maks = %d). Brug BLOB i stedet" + nla "Te grote kolomlengte voor '%-.192s' (max = %d). Maak hiervoor gebruik van het type BLOB" + eng "Column length too big for column '%-.192s' (max = %d); use BLOB or TEXT instead" + jps "column '%-.192s' ‚Í,Šm•Û‚·‚é column ‚̑傫‚³‚ª‘½‚·‚¬‚Ü‚·. (Å‘å %d ‚Ü‚Å). BLOB ‚ð‚©‚í‚è‚ÉŽg—p‚µ‚Ä‚­‚¾‚³‚¢.", + est "Tulba '%-.192s' pikkus on liiga pikk (maksimaalne pikkus: %d). Kasuta BLOB väljatüüpi" + fre "Champ '%-.192s' trop long (max = %d). Utilisez un BLOB" + ger "Feldlänge für Feld '%-.192s' zu groß (maximal %d). BLOB- oder TEXT-Spaltentyp verwenden!" + greek "Ðïëý ìåãÜëï ìÞêïò ãéá ôï ðåäßï '%-.192s' (max = %d). Ðáñáêáëþ ÷ñçóéìïðïéåßóôå ôïí ôýðï BLOB" + hun "A(z) '%-.192s' oszlop tul hosszu. (maximum = %d). Hasznaljon BLOB tipust inkabb." + ita "La colonna '%-.192s' e` troppo grande (max=%d). Utilizza un BLOB." + jpn "column '%-.192s' ¤Ï,³ÎÊݤ¹¤ë column ¤ÎÂ礭¤µ¤¬Â¿¤¹¤®¤Þ¤¹. (ºÇÂç %d ¤Þ¤Ç). BLOB ¤ò¤«¤ï¤ê¤Ë»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤." + kor "Ä®·³ '%-.192s'ÀÇ Ä®·³ ±æÀ̰¡ ³Ê¹« ±é´Ï´Ù (ÃÖ´ë = %d). ´ë½Å¿¡ BLOB¸¦ »ç¿ëÇϼ¼¿ä." + nor "For stor nøkkellengde for kolonne '%-.192s' (maks = %d). Bruk BLOB istedenfor" + norwegian-ny "For stor nykkellengde for felt '%-.192s' (maks = %d). Bruk BLOB istadenfor" + pol "Zbyt du¿a d³ugo?æ kolumny '%-.192s' (maks. = %d). W zamian u¿yj typu BLOB" + por "Comprimento da coluna '%-.192s' grande demais (max = %d); use BLOB em seu lugar" + rum "Lungimea coloanei '%-.192s' este prea lunga (maximum = %d). Foloseste BLOB mai bine" + rus "óÌÉÛËÏÍ ÂÏÌØÛÁÑ ÄÌÉÎÁ ÓÔÏÌÂÃÁ '%-.192s' (ÍÁËÓÉÍÕÍ = %d). éÓÐÏÌØÚÕÊÔÅ ÔÉÐ BLOB ÉÌÉ TEXT ×ÍÅÓÔÏ ÔÅËÕÝÅÇÏ" + serbian "Previše podataka za kolonu '%-.192s' (maksimum je %d). Upotrebite BLOB polje" + slo "Príli¹ veµká då¾ka pre pole '%-.192s' (maximum = %d). Pou¾ite BLOB" + spa "Longitud de columna demasiado grande para la columna '%-.192s' (maximo = %d).Usar BLOB en su lugar" + swe "För stor kolumnlängd angiven för '%-.192s' (max= %d). Använd en BLOB instället" + ukr "úÁÄÏ×ÇÁ ÄÏ×ÖÉÎÁ ÓÔÏ×ÂÃÑ '%-.192s' (max = %d). ÷ÉËÏÒÉÓÔÁÊÔÅ ÔÉÐ BLOB" ER_WRONG_AUTO_KEY 42000 S1009 cze "M-Bù¾ete mít pouze jedno AUTO pole a to musí být definováno jako klíè" dan "Der kan kun specificeres eet AUTO_INCREMENT-felt, og det skal være indekseret" @@ -1919,30 +1919,30 @@ ER_SHUTDOWN_COMPLETE swe "%s: Avslutning klar\n" ukr "%s: òÏÂÏÔÕ ÚÁ×ÅÒÛÅÎÏ\n" ER_FORCING_CLOSE 08S01 - cze "%s: n-Básilné uzavøení threadu %ld u¾ivatele '%-.32s'\n" - dan "%s: Forceret nedlukning af tråd: %ld bruger: '%-.32s'\n" - nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.32s'\n" - eng "%s: Forcing close of thread %ld user: '%-.32s'\n" - jps "%s: ƒXƒŒƒbƒh %ld ‹­§I—¹ user: '%-.32s'\n", - est "%s: Sulgen jõuga lõime %ld kasutaja: '%-.32s'\n" - fre "%s: Arrêt forcé de la tâche (thread) %ld utilisateur: '%-.32s'\n" - ger "%s: Thread %ld zwangsweise beendet. Benutzer: '%-.32s'\n" - greek "%s: Ôï thread èá êëåßóåé %ld user: '%-.32s'\n" - hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.32s'\n" - ita "%s: Forzata la chiusura del thread %ld utente: '%-.32s'\n" - jpn "%s: ¥¹¥ì¥Ã¥É %ld ¶¯À©½ªÎ» user: '%-.32s'\n" - kor "%s: thread %ldÀÇ °­Á¦ Á¾·á user: '%-.32s'\n" - nor "%s: Påtvinget avslutning av tråd %ld bruker: '%-.32s'\n" - norwegian-ny "%s: Påtvinga avslutning av tråd %ld brukar: '%-.32s'\n" - pol "%s: Wymuszenie zamkniêcia w?tku %ld u¿ytkownik: '%-.32s'\n" - por "%s: Forçando finalização da 'thread' %ld - usuário '%-.32s'\n" - rum "%s: Terminare fortata a thread-ului %ld utilizatorului: '%-.32s'\n" - rus "%s: ðÒÉÎÕÄÉÔÅÌØÎÏ ÚÁËÒÙ×ÁÅÍ ÐÏÔÏË %ld ÐÏÌØÚÏ×ÁÔÅÌÑ: '%-.32s'\n" - serbian "%s: Usiljeno gašenje thread-a %ld koji pripada korisniku: '%-.32s'\n" - slo "%s: násilné ukonèenie vlákna %ld u¾ívateµa '%-.32s'\n" - spa "%s: Forzando a cerrar el thread %ld usuario: '%-.32s'\n" - swe "%s: Stänger av tråd %ld; användare: '%-.32s'\n" - ukr "%s: ðÒÉÓËÏÒÀÀ ÚÁËÒÉÔÔÑ Ç¦ÌËÉ %ld ËÏÒÉÓÔÕ×ÁÞÁ: '%-.32s'\n" + cze "%s: n-Básilné uzavøení threadu %ld u¾ivatele '%-.48s'\n" + dan "%s: Forceret nedlukning af tråd: %ld bruger: '%-.48s'\n" + nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.48s'\n" + eng "%s: Forcing close of thread %ld user: '%-.48s'\n" + jps "%s: ƒXƒŒƒbƒh %ld ‹­§I—¹ user: '%-.48s'\n", + est "%s: Sulgen jõuga lõime %ld kasutaja: '%-.48s'\n" + fre "%s: Arrêt forcé de la tâche (thread) %ld utilisateur: '%-.48s'\n" + ger "%s: Thread %ld zwangsweise beendet. Benutzer: '%-.48s'\n" + greek "%s: Ôï thread èá êëåßóåé %ld user: '%-.48s'\n" + hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.48s'\n" + ita "%s: Forzata la chiusura del thread %ld utente: '%-.48s'\n" + jpn "%s: ¥¹¥ì¥Ã¥É %ld ¶¯À©½ªÎ» user: '%-.48s'\n" + kor "%s: thread %ldÀÇ °­Á¦ Á¾·á user: '%-.48s'\n" + nor "%s: Påtvinget avslutning av tråd %ld bruker: '%-.48s'\n" + norwegian-ny "%s: Påtvinga avslutning av tråd %ld brukar: '%-.48s'\n" + pol "%s: Wymuszenie zamkniêcia w?tku %ld u¿ytkownik: '%-.48s'\n" + por "%s: Forçando finalização da 'thread' %ld - usuário '%-.48s'\n" + rum "%s: Terminare fortata a thread-ului %ld utilizatorului: '%-.48s'\n" + rus "%s: ðÒÉÎÕÄÉÔÅÌØÎÏ ÚÁËÒÙ×ÁÅÍ ÐÏÔÏË %ld ÐÏÌØÚÏ×ÁÔÅÌÑ: '%-.48s'\n" + serbian "%s: Usiljeno gašenje thread-a %ld koji pripada korisniku: '%-.48s'\n" + slo "%s: násilné ukonèenie vlákna %ld u¾ívateµa '%-.48s'\n" + spa "%s: Forzando a cerrar el thread %ld usuario: '%-.48s'\n" + swe "%s: Stänger av tråd %ld; användare: '%-.48s'\n" + ukr "%s: ðÒÉÓËÏÒÀÀ ÚÁËÒÉÔÔÑ Ç¦ÌËÉ %ld ËÏÒÉÓÔÕ×ÁÞÁ: '%-.48s'\n" ER_IPSOCK_ERROR 08S01 cze "Nemohu vytvo-Bøit IP socket" dan "Kan ikke oprette IP socket" @@ -1969,30 +1969,30 @@ ER_IPSOCK_ERROR 08S01 swe "Kan inte skapa IP-socket" ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ IP ÒÏÚ'¤Í" ER_NO_SUCH_INDEX 42S12 S1009 - cze "Tabulka '%-.64s' nem-Bá index odpovídající CREATE INDEX. Vytvoøte tabulku znovu" - dan "Tabellen '%-.64s' har ikke den nøgle, som blev brugt i CREATE INDEX. Genopret tabellen" - nla "Tabel '%-.64s' heeft geen INDEX zoals deze gemaakt worden met CREATE INDEX. Maak de tabel opnieuw" - eng "Table '%-.64s' has no index like the one used in CREATE INDEX; recreate the table" - jps "Table '%-.64s' ‚Í‚»‚̂悤‚È index ‚ðŽ‚Á‚Ä‚¢‚Ü‚¹‚ñ(CREATE INDEX ŽÀsŽž‚ÉŽw’肳‚ê‚Ä‚¢‚Ü‚¹‚ñ). ƒe[ƒuƒ‹‚ðì‚è’¼‚µ‚Ä‚­‚¾‚³‚¢", - est "Tabelil '%-.64s' puuduvad võtmed. Loo tabel uuesti" - fre "La table '%-.64s' n'a pas d'index comme celle utilisée dans CREATE INDEX. Recréez la table" - ger "Tabelle '%-.64s' besitzt keinen wie den in CREATE INDEX verwendeten Index. Tabelle neu anlegen" - greek "Ï ðßíáêáò '%-.64s' äåí Ý÷åé åõñåôÞñéï (index) óáí áõôü ðïõ ÷ñçóéìïðïéåßôå óôçí CREATE INDEX. Ðáñáêáëþ, îáíáäçìéïõñãÞóôå ôïí ðßíáêá" - hun "A(z) '%-.64s' tablahoz nincs meg a CREATE INDEX altal hasznalt index. Alakitsa at a tablat" - ita "La tabella '%-.64s' non ha nessun indice come quello specificatato dalla CREATE INDEX. Ricrea la tabella" - jpn "Table '%-.64s' ¤Ï¤½¤Î¤è¤¦¤Ê index ¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó(CREATE INDEX ¼Â¹Ô»þ¤Ë»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó). ¥Æ¡¼¥Ö¥ë¤òºî¤êľ¤·¤Æ¤¯¤À¤µ¤¤" - kor "Å×À̺í '%-.64s'´Â À妽º¸¦ ¸¸µéÁö ¾Ê¾Ò½À´Ï´Ù. alter Å×À̺í¸í·ÉÀ» ÀÌ¿ëÇÏ¿© Å×À̺íÀ» ¼öÁ¤Çϼ¼¿ä..." - nor "Tabellen '%-.64s' har ingen index som den som er brukt i CREATE INDEX. Gjenopprett tabellen" - norwegian-ny "Tabellen '%-.64s' har ingen index som den som er brukt i CREATE INDEX. Oprett tabellen på nytt" - pol "Tabela '%-.64s' nie ma indeksu takiego jak w CREATE INDEX. Stwórz tabelê" - por "Tabela '%-.64s' não possui um índice como o usado em CREATE INDEX. Recrie a tabela" - rum "Tabela '%-.64s' nu are un index ca acela folosit in CREATE INDEX. Re-creeaza tabela" - rus "÷ ÔÁÂÌÉÃÅ '%-.64s' ÎÅÔ ÔÁËÏÇÏ ÉÎÄÅËÓÁ, ËÁË × CREATE INDEX. óÏÚÄÁÊÔÅ ÔÁÂÌÉÃÕ ÚÁÎÏ×Ï" - serbian "Tabela '%-.64s' nema isti indeks kao onaj upotrebljen pri komandi 'CREATE INDEX'. Napravite tabelu ponovo" - slo "Tabuµka '%-.64s' nemá index zodpovedajúci CREATE INDEX. Vytvorte tabulku znova" - spa "La tabla '%-.64s' no tiene indice como el usado en CREATE INDEX. Crea de nuevo la tabla" - swe "Tabellen '%-.64s' har inget index som motsvarar det angivna i CREATE INDEX. Skapa om tabellen" - ukr "ôÁÂÌÉÃÑ '%-.64s' ÍÁ¤ ¦ÎÄÅËÓ, ÝÏ ÎÅ ÓЦ×ÐÁÄÁ¤ Ú ×ËÁÚÁÎÎÉÍ Õ CREATE INDEX. óÔ×ÏÒ¦ÔØ ÔÁÂÌÉÃÀ ÚÎÏ×Õ" + cze "Tabulka '%-.192s' nem-Bá index odpovídající CREATE INDEX. Vytvoøte tabulku znovu" + dan "Tabellen '%-.192s' har ikke den nøgle, som blev brugt i CREATE INDEX. Genopret tabellen" + nla "Tabel '%-.192s' heeft geen INDEX zoals deze gemaakt worden met CREATE INDEX. Maak de tabel opnieuw" + eng "Table '%-.192s' has no index like the one used in CREATE INDEX; recreate the table" + jps "Table '%-.192s' ‚Í‚»‚̂悤‚È index ‚ðŽ‚Á‚Ä‚¢‚Ü‚¹‚ñ(CREATE INDEX ŽÀsŽž‚ÉŽw’肳‚ê‚Ä‚¢‚Ü‚¹‚ñ). ƒe[ƒuƒ‹‚ðì‚è’¼‚µ‚Ä‚­‚¾‚³‚¢", + est "Tabelil '%-.192s' puuduvad võtmed. Loo tabel uuesti" + fre "La table '%-.192s' n'a pas d'index comme celle utilisée dans CREATE INDEX. Recréez la table" + ger "Tabelle '%-.192s' besitzt keinen wie den in CREATE INDEX verwendeten Index. Tabelle neu anlegen" + greek "Ï ðßíáêáò '%-.192s' äåí Ý÷åé åõñåôÞñéï (index) óáí áõôü ðïõ ÷ñçóéìïðïéåßôå óôçí CREATE INDEX. Ðáñáêáëþ, îáíáäçìéïõñãÞóôå ôïí ðßíáêá" + hun "A(z) '%-.192s' tablahoz nincs meg a CREATE INDEX altal hasznalt index. Alakitsa at a tablat" + ita "La tabella '%-.192s' non ha nessun indice come quello specificatato dalla CREATE INDEX. Ricrea la tabella" + jpn "Table '%-.192s' ¤Ï¤½¤Î¤è¤¦¤Ê index ¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó(CREATE INDEX ¼Â¹Ô»þ¤Ë»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó). ¥Æ¡¼¥Ö¥ë¤òºî¤êľ¤·¤Æ¤¯¤À¤µ¤¤" + kor "Å×À̺í '%-.192s'´Â À妽º¸¦ ¸¸µéÁö ¾Ê¾Ò½À´Ï´Ù. alter Å×À̺í¸í·ÉÀ» ÀÌ¿ëÇÏ¿© Å×À̺íÀ» ¼öÁ¤Çϼ¼¿ä..." + nor "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Gjenopprett tabellen" + norwegian-ny "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Oprett tabellen på nytt" + pol "Tabela '%-.192s' nie ma indeksu takiego jak w CREATE INDEX. Stwórz tabelê" + por "Tabela '%-.192s' não possui um índice como o usado em CREATE INDEX. Recrie a tabela" + rum "Tabela '%-.192s' nu are un index ca acela folosit in CREATE INDEX. Re-creeaza tabela" + rus "÷ ÔÁÂÌÉÃÅ '%-.192s' ÎÅÔ ÔÁËÏÇÏ ÉÎÄÅËÓÁ, ËÁË × CREATE INDEX. óÏÚÄÁÊÔÅ ÔÁÂÌÉÃÕ ÚÁÎÏ×Ï" + serbian "Tabela '%-.192s' nema isti indeks kao onaj upotrebljen pri komandi 'CREATE INDEX'. Napravite tabelu ponovo" + slo "Tabuµka '%-.192s' nemá index zodpovedajúci CREATE INDEX. Vytvorte tabulku znova" + spa "La tabla '%-.192s' no tiene indice como el usado en CREATE INDEX. Crea de nuevo la tabla" + swe "Tabellen '%-.192s' har inget index som motsvarar det angivna i CREATE INDEX. Skapa om tabellen" + ukr "ôÁÂÌÉÃÑ '%-.192s' ÍÁ¤ ¦ÎÄÅËÓ, ÝÏ ÎÅ ÓЦ×ÐÁÄÁ¤ Ú ×ËÁÚÁÎÎÉÍ Õ CREATE INDEX. óÔ×ÏÒ¦ÔØ ÔÁÂÌÉÃÀ ÚÎÏ×Õ" ER_WRONG_FIELD_TERMINATORS 42000 S1009 cze "Argument separ-Bátoru polo¾ek nebyl oèekáván. Pøeètìte si manuál" dan "Felt adskiller er ikke som forventet, se dokumentationen" @@ -2190,30 +2190,30 @@ ER_CANT_REMOVE_ALL_FIELDS 42000 swe "Man kan inte radera alla fält med ALTER TABLE. Använd DROP TABLE istället" ukr "îÅ ÍÏÖÌÉ×Ï ×ÉÄÁÌÉÔÉ ×Ó¦ ÓÔÏ×Âæ ÚÁ ÄÏÐÏÍÏÇÏÀ ALTER TABLE. äÌÑ ÃØÏÇÏ ÓËÏÒÉÓÔÁÊÔÅÓÑ DROP TABLE" ER_CANT_DROP_FIELD_OR_KEY 42000 - cze "Nemohu zru-B¹it '%-.64s' (provést DROP). Zkontrolujte, zda neexistují záznamy/klíèe" - dan "Kan ikke udføre DROP '%-.64s'. Undersøg om feltet/nøglen eksisterer." - nla "Kan '%-.64s' niet weggooien. Controleer of het veld of de zoeksleutel daadwerkelijk bestaat." - eng "Can't DROP '%-.64s'; check that column/key exists" - jps "'%-.64s' ‚ð”jŠü‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½; check that column/key exists", - est "Ei suuda kustutada '%-.64s'. Kontrolli kas tulp/võti eksisteerib" - fre "Ne peut effacer (DROP) '%-.64s'. Vérifiez s'il existe" - ger "Kann '%-.64s' nicht löschen. Existiert die Spalte oder der Schlüssel?" - greek "Áäýíáôç ç äéáãñáöÞ (DROP) '%-.64s'. Ðáñáêáëþ åëÝãîôå áí ôï ðåäßï/êëåéäß õðÜñ÷åé" - hun "A DROP '%-.64s' nem lehetseges. Ellenorizze, hogy a mezo/kulcs letezik-e" - ita "Impossibile cancellare '%-.64s'. Controllare che il campo chiave esista" - jpn "'%-.64s' ¤òÇË´þ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿; check that column/key exists" - kor "'%-.64s'¸¦ DROPÇÒ ¼ö ¾ø½À´Ï´Ù. Ä®·³À̳ª ۰¡ Á¸ÀçÇÏ´ÂÁö äũÇϼ¼¿ä." - nor "Kan ikke DROP '%-.64s'. Undersøk om felt/nøkkel eksisterer." - norwegian-ny "Kan ikkje DROP '%-.64s'. Undersøk om felt/nøkkel eksisterar." - pol "Nie mo¿na wykonaæ operacji DROP '%-.64s'. Sprawd¥, czy to pole/klucz istnieje" - por "Não se pode fazer DROP '%-.64s'. Confira se esta coluna/chave existe" - rum "Nu pot sa DROP '%-.64s'. Verifica daca coloana/cheia exista" - rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ (DROP) '%-.64s'. õÂÅÄÉÔÅÓØ ÞÔÏ ÓÔÏÌÂÅÃ/ËÌÀÞ ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Ne mogu da izvršim komandu drop 'DROP' na '%-.64s'. Proverite da li ta kolona (odnosno kljuè) postoji" - slo "Nemô¾em zru¹i» (DROP) '%-.64s'. Skontrolujte, èi neexistujú záznamy/kµúèe" - spa "No puedo ELIMINAR '%-.64s'. compuebe que el campo/clave existe" - swe "Kan inte ta bort '%-.64s'. Kontrollera att fältet/nyckel finns" - ukr "îÅ ÍÏÖÕ DROP '%-.64s'. ðÅÒÅצÒÔÅ, ÞÉ ÃÅÊ ÓÔÏ×ÂÅÃØ/ËÌÀÞ ¦ÓÎÕ¤" + cze "Nemohu zru-B¹it '%-.192s' (provést DROP). Zkontrolujte, zda neexistují záznamy/klíèe" + dan "Kan ikke udføre DROP '%-.192s'. Undersøg om feltet/nøglen eksisterer." + nla "Kan '%-.192s' niet weggooien. Controleer of het veld of de zoeksleutel daadwerkelijk bestaat." + eng "Can't DROP '%-.192s'; check that column/key exists" + jps "'%-.192s' ‚ð”jŠü‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½; check that column/key exists", + est "Ei suuda kustutada '%-.192s'. Kontrolli kas tulp/võti eksisteerib" + fre "Ne peut effacer (DROP) '%-.192s'. Vérifiez s'il existe" + ger "Kann '%-.192s' nicht löschen. Existiert die Spalte oder der Schlüssel?" + greek "Áäýíáôç ç äéáãñáöÞ (DROP) '%-.192s'. Ðáñáêáëþ åëÝãîôå áí ôï ðåäßï/êëåéäß õðÜñ÷åé" + hun "A DROP '%-.192s' nem lehetseges. Ellenorizze, hogy a mezo/kulcs letezik-e" + ita "Impossibile cancellare '%-.192s'. Controllare che il campo chiave esista" + jpn "'%-.192s' ¤òÇË´þ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿; check that column/key exists" + kor "'%-.192s'¸¦ DROPÇÒ ¼ö ¾ø½À´Ï´Ù. Ä®·³À̳ª ۰¡ Á¸ÀçÇÏ´ÂÁö äũÇϼ¼¿ä." + nor "Kan ikke DROP '%-.192s'. Undersøk om felt/nøkkel eksisterer." + norwegian-ny "Kan ikkje DROP '%-.192s'. Undersøk om felt/nøkkel eksisterar." + pol "Nie mo¿na wykonaæ operacji DROP '%-.192s'. Sprawd¥, czy to pole/klucz istnieje" + por "Não se pode fazer DROP '%-.192s'. Confira se esta coluna/chave existe" + rum "Nu pot sa DROP '%-.192s'. Verifica daca coloana/cheia exista" + rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ (DROP) '%-.192s'. õÂÅÄÉÔÅÓØ ÞÔÏ ÓÔÏÌÂÅÃ/ËÌÀÞ ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Ne mogu da izvršim komandu drop 'DROP' na '%-.192s'. Proverite da li ta kolona (odnosno kljuè) postoji" + slo "Nemô¾em zru¹i» (DROP) '%-.192s'. Skontrolujte, èi neexistujú záznamy/kµúèe" + spa "No puedo ELIMINAR '%-.192s'. compuebe que el campo/clave existe" + swe "Kan inte ta bort '%-.192s'. Kontrollera att fältet/nyckel finns" + ukr "îÅ ÍÏÖÕ DROP '%-.192s'. ðÅÒÅצÒÔÅ, ÞÉ ÃÅÊ ÓÔÏ×ÂÅÃØ/ËÌÀÞ ¦ÓÎÕ¤" ER_INSERT_INFO cze "Z-Báznamù: %ld Zdvojených: %ld Varování: %ld" dan "Poster: %ld Ens: %ld Advarsler: %ld" @@ -2240,11 +2240,11 @@ ER_INSERT_INFO swe "Rader: %ld Dubletter: %ld Varningar: %ld" ukr "úÁÐÉÓ¦×: %ld äÕÂ̦ËÁÔ¦×: %ld úÁÓÔÅÒÅÖÅÎØ: %ld" ER_UPDATE_TABLE_USED - eng "You can't specify target table '%-.64s' for update in FROM clause" - ger "Die Verwendung der zu aktualisierenden Zieltabelle '%-.64s' ist in der FROM-Klausel nicht zulässig." - rus "îÅ ÄÏÐÕÓËÁÅÔÓÑ ÕËÁÚÁÎÉÅ ÔÁÂÌÉÃÙ '%-.64s' × ÓÐÉÓËÅ ÔÁÂÌÉà FROM ÄÌÑ ×ÎÅÓÅÎÉÑ × ÎÅÅ ÉÚÍÅÎÅÎÉÊ" - swe "INSERT-table '%-.64s' får inte finnas i FROM tabell-listan" - ukr "ôÁÂÌÉÃÑ '%-.64s' ÝÏ ÚͦÎÀ¤ÔØÓÑ ÎÅ ÄÏÚ×ÏÌÅÎÁ Õ ÐÅÒÅ̦ËÕ ÔÁÂÌÉÃØ FROM" + eng "You can't specify target table '%-.192s' for update in FROM clause" + ger "Die Verwendung der zu aktualisierenden Zieltabelle '%-.192s' ist in der FROM-Klausel nicht zulässig." + rus "îÅ ÄÏÐÕÓËÁÅÔÓÑ ÕËÁÚÁÎÉÅ ÔÁÂÌÉÃÙ '%-.192s' × ÓÐÉÓËÅ ÔÁÂÌÉà FROM ÄÌÑ ×ÎÅÓÅÎÉÑ × ÎÅÅ ÉÚÍÅÎÅÎÉÊ" + swe "INSERT-table '%-.192s' får inte finnas i FROM tabell-listan" + ukr "ôÁÂÌÉÃÑ '%-.192s' ÝÏ ÚͦÎÀ¤ÔØÓÑ ÎÅ ÄÏÚ×ÏÌÅÎÁ Õ ÐÅÒÅ̦ËÕ ÔÁÂÌÉÃØ FROM" ER_NO_SUCH_THREAD cze "Nezn-Bámá identifikace threadu: %lu" dan "Ukendt tråd id: %lu" @@ -2319,28 +2319,28 @@ ER_NO_TABLES_USED swe "Inga tabeller angivna" ukr "îÅ ×ÉËÏÒÉÓÔÁÎÏ ÔÁÂÌÉÃØ" ER_TOO_BIG_SET - cze "P-Bøíli¹ mnoho øetìzcù pro sloupec %-.64s a SET" - dan "For mange tekststrenge til specifikationen af SET i kolonne %-.64s" - nla "Teveel strings voor kolom %-.64s en SET" - eng "Too many strings for column %-.64s and SET" - est "Liiga palju string tulbale %-.64s tüübile SET" - fre "Trop de chaînes dans la colonne %-.64s avec SET" - ger "Zu viele Strings für Feld %-.64s und SET angegeben" - greek "ÐÜñá ðïëëÜ strings ãéá ôï ðåäßï %-.64s êáé SET" - hun "Tul sok karakter: %-.64s es SET" - ita "Troppe stringhe per la colonna %-.64s e la SET" - kor "Ä®·³ %-.64s¿Í SET¿¡¼­ ½ºÆ®¸µÀÌ ³Ê¹« ¸¹½À´Ï´Ù." - nor "For mange tekststrenger kolonne %-.64s og SET" - norwegian-ny "For mange tekststrengar felt %-.64s og SET" - pol "Zbyt wiele ³añcuchów dla kolumny %-.64s i polecenia SET" - por "'Strings' demais para coluna '%-.64s' e SET" - rum "Prea multe siruri pentru coloana %-.64s si SET" - rus "óÌÉÛËÏÍ ÍÎÏÇÏ ÚÎÁÞÅÎÉÊ ÄÌÑ ÓÔÏÌÂÃÁ %-.64s × SET" - serbian "Previše string-ova za kolonu '%-.64s' i komandu 'SET'" - slo "Príli¹ mnoho re»azcov pre pole %-.64s a SET" - spa "Muchas strings para columna %-.64s y SET" - swe "För många alternativ till kolumn %-.64s för SET" - ukr "úÁÂÁÇÁÔÏ ÓÔÒÏË ÄÌÑ ÓÔÏ×ÂÃÑ %-.64s ÔÁ SET" + cze "P-Bøíli¹ mnoho øetìzcù pro sloupec %-.192s a SET" + dan "For mange tekststrenge til specifikationen af SET i kolonne %-.192s" + nla "Teveel strings voor kolom %-.192s en SET" + eng "Too many strings for column %-.192s and SET" + est "Liiga palju string tulbale %-.192s tüübile SET" + fre "Trop de chaînes dans la colonne %-.192s avec SET" + ger "Zu viele Strings für Feld %-.192s und SET angegeben" + greek "ÐÜñá ðïëëÜ strings ãéá ôï ðåäßï %-.192s êáé SET" + hun "Tul sok karakter: %-.192s es SET" + ita "Troppe stringhe per la colonna %-.192s e la SET" + kor "Ä®·³ %-.192s¿Í SET¿¡¼­ ½ºÆ®¸µÀÌ ³Ê¹« ¸¹½À´Ï´Ù." + nor "For mange tekststrenger kolonne %-.192s og SET" + norwegian-ny "For mange tekststrengar felt %-.192s og SET" + pol "Zbyt wiele ³añcuchów dla kolumny %-.192s i polecenia SET" + por "'Strings' demais para coluna '%-.192s' e SET" + rum "Prea multe siruri pentru coloana %-.192s si SET" + rus "óÌÉÛËÏÍ ÍÎÏÇÏ ÚÎÁÞÅÎÉÊ ÄÌÑ ÓÔÏÌÂÃÁ %-.192s × SET" + serbian "Previše string-ova za kolonu '%-.192s' i komandu 'SET'" + slo "Príli¹ mnoho re»azcov pre pole %-.192s a SET" + spa "Muchas strings para columna %-.192s y SET" + swe "För många alternativ till kolumn %-.192s för SET" + ukr "úÁÂÁÇÁÔÏ ÓÔÒÏË ÄÌÑ ÓÔÏ×ÂÃÑ %-.192s ÔÁ SET" ER_NO_UNIQUE_LOGFILE cze "Nemohu vytvo-Bøit jednoznaèné jméno logovacího souboru %-.200s.(1-999)\n" dan "Kan ikke lave unikt log-filnavn %-.200s.(1-999)\n" @@ -2365,79 +2365,79 @@ ER_NO_UNIQUE_LOGFILE swe "Kan inte generera ett unikt filnamn %-.200s.(1-999)\n" ukr "îÅ ÍÏÖÕ ÚÇÅÎÅÒÕ×ÁÔÉ ÕΦËÁÌØÎÅ ¦Í'Ñ log-ÆÁÊÌÕ %-.200s.(1-999)\n" ER_TABLE_NOT_LOCKED_FOR_WRITE - cze "Tabulka '%-.64s' byla zam-Bèena s READ a nemù¾e být zmìnìna" - dan "Tabellen '%-.64s' var låst med READ lås og kan ikke opdateres" - nla "Tabel '%-.64s' was gelocked met een lock om te lezen. Derhalve kunnen geen wijzigingen worden opgeslagen." - eng "Table '%-.64s' was locked with a READ lock and can't be updated" - jps "Table '%-.64s' ‚Í READ lock ‚ɂȂÁ‚Ä‚¢‚ÄAXV‚͂ł«‚Ü‚¹‚ñ", - est "Tabel '%-.64s' on lukustatud READ lukuga ning ei ole muudetav" - fre "Table '%-.64s' verrouillée lecture (READ): modification impossible" - ger "Tabelle '%-.64s' ist mit Lesesperre versehen und kann nicht aktualisiert werden" - greek "Ï ðßíáêáò '%-.64s' Ý÷åé êëåéäùèåß ìå READ lock êáé äåí åðéôñÝðïíôáé áëëáãÝò" - hun "A(z) '%-.64s' tabla zarolva lett (READ lock) es nem lehet frissiteni" - ita "La tabella '%-.64s' e` soggetta a lock in lettura e non puo` essere aggiornata" - jpn "Table '%-.64s' ¤Ï READ lock ¤Ë¤Ê¤Ã¤Æ¤¤¤Æ¡¢¹¹¿·¤Ï¤Ç¤­¤Þ¤»¤ó" - kor "Å×À̺í '%-.64s'´Â READ ¶ôÀÌ Àá°ÜÀ־ °»½ÅÇÒ ¼ö ¾ø½À´Ï´Ù." - nor "Tabellen '%-.64s' var låst med READ lås og kan ikke oppdateres" - norwegian-ny "Tabellen '%-.64s' var låst med READ lås og kan ikkje oppdaterast" - pol "Tabela '%-.64s' zosta³a zablokowana przez READ i nie mo¿e zostaæ zaktualizowana" - por "Tabela '%-.64s' foi travada com trava de leitura e não pode ser atualizada" - rum "Tabela '%-.64s' a fost locked cu un READ lock si nu poate fi actualizata" - rus "ôÁÂÌÉÃÁ '%-.64s' ÚÁÂÌÏËÉÒÏ×ÁÎÁ ÕÒÏ×ÎÅÍ READ lock É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÚÍÅÎÅÎÁ" - serbian "Tabela '%-.64s' je zakljuèana READ lock-om; iz nje se može samo èitati ali u nju se ne može pisati" - slo "Tabuµka '%-.64s' bola zamknutá s READ a nemô¾e by» zmenená" - spa "Tabla '%-.64s' fue trabada con un READ lock y no puede ser actualizada" - swe "Tabell '%-.64s' kan inte uppdateras emedan den är låst för läsning" - ukr "ôÁÂÌÉÃÀ '%-.64s' ÚÁÂÌÏËÏ×ÁÎÏ Ô¦ÌØËÉ ÄÌÑ ÞÉÔÁÎÎÑ, ÔÏÍÕ §§ ÎÅ ÍÏÖÎÁ ÏÎÏ×ÉÔÉ" + cze "Tabulka '%-.192s' byla zam-Bèena s READ a nemù¾e být zmìnìna" + dan "Tabellen '%-.192s' var låst med READ lås og kan ikke opdateres" + nla "Tabel '%-.192s' was gelocked met een lock om te lezen. Derhalve kunnen geen wijzigingen worden opgeslagen." + eng "Table '%-.192s' was locked with a READ lock and can't be updated" + jps "Table '%-.192s' ‚Í READ lock ‚ɂȂÁ‚Ä‚¢‚ÄAXV‚͂ł«‚Ü‚¹‚ñ", + est "Tabel '%-.192s' on lukustatud READ lukuga ning ei ole muudetav" + fre "Table '%-.192s' verrouillée lecture (READ): modification impossible" + ger "Tabelle '%-.192s' ist mit Lesesperre versehen und kann nicht aktualisiert werden" + greek "Ï ðßíáêáò '%-.192s' Ý÷åé êëåéäùèåß ìå READ lock êáé äåí åðéôñÝðïíôáé áëëáãÝò" + hun "A(z) '%-.192s' tabla zarolva lett (READ lock) es nem lehet frissiteni" + ita "La tabella '%-.192s' e` soggetta a lock in lettura e non puo` essere aggiornata" + jpn "Table '%-.192s' ¤Ï READ lock ¤Ë¤Ê¤Ã¤Æ¤¤¤Æ¡¢¹¹¿·¤Ï¤Ç¤­¤Þ¤»¤ó" + kor "Å×À̺í '%-.192s'´Â READ ¶ôÀÌ Àá°ÜÀ־ °»½ÅÇÒ ¼ö ¾ø½À´Ï´Ù." + nor "Tabellen '%-.192s' var låst med READ lås og kan ikke oppdateres" + norwegian-ny "Tabellen '%-.192s' var låst med READ lås og kan ikkje oppdaterast" + pol "Tabela '%-.192s' zosta³a zablokowana przez READ i nie mo¿e zostaæ zaktualizowana" + por "Tabela '%-.192s' foi travada com trava de leitura e não pode ser atualizada" + rum "Tabela '%-.192s' a fost locked cu un READ lock si nu poate fi actualizata" + rus "ôÁÂÌÉÃÁ '%-.192s' ÚÁÂÌÏËÉÒÏ×ÁÎÁ ÕÒÏ×ÎÅÍ READ lock É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÚÍÅÎÅÎÁ" + serbian "Tabela '%-.192s' je zakljuèana READ lock-om; iz nje se može samo èitati ali u nju se ne može pisati" + slo "Tabuµka '%-.192s' bola zamknutá s READ a nemô¾e by» zmenená" + spa "Tabla '%-.192s' fue trabada con un READ lock y no puede ser actualizada" + swe "Tabell '%-.192s' kan inte uppdateras emedan den är låst för läsning" + ukr "ôÁÂÌÉÃÀ '%-.192s' ÚÁÂÌÏËÏ×ÁÎÏ Ô¦ÌØËÉ ÄÌÑ ÞÉÔÁÎÎÑ, ÔÏÍÕ §§ ÎÅ ÍÏÖÎÁ ÏÎÏ×ÉÔÉ" ER_TABLE_NOT_LOCKED - cze "Tabulka '%-.64s' nebyla zam-Bèena s LOCK TABLES" - dan "Tabellen '%-.64s' var ikke låst med LOCK TABLES" - nla "Tabel '%-.64s' was niet gelocked met LOCK TABLES" - eng "Table '%-.64s' was not locked with LOCK TABLES" - jps "Table '%-.64s' ‚Í LOCK TABLES ‚É‚æ‚Á‚ăƒbƒN‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "Tabel '%-.64s' ei ole lukustatud käsuga LOCK TABLES" - fre "Table '%-.64s' non verrouillée: utilisez LOCK TABLES" - ger "Tabelle '%-.64s' wurde nicht mit LOCK TABLES gesperrt" - greek "Ï ðßíáêáò '%-.64s' äåí Ý÷åé êëåéäùèåß ìå LOCK TABLES" - hun "A(z) '%-.64s' tabla nincs zarolva a LOCK TABLES-szel" - ita "Non e` stato impostato il lock per la tabella '%-.64s' con LOCK TABLES" - jpn "Table '%-.64s' ¤Ï LOCK TABLES ¤Ë¤è¤Ã¤Æ¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "Å×À̺í '%-.64s'´Â LOCK TABLES ¸í·ÉÀ¸·Î Àá±âÁö ¾Ê¾Ò½À´Ï´Ù." - nor "Tabellen '%-.64s' var ikke låst med LOCK TABLES" - norwegian-ny "Tabellen '%-.64s' var ikkje låst med LOCK TABLES" - pol "Tabela '%-.64s' nie zosta³a zablokowana poleceniem LOCK TABLES" - por "Tabela '%-.64s' não foi travada com LOCK TABLES" - rum "Tabela '%-.64s' nu a fost locked cu LOCK TABLES" - rus "ôÁÂÌÉÃÁ '%-.64s' ÎÅ ÂÙÌÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES" - serbian "Tabela '%-.64s' nije bila zakljuèana komandom 'LOCK TABLES'" - slo "Tabuµka '%-.64s' nebola zamknutá s LOCK TABLES" - spa "Tabla '%-.64s' no fue trabada con LOCK TABLES" - swe "Tabell '%-.64s' är inte låst med LOCK TABLES" - ukr "ôÁÂÌÉÃÀ '%-.64s' ÎÅ ÂÕÌÏ ÂÌÏËÏ×ÁÎÏ Ú LOCK TABLES" + cze "Tabulka '%-.192s' nebyla zam-Bèena s LOCK TABLES" + dan "Tabellen '%-.192s' var ikke låst med LOCK TABLES" + nla "Tabel '%-.192s' was niet gelocked met LOCK TABLES" + eng "Table '%-.192s' was not locked with LOCK TABLES" + jps "Table '%-.192s' ‚Í LOCK TABLES ‚É‚æ‚Á‚ăƒbƒN‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "Tabel '%-.192s' ei ole lukustatud käsuga LOCK TABLES" + fre "Table '%-.192s' non verrouillée: utilisez LOCK TABLES" + ger "Tabelle '%-.192s' wurde nicht mit LOCK TABLES gesperrt" + greek "Ï ðßíáêáò '%-.192s' äåí Ý÷åé êëåéäùèåß ìå LOCK TABLES" + hun "A(z) '%-.192s' tabla nincs zarolva a LOCK TABLES-szel" + ita "Non e` stato impostato il lock per la tabella '%-.192s' con LOCK TABLES" + jpn "Table '%-.192s' ¤Ï LOCK TABLES ¤Ë¤è¤Ã¤Æ¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "Å×À̺í '%-.192s'´Â LOCK TABLES ¸í·ÉÀ¸·Î Àá±âÁö ¾Ê¾Ò½À´Ï´Ù." + nor "Tabellen '%-.192s' var ikke låst med LOCK TABLES" + norwegian-ny "Tabellen '%-.192s' var ikkje låst med LOCK TABLES" + pol "Tabela '%-.192s' nie zosta³a zablokowana poleceniem LOCK TABLES" + por "Tabela '%-.192s' não foi travada com LOCK TABLES" + rum "Tabela '%-.192s' nu a fost locked cu LOCK TABLES" + rus "ôÁÂÌÉÃÁ '%-.192s' ÎÅ ÂÙÌÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES" + serbian "Tabela '%-.192s' nije bila zakljuèana komandom 'LOCK TABLES'" + slo "Tabuµka '%-.192s' nebola zamknutá s LOCK TABLES" + spa "Tabla '%-.192s' no fue trabada con LOCK TABLES" + swe "Tabell '%-.192s' är inte låst med LOCK TABLES" + ukr "ôÁÂÌÉÃÀ '%-.192s' ÎÅ ÂÕÌÏ ÂÌÏËÏ×ÁÎÏ Ú LOCK TABLES" ER_BLOB_CANT_HAVE_DEFAULT 42000 - cze "Blob polo-B¾ka '%-.64s' nemù¾e mít defaultní hodnotu" - dan "BLOB feltet '%-.64s' kan ikke have en standard værdi" - nla "Blob veld '%-.64s' can geen standaardwaarde bevatten" - eng "BLOB/TEXT column '%-.64s' can't have a default value" - est "BLOB-tüüpi tulp '%-.64s' ei saa omada vaikeväärtust" - fre "BLOB '%-.64s' ne peut avoir de valeur par défaut" - ger "BLOB/TEXT-Feld '%-.64s' darf keinen Vorgabewert (DEFAULT) haben" - greek "Ôá Blob ðåäßá '%-.64s' äåí ìðïñïýí íá Ý÷ïõí ðñïêáèïñéóìÝíåò ôéìÝò (default value)" - hun "A(z) '%-.64s' blob objektumnak nem lehet alapertelmezett erteke" - ita "Il campo BLOB '%-.64s' non puo` avere un valore di default" - jpn "BLOB column '%-.64s' can't have a default value" - kor "BLOB Ä®·³ '%-.64s' ´Â µðÆúÆ® °ªÀ» °¡Áú ¼ö ¾ø½À´Ï´Ù." - nor "Blob feltet '%-.64s' kan ikke ha en standard verdi" - norwegian-ny "Blob feltet '%-.64s' kan ikkje ha ein standard verdi" - pol "Pole typu blob '%-.64s' nie mo¿e mieæ domy?lnej warto?ci" - por "Coluna BLOB '%-.64s' não pode ter um valor padrão (default)" - rum "Coloana BLOB '%-.64s' nu poate avea o valoare default" - rus "îÅ×ÏÚÍÏÖÎÏ ÕËÁÚÙ×ÁÔØ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ ÓÔÏÌÂÃÁ BLOB '%-.64s'" - serbian "BLOB kolona '%-.64s' ne može imati default vrednost" - slo "Pole BLOB '%-.64s' nemô¾e ma» implicitnú hodnotu" - spa "Campo Blob '%-.64s' no puede tener valores patron" - swe "BLOB fält '%-.64s' kan inte ha ett DEFAULT-värde" - ukr "óÔÏ×ÂÅÃØ BLOB '%-.64s' ÎÅ ÍÏÖÅ ÍÁÔÉ ÚÎÁÞÅÎÎÑ ÐÏ ÚÁÍÏ×ÞÕ×ÁÎÎÀ" + cze "Blob polo-B¾ka '%-.192s' nemù¾e mít defaultní hodnotu" + dan "BLOB feltet '%-.192s' kan ikke have en standard værdi" + nla "Blob veld '%-.192s' can geen standaardwaarde bevatten" + eng "BLOB/TEXT column '%-.192s' can't have a default value" + est "BLOB-tüüpi tulp '%-.192s' ei saa omada vaikeväärtust" + fre "BLOB '%-.192s' ne peut avoir de valeur par défaut" + ger "BLOB/TEXT-Feld '%-.192s' darf keinen Vorgabewert (DEFAULT) haben" + greek "Ôá Blob ðåäßá '%-.192s' äåí ìðïñïýí íá Ý÷ïõí ðñïêáèïñéóìÝíåò ôéìÝò (default value)" + hun "A(z) '%-.192s' blob objektumnak nem lehet alapertelmezett erteke" + ita "Il campo BLOB '%-.192s' non puo` avere un valore di default" + jpn "BLOB column '%-.192s' can't have a default value" + kor "BLOB Ä®·³ '%-.192s' ´Â µðÆúÆ® °ªÀ» °¡Áú ¼ö ¾ø½À´Ï´Ù." + nor "Blob feltet '%-.192s' kan ikke ha en standard verdi" + norwegian-ny "Blob feltet '%-.192s' kan ikkje ha ein standard verdi" + pol "Pole typu blob '%-.192s' nie mo¿e mieæ domy?lnej warto?ci" + por "Coluna BLOB '%-.192s' não pode ter um valor padrão (default)" + rum "Coloana BLOB '%-.192s' nu poate avea o valoare default" + rus "îÅ×ÏÚÍÏÖÎÏ ÕËÁÚÙ×ÁÔØ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ ÓÔÏÌÂÃÁ BLOB '%-.192s'" + serbian "BLOB kolona '%-.192s' ne može imati default vrednost" + slo "Pole BLOB '%-.192s' nemô¾e ma» implicitnú hodnotu" + spa "Campo Blob '%-.192s' no puede tener valores patron" + swe "BLOB fält '%-.192s' kan inte ha ett DEFAULT-värde" + ukr "óÔÏ×ÂÅÃØ BLOB '%-.192s' ÎÅ ÍÏÖÅ ÍÁÔÉ ÚÎÁÞÅÎÎÑ ÐÏ ÚÁÍÏ×ÞÕ×ÁÎÎÀ" ER_WRONG_DB_NAME 42000 cze "Nep-Bøípustné jméno databáze '%-.100s'" dan "Ugyldigt database navn '%-.100s'" @@ -2534,121 +2534,121 @@ ER_UNKNOWN_ERROR swe "Oidentifierat fel" ukr "îÅצÄÏÍÁ ÐÏÍÉÌËÁ" ER_UNKNOWN_PROCEDURE 42000 - cze "Nezn-Bámá procedura %-.64s" - dan "Ukendt procedure %-.64s" - nla "Onbekende procedure %-.64s" - eng "Unknown procedure '%-.64s'" - est "Tundmatu protseduur '%-.64s'" - fre "Procédure %-.64s inconnue" - ger "Unbekannte Prozedur '%-.64s'" - greek "Áãíùóôç äéáäéêáóßá '%-.64s'" - hun "Ismeretlen eljaras: '%-.64s'" - ita "Procedura '%-.64s' sconosciuta" - kor "¾Ë¼ö ¾ø´Â ¼öÇ๮ : '%-.64s'" - nor "Ukjent prosedyre %-.64s" - norwegian-ny "Ukjend prosedyre %-.64s" - pol "Unkown procedure %-.64s" - por "'Procedure' '%-.64s' desconhecida" - rum "Procedura unknown '%-.64s'" - rus "îÅÉÚ×ÅÓÔÎÁÑ ÐÒÏÃÅÄÕÒÁ '%-.64s'" - serbian "Nepoznata procedura '%-.64s'" - slo "Neznámá procedúra '%-.64s'" - spa "Procedimiento desconocido %-.64s" - swe "Okänd procedur: %-.64s" - ukr "îÅצÄÏÍÁ ÐÒÏÃÅÄÕÒÁ '%-.64s'" + cze "Nezn-Bámá procedura %-.192s" + dan "Ukendt procedure %-.192s" + nla "Onbekende procedure %-.192s" + eng "Unknown procedure '%-.192s'" + est "Tundmatu protseduur '%-.192s'" + fre "Procédure %-.192s inconnue" + ger "Unbekannte Prozedur '%-.192s'" + greek "Áãíùóôç äéáäéêáóßá '%-.192s'" + hun "Ismeretlen eljaras: '%-.192s'" + ita "Procedura '%-.192s' sconosciuta" + kor "¾Ë¼ö ¾ø´Â ¼öÇ๮ : '%-.192s'" + nor "Ukjent prosedyre %-.192s" + norwegian-ny "Ukjend prosedyre %-.192s" + pol "Unkown procedure %-.192s" + por "'Procedure' '%-.192s' desconhecida" + rum "Procedura unknown '%-.192s'" + rus "îÅÉÚ×ÅÓÔÎÁÑ ÐÒÏÃÅÄÕÒÁ '%-.192s'" + serbian "Nepoznata procedura '%-.192s'" + slo "Neznámá procedúra '%-.192s'" + spa "Procedimiento desconocido %-.192s" + swe "Okänd procedur: %-.192s" + ukr "îÅצÄÏÍÁ ÐÒÏÃÅÄÕÒÁ '%-.192s'" ER_WRONG_PARAMCOUNT_TO_PROCEDURE 42000 - cze "Chybn-Bý poèet parametrù procedury %-.64s" - dan "Forkert antal parametre til proceduren %-.64s" - nla "Foutief aantal parameters doorgegeven aan procedure %-.64s" - eng "Incorrect parameter count to procedure '%-.64s'" - est "Vale parameetrite hulk protseduurile '%-.64s'" - fre "Mauvais nombre de paramètres pour la procedure %-.64s" - ger "Falsche Parameterzahl für Prozedur '%-.64s'" - greek "ËÜèïò áñéèìüò ðáñáìÝôñùí óôç äéáäéêáóßá '%-.64s'" - hun "Rossz parameter a(z) '%-.64s'eljaras szamitasanal" - ita "Numero di parametri errato per la procedura '%-.64s'" - kor "'%-.64s' ¼öÇ๮¿¡ ´ëÇÑ ºÎÁ¤È®ÇÑ ÆÄ¶ó¸ÞÅÍ" - nor "Feil parameter antall til prosedyren %-.64s" - norwegian-ny "Feil parameter tal til prosedyra %-.64s" - pol "Incorrect parameter count to procedure %-.64s" - por "Número de parâmetros incorreto para a 'procedure' '%-.64s'" - rum "Procedura '%-.64s' are un numar incorect de parametri" - rus "îÅËÏÒÒÅËÔÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÐÁÒÁÍÅÔÒÏ× ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.64s'" - serbian "Pogrešan broj parametara za proceduru '%-.64s'" - slo "Chybný poèet parametrov procedúry '%-.64s'" - spa "Equivocado parametro count para procedimiento %-.64s" - swe "Felaktigt antal parametrar till procedur %-.64s" - ukr "èÉÂÎÁ Ë¦ÌØË¦ÓÔØ ÐÁÒÁÍÅÔÒ¦× ÐÒÏÃÅÄÕÒÉ '%-.64s'" + cze "Chybn-Bý poèet parametrù procedury %-.192s" + dan "Forkert antal parametre til proceduren %-.192s" + nla "Foutief aantal parameters doorgegeven aan procedure %-.192s" + eng "Incorrect parameter count to procedure '%-.192s'" + est "Vale parameetrite hulk protseduurile '%-.192s'" + fre "Mauvais nombre de paramètres pour la procedure %-.192s" + ger "Falsche Parameterzahl für Prozedur '%-.192s'" + greek "ËÜèïò áñéèìüò ðáñáìÝôñùí óôç äéáäéêáóßá '%-.192s'" + hun "Rossz parameter a(z) '%-.192s'eljaras szamitasanal" + ita "Numero di parametri errato per la procedura '%-.192s'" + kor "'%-.192s' ¼öÇ๮¿¡ ´ëÇÑ ºÎÁ¤È®ÇÑ ÆÄ¶ó¸ÞÅÍ" + nor "Feil parameter antall til prosedyren %-.192s" + norwegian-ny "Feil parameter tal til prosedyra %-.192s" + pol "Incorrect parameter count to procedure %-.192s" + por "Número de parâmetros incorreto para a 'procedure' '%-.192s'" + rum "Procedura '%-.192s' are un numar incorect de parametri" + rus "îÅËÏÒÒÅËÔÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÐÁÒÁÍÅÔÒÏ× ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.192s'" + serbian "Pogrešan broj parametara za proceduru '%-.192s'" + slo "Chybný poèet parametrov procedúry '%-.192s'" + spa "Equivocado parametro count para procedimiento %-.192s" + swe "Felaktigt antal parametrar till procedur %-.192s" + ukr "èÉÂÎÁ Ë¦ÌØË¦ÓÔØ ÐÁÒÁÍÅÔÒ¦× ÐÒÏÃÅÄÕÒÉ '%-.192s'" ER_WRONG_PARAMETERS_TO_PROCEDURE - cze "Chybn-Bé parametry procedury %-.64s" - dan "Forkert(e) parametre til proceduren %-.64s" - nla "Foutieve parameters voor procedure %-.64s" - eng "Incorrect parameters to procedure '%-.64s'" - est "Vigased parameetrid protseduurile '%-.64s'" - fre "Paramètre erroné pour la procedure %-.64s" - ger "Falsche Parameter für Prozedur '%-.64s'" - greek "ËÜèïò ðáñÜìåôñïé óôçí äéáäéêáóßá '%-.64s'" - hun "Rossz parameter a(z) '%-.64s' eljarasban" - ita "Parametri errati per la procedura '%-.64s'" - kor "'%-.64s' ¼öÇ๮¿¡ ´ëÇÑ ºÎÁ¤È®ÇÑ ÆÄ¶ó¸ÞÅÍ" - nor "Feil parametre til prosedyren %-.64s" - norwegian-ny "Feil parameter til prosedyra %-.64s" - pol "Incorrect parameters to procedure %-.64s" - por "Parâmetros incorretos para a 'procedure' '%-.64s'" - rum "Procedura '%-.64s' are parametrii incorecti" - rus "îÅËÏÒÒÅËÔÎÙÅ ÐÁÒÁÍÅÔÒÙ ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.64s'" - serbian "Pogrešni parametri prosleðeni proceduri '%-.64s'" - slo "Chybné parametre procedúry '%-.64s'" - spa "Equivocados parametros para procedimiento %-.64s" - swe "Felaktiga parametrar till procedur %-.64s" - ukr "èÉÂÎÉÊ ÐÁÒÁÍÅÔÅÒ ÐÒÏÃÅÄÕÒÉ '%-.64s'" + cze "Chybn-Bé parametry procedury %-.192s" + dan "Forkert(e) parametre til proceduren %-.192s" + nla "Foutieve parameters voor procedure %-.192s" + eng "Incorrect parameters to procedure '%-.192s'" + est "Vigased parameetrid protseduurile '%-.192s'" + fre "Paramètre erroné pour la procedure %-.192s" + ger "Falsche Parameter für Prozedur '%-.192s'" + greek "ËÜèïò ðáñÜìåôñïé óôçí äéáäéêáóßá '%-.192s'" + hun "Rossz parameter a(z) '%-.192s' eljarasban" + ita "Parametri errati per la procedura '%-.192s'" + kor "'%-.192s' ¼öÇ๮¿¡ ´ëÇÑ ºÎÁ¤È®ÇÑ ÆÄ¶ó¸ÞÅÍ" + nor "Feil parametre til prosedyren %-.192s" + norwegian-ny "Feil parameter til prosedyra %-.192s" + pol "Incorrect parameters to procedure %-.192s" + por "Parâmetros incorretos para a 'procedure' '%-.192s'" + rum "Procedura '%-.192s' are parametrii incorecti" + rus "îÅËÏÒÒÅËÔÎÙÅ ÐÁÒÁÍÅÔÒÙ ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.192s'" + serbian "Pogrešni parametri prosleðeni proceduri '%-.192s'" + slo "Chybné parametre procedúry '%-.192s'" + spa "Equivocados parametros para procedimiento %-.192s" + swe "Felaktiga parametrar till procedur %-.192s" + ukr "èÉÂÎÉÊ ÐÁÒÁÍÅÔÅÒ ÐÒÏÃÅÄÕÒÉ '%-.192s'" ER_UNKNOWN_TABLE 42S02 - cze "Nezn-Bámá tabulka '%-.64s' v %-.32s" - dan "Ukendt tabel '%-.64s' i %-.32s" - nla "Onbekende tabel '%-.64s' in %-.32s" - eng "Unknown table '%-.64s' in %-.32s" - est "Tundmatu tabel '%-.64s' %-.32s-s" - fre "Table inconnue '%-.64s' dans %-.32s" - ger "Unbekannte Tabelle '%-.64s' in '%-.32s'" - greek "Áãíùóôïò ðßíáêáò '%-.64s' óå %-.32s" - hun "Ismeretlen tabla: '%-.64s' %-.32s-ban" - ita "Tabella '%-.64s' sconosciuta in %-.32s" - jpn "Unknown table '%-.64s' in %-.32s" - kor "¾Ë¼ö ¾ø´Â Å×À̺í '%-.64s' (µ¥ÀÌŸº£À̽º %-.32s)" - nor "Ukjent tabell '%-.64s' i %-.32s" - norwegian-ny "Ukjend tabell '%-.64s' i %-.32s" - pol "Unknown table '%-.64s' in %-.32s" - por "Tabela '%-.64s' desconhecida em '%-.32s'" - rum "Tabla '%-.64s' invalida in %-.32s" - rus "îÅÉÚ×ÅÓÔÎÁÑ ÔÁÂÌÉÃÁ '%-.64s' × %-.32s" - serbian "Nepoznata tabela '%-.64s' u '%-.32s'" - slo "Neznáma tabuµka '%-.64s' v %-.32s" - spa "Tabla desconocida '%-.64s' in %-.32s" - swe "Okänd tabell '%-.64s' i '%-.32s'" - ukr "îÅצÄÏÍÁ ÔÁÂÌÉÃÑ '%-.64s' Õ %-.32s" + cze "Nezn-Bámá tabulka '%-.192s' v %-.32s" + dan "Ukendt tabel '%-.192s' i %-.32s" + nla "Onbekende tabel '%-.192s' in %-.32s" + eng "Unknown table '%-.192s' in %-.32s" + est "Tundmatu tabel '%-.192s' %-.32s-s" + fre "Table inconnue '%-.192s' dans %-.32s" + ger "Unbekannte Tabelle '%-.192s' in '%-.32s'" + greek "Áãíùóôïò ðßíáêáò '%-.192s' óå %-.32s" + hun "Ismeretlen tabla: '%-.192s' %-.32s-ban" + ita "Tabella '%-.192s' sconosciuta in %-.32s" + jpn "Unknown table '%-.192s' in %-.32s" + kor "¾Ë¼ö ¾ø´Â Å×À̺í '%-.192s' (µ¥ÀÌŸº£À̽º %-.32s)" + nor "Ukjent tabell '%-.192s' i %-.32s" + norwegian-ny "Ukjend tabell '%-.192s' i %-.32s" + pol "Unknown table '%-.192s' in %-.32s" + por "Tabela '%-.192s' desconhecida em '%-.32s'" + rum "Tabla '%-.192s' invalida in %-.32s" + rus "îÅÉÚ×ÅÓÔÎÁÑ ÔÁÂÌÉÃÁ '%-.192s' × %-.32s" + serbian "Nepoznata tabela '%-.192s' u '%-.32s'" + slo "Neznáma tabuµka '%-.192s' v %-.32s" + spa "Tabla desconocida '%-.192s' in %-.32s" + swe "Okänd tabell '%-.192s' i '%-.32s'" + ukr "îÅצÄÏÍÁ ÔÁÂÌÉÃÑ '%-.192s' Õ %-.32s" ER_FIELD_SPECIFIED_TWICE 42000 - cze "Polo-B¾ka '%-.64s' je zadána dvakrát" - dan "Feltet '%-.64s' er anvendt to gange" - nla "Veld '%-.64s' is dubbel gespecificeerd" - eng "Column '%-.64s' specified twice" - est "Tulp '%-.64s' on määratletud topelt" - fre "Champ '%-.64s' spécifié deux fois" - ger "Feld '%-.64s' wurde zweimal angegeben" - greek "Ôï ðåäßï '%-.64s' Ý÷åé ïñéóèåß äýï öïñÝò" - hun "A(z) '%-.64s' mezot ketszer definialta" - ita "Campo '%-.64s' specificato 2 volte" - kor "Ä®·³ '%-.64s'´Â µÎ¹ø Á¤ÀǵǾî ÀÖÀ¾´Ï´Ù." - nor "Feltet '%-.64s' er spesifisert to ganger" - norwegian-ny "Feltet '%-.64s' er spesifisert to gangar" - pol "Field '%-.64s' specified twice" - por "Coluna '%-.64s' especificada duas vezes" - rum "Coloana '%-.64s' specificata de doua ori" - rus "óÔÏÌÂÅà '%-.64s' ÕËÁÚÁÎ Ä×ÁÖÄÙ" - serbian "Kolona '%-.64s' je navedena dva puta" - slo "Pole '%-.64s' je zadané dvakrát" - spa "Campo '%-.64s' especificado dos veces" - swe "Fält '%-.64s' är redan använt" - ukr "óÔÏ×ÂÅÃØ '%-.64s' ÚÁÚÎÁÞÅÎÏ Äצަ" + cze "Polo-B¾ka '%-.192s' je zadána dvakrát" + dan "Feltet '%-.192s' er anvendt to gange" + nla "Veld '%-.192s' is dubbel gespecificeerd" + eng "Column '%-.192s' specified twice" + est "Tulp '%-.192s' on määratletud topelt" + fre "Champ '%-.192s' spécifié deux fois" + ger "Feld '%-.192s' wurde zweimal angegeben" + greek "Ôï ðåäßï '%-.192s' Ý÷åé ïñéóèåß äýï öïñÝò" + hun "A(z) '%-.192s' mezot ketszer definialta" + ita "Campo '%-.192s' specificato 2 volte" + kor "Ä®·³ '%-.192s'´Â µÎ¹ø Á¤ÀǵǾî ÀÖÀ¾´Ï´Ù." + nor "Feltet '%-.192s' er spesifisert to ganger" + norwegian-ny "Feltet '%-.192s' er spesifisert to gangar" + pol "Field '%-.192s' specified twice" + por "Coluna '%-.192s' especificada duas vezes" + rum "Coloana '%-.192s' specificata de doua ori" + rus "óÔÏÌÂÅà '%-.192s' ÕËÁÚÁÎ Ä×ÁÖÄÙ" + serbian "Kolona '%-.192s' je navedena dva puta" + slo "Pole '%-.192s' je zadané dvakrát" + spa "Campo '%-.192s' especificado dos veces" + swe "Fält '%-.192s' är redan använt" + ukr "óÔÏ×ÂÅÃØ '%-.192s' ÚÁÚÎÁÞÅÎÏ Äצަ" ER_INVALID_GROUP_FUNC_USE cze "Nespr-Bávné pou¾ití funkce group" dan "Forkert brug af grupperings-funktion" @@ -2670,28 +2670,28 @@ ER_INVALID_GROUP_FUNC_USE swe "Felaktig användning av SQL grupp function" ukr "èÉÂÎÅ ×ÉËÏÒÉÓÔÁÎÎÑ ÆÕÎËæ§ ÇÒÕÐÕ×ÁÎÎÑ" ER_UNSUPPORTED_EXTENSION 42000 - cze "Tabulka '%-.64s' pou-B¾ívá roz¹íøení, které v této verzi MySQL není" - dan "Tabellen '%-.64s' bruger et filtypenavn som ikke findes i denne MySQL version" - nla "Tabel '%-.64s' gebruikt een extensie, die niet in deze MySQL-versie voorkomt." - eng "Table '%-.64s' uses an extension that doesn't exist in this MySQL version" - est "Tabel '%-.64s' kasutab laiendust, mis ei eksisteeri antud MySQL versioonis" - fre "Table '%-.64s' : utilise une extension invalide pour cette version de MySQL" - ger "Tabelle '%-.64s' verwendet eine Erweiterung, die in dieser MySQL-Version nicht verfügbar ist" - greek "Ï ðßíáêò '%-.64s' ÷ñçóéìïðïéåß êÜðïéï extension ðïõ äåí õðÜñ÷åé óôçí Ýêäïóç áõôÞ ôçò MySQL" - hun "A(z) '%-.64s' tabla olyan bovitest hasznal, amely nem letezik ebben a MySQL versioban." - ita "La tabella '%-.64s' usa un'estensione che non esiste in questa versione di MySQL" - kor "Å×À̺í '%-.64s'´Â È®Àå¸í·ÉÀ» ÀÌ¿ëÇÏÁö¸¸ ÇöÀçÀÇ MySQL ¹öÁ¯¿¡¼­´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." - nor "Table '%-.64s' uses a extension that doesn't exist in this MySQL version" - norwegian-ny "Table '%-.64s' uses a extension that doesn't exist in this MySQL version" - pol "Table '%-.64s' uses a extension that doesn't exist in this MySQL version" - por "Tabela '%-.64s' usa uma extensão que não existe nesta versão do MySQL" - rum "Tabela '%-.64s' foloseste o extensire inexistenta in versiunea curenta de MySQL" - rus "÷ ÔÁÂÌÉÃÅ '%-.64s' ÉÓÐÏÌØÚÕÀÔÓÑ ×ÏÚÍÏÖÎÏÓÔÉ, ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÍÙÅ × ÜÔÏÊ ×ÅÒÓÉÉ MySQL" - serbian "Tabela '%-.64s' koristi ekstenziju koje ne postoji u ovoj verziji MySQL-a" - slo "Tabuµka '%-.64s' pou¾íva roz¹írenie, ktoré v tejto verzii MySQL nie je" - spa "Tabla '%-.64s' usa una extensión que no existe en esta MySQL versión" - swe "Tabell '%-.64s' har en extension som inte finns i denna version av MySQL" - ukr "ôÁÂÌÉÃÑ '%-.64s' ×ÉËÏÒÉÓÔÏ×Õ¤ ÒÏÚÛÉÒÅÎÎÑ, ÝÏ ÎÅ ¦ÓÎÕ¤ Õ Ã¦Ê ×ÅÒÓ¦§ MySQL" + cze "Tabulka '%-.192s' pou-B¾ívá roz¹íøení, které v této verzi MySQL není" + dan "Tabellen '%-.192s' bruger et filtypenavn som ikke findes i denne MySQL version" + nla "Tabel '%-.192s' gebruikt een extensie, die niet in deze MySQL-versie voorkomt." + eng "Table '%-.192s' uses an extension that doesn't exist in this MySQL version" + est "Tabel '%-.192s' kasutab laiendust, mis ei eksisteeri antud MySQL versioonis" + fre "Table '%-.192s' : utilise une extension invalide pour cette version de MySQL" + ger "Tabelle '%-.192s' verwendet eine Erweiterung, die in dieser MySQL-Version nicht verfügbar ist" + greek "Ï ðßíáêò '%-.192s' ÷ñçóéìïðïéåß êÜðïéï extension ðïõ äåí õðÜñ÷åé óôçí Ýêäïóç áõôÞ ôçò MySQL" + hun "A(z) '%-.192s' tabla olyan bovitest hasznal, amely nem letezik ebben a MySQL versioban." + ita "La tabella '%-.192s' usa un'estensione che non esiste in questa versione di MySQL" + kor "Å×À̺í '%-.192s'´Â È®Àå¸í·ÉÀ» ÀÌ¿ëÇÏÁö¸¸ ÇöÀçÀÇ MySQL ¹öÁ¯¿¡¼­´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." + nor "Table '%-.192s' uses a extension that doesn't exist in this MySQL version" + norwegian-ny "Table '%-.192s' uses a extension that doesn't exist in this MySQL version" + pol "Table '%-.192s' uses a extension that doesn't exist in this MySQL version" + por "Tabela '%-.192s' usa uma extensão que não existe nesta versão do MySQL" + rum "Tabela '%-.192s' foloseste o extensire inexistenta in versiunea curenta de MySQL" + rus "÷ ÔÁÂÌÉÃÅ '%-.192s' ÉÓÐÏÌØÚÕÀÔÓÑ ×ÏÚÍÏÖÎÏÓÔÉ, ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÍÙÅ × ÜÔÏÊ ×ÅÒÓÉÉ MySQL" + serbian "Tabela '%-.192s' koristi ekstenziju koje ne postoji u ovoj verziji MySQL-a" + slo "Tabuµka '%-.192s' pou¾íva roz¹írenie, ktoré v tejto verzii MySQL nie je" + spa "Tabla '%-.192s' usa una extensión que no existe en esta MySQL versión" + swe "Tabell '%-.192s' har en extension som inte finns i denna version av MySQL" + ukr "ôÁÂÌÉÃÑ '%-.192s' ×ÉËÏÒÉÓÔÏ×Õ¤ ÒÏÚÛÉÒÅÎÎÑ, ÝÏ ÎÅ ¦ÓÎÕ¤ Õ Ã¦Ê ×ÅÒÓ¦§ MySQL" ER_TABLE_MUST_HAVE_COLUMNS 42000 cze "Tabulka mus-Bí mít alespoò jeden sloupec" dan "En tabel skal have mindst een kolonne" @@ -2715,27 +2715,27 @@ ER_TABLE_MUST_HAVE_COLUMNS 42000 swe "Tabeller måste ha minst 1 kolumn" ukr "ôÁÂÌÉÃÑ ÐÏ×ÉÎÎÁ ÍÁÔÉ ÈÏÞÁ ÏÄÉÎ ÓÔÏ×ÂÅÃØ" ER_RECORD_FILE_FULL - cze "Tabulka '%-.64s' je pln-Bá" - dan "Tabellen '%-.64s' er fuld" - nla "De tabel '%-.64s' is vol" - eng "The table '%-.64s' is full" - jps "table '%-.64s' ‚Í‚¢‚Á‚Ï‚¢‚Å‚·", - est "Tabel '%-.64s' on täis" - fre "La table '%-.64s' est pleine" - ger "Tabelle '%-.64s' ist voll" - greek "Ï ðßíáêáò '%-.64s' åßíáé ãåìÜôïò" - hun "A '%-.64s' tabla megtelt" - ita "La tabella '%-.64s' e` piena" - jpn "table '%-.64s' ¤Ï¤¤¤Ã¤Ñ¤¤¤Ç¤¹" - kor "Å×À̺í '%-.64s'°¡ full³µ½À´Ï´Ù. " - por "Tabela '%-.64s' está cheia" - rum "Tabela '%-.64s' e plina" - rus "ôÁÂÌÉÃÁ '%-.64s' ÐÅÒÅÐÏÌÎÅÎÁ" - serbian "Tabela '%-.64s' je popunjena do kraja" - slo "Tabuµka '%-.64s' je plná" - spa "La tabla '%-.64s' está llena" - swe "Tabellen '%-.64s' är full" - ukr "ôÁÂÌÉÃÑ '%-.64s' ÚÁÐÏ×ÎÅÎÁ" + cze "Tabulka '%-.192s' je pln-Bá" + dan "Tabellen '%-.192s' er fuld" + nla "De tabel '%-.192s' is vol" + eng "The table '%-.192s' is full" + jps "table '%-.192s' ‚Í‚¢‚Á‚Ï‚¢‚Å‚·", + est "Tabel '%-.192s' on täis" + fre "La table '%-.192s' est pleine" + ger "Tabelle '%-.192s' ist voll" + greek "Ï ðßíáêáò '%-.192s' åßíáé ãåìÜôïò" + hun "A '%-.192s' tabla megtelt" + ita "La tabella '%-.192s' e` piena" + jpn "table '%-.192s' ¤Ï¤¤¤Ã¤Ñ¤¤¤Ç¤¹" + kor "Å×À̺í '%-.192s'°¡ full³µ½À´Ï´Ù. " + por "Tabela '%-.192s' está cheia" + rum "Tabela '%-.192s' e plina" + rus "ôÁÂÌÉÃÁ '%-.192s' ÐÅÒÅÐÏÌÎÅÎÁ" + serbian "Tabela '%-.192s' je popunjena do kraja" + slo "Tabuµka '%-.192s' je plná" + spa "La tabla '%-.192s' está llena" + swe "Tabellen '%-.192s' är full" + ukr "ôÁÂÌÉÃÑ '%-.192s' ÚÁÐÏ×ÎÅÎÁ" ER_UNKNOWN_CHARACTER_SET 42000 cze "Nezn-Bámá znaková sada: '%-.64s'" dan "Ukendt tegnsæt: '%-.64s'" @@ -2865,52 +2865,52 @@ ER_WRONG_OUTER_JOIN 42000 swe "Felaktigt referens i OUTER JOIN. Kontrollera ON-uttrycket" ukr "ðÅÒÅÈÒÅÓÎÁ ÚÁÌÅÖΦÓÔØ Õ OUTER JOIN. ðÅÒÅצÒÔÅ ÕÍÏ×Õ ON" ER_NULL_COLUMN_IN_INDEX 42000 - eng "Table handler doesn't support NULL in given index. Please change column '%-.64s' to be NOT NULL or use another handler" - swe "Tabell hanteraren kan inte indexera NULL kolumner för den givna index typen. Ändra '%-.64s' till NOT NULL eller använd en annan hanterare" + eng "Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler" + swe "Tabell hanteraren kan inte indexera NULL kolumner för den givna index typen. Ändra '%-.192s' till NOT NULL eller använd en annan hanterare" ER_CANT_FIND_UDF - cze "Nemohu na-Bèíst funkci '%-.64s'" - dan "Kan ikke læse funktionen '%-.64s'" - nla "Kan functie '%-.64s' niet laden" - eng "Can't load function '%-.64s'" - jps "function '%-.64s' ‚ð ƒ[ƒh‚Å‚«‚Ü‚¹‚ñ", - est "Ei suuda avada funktsiooni '%-.64s'" - fre "Imposible de charger la fonction '%-.64s'" - ger "Kann Funktion '%-.64s' nicht laden" - greek "Äåí åßíáé äõíáôÞ ç äéáäéêáóßá load ãéá ôç óõíÜñôçóç '%-.64s'" - hun "A(z) '%-.64s' fuggveny nem toltheto be" - ita "Impossibile caricare la funzione '%-.64s'" - jpn "function '%-.64s' ¤ò ¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó" - kor "'%-.64s' ÇÔ¼ö¸¦ ·ÎµåÇÏÁö ¸øÇß½À´Ï´Ù." - por "Não pode carregar a função '%-.64s'" - rum "Nu pot incarca functia '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÇÒÕÚÉÔØ ÆÕÎËÃÉÀ '%-.64s'" - serbian "Ne mogu da uèitam funkciju '%-.64s'" - slo "Nemô¾em naèíta» funkciu '%-.64s'" - spa "No puedo cargar función '%-.64s'" - swe "Kan inte ladda funktionen '%-.64s'" - ukr "îÅ ÍÏÖÕ ÚÁ×ÁÎÔÁÖÉÔÉ ÆÕÎËæÀ '%-.64s'" + cze "Nemohu na-Bèíst funkci '%-.192s'" + dan "Kan ikke læse funktionen '%-.192s'" + nla "Kan functie '%-.192s' niet laden" + eng "Can't load function '%-.192s'" + jps "function '%-.192s' ‚ð ƒ[ƒh‚Å‚«‚Ü‚¹‚ñ", + est "Ei suuda avada funktsiooni '%-.192s'" + fre "Imposible de charger la fonction '%-.192s'" + ger "Kann Funktion '%-.192s' nicht laden" + greek "Äåí åßíáé äõíáôÞ ç äéáäéêáóßá load ãéá ôç óõíÜñôçóç '%-.192s'" + hun "A(z) '%-.192s' fuggveny nem toltheto be" + ita "Impossibile caricare la funzione '%-.192s'" + jpn "function '%-.192s' ¤ò ¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó" + kor "'%-.192s' ÇÔ¼ö¸¦ ·ÎµåÇÏÁö ¸øÇß½À´Ï´Ù." + por "Não pode carregar a função '%-.192s'" + rum "Nu pot incarca functia '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÇÒÕÚÉÔØ ÆÕÎËÃÉÀ '%-.192s'" + serbian "Ne mogu da uèitam funkciju '%-.192s'" + slo "Nemô¾em naèíta» funkciu '%-.192s'" + spa "No puedo cargar función '%-.192s'" + swe "Kan inte ladda funktionen '%-.192s'" + ukr "îÅ ÍÏÖÕ ÚÁ×ÁÎÔÁÖÉÔÉ ÆÕÎËæÀ '%-.192s'" ER_CANT_INITIALIZE_UDF - cze "Nemohu inicializovat funkci '%-.64s'; %-.80s" - dan "Kan ikke starte funktionen '%-.64s'; %-.80s" - nla "Kan functie '%-.64s' niet initialiseren; %-.80s" - eng "Can't initialize function '%-.64s'; %-.80s" - jps "function '%-.64s' ‚ð‰Šú‰»‚Å‚«‚Ü‚¹‚ñ; %-.80s", - est "Ei suuda algväärtustada funktsiooni '%-.64s'; %-.80s" - fre "Impossible d'initialiser la fonction '%-.64s'; %-.80s" - ger "Kann Funktion '%-.64s' nicht initialisieren: %-.80s" - greek "Äåí åßíáé äõíáôÞ ç Ýíáñîç ôçò óõíÜñôçóçò '%-.64s'; %-.80s" - hun "A(z) '%-.64s' fuggveny nem inicializalhato; %-.80s" - ita "Impossibile inizializzare la funzione '%-.64s'; %-.80s" - jpn "function '%-.64s' ¤ò½é´ü²½¤Ç¤­¤Þ¤»¤ó; %-.80s" - kor "'%-.64s' ÇÔ¼ö¸¦ ÃʱâÈ­ ÇÏÁö ¸øÇß½À´Ï´Ù.; %-.80s" - por "Não pode inicializar a função '%-.64s' - '%-.80s'" - rum "Nu pot initializa functia '%-.64s'; %-.80s" - rus "îÅ×ÏÚÍÏÖÎÏ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÆÕÎËÃÉÀ '%-.64s'; %-.80s" - serbian "Ne mogu da inicijalizujem funkciju '%-.64s'; %-.80s" - slo "Nemô¾em inicializova» funkciu '%-.64s'; %-.80s" - spa "No puedo inicializar función '%-.64s'; %-.80s" - swe "Kan inte initialisera funktionen '%-.64s'; '%-.80s'" - ukr "îÅ ÍÏÖÕ ¦Î¦Ã¦Á̦ÚÕ×ÁÔÉ ÆÕÎËæÀ '%-.64s'; %-.80s" + cze "Nemohu inicializovat funkci '%-.192s'; %-.80s" + dan "Kan ikke starte funktionen '%-.192s'; %-.80s" + nla "Kan functie '%-.192s' niet initialiseren; %-.80s" + eng "Can't initialize function '%-.192s'; %-.80s" + jps "function '%-.192s' ‚ð‰Šú‰»‚Å‚«‚Ü‚¹‚ñ; %-.80s", + est "Ei suuda algväärtustada funktsiooni '%-.192s'; %-.80s" + fre "Impossible d'initialiser la fonction '%-.192s'; %-.80s" + ger "Kann Funktion '%-.192s' nicht initialisieren: %-.80s" + greek "Äåí åßíáé äõíáôÞ ç Ýíáñîç ôçò óõíÜñôçóçò '%-.192s'; %-.80s" + hun "A(z) '%-.192s' fuggveny nem inicializalhato; %-.80s" + ita "Impossibile inizializzare la funzione '%-.192s'; %-.80s" + jpn "function '%-.192s' ¤ò½é´ü²½¤Ç¤­¤Þ¤»¤ó; %-.80s" + kor "'%-.192s' ÇÔ¼ö¸¦ ÃʱâÈ­ ÇÏÁö ¸øÇß½À´Ï´Ù.; %-.80s" + por "Não pode inicializar a função '%-.192s' - '%-.80s'" + rum "Nu pot initializa functia '%-.192s'; %-.80s" + rus "îÅ×ÏÚÍÏÖÎÏ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÆÕÎËÃÉÀ '%-.192s'; %-.80s" + serbian "Ne mogu da inicijalizujem funkciju '%-.192s'; %-.80s" + slo "Nemô¾em inicializova» funkciu '%-.192s'; %-.80s" + spa "No puedo inicializar función '%-.192s'; %-.80s" + swe "Kan inte initialisera funktionen '%-.192s'; '%-.80s'" + ukr "îÅ ÍÏÖÕ ¦Î¦Ã¦Á̦ÚÕ×ÁÔÉ ÆÕÎËæÀ '%-.192s'; %-.80s" ER_UDF_NO_PATHS cze "Pro sd-Bílenou knihovnu nejsou povoleny cesty" dan "Angivelse af sti ikke tilladt for delt bibliotek" @@ -2934,52 +2934,52 @@ ER_UDF_NO_PATHS swe "Man får inte ange sökväg för dynamiska bibliotek" ukr "îÅ ÄÏÚ×ÏÌÅÎÏ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉ ÐÕÔ¦ ÄÌÑ ÒÏÚĦÌÀ×ÁÎÉÈ Â¦Â̦ÏÔÅË" ER_UDF_EXISTS - cze "Funkce '%-.64s' ji-B¾ existuje" - dan "Funktionen '%-.64s' findes allerede" - nla "Functie '%-.64s' bestaat reeds" - eng "Function '%-.64s' already exists" - jps "Function '%-.64s' ‚ÍŠù‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚·", - est "Funktsioon '%-.64s' juba eksisteerib" - fre "La fonction '%-.64s' existe déjà" - ger "Funktion '%-.64s' existiert schon" - greek "Ç óõíÜñôçóç '%-.64s' õðÜñ÷åé Þäç" - hun "A '%-.64s' fuggveny mar letezik" - ita "La funzione '%-.64s' esiste gia`" - jpn "Function '%-.64s' ¤Ï´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹" - kor "'%-.64s' ÇÔ¼ö´Â ÀÌ¹Ì Á¸ÀçÇÕ´Ï´Ù." - por "Função '%-.64s' já existe" - rum "Functia '%-.64s' exista deja" - rus "æÕÎËÃÉÑ '%-.64s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Funkcija '%-.64s' veæ postoji" - slo "Funkcia '%-.64s' u¾ existuje" - spa "Función '%-.64s' ya existe" - swe "Funktionen '%-.64s' finns redan" - ukr "æÕÎËÃ¦Ñ '%-.64s' ×ÖÅ ¦ÓÎÕ¤" + cze "Funkce '%-.192s' ji-B¾ existuje" + dan "Funktionen '%-.192s' findes allerede" + nla "Functie '%-.192s' bestaat reeds" + eng "Function '%-.192s' already exists" + jps "Function '%-.192s' ‚ÍŠù‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚·", + est "Funktsioon '%-.192s' juba eksisteerib" + fre "La fonction '%-.192s' existe déjà" + ger "Funktion '%-.192s' existiert schon" + greek "Ç óõíÜñôçóç '%-.192s' õðÜñ÷åé Þäç" + hun "A '%-.192s' fuggveny mar letezik" + ita "La funzione '%-.192s' esiste gia`" + jpn "Function '%-.192s' ¤Ï´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹" + kor "'%-.192s' ÇÔ¼ö´Â ÀÌ¹Ì Á¸ÀçÇÕ´Ï´Ù." + por "Função '%-.192s' já existe" + rum "Functia '%-.192s' exista deja" + rus "æÕÎËÃÉÑ '%-.192s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Funkcija '%-.192s' veæ postoji" + slo "Funkcia '%-.192s' u¾ existuje" + spa "Función '%-.192s' ya existe" + swe "Funktionen '%-.192s' finns redan" + ukr "æÕÎËÃ¦Ñ '%-.192s' ×ÖÅ ¦ÓÎÕ¤" ER_CANT_OPEN_LIBRARY - cze "Nemohu otev-Bøít sdílenou knihovnu '%-.64s' (errno: %d %-.128s)" - dan "Kan ikke åbne delt bibliotek '%-.64s' (errno: %d %-.128s)" - nla "Kan shared library '%-.64s' niet openen (Errcode: %d %-.128s)" - eng "Can't open shared library '%-.64s' (errno: %d %-.128s)" - jps "shared library '%-.64s' ‚ðŠJ‚­Ž–‚ª‚Å‚«‚Ü‚¹‚ñ (errno: %d %-.128s)", - est "Ei suuda avada jagatud teeki '%-.64s' (veakood: %d %-.128s)" - fre "Impossible d'ouvrir la bibliothèque partagée '%-.64s' (errno: %d %-.128s)" - ger "Kann Shared Library '%-.64s' nicht öffnen (Fehler: %d %-.128s)" - greek "Äåí åßíáé äõíáôÞ ç áíÜãíùóç ôçò shared library '%-.64s' (êùäéêüò ëÜèïõò: %d %-.128s)" - hun "A(z) '%-.64s' megosztott konyvtar nem hasznalhato (hibakod: %d %-.128s)" - ita "Impossibile aprire la libreria condivisa '%-.64s' (errno: %d %-.128s)" - jpn "shared library '%-.64s' ¤ò³«¤¯»ö¤¬¤Ç¤­¤Þ¤»¤ó (errno: %d %-.128s)" - kor "'%-.64s' °øÀ¯ ¶óÀ̹ö·¯¸®¸¦ ¿­¼ö ¾ø½À´Ï´Ù.(¿¡·¯¹øÈ£: %d %-.128s)" - nor "Can't open shared library '%-.64s' (errno: %d %-.128s)" - norwegian-ny "Can't open shared library '%-.64s' (errno: %d %-.128s)" - pol "Can't open shared library '%-.64s' (errno: %d %-.128s)" - por "Não pode abrir biblioteca compartilhada '%-.64s' (erro no. %d '%-.128s')" - rum "Nu pot deschide libraria shared '%-.64s' (Eroare: %d %-.128s)" - rus "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÄÉÎÁÍÉÞÅÓËÕÀ ÂÉÂÌÉÏÔÅËÕ '%-.64s' (ÏÛÉÂËÁ: %d %-.128s)" - serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.64s' (errno: %d %-.128s)" - slo "Nemô¾em otvori» zdieµanú kni¾nicu '%-.64s' (chybový kód: %d %-.128s)" - spa "No puedo abrir libraria conjugada '%-.64s' (errno: %d %-.128s)" - swe "Kan inte öppna det dynamiska biblioteket '%-.64s' (Felkod: %d %-.128s)" - ukr "îÅ ÍÏÖÕ ×¦ÄËÒÉÔÉ ÒÏÚĦÌÀ×ÁÎÕ Â¦Â̦ÏÔÅËÕ '%-.64s' (ÐÏÍÉÌËÁ: %d %-.128s)" + cze "Nemohu otev-Bøít sdílenou knihovnu '%-.192s' (errno: %d %-.128s)" + dan "Kan ikke åbne delt bibliotek '%-.192s' (errno: %d %-.128s)" + nla "Kan shared library '%-.192s' niet openen (Errcode: %d %-.128s)" + eng "Can't open shared library '%-.192s' (errno: %d %-.128s)" + jps "shared library '%-.192s' ‚ðŠJ‚­Ž–‚ª‚Å‚«‚Ü‚¹‚ñ (errno: %d %-.128s)", + est "Ei suuda avada jagatud teeki '%-.192s' (veakood: %d %-.128s)" + fre "Impossible d'ouvrir la bibliothèque partagée '%-.192s' (errno: %d %-.128s)" + ger "Kann Shared Library '%-.192s' nicht öffnen (Fehler: %d %-.128s)" + greek "Äåí åßíáé äõíáôÞ ç áíÜãíùóç ôçò shared library '%-.192s' (êùäéêüò ëÜèïõò: %d %-.128s)" + hun "A(z) '%-.192s' megosztott konyvtar nem hasznalhato (hibakod: %d %-.128s)" + ita "Impossibile aprire la libreria condivisa '%-.192s' (errno: %d %-.128s)" + jpn "shared library '%-.192s' ¤ò³«¤¯»ö¤¬¤Ç¤­¤Þ¤»¤ó (errno: %d %-.128s)" + kor "'%-.192s' °øÀ¯ ¶óÀ̹ö·¯¸®¸¦ ¿­¼ö ¾ø½À´Ï´Ù.(¿¡·¯¹øÈ£: %d %-.128s)" + nor "Can't open shared library '%-.192s' (errno: %d %-.128s)" + norwegian-ny "Can't open shared library '%-.192s' (errno: %d %-.128s)" + pol "Can't open shared library '%-.192s' (errno: %d %-.128s)" + por "Não pode abrir biblioteca compartilhada '%-.192s' (erro no. %d '%-.128s')" + rum "Nu pot deschide libraria shared '%-.192s' (Eroare: %d %-.128s)" + rus "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÄÉÎÁÍÉÞÅÓËÕÀ ÂÉÂÌÉÏÔÅËÕ '%-.192s' (ÏÛÉÂËÁ: %d %-.128s)" + serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.192s' (errno: %d %-.128s)" + slo "Nemô¾em otvori» zdieµanú kni¾nicu '%-.192s' (chybový kód: %d %-.128s)" + spa "No puedo abrir libraria conjugada '%-.192s' (errno: %d %-.128s)" + swe "Kan inte öppna det dynamiska biblioteket '%-.192s' (Felkod: %d %-.128s)" + ukr "îÅ ÍÏÖÕ ×¦ÄËÒÉÔÉ ÒÏÚĦÌÀ×ÁÎÕ Â¦Â̦ÏÔÅËÕ '%-.192s' (ÐÏÍÉÌËÁ: %d %-.128s)" ER_CANT_FIND_DL_ENTRY cze "Nemohu naj-Bít funkci '%-.128s' v knihovnì" dan "Kan ikke finde funktionen '%-.128s' i bibliotek" @@ -3003,27 +3003,27 @@ ER_CANT_FIND_DL_ENTRY swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket" ukr "îÅ ÍÏÖÕ ÚÎÁÊÔÉ ÆÕÎËæÀ '%-.128s' Õ Â¦Â̦ÏÔÅæ" ER_FUNCTION_NOT_DEFINED - cze "Funkce '%-.64s' nen-Bí definována" - dan "Funktionen '%-.64s' er ikke defineret" - nla "Functie '%-.64s' is niet gedefinieerd" - eng "Function '%-.64s' is not defined" - jps "Function '%-.64s' ‚Í’è‹`‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "Funktsioon '%-.64s' ei ole defineeritud" - fre "La fonction '%-.64s' n'est pas définie" - ger "Funktion '%-.64s' ist nicht definiert" - greek "Ç óõíÜñôçóç '%-.64s' äåí Ý÷åé ïñéóèåß" - hun "A '%-.64s' fuggveny nem definialt" - ita "La funzione '%-.64s' non e` definita" - jpn "Function '%-.64s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "'%-.64s' ÇÔ¼ö°¡ Á¤ÀǵǾî ÀÖÁö ¾Ê½À´Ï´Ù." - por "Função '%-.64s' não está definida" - rum "Functia '%-.64s' nu e definita" - rus "æÕÎËÃÉÑ '%-.64s' ÎÅ ÏÐÒÅÄÅÌÅÎÁ" - serbian "Funkcija '%-.64s' nije definisana" - slo "Funkcia '%-.64s' nie je definovaná" - spa "Función '%-.64s' no está definida" - swe "Funktionen '%-.64s' är inte definierad" - ukr "æÕÎËæÀ '%-.64s' ÎÅ ×ÉÚÎÁÞÅÎÏ" + cze "Funkce '%-.192s' nen-Bí definována" + dan "Funktionen '%-.192s' er ikke defineret" + nla "Functie '%-.192s' is niet gedefinieerd" + eng "Function '%-.192s' is not defined" + jps "Function '%-.192s' ‚Í’è‹`‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "Funktsioon '%-.192s' ei ole defineeritud" + fre "La fonction '%-.192s' n'est pas définie" + ger "Funktion '%-.192s' ist nicht definiert" + greek "Ç óõíÜñôçóç '%-.192s' äåí Ý÷åé ïñéóèåß" + hun "A '%-.192s' fuggveny nem definialt" + ita "La funzione '%-.192s' non e` definita" + jpn "Function '%-.192s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "'%-.192s' ÇÔ¼ö°¡ Á¤ÀǵǾî ÀÖÁö ¾Ê½À´Ï´Ù." + por "Função '%-.192s' não está definida" + rum "Functia '%-.192s' nu e definita" + rus "æÕÎËÃÉÑ '%-.192s' ÎÅ ÏÐÒÅÄÅÌÅÎÁ" + serbian "Funkcija '%-.192s' nije definisana" + slo "Funkcia '%-.192s' nie je definovaná" + spa "Función '%-.192s' no está definida" + swe "Funktionen '%-.192s' är inte definierad" + ukr "æÕÎËæÀ '%-.192s' ÎÅ ×ÉÚÎÁÞÅÎÏ" ER_HOST_IS_BLOCKED cze "Stroj '%-.64s' je zablokov-Bán kvùli mnoha chybám pøi pøipojování. Odblokujete pou¾itím 'mysqladmin flush-hosts'" dan "Værten '%-.64s' er blokeret på grund af mange fejlforespørgsler. Lås op med 'mysqladmin flush-hosts'" @@ -3188,27 +3188,27 @@ ER_WRONG_VALUE_COUNT_ON_ROW 21S01 swe "Antalet kolumner motsvarar inte antalet värden på rad: %ld" ukr "ë¦ÌØË¦ÓÔØ ÓÔÏ×ÂÃ¦× ÎÅ ÓЦ×ÐÁÄÁ¤ Ú Ë¦ÌØË¦ÓÔÀ ÚÎÁÞÅÎØ Õ ÓÔÒÏæ %ld" ER_CANT_REOPEN_TABLE - cze "Nemohu znovuotev-Bøít tabulku: '%-.64s" - dan "Kan ikke genåbne tabel '%-.64s" - nla "Kan tabel niet opnieuw openen: '%-.64s" - eng "Can't reopen table: '%-.64s'" - est "Ei suuda taasavada tabelit '%-.64s'" - fre "Impossible de réouvrir la table: '%-.64s" - ger "Kann Tabelle'%-.64s' nicht erneut öffnen" - hun "Nem lehet ujra-megnyitni a tablat: '%-.64s" - ita "Impossibile riaprire la tabella: '%-.64s'" - kor "Å×À̺íÀ» ´Ù½Ã ¿­¼ö ¾ø±º¿ä: '%-.64s" - nor "Can't reopen table: '%-.64s" - norwegian-ny "Can't reopen table: '%-.64s" - pol "Can't reopen table: '%-.64s" - por "Não pode reabrir a tabela '%-.64s" - rum "Nu pot redeschide tabela: '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÎÏ×Ï ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ '%-.64s'" - serbian "Ne mogu da ponovo otvorim tabelu '%-.64s'" - slo "Can't reopen table: '%-.64s" - spa "No puedo reabrir tabla: '%-.64s" - swe "Kunde inte stänga och öppna tabell '%-.64s" - ukr "îÅ ÍÏÖÕ ÐÅÒÅצÄËÒÉÔÉ ÔÁÂÌÉÃÀ: '%-.64s'" + cze "Nemohu znovuotev-Bøít tabulku: '%-.192s" + dan "Kan ikke genåbne tabel '%-.192s" + nla "Kan tabel niet opnieuw openen: '%-.192s" + eng "Can't reopen table: '%-.192s'" + est "Ei suuda taasavada tabelit '%-.192s'" + fre "Impossible de réouvrir la table: '%-.192s" + ger "Kann Tabelle'%-.192s' nicht erneut öffnen" + hun "Nem lehet ujra-megnyitni a tablat: '%-.192s" + ita "Impossibile riaprire la tabella: '%-.192s'" + kor "Å×À̺íÀ» ´Ù½Ã ¿­¼ö ¾ø±º¿ä: '%-.192s" + nor "Can't reopen table: '%-.192s" + norwegian-ny "Can't reopen table: '%-.192s" + pol "Can't reopen table: '%-.192s" + por "Não pode reabrir a tabela '%-.192s" + rum "Nu pot redeschide tabela: '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÎÏ×Ï ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ '%-.192s'" + serbian "Ne mogu da ponovo otvorim tabelu '%-.192s'" + slo "Can't reopen table: '%-.192s" + spa "No puedo reabrir tabla: '%-.192s" + swe "Kunde inte stänga och öppna tabell '%-.192s" + ukr "îÅ ÍÏÖÕ ÐÅÒÅצÄËÒÉÔÉ ÔÁÂÌÉÃÀ: '%-.192s'" ER_INVALID_USE_OF_NULL 22004 cze "Neplatn-Bé u¾ití hodnoty NULL" dan "Forkert brug af nulværdi (NULL)" @@ -3266,65 +3266,65 @@ ER_MIX_OF_GROUP_FUNC_AND_FIELDS 42000 swe "Man får ha både GROUP-kolumner (MIN(),MAX(),COUNT()...) och fält i en fråga om man inte har en GROUP BY-del" ukr "úͦÛÕ×ÁÎÎÑ GROUP ÓÔÏ×ÂÃ¦× (MIN(),MAX(),COUNT()...) Ú ÎÅ GROUP ÓÔÏ×ÂÃÑÍÉ ¤ ÚÁÂÏÒÏÎÅÎÉÍ, ÑËÝÏ ÎÅ ÍÁ¤ GROUP BY" ER_NONEXISTING_GRANT 42000 - cze "Neexistuje odpov-Bídající grant pro u¾ivatele '%-.32s' na stroji '%-.64s'" - dan "Denne tilladelse findes ikke for brugeren '%-.32s' på vært '%-.64s'" - nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.32s' op host '%-.64s'" - eng "There is no such grant defined for user '%-.32s' on host '%-.64s'" - jps "ƒ†[ƒU[ '%-.32s' (ƒzƒXƒg '%-.64s' ‚̃†[ƒU[) ‚Í‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "Sellist õigust ei ole defineeritud kasutajale '%-.32s' masinast '%-.64s'" - fre "Un tel droit n'est pas défini pour l'utilisateur '%-.32s' sur l'hôte '%-.64s'" - ger "Für Benutzer '%-.32s' auf Host '%-.64s' gibt es keine solche Berechtigung" - hun "A '%-.32s' felhasznalonak nincs ilyen joga a '%-.64s' host-on" - ita "GRANT non definita per l'utente '%-.32s' dalla macchina '%-.64s'" - jpn "¥æ¡¼¥¶¡¼ '%-.32s' (¥Û¥¹¥È '%-.64s' ¤Î¥æ¡¼¥¶¡¼) ¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "»ç¿ëÀÚ '%-.32s' (È£½ºÆ® '%-.64s')¸¦ À§ÇÏ¿© Á¤ÀÇµÈ ±×·± ½ÂÀÎÀº ¾ø½À´Ï´Ù." - por "Não existe tal permissão (grant) definida para o usuário '%-.32s' no 'host' '%-.64s'" - rum "Nu exista un astfel de grant definit pentru utilzatorul '%-.32s' de pe host-ul '%-.64s'" - rus "ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' ÎÁ ÈÏÓÔÅ '%-.64s'" - serbian "Ne postoji odobrenje za pristup korisniku '%-.32s' na host-u '%-.64s'" - spa "No existe permiso definido para usuario '%-.32s' en el servidor '%-.64s'" - swe "Det finns inget privilegium definierat för användare '%-.32s' på '%-.64s'" - ukr "ðÏ×ÎÏ×ÁÖÅÎØ ÎÅ ×ÉÚÎÁÞÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ '%-.32s' Ú ÈÏÓÔÕ '%-.64s'" + cze "Neexistuje odpov-Bídající grant pro u¾ivatele '%-.48s' na stroji '%-.64s'" + dan "Denne tilladelse findes ikke for brugeren '%-.48s' på vært '%-.64s'" + nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s'" + eng "There is no such grant defined for user '%-.48s' on host '%-.64s'" + jps "ƒ†[ƒU[ '%-.48s' (ƒzƒXƒg '%-.64s' ‚̃†[ƒU[) ‚Í‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "Sellist õigust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s'" + fre "Un tel droit n'est pas défini pour l'utilisateur '%-.48s' sur l'hôte '%-.64s'" + ger "Für Benutzer '%-.48s' auf Host '%-.64s' gibt es keine solche Berechtigung" + hun "A '%-.48s' felhasznalonak nincs ilyen joga a '%-.64s' host-on" + ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s'" + jpn "¥æ¡¼¥¶¡¼ '%-.48s' (¥Û¥¹¥È '%-.64s' ¤Î¥æ¡¼¥¶¡¼) ¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "»ç¿ëÀÚ '%-.48s' (È£½ºÆ® '%-.64s')¸¦ À§ÇÏ¿© Á¤ÀÇµÈ ±×·± ½ÂÀÎÀº ¾ø½À´Ï´Ù." + por "Não existe tal permissão (grant) definida para o usuário '%-.48s' no 'host' '%-.64s'" + rum "Nu exista un astfel de grant definit pentru utilzatorul '%-.48s' de pe host-ul '%-.64s'" + rus "ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s' ÎÁ ÈÏÓÔÅ '%-.64s'" + serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s'" + spa "No existe permiso definido para usuario '%-.48s' en el servidor '%-.64s'" + swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s'" + ukr "ðÏ×ÎÏ×ÁÖÅÎØ ÎÅ ×ÉÚÎÁÞÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ '%-.48s' Ú ÈÏÓÔÕ '%-.64s'" ER_TABLEACCESS_DENIED_ERROR 42000 - cze "%-.16s p-Bøíkaz nepøístupný pro u¾ivatele: '%-.32s'@'%-.64s' pro tabulku '%-.64s'" - dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s'@'%-.64s' for tabellen '%-.64s'" - nla "%-.16s commando geweigerd voor gebruiker: '%-.32s'@'%-.64s' voor tabel '%-.64s'" - eng "%-.16s command denied to user '%-.32s'@'%-.64s' for table '%-.64s'" - jps "ƒRƒ}ƒ“ƒh %-.16s ‚Í ƒ†[ƒU[ '%-.32s'@'%-.64s' ,ƒe[ƒuƒ‹ '%-.64s' ‚ɑ΂µ‚Ä‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "%-.16s käsk ei ole lubatud kasutajale '%-.32s'@'%-.64s' tabelis '%-.64s'" - fre "La commande '%-.16s' est interdite à l'utilisateur: '%-.32s'@'@%-.64s' sur la table '%-.64s'" - ger "%-.16s Befehl nicht erlaubt für Benutzer '%-.32s'@'%-.64s' auf Tabelle '%-.64s'" - hun "%-.16s parancs a '%-.32s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.64s' tablaban" - ita "Comando %-.16s negato per l'utente: '%-.32s'@'%-.64s' sulla tabella '%-.64s'" - jpn "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ,¥Æ¡¼¥Ö¥ë '%-.64s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.32s'@'%-.64s' for Å×À̺í '%-.64s'" - por "Comando '%-.16s' negado para o usuário '%-.32s'@'%-.64s' na tabela '%-.64s'" - rum "Comanda %-.16s interzisa utilizatorului: '%-.32s'@'%-.64s' pentru tabela '%-.64s'" - rus "ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.32s'@'%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'" - serbian "%-.16s komanda zabranjena za korisnika '%-.32s'@'%-.64s' za tabelu '%-.64s'" - spa "%-.16s comando negado para usuario: '%-.32s'@'%-.64s' para tabla '%-.64s'" - swe "%-.16s ej tillåtet för '%-.32s'@'%-.64s' för tabell '%-.64s'" - ukr "%-.16s ËÏÍÁÎÄÁ ÚÁÂÏÒÏÎÅÎÁ ËÏÒÉÓÔÕ×ÁÞÕ: '%-.32s'@'%-.64s' Õ ÔÁÂÌÉæ '%-.64s'" + cze "%-.16s p-Bøíkaz nepøístupný pro u¾ivatele: '%-.48s'@'%-.64s' pro tabulku '%-.192s'" + dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for tabellen '%-.192s'" + nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor tabel '%-.192s'" + eng "%-.16s command denied to user '%-.48s'@'%-.64s' for table '%-.192s'" + jps "ƒRƒ}ƒ“ƒh %-.16s ‚Í ƒ†[ƒU[ '%-.48s'@'%-.64s' ,ƒe[ƒuƒ‹ '%-.192s' ‚ɑ΂µ‚Ä‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "%-.16s käsk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tabelis '%-.192s'" + fre "La commande '%-.16s' est interdite à l'utilisateur: '%-.48s'@'@%-.64s' sur la table '%-.192s'" + ger "%-.16s Befehl nicht erlaubt für Benutzer '%-.48s'@'%-.64s' auf Tabelle '%-.192s'" + hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s' tablaban" + ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla tabella '%-.192s'" + jpn "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.48s'@'%-.64s' ,¥Æ¡¼¥Ö¥ë '%-.192s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.48s'@'%-.64s' for Å×À̺í '%-.192s'" + por "Comando '%-.16s' negado para o usuário '%-.48s'@'%-.64s' na tabela '%-.192s'" + rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru tabela '%-.192s'" + rus "ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.48s'@'%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.192s'" + serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za tabelu '%-.192s'" + spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para tabla '%-.192s'" + swe "%-.16s ej tillåtet för '%-.48s'@'%-.64s' för tabell '%-.192s'" + ukr "%-.16s ËÏÍÁÎÄÁ ÚÁÂÏÒÏÎÅÎÁ ËÏÒÉÓÔÕ×ÁÞÕ: '%-.48s'@'%-.64s' Õ ÔÁÂÌÉæ '%-.192s'" ER_COLUMNACCESS_DENIED_ERROR 42000 - cze "%-.16s p-Bøíkaz nepøístupný pro u¾ivatele: '%-.32s'@'%-.64s' pro sloupec '%-.64s' v tabulce '%-.64s'" - dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s'@'%-.64s' for kolonne '%-.64s' in tabellen '%-.64s'" - nla "%-.16s commando geweigerd voor gebruiker: '%-.32s'@'%-.64s' voor kolom '%-.64s' in tabel '%-.64s'" - eng "%-.16s command denied to user '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'" - jps "ƒRƒ}ƒ“ƒh %-.16s ‚Í ƒ†[ƒU[ '%-.32s'@'%-.64s'\n ƒJƒ‰ƒ€ '%-.64s' ƒe[ƒuƒ‹ '%-.64s' ‚ɑ΂µ‚Ä‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "%-.16s käsk ei ole lubatud kasutajale '%-.32s'@'%-.64s' tulbale '%-.64s' tabelis '%-.64s'" - fre "La commande '%-.16s' est interdite à l'utilisateur: '%-.32s'@'@%-.64s' sur la colonne '%-.64s' de la table '%-.64s'" - ger "%-.16s Befehl nicht erlaubt für Benutzer '%-.32s'@'%-.64s' und Feld '%-.64s' in Tabelle '%-.64s'" - hun "%-.16s parancs a '%-.32s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.64s' mezo eseten a '%-.64s' tablaban" - ita "Comando %-.16s negato per l'utente: '%-.32s'@'%-.64s' sulla colonna '%-.64s' della tabella '%-.64s'" - jpn "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s'\n ¥«¥é¥à '%-.64s' ¥Æ¡¼¥Ö¥ë '%-.64s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.32s'@'%-.64s' for Ä®·³ '%-.64s' in Å×À̺í '%-.64s'" - por "Comando '%-.16s' negado para o usuário '%-.32s'@'%-.64s' na coluna '%-.64s', na tabela '%-.64s'" - rum "Comanda %-.16s interzisa utilizatorului: '%-.32s'@'%-.64s' pentru coloana '%-.64s' in tabela '%-.64s'" - rus "ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.32s'@'%-.64s' ÄÌÑ ÓÔÏÌÂÃÁ '%-.64s' × ÔÁÂÌÉÃÅ '%-.64s'" - serbian "%-.16s komanda zabranjena za korisnika '%-.32s'@'%-.64s' za kolonu '%-.64s' iz tabele '%-.64s'" - spa "%-.16s comando negado para usuario: '%-.32s'@'%-.64s' para columna '%-.64s' en la tabla '%-.64s'" - swe "%-.16s ej tillåtet för '%-.32s'@'%-.64s' för kolumn '%-.64s' i tabell '%-.64s'" - ukr "%-.16s ËÏÍÁÎÄÁ ÚÁÂÏÒÏÎÅÎÁ ËÏÒÉÓÔÕ×ÁÞÕ: '%-.32s'@'%-.64s' ÄÌÑ ÓÔÏ×ÂÃÑ '%-.64s' Õ ÔÁÂÌÉæ '%-.64s'" + cze "%-.16s p-Bøíkaz nepøístupný pro u¾ivatele: '%-.48s'@'%-.64s' pro sloupec '%-.192s' v tabulce '%-.192s'" + dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for kolonne '%-.192s' in tabellen '%-.192s'" + nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor kolom '%-.192s' in tabel '%-.192s'" + eng "%-.16s command denied to user '%-.48s'@'%-.64s' for column '%-.192s' in table '%-.192s'" + jps "ƒRƒ}ƒ“ƒh %-.16s ‚Í ƒ†[ƒU[ '%-.48s'@'%-.64s'\n ƒJƒ‰ƒ€ '%-.192s' ƒe[ƒuƒ‹ '%-.192s' ‚ɑ΂µ‚Ä‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "%-.16s käsk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tulbale '%-.192s' tabelis '%-.192s'" + fre "La commande '%-.16s' est interdite à l'utilisateur: '%-.48s'@'@%-.64s' sur la colonne '%-.192s' de la table '%-.192s'" + ger "%-.16s Befehl nicht erlaubt für Benutzer '%-.48s'@'%-.64s' und Feld '%-.192s' in Tabelle '%-.192s'" + hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s' mezo eseten a '%-.192s' tablaban" + ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla colonna '%-.192s' della tabella '%-.192s'" + jpn "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.48s'@'%-.64s'\n ¥«¥é¥à '%-.192s' ¥Æ¡¼¥Ö¥ë '%-.192s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.48s'@'%-.64s' for Ä®·³ '%-.192s' in Å×À̺í '%-.192s'" + por "Comando '%-.16s' negado para o usuário '%-.48s'@'%-.64s' na coluna '%-.192s', na tabela '%-.192s'" + rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru coloana '%-.192s' in tabela '%-.192s'" + rus "ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.48s'@'%-.64s' ÄÌÑ ÓÔÏÌÂÃÁ '%-.192s' × ÔÁÂÌÉÃÅ '%-.192s'" + serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za kolonu '%-.192s' iz tabele '%-.192s'" + spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para columna '%-.192s' en la tabla '%-.192s'" + swe "%-.16s ej tillåtet för '%-.48s'@'%-.64s' för kolumn '%-.192s' i tabell '%-.192s'" + ukr "%-.16s ËÏÍÁÎÄÁ ÚÁÂÏÒÏÎÅÎÁ ËÏÒÉÓÔÕ×ÁÞÕ: '%-.48s'@'%-.64s' ÄÌÑ ÓÔÏ×ÂÃÑ '%-.192s' Õ ÔÁÂÌÉæ '%-.192s'" ER_ILLEGAL_GRANT_FOR_TABLE 42000 cze "Neplatn-Bý pøíkaz GRANT/REVOKE. Prosím, pøeètìte si v manuálu, jaká privilegia je mo¾né pou¾ít." dan "Forkert GRANT/REVOKE kommando. Se i brugervejledningen hvilke privilegier der kan specificeres." @@ -3368,46 +3368,46 @@ ER_GRANT_WRONG_HOST_OR_USER 42000 swe "Felaktigt maskinnamn eller användarnamn använt med GRANT" ukr "áÒÇÕÍÅÎÔ host ÁÂÏ user ÄÌÑ GRANT ÚÁÄÏ×ÇÉÊ" ER_NO_SUCH_TABLE 42S02 - cze "Tabulka '%-.64s.%-.64s' neexistuje" - dan "Tabellen '%-.64s.%-.64s' eksisterer ikke" - nla "Tabel '%-.64s.%-.64s' bestaat niet" - eng "Table '%-.64s.%-.64s' doesn't exist" - est "Tabelit '%-.64s.%-.64s' ei eksisteeri" - fre "La table '%-.64s.%-.64s' n'existe pas" - ger "Tabelle '%-.64s.%-.64s' existiert nicht" - hun "A '%-.64s.%-.64s' tabla nem letezik" - ita "La tabella '%-.64s.%-.64s' non esiste" - jpn "Table '%-.64s.%-.64s' doesn't exist" - kor "Å×À̺í '%-.64s.%-.64s' ´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." - nor "Table '%-.64s.%-.64s' doesn't exist" - norwegian-ny "Table '%-.64s.%-.64s' doesn't exist" - pol "Table '%-.64s.%-.64s' doesn't exist" - por "Tabela '%-.64s.%-.64s' não existe" - rum "Tabela '%-.64s.%-.64s' nu exista" - rus "ôÁÂÌÉÃÁ '%-.64s.%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Tabela '%-.64s.%-.64s' ne postoji" - slo "Table '%-.64s.%-.64s' doesn't exist" - spa "Tabla '%-.64s.%-.64s' no existe" - swe "Det finns ingen tabell som heter '%-.64s.%-.64s'" - ukr "ôÁÂÌÉÃÑ '%-.64s.%-.64s' ÎÅ ¦ÓÎÕ¤" + cze "Tabulka '%-.192s.%-.192s' neexistuje" + dan "Tabellen '%-.192s.%-.192s' eksisterer ikke" + nla "Tabel '%-.192s.%-.192s' bestaat niet" + eng "Table '%-.192s.%-.192s' doesn't exist" + est "Tabelit '%-.192s.%-.192s' ei eksisteeri" + fre "La table '%-.192s.%-.192s' n'existe pas" + ger "Tabelle '%-.192s.%-.192s' existiert nicht" + hun "A '%-.192s.%-.192s' tabla nem letezik" + ita "La tabella '%-.192s.%-.192s' non esiste" + jpn "Table '%-.192s.%-.192s' doesn't exist" + kor "Å×À̺í '%-.192s.%-.192s' ´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." + nor "Table '%-.192s.%-.192s' doesn't exist" + norwegian-ny "Table '%-.192s.%-.192s' doesn't exist" + pol "Table '%-.192s.%-.192s' doesn't exist" + por "Tabela '%-.192s.%-.192s' não existe" + rum "Tabela '%-.192s.%-.192s' nu exista" + rus "ôÁÂÌÉÃÁ '%-.192s.%-.192s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Tabela '%-.192s.%-.192s' ne postoji" + slo "Table '%-.192s.%-.192s' doesn't exist" + spa "Tabla '%-.192s.%-.192s' no existe" + swe "Det finns ingen tabell som heter '%-.192s.%-.192s'" + ukr "ôÁÂÌÉÃÑ '%-.192s.%-.192s' ÎÅ ¦ÓÎÕ¤" ER_NONEXISTING_TABLE_GRANT 42000 - cze "Neexistuje odpov-Bídající grant pro u¾ivatele '%-.32s' na stroji '%-.64s' pro tabulku '%-.64s'" - dan "Denne tilladelse eksisterer ikke for brugeren '%-.32s' på vært '%-.64s' for tabellen '%-.64s'" - nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.32s' op host '%-.64s' op tabel '%-.64s'" - eng "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'" - est "Sellist õigust ei ole defineeritud kasutajale '%-.32s' masinast '%-.64s' tabelile '%-.64s'" - fre "Un tel droit n'est pas défini pour l'utilisateur '%-.32s' sur l'hôte '%-.64s' sur la table '%-.64s'" - ger "Eine solche Berechtigung ist für User '%-.32s' auf Host '%-.64s' an Tabelle '%-.64s' nicht definiert" - hun "A '%-.32s' felhasznalo szamara a '%-.64s' host '%-.64s' tablajaban ez a parancs nem engedelyezett" - ita "GRANT non definita per l'utente '%-.32s' dalla macchina '%-.64s' sulla tabella '%-.64s'" - kor "»ç¿ëÀÚ '%-.32s'(È£½ºÆ® '%-.64s')´Â Å×À̺í '%-.64s'¸¦ »ç¿ëÇϱâ À§ÇÏ¿© Á¤ÀÇµÈ ½ÂÀÎÀº ¾ø½À´Ï´Ù. " - por "Não existe tal permissão (grant) definido para o usuário '%-.32s' no 'host' '%-.64s', na tabela '%-.64s'" - rum "Nu exista un astfel de privilegiu (grant) definit pentru utilizatorul '%-.32s' de pe host-ul '%-.64s' pentru tabela '%-.64s'" - rus "ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' ÎÁ ËÏÍÐØÀÔÅÒÅ '%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'" - serbian "Ne postoji odobrenje za pristup korisniku '%-.32s' na host-u '%-.64s' tabeli '%-.64s'" - spa "No existe tal permiso definido para usuario '%-.32s' en el servidor '%-.64s' en la tabla '%-.64s'" - swe "Det finns inget privilegium definierat för användare '%-.32s' på '%-.64s' för tabell '%-.64s'" - ukr "ðÏ×ÎÏ×ÁÖÅÎØ ÎÅ ×ÉÚÎÁÞÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ '%-.32s' Ú ÈÏÓÔÕ '%-.64s' ÄÌÑ ÔÁÂÌÉæ '%-.64s'" + cze "Neexistuje odpov-Bídající grant pro u¾ivatele '%-.48s' na stroji '%-.64s' pro tabulku '%-.192s'" + dan "Denne tilladelse eksisterer ikke for brugeren '%-.48s' på vært '%-.64s' for tabellen '%-.192s'" + nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s' op tabel '%-.192s'" + eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on table '%-.192s'" + est "Sellist õigust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s' tabelile '%-.192s'" + fre "Un tel droit n'est pas défini pour l'utilisateur '%-.48s' sur l'hôte '%-.64s' sur la table '%-.192s'" + ger "Eine solche Berechtigung ist für User '%-.48s' auf Host '%-.64s' an Tabelle '%-.192s' nicht definiert" + hun "A '%-.48s' felhasznalo szamara a '%-.64s' host '%-.192s' tablajaban ez a parancs nem engedelyezett" + ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s' sulla tabella '%-.192s'" + kor "»ç¿ëÀÚ '%-.48s'(È£½ºÆ® '%-.64s')´Â Å×À̺í '%-.192s'¸¦ »ç¿ëÇϱâ À§ÇÏ¿© Á¤ÀÇµÈ ½ÂÀÎÀº ¾ø½À´Ï´Ù. " + por "Não existe tal permissão (grant) definido para o usuário '%-.48s' no 'host' '%-.64s', na tabela '%-.192s'" + rum "Nu exista un astfel de privilegiu (grant) definit pentru utilizatorul '%-.48s' de pe host-ul '%-.64s' pentru tabela '%-.192s'" + rus "ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s' ÎÁ ËÏÍÐØÀÔÅÒÅ '%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.192s'" + serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s' tabeli '%-.192s'" + spa "No existe tal permiso definido para usuario '%-.48s' en el servidor '%-.64s' en la tabla '%-.192s'" + swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s' för tabell '%-.192s'" + ukr "ðÏ×ÎÏ×ÁÖÅÎØ ÎÅ ×ÉÚÎÁÞÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ '%-.48s' Ú ÈÏÓÔÕ '%-.64s' ÄÌÑ ÔÁÂÌÉæ '%-.192s'" ER_NOT_ALLOWED_COMMAND 42000 cze "Pou-B¾itý pøíkaz není v této verzi MySQL povolen" dan "Den brugte kommando er ikke tilladt med denne udgave af MySQL" @@ -3451,23 +3451,23 @@ ER_SYNTAX_ERROR 42000 swe "Du har något fel i din syntax" ukr "õ ×ÁÓ ÐÏÍÉÌËÁ Õ ÓÉÎÔÁËÓÉÓ¦ SQL" ER_DELAYED_CANT_CHANGE_LOCK - cze "Zpo-B¾dìný insert threadu nebyl schopen získat po¾adovaný zámek pro tabulku %-.64s" - dan "Forsinket indsættelse tråden (delayed insert thread) kunne ikke opnå lås på tabellen %-.64s" - nla "'Delayed insert' thread kon de aangevraagde 'lock' niet krijgen voor tabel %-.64s" - eng "Delayed insert thread couldn't get requested lock for table %-.64s" - est "INSERT DELAYED lõim ei suutnud saada soovitud lukku tabelile %-.64s" - fre "La tâche 'delayed insert' n'a pas pu obtenir le verrou démandé sur la table %-.64s" - ger "Verzögerter (DELAYED) Einfüge-Thread konnte die angeforderte Sperre für Tabelle '%-.64s' nicht erhalten" - hun "A kesleltetett beillesztes (delayed insert) thread nem kapott zatolast a %-.64s tablahoz" - ita "Il thread di inserimento ritardato non riesce ad ottenere il lock per la tabella %-.64s" - kor "Áö¿¬µÈ insert ¾²·¹µå°¡ Å×À̺í %-.64sÀÇ ¿ä±¸µÈ ¶ôÅ·À» ó¸®ÇÒ ¼ö ¾ø¾ú½À´Ï´Ù." - por "'Thread' de inserção retardada (atrasada) pois não conseguiu obter a trava solicitada para tabela '%-.64s'" - rum "Thread-ul pentru inserarea aminata nu a putut obtine lacatul (lock) pentru tabela %-.64s" - rus "ðÏÔÏË, ÏÂÓÌÕÖÉ×ÁÀÝÉÊ ÏÔÌÏÖÅÎÎÕÀ ×ÓÔÁ×ËÕ (delayed insert), ÎÅ ÓÍÏÇ ÐÏÌÕÞÉÔØ ÚÁÐÒÁÛÉ×ÁÅÍÕÀ ÂÌÏËÉÒÏ×ËÕ ÎÁ ÔÁÂÌÉÃÕ %-.64s" - serbian "Prolongirani 'INSERT' thread nije mogao da dobije traženo zakljuèavanje tabele '%-.64s'" - spa "Thread de inserción retarda no pudiendo bloquear para la tabla %-.64s" - swe "DELAYED INSERT-tråden kunde inte låsa tabell '%-.64s'" - ukr "ç¦ÌËÁ ÄÌÑ INSERT DELAYED ÎÅ ÍÏÖÅ ÏÔÒÉÍÁÔÉ ÂÌÏËÕ×ÁÎÎÑ ÄÌÑ ÔÁÂÌÉæ %-.64s" + cze "Zpo-B¾dìný insert threadu nebyl schopen získat po¾adovaný zámek pro tabulku %-.192s" + dan "Forsinket indsættelse tråden (delayed insert thread) kunne ikke opnå lås på tabellen %-.192s" + nla "'Delayed insert' thread kon de aangevraagde 'lock' niet krijgen voor tabel %-.192s" + eng "Delayed insert thread couldn't get requested lock for table %-.192s" + est "INSERT DELAYED lõim ei suutnud saada soovitud lukku tabelile %-.192s" + fre "La tâche 'delayed insert' n'a pas pu obtenir le verrou démandé sur la table %-.192s" + ger "Verzögerter (DELAYED) Einfüge-Thread konnte die angeforderte Sperre für Tabelle '%-.192s' nicht erhalten" + hun "A kesleltetett beillesztes (delayed insert) thread nem kapott zatolast a %-.192s tablahoz" + ita "Il thread di inserimento ritardato non riesce ad ottenere il lock per la tabella %-.192s" + kor "Áö¿¬µÈ insert ¾²·¹µå°¡ Å×À̺í %-.192sÀÇ ¿ä±¸µÈ ¶ôÅ·À» ó¸®ÇÒ ¼ö ¾ø¾ú½À´Ï´Ù." + por "'Thread' de inserção retardada (atrasada) pois não conseguiu obter a trava solicitada para tabela '%-.192s'" + rum "Thread-ul pentru inserarea aminata nu a putut obtine lacatul (lock) pentru tabela %-.192s" + rus "ðÏÔÏË, ÏÂÓÌÕÖÉ×ÁÀÝÉÊ ÏÔÌÏÖÅÎÎÕÀ ×ÓÔÁ×ËÕ (delayed insert), ÎÅ ÓÍÏÇ ÐÏÌÕÞÉÔØ ÚÁÐÒÁÛÉ×ÁÅÍÕÀ ÂÌÏËÉÒÏ×ËÕ ÎÁ ÔÁÂÌÉÃÕ %-.192s" + serbian "Prolongirani 'INSERT' thread nije mogao da dobije traženo zakljuèavanje tabele '%-.192s'" + spa "Thread de inserción retarda no pudiendo bloquear para la tabla %-.192s" + swe "DELAYED INSERT-tråden kunde inte låsa tabell '%-.192s'" + ukr "ç¦ÌËÁ ÄÌÑ INSERT DELAYED ÎÅ ÍÏÖÅ ÏÔÒÉÍÁÔÉ ÂÌÏËÕ×ÁÎÎÑ ÄÌÑ ÔÁÂÌÉæ %-.192s" ER_TOO_MANY_DELAYED_THREADS cze "P-Bøíli¹ mnoho zpo¾dìných threadù" dan "For mange slettede tråde (threads) i brug" @@ -3487,28 +3487,28 @@ ER_TOO_MANY_DELAYED_THREADS swe "Det finns redan 'max_delayed_threads' trådar i använding" ukr "úÁÂÁÇÁÔÏ ÚÁÔÒÉÍÁÎÉÈ Ç¦ÌÏË ×ÉËÏÒÉÓÔÏ×Õ¤ÔØÓÑ" ER_ABORTING_CONNECTION 08S01 - cze "Zru-B¹eno spojení %ld do databáze: '%-.64s' u¾ivatel: '%-.32s' (%-.64s)" - dan "Afbrudt forbindelse %ld til database: '%-.64s' bruger: '%-.32s' (%-.64s)" - nla "Afgebroken verbinding %ld naar db: '%-.64s' gebruiker: '%-.32s' (%-.64s)" - eng "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - est "Ühendus katkestatud %ld andmebaasile: '%-.64s' kasutajale: '%-.32s' (%-.64s)" - fre "Connection %ld avortée vers la bd: '%-.64s' utilisateur: '%-.32s' (%-.64s)" - ger "Abbruch der Verbindung %ld zur Datenbank '%-.64s'. Benutzer: '%-.32s' (%-.64s)" - hun "Megszakitott kapcsolat %ld db: '%-.64s' adatbazishoz, felhasznalo: '%-.32s' (%-.64s)" - ita "Interrotta la connessione %ld al db: '%-.64s' utente: '%-.32s' (%-.64s)" - jpn "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - kor "µ¥ÀÌŸº£À̽º Á¢¼ÓÀ» À§ÇÑ ¿¬°á %ld°¡ Áß´ÜµÊ : '%-.64s' »ç¿ëÀÚ: '%-.32s' (%-.64s)" - nor "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - norwegian-ny "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - pol "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - por "Conexão %ld abortou para o banco de dados '%-.64s' - usuário '%-.32s' (%-.64s)" - rum "Conectie terminata %ld la baza de date: '%-.64s' utilizator: '%-.32s' (%-.64s)" - rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' (%-.64s)" - serbian "Prekinuta konekcija broj %ld ka bazi: '%-.64s' korisnik je bio: '%-.32s' (%-.64s)" - slo "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - spa "Conexión abortada %ld para db: '%-.64s' usuario: '%-.32s' (%-.64s)" - swe "Avbröt länken för tråd %ld till db '%-.64s', användare '%-.32s' (%-.64s)" - ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.64s' ËÏÒÉÓÔÕ×ÁÞÁ: '%-.32s' (%-.64s)" + cze "Zru-B¹eno spojení %ld do databáze: '%-.192s' u¾ivatel: '%-.48s' (%-.64s)" + dan "Afbrudt forbindelse %ld til database: '%-.192s' bruger: '%-.48s' (%-.64s)" + nla "Afgebroken verbinding %ld naar db: '%-.192s' gebruiker: '%-.48s' (%-.64s)" + eng "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + est "Ühendus katkestatud %ld andmebaasile: '%-.192s' kasutajale: '%-.48s' (%-.64s)" + fre "Connection %ld avortée vers la bd: '%-.192s' utilisateur: '%-.48s' (%-.64s)" + ger "Abbruch der Verbindung %ld zur Datenbank '%-.192s'. Benutzer: '%-.48s' (%-.64s)" + hun "Megszakitott kapcsolat %ld db: '%-.192s' adatbazishoz, felhasznalo: '%-.48s' (%-.64s)" + ita "Interrotta la connessione %ld al db: '%-.192s' utente: '%-.48s' (%-.64s)" + jpn "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + kor "µ¥ÀÌŸº£À̽º Á¢¼ÓÀ» À§ÇÑ ¿¬°á %ld°¡ Áß´ÜµÊ : '%-.192s' »ç¿ëÀÚ: '%-.48s' (%-.64s)" + nor "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + norwegian-ny "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + pol "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + por "Conexão %ld abortou para o banco de dados '%-.192s' - usuário '%-.48s' (%-.64s)" + rum "Conectie terminata %ld la baza de date: '%-.192s' utilizator: '%-.48s' (%-.64s)" + rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.192s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s' (%-.64s)" + serbian "Prekinuta konekcija broj %ld ka bazi: '%-.192s' korisnik je bio: '%-.48s' (%-.64s)" + slo "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + spa "Conexión abortada %ld para db: '%-.192s' usuario: '%-.48s' (%-.64s)" + swe "Avbröt länken för tråd %ld till db '%-.192s', användare '%-.48s' (%-.64s)" + ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.192s' ËÏÒÉÓÔÕ×ÁÞÁ: '%-.48s' (%-.64s)" ER_NET_PACKET_TOO_LARGE 08S01 cze "Zji-B¹tìn pøíchozí packet del¹í ne¾ 'max_allowed_packet'" dan "Modtog en datapakke som var større end 'max_allowed_packet'" @@ -3723,29 +3723,29 @@ ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 42000 swe "Den använda tabelltypen kan inte hantera AUTO_INCREMENT-kolumner" ukr "÷ÉËÏÒÉÓÔÁÎÉÊ ÔÉÐ ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕ¤ AUTO_INCREMENT ÓÔÏ×Âæ" ER_DELAYED_INSERT_TABLE_LOCKED - cze "INSERT DELAYED nen-Bí mo¾no s tabulkou '%-.64s' pou¾ít, proto¾e je zamèená pomocí LOCK TABLES" - dan "INSERT DELAYED kan ikke bruges med tabellen '%-.64s', fordi tabellen er låst med LOCK TABLES" - nla "INSERT DELAYED kan niet worden gebruikt bij table '%-.64s', vanwege een 'lock met LOCK TABLES" - eng "INSERT DELAYED can't be used with table '%-.64s' because it is locked with LOCK TABLES" - est "INSERT DELAYED ei saa kasutada tabeli '%-.64s' peal, kuna see on lukustatud LOCK TABLES käsuga" - fre "INSERT DELAYED ne peut être utilisé avec la table '%-.64s', car elle est verrouée avec LOCK TABLES" - ger "INSERT DELAYED kann für Tabelle '%-.64s' nicht verwendet werden, da sie mit LOCK TABLES gesperrt ist" - greek "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - hun "Az INSERT DELAYED nem hasznalhato a '%-.64s' tablahoz, mert a tabla zarolt (LOCK TABLES)" - ita "L'inserimento ritardato (INSERT DELAYED) non puo` essere usato con la tabella '%-.64s', perche` soggetta a lock da 'LOCK TABLES'" - jpn "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - kor "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - nor "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - norwegian-ny "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - pol "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - por "INSERT DELAYED não pode ser usado com a tabela '%-.64s', porque ela está travada com LOCK TABLES" - rum "INSERT DELAYED nu poate fi folosit cu tabela '%-.64s', deoarece este locked folosing LOCK TABLES" - rus "îÅÌØÚÑ ÉÓÐÏÌØÚÏ×ÁÔØ INSERT DELAYED ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s', ÐÏÔÏÍÕ ÞÔÏ ÏÎÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES" - serbian "Komanda 'INSERT DELAYED' ne može biti iskorištena u tabeli '%-.64s', zbog toga što je zakljuèana komandom 'LOCK TABLES'" - slo "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - spa "INSERT DELAYED no puede ser usado con tablas '%-.64s', porque esta bloqueada con LOCK TABLES" - swe "INSERT DELAYED kan inte användas med tabell '%-.64s', emedan den är låst med LOCK TABLES" - ukr "INSERT DELAYED ÎÅ ÍÏÖÅ ÂÕÔÉ ×ÉËÏÒÉÓÔÁÎÏ Ú ÔÁÂÌÉÃÅÀ '%-.64s', ÔÏÍÕ ÝÏ §§ ÚÁÂÌÏËÏ×ÁÎÏ Ú LOCK TABLES" + cze "INSERT DELAYED nen-Bí mo¾no s tabulkou '%-.192s' pou¾ít, proto¾e je zamèená pomocí LOCK TABLES" + dan "INSERT DELAYED kan ikke bruges med tabellen '%-.192s', fordi tabellen er låst med LOCK TABLES" + nla "INSERT DELAYED kan niet worden gebruikt bij table '%-.192s', vanwege een 'lock met LOCK TABLES" + eng "INSERT DELAYED can't be used with table '%-.192s' because it is locked with LOCK TABLES" + est "INSERT DELAYED ei saa kasutada tabeli '%-.192s' peal, kuna see on lukustatud LOCK TABLES käsuga" + fre "INSERT DELAYED ne peut être utilisé avec la table '%-.192s', car elle est verrouée avec LOCK TABLES" + ger "INSERT DELAYED kann für Tabelle '%-.192s' nicht verwendet werden, da sie mit LOCK TABLES gesperrt ist" + greek "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + hun "Az INSERT DELAYED nem hasznalhato a '%-.192s' tablahoz, mert a tabla zarolt (LOCK TABLES)" + ita "L'inserimento ritardato (INSERT DELAYED) non puo` essere usato con la tabella '%-.192s', perche` soggetta a lock da 'LOCK TABLES'" + jpn "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + kor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + nor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + norwegian-ny "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + pol "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + por "INSERT DELAYED não pode ser usado com a tabela '%-.192s', porque ela está travada com LOCK TABLES" + rum "INSERT DELAYED nu poate fi folosit cu tabela '%-.192s', deoarece este locked folosing LOCK TABLES" + rus "îÅÌØÚÑ ÉÓÐÏÌØÚÏ×ÁÔØ INSERT DELAYED ÄÌÑ ÔÁÂÌÉÃÙ '%-.192s', ÐÏÔÏÍÕ ÞÔÏ ÏÎÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES" + serbian "Komanda 'INSERT DELAYED' ne može biti iskorištena u tabeli '%-.192s', zbog toga što je zakljuèana komandom 'LOCK TABLES'" + slo "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + spa "INSERT DELAYED no puede ser usado con tablas '%-.192s', porque esta bloqueada con LOCK TABLES" + swe "INSERT DELAYED kan inte användas med tabell '%-.192s', emedan den är låst med LOCK TABLES" + ukr "INSERT DELAYED ÎÅ ÍÏÖÅ ÂÕÔÉ ×ÉËÏÒÉÓÔÁÎÏ Ú ÔÁÂÌÉÃÅÀ '%-.192s', ÔÏÍÕ ÝÏ §§ ÚÁÂÌÏËÏ×ÁÎÏ Ú LOCK TABLES" ER_WRONG_COLUMN_NAME 42000 cze "Nespr-Bávné jméno sloupce '%-.100s'" dan "Forkert kolonnenavn '%-.100s'" @@ -3764,29 +3764,29 @@ ER_WRONG_COLUMN_NAME 42000 swe "Felaktigt kolumnnamn '%-.100s'" ukr "îÅצÒÎÅ ¦Í'Ñ ÓÔÏ×ÂÃÑ '%-.100s'" ER_WRONG_KEY_COLUMN 42000 - cze "Handler pou-B¾ité tabulky neumí indexovat sloupce '%-.64s'" - dan "Den brugte tabeltype kan ikke indeksere kolonnen '%-.64s'" - nla "De gebruikte tabel 'handler' kan kolom '%-.64s' niet indexeren" - eng "The used storage engine can't index column '%-.64s'" - est "Tabelihandler ei oska indekseerida tulpa '%-.64s'" - fre "Le handler de la table ne peut indexé la colonne '%-.64s'" - ger "Die verwendete Speicher-Engine kann die Spalte '%-.64s' nicht indizieren" - greek "The used table handler can't index column '%-.64s'" - hun "A hasznalt tablakezelo nem tudja a '%-.64s' mezot indexelni" - ita "Il gestore delle tabelle non puo` indicizzare la colonna '%-.64s'" - jpn "The used table handler can't index column '%-.64s'" - kor "The used table handler can't index column '%-.64s'" - nor "The used table handler can't index column '%-.64s'" - norwegian-ny "The used table handler can't index column '%-.64s'" - pol "The used table handler can't index column '%-.64s'" - por "O manipulador de tabela usado não pode indexar a coluna '%-.64s'" - rum "Handler-ul tabelei folosite nu poate indexa coloana '%-.64s'" - rus "éÓÐÏÌØÚÏ×ÁÎÎÙÊ ÏÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ ÎÅ ÍÏÖÅÔ ÐÒÏÉÎÄÅËÓÉÒÏ×ÁÔØ ÓÔÏÌÂÅà '%-.64s'" - serbian "Handler tabele ne može da indeksira kolonu '%-.64s'" - slo "The used table handler can't index column '%-.64s'" - spa "El manipulador de tabla usado no puede indexar columna '%-.64s'" - swe "Den använda tabelltypen kan inte indexera kolumn '%-.64s'" - ukr "÷ÉËÏÒÉÓÔÁÎÉÊ ×ËÁÚ¦×ÎÉË ÔÁÂÌÉæ ÎÅ ÍÏÖÅ ¦ÎÄÅËÓÕ×ÁÔÉ ÓÔÏ×ÂÅÃØ '%-.64s'" + cze "Handler pou-B¾ité tabulky neumí indexovat sloupce '%-.192s'" + dan "Den brugte tabeltype kan ikke indeksere kolonnen '%-.192s'" + nla "De gebruikte tabel 'handler' kan kolom '%-.192s' niet indexeren" + eng "The used storage engine can't index column '%-.192s'" + est "Tabelihandler ei oska indekseerida tulpa '%-.192s'" + fre "Le handler de la table ne peut indexé la colonne '%-.192s'" + ger "Die verwendete Speicher-Engine kann die Spalte '%-.192s' nicht indizieren" + greek "The used table handler can't index column '%-.192s'" + hun "A hasznalt tablakezelo nem tudja a '%-.192s' mezot indexelni" + ita "Il gestore delle tabelle non puo` indicizzare la colonna '%-.192s'" + jpn "The used table handler can't index column '%-.192s'" + kor "The used table handler can't index column '%-.192s'" + nor "The used table handler can't index column '%-.192s'" + norwegian-ny "The used table handler can't index column '%-.192s'" + pol "The used table handler can't index column '%-.192s'" + por "O manipulador de tabela usado não pode indexar a coluna '%-.192s'" + rum "Handler-ul tabelei folosite nu poate indexa coloana '%-.192s'" + rus "éÓÐÏÌØÚÏ×ÁÎÎÙÊ ÏÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ ÎÅ ÍÏÖÅÔ ÐÒÏÉÎÄÅËÓÉÒÏ×ÁÔØ ÓÔÏÌÂÅà '%-.192s'" + serbian "Handler tabele ne može da indeksira kolonu '%-.192s'" + slo "The used table handler can't index column '%-.192s'" + spa "El manipulador de tabla usado no puede indexar columna '%-.192s'" + swe "Den använda tabelltypen kan inte indexera kolumn '%-.192s'" + ukr "÷ÉËÏÒÉÓÔÁÎÉÊ ×ËÁÚ¦×ÎÉË ÔÁÂÌÉæ ÎÅ ÍÏÖÅ ¦ÎÄÅËÓÕ×ÁÔÉ ÓÔÏ×ÂÅÃØ '%-.192s'" ER_WRONG_MRG_TABLE cze "V-B¹echny tabulky v MERGE tabulce nejsou definovány stejnì" dan "Tabellerne i MERGE er ikke defineret ens" @@ -3811,46 +3811,46 @@ ER_WRONG_MRG_TABLE swe "Tabellerna i MERGE-tabellen är inte identiskt definierade" ukr "ôÁÂÌÉæ Õ MERGE TABLE ÍÁÀÔØ Ò¦ÚÎÕ ÓÔÒÕËÔÕÒÕ" ER_DUP_UNIQUE 23000 - cze "Kv-Bùli unique constraintu nemozu zapsat do tabulky '%-.64s'" - dan "Kan ikke skrive til tabellen '%-.64s' fordi det vil bryde CONSTRAINT regler" - nla "Kan niet opslaan naar table '%-.64s' vanwege 'unique' beperking" - eng "Can't write, because of unique constraint, to table '%-.64s'" - est "Ei suuda kirjutada tabelisse '%-.64s', kuna see rikub ühesuse kitsendust" - fre "Écriture impossible à cause d'un index UNIQUE sur la table '%-.64s'" - ger "Schreiben in Tabelle '%-.64s' nicht möglich wegen einer Eindeutigkeitsbeschränkung (unique constraint)" - hun "A '%-.64s' nem irhato, az egyedi mezok miatt" - ita "Impossibile scrivere nella tabella '%-.64s' per limitazione di unicita`" - por "Não pode gravar, devido à restrição UNIQUE, na tabela '%-.64s'" - rum "Nu pot scrie pe hard-drive, din cauza constraintului unic (unique constraint) pentru tabela '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ × ÔÁÂÌÉÃÕ '%-.64s' ÉÚ-ÚÁ ÏÇÒÁÎÉÞÅÎÉÊ ÕÎÉËÁÌØÎÏÇÏ ËÌÀÞÁ" - serbian "Zbog provere jedinstvenosti ne mogu da upišem podatke u tabelu '%-.64s'" - spa "No puedo escribir, debido al único constraint, para tabla '%-.64s'" - swe "Kan inte skriva till tabell '%-.64s'; UNIQUE-test" - ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ ÄÏ ÔÁÂÌÉæ '%-.64s', Ú ÐÒÉÞÉÎÉ ×ÉÍÏÇ ÕΦËÁÌØÎÏÓÔ¦" + cze "Kv-Bùli unique constraintu nemozu zapsat do tabulky '%-.192s'" + dan "Kan ikke skrive til tabellen '%-.192s' fordi det vil bryde CONSTRAINT regler" + nla "Kan niet opslaan naar table '%-.192s' vanwege 'unique' beperking" + eng "Can't write, because of unique constraint, to table '%-.192s'" + est "Ei suuda kirjutada tabelisse '%-.192s', kuna see rikub ühesuse kitsendust" + fre "Écriture impossible à cause d'un index UNIQUE sur la table '%-.192s'" + ger "Schreiben in Tabelle '%-.192s' nicht möglich wegen einer Eindeutigkeitsbeschränkung (unique constraint)" + hun "A '%-.192s' nem irhato, az egyedi mezok miatt" + ita "Impossibile scrivere nella tabella '%-.192s' per limitazione di unicita`" + por "Não pode gravar, devido à restrição UNIQUE, na tabela '%-.192s'" + rum "Nu pot scrie pe hard-drive, din cauza constraintului unic (unique constraint) pentru tabela '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ × ÔÁÂÌÉÃÕ '%-.192s' ÉÚ-ÚÁ ÏÇÒÁÎÉÞÅÎÉÊ ÕÎÉËÁÌØÎÏÇÏ ËÌÀÞÁ" + serbian "Zbog provere jedinstvenosti ne mogu da upišem podatke u tabelu '%-.192s'" + spa "No puedo escribir, debido al único constraint, para tabla '%-.192s'" + swe "Kan inte skriva till tabell '%-.192s'; UNIQUE-test" + ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ ÄÏ ÔÁÂÌÉæ '%-.192s', Ú ÐÒÉÞÉÎÉ ×ÉÍÏÇ ÕΦËÁÌØÎÏÓÔ¦" ER_BLOB_KEY_WITHOUT_LENGTH 42000 - cze "BLOB sloupec '%-.64s' je pou-B¾it ve specifikaci klíèe bez délky" - dan "BLOB kolonnen '%-.64s' brugt i nøglespecifikation uden nøglelængde" - nla "BLOB kolom '%-.64s' gebruikt in zoeksleutel specificatie zonder zoeksleutel lengte" - eng "BLOB/TEXT column '%-.64s' used in key specification without a key length" - est "BLOB-tüüpi tulp '%-.64s' on kasutusel võtmes ilma pikkust määratlemata" - fre "La colonne '%-.64s' de type BLOB est utilisée dans une définition d'index sans longueur d'index" - ger "BLOB- oder TEXT-Spalte '%-.64s' wird in der Schlüsseldefinition ohne Schlüssellängenangabe verwendet" - greek "BLOB column '%-.64s' used in key specification without a key length" - hun "BLOB mezo '%-.64s' hasznalt a mezo specifikacioban, a mezohossz megadasa nelkul" - ita "La colonna '%-.64s' di tipo BLOB e` usata in una chiave senza specificarne la lunghezza" - jpn "BLOB column '%-.64s' used in key specification without a key length" - kor "BLOB column '%-.64s' used in key specification without a key length" - nor "BLOB column '%-.64s' used in key specification without a key length" - norwegian-ny "BLOB column '%-.64s' used in key specification without a key length" - pol "BLOB column '%-.64s' used in key specification without a key length" - por "Coluna BLOB '%-.64s' usada na especificação de chave sem o comprimento da chave" - rum "Coloana BLOB '%-.64s' este folosita in specificarea unei chei fara ca o lungime de cheie sa fie folosita" - rus "óÔÏÌÂÅà ÔÉÐÁ BLOB '%-.64s' ÂÙÌ ÕËÁÚÁÎ × ÏÐÒÅÄÅÌÅÎÉÉ ËÌÀÞÁ ÂÅÚ ÕËÁÚÁÎÉÑ ÄÌÉÎÙ ËÌÀÞÁ" - serbian "BLOB kolona '%-.64s' je upotrebljena u specifikaciji kljuèa bez navoðenja dužine kljuèa" - slo "BLOB column '%-.64s' used in key specification without a key length" - spa "Columna BLOB column '%-.64s' usada en especificación de clave sin tamaño de la clave" - swe "Du har inte angett någon nyckellängd för BLOB '%-.64s'" - ukr "óÔÏ×ÂÅÃØ BLOB '%-.64s' ×ÉËÏÒÉÓÔÁÎÏ Õ ×ÉÚÎÁÞÅÎΦ ËÌÀÞÁ ÂÅÚ ×ËÁÚÁÎÎÑ ÄÏ×ÖÉÎÉ ËÌÀÞÁ" + cze "BLOB sloupec '%-.192s' je pou-B¾it ve specifikaci klíèe bez délky" + dan "BLOB kolonnen '%-.192s' brugt i nøglespecifikation uden nøglelængde" + nla "BLOB kolom '%-.192s' gebruikt in zoeksleutel specificatie zonder zoeksleutel lengte" + eng "BLOB/TEXT column '%-.192s' used in key specification without a key length" + est "BLOB-tüüpi tulp '%-.192s' on kasutusel võtmes ilma pikkust määratlemata" + fre "La colonne '%-.192s' de type BLOB est utilisée dans une définition d'index sans longueur d'index" + ger "BLOB- oder TEXT-Spalte '%-.192s' wird in der Schlüsseldefinition ohne Schlüssellängenangabe verwendet" + greek "BLOB column '%-.192s' used in key specification without a key length" + hun "BLOB mezo '%-.192s' hasznalt a mezo specifikacioban, a mezohossz megadasa nelkul" + ita "La colonna '%-.192s' di tipo BLOB e` usata in una chiave senza specificarne la lunghezza" + jpn "BLOB column '%-.192s' used in key specification without a key length" + kor "BLOB column '%-.192s' used in key specification without a key length" + nor "BLOB column '%-.192s' used in key specification without a key length" + norwegian-ny "BLOB column '%-.192s' used in key specification without a key length" + pol "BLOB column '%-.192s' used in key specification without a key length" + por "Coluna BLOB '%-.192s' usada na especificação de chave sem o comprimento da chave" + rum "Coloana BLOB '%-.192s' este folosita in specificarea unei chei fara ca o lungime de cheie sa fie folosita" + rus "óÔÏÌÂÅà ÔÉÐÁ BLOB '%-.192s' ÂÙÌ ÕËÁÚÁÎ × ÏÐÒÅÄÅÌÅÎÉÉ ËÌÀÞÁ ÂÅÚ ÕËÁÚÁÎÉÑ ÄÌÉÎÙ ËÌÀÞÁ" + serbian "BLOB kolona '%-.192s' je upotrebljena u specifikaciji kljuèa bez navoðenja dužine kljuèa" + slo "BLOB column '%-.192s' used in key specification without a key length" + spa "Columna BLOB column '%-.192s' usada en especificación de clave sin tamaño de la clave" + swe "Du har inte angett någon nyckellängd för BLOB '%-.192s'" + ukr "óÔÏ×ÂÅÃØ BLOB '%-.192s' ×ÉËÏÒÉÓÔÁÎÏ Õ ×ÉÚÎÁÞÅÎΦ ËÌÀÞÁ ÂÅÚ ×ËÁÚÁÎÎÑ ÄÏ×ÖÉÎÉ ËÌÀÞÁ" ER_PRIMARY_CANT_HAVE_NULL 42000 cze "V-B¹echny èásti primárního klíèe musejí být NOT NULL; pokud potøebujete NULL, pou¾ijte UNIQUE" dan "Alle dele af en PRIMARY KEY skal være NOT NULL; Hvis du skal bruge NULL i nøglen, brug UNIQUE istedet" @@ -3936,21 +3936,21 @@ ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE swe "Du använder 'säker uppdateringsmod' och försökte uppdatera en tabell utan en WHERE-sats som använder sig av en nyckel" ukr "÷É Õ ÒÅÖÉͦ ÂÅÚÐÅÞÎÏÇÏ ÏÎÏ×ÌÅÎÎÑ ÔÁ ÎÁÍÁÇÁ¤ÔÅÓØ ÏÎÏ×ÉÔÉ ÔÁÂÌÉÃÀ ÂÅÚ ÏÐÅÒÁÔÏÒÁ WHERE, ÝÏ ×ÉËÏÒÉÓÔÏ×Õ¤ KEY ÓÔÏ×ÂÅÃØ" ER_KEY_DOES_NOT_EXITS 42000 S1009 - cze "Kl-Bíè '%-.64s' v tabulce '%-.64s' neexistuje" - dan "Nøglen '%-.64s' eksisterer ikke i tabellen '%-.64s'" - nla "Zoeksleutel '%-.64s' bestaat niet in tabel '%-.64s'" - eng "Key '%-.64s' doesn't exist in table '%-.64s'" - est "Võti '%-.64s' ei eksisteeri tabelis '%-.64s'" - fre "L'index '%-.64s' n'existe pas sur la table '%-.64s'" - ger "Schlüssel '%-.64s' existiert in der Tabelle '%-.64s' nicht" - hun "A '%-.64s' kulcs nem letezik a '%-.64s' tablaban" - ita "La chiave '%-.64s' non esiste nella tabella '%-.64s'" - por "Chave '%-.64s' não existe na tabela '%-.64s'" - rus "ëÌÀÞ '%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ × ÔÁÂÌÉÃÅ '%-.64s'" - serbian "Kljuè '%-.64s' ne postoji u tabeli '%-.64s'" - spa "Clave '%-.64s' no existe en la tabla '%-.64s'" - swe "Nyckel '%-.64s' finns inte in tabell '%-.64s'" - ukr "ëÌÀÞ '%-.64s' ÎÅ ¦ÓÎÕ¤ × ÔÁÂÌÉæ '%-.64s'" + cze "Kl-Bíè '%-.192s' v tabulce '%-.192s' neexistuje" + dan "Nøglen '%-.192s' eksisterer ikke i tabellen '%-.192s'" + nla "Zoeksleutel '%-.192s' bestaat niet in tabel '%-.192s'" + eng "Key '%-.192s' doesn't exist in table '%-.192s'" + est "Võti '%-.192s' ei eksisteeri tabelis '%-.192s'" + fre "L'index '%-.192s' n'existe pas sur la table '%-.192s'" + ger "Schlüssel '%-.192s' existiert in der Tabelle '%-.192s' nicht" + hun "A '%-.192s' kulcs nem letezik a '%-.192s' tablaban" + ita "La chiave '%-.192s' non esiste nella tabella '%-.192s'" + por "Chave '%-.192s' não existe na tabela '%-.192s'" + rus "ëÌÀÞ '%-.192s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ × ÔÁÂÌÉÃÅ '%-.192s'" + serbian "Kljuè '%-.192s' ne postoji u tabeli '%-.192s'" + spa "Clave '%-.192s' no existe en la tabla '%-.192s'" + swe "Nyckel '%-.192s' finns inte in tabell '%-.192s'" + ukr "ëÌÀÞ '%-.192s' ÎÅ ¦ÓÎÕ¤ × ÔÁÂÌÉæ '%-.192s'" ER_CHECK_NO_SUCH_TABLE 42000 cze "Nemohu otev-Bøít tabulku" dan "Kan ikke åbne tabellen" @@ -4072,20 +4072,20 @@ ER_ERROR_DURING_CHECKPOINT swe "Fick fel %d vid CHECKPOINT" ukr "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ %d Ð¦Ä ÞÁÓ CHECKPOINT" ER_NEW_ABORTING_CONNECTION 08S01 - cze "Spojen-Bí %ld do databáze: '%-.64s' u¾ivatel: '%-.32s' stroj: '%-.64s' (%-.64s) bylo pøeru¹eno" - dan "Afbrød forbindelsen %ld til databasen '%-.64s' bruger: '%-.32s' vært: '%-.64s' (%-.64s)" - nla "Afgebroken verbinding %ld naar db: '%-.64s' gebruiker: '%-.32s' host: '%-.64s' (%-.64s)" - eng "Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: '%-.64s' (%-.64s)" - est "Ühendus katkestatud %ld andmebaas: '%-.64s' kasutaja: '%-.32s' masin: '%-.64s' (%-.64s)" - fre "Connection %ld avortée vers la bd: '%-.64s' utilisateur: '%-.32s' hôte: '%-.64s' (%-.64s)" - ger "Abbruch der Verbindung %ld zur Datenbank '%-.64s'. Benutzer: '%-.32s', Host: '%-.64s' (%-.64s)" - ita "Interrotta la connessione %ld al db: ''%-.64s' utente: '%-.32s' host: '%-.64s' (%-.64s)" - por "Conexão %ld abortada para banco de dados '%-.64s' - usuário '%-.32s' - 'host' '%-.64s' ('%-.64s')" - rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' Ó ÈÏÓÔÁ '%-.64s' (%-.64s)" - serbian "Prekinuta konekcija broj %ld ka bazi: '%-.64s' korisnik je bio: '%-.32s' a host: '%-.64s' (%-.64s)" - spa "Abortada conexión %ld para db: '%-.64s' usuario: '%-.32s' servidor: '%-.64s' (%-.64s)" - swe "Avbröt länken för tråd %ld till db '%-.64s', användare '%-.32s', host '%-.64s' (%-.64s)" - ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.64s' ËÏÒÉÓÔÕ×ÁÞ: '%-.32s' ÈÏÓÔ: '%-.64s' (%-.64s)" + cze "Spojen-Bí %ld do databáze: '%-.192s' u¾ivatel: '%-.48s' stroj: '%-.64s' (%-.64s) bylo pøeru¹eno" + dan "Afbrød forbindelsen %ld til databasen '%-.192s' bruger: '%-.48s' vært: '%-.64s' (%-.64s)" + nla "Afgebroken verbinding %ld naar db: '%-.192s' gebruiker: '%-.48s' host: '%-.64s' (%-.64s)" + eng "Aborted connection %ld to db: '%-.192s' user: '%-.48s' host: '%-.64s' (%-.64s)" + est "Ühendus katkestatud %ld andmebaas: '%-.192s' kasutaja: '%-.48s' masin: '%-.64s' (%-.64s)" + fre "Connection %ld avortée vers la bd: '%-.192s' utilisateur: '%-.48s' hôte: '%-.64s' (%-.64s)" + ger "Abbruch der Verbindung %ld zur Datenbank '%-.192s'. Benutzer: '%-.48s', Host: '%-.64s' (%-.64s)" + ita "Interrotta la connessione %ld al db: ''%-.192s' utente: '%-.48s' host: '%-.64s' (%-.64s)" + por "Conexão %ld abortada para banco de dados '%-.192s' - usuário '%-.48s' - 'host' '%-.64s' ('%-.64s')" + rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.192s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s' Ó ÈÏÓÔÁ '%-.64s' (%-.64s)" + serbian "Prekinuta konekcija broj %ld ka bazi: '%-.192s' korisnik je bio: '%-.48s' a host: '%-.64s' (%-.64s)" + spa "Abortada conexión %ld para db: '%-.192s' usuario: '%-.48s' servidor: '%-.64s' (%-.64s)" + swe "Avbröt länken för tråd %ld till db '%-.192s', användare '%-.48s', host '%-.64s' (%-.64s)" + ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.192s' ËÏÒÉÓÔÕ×ÁÞ: '%-.48s' ÈÏÓÔ: '%-.64s' (%-.64s)" ER_DUMP_NOT_IMPLEMENTED cze "Handler tabulky nepodporuje bin-Bární dump" dan "Denne tabeltype unserstøtter ikke binært tabeldump" @@ -4110,20 +4110,20 @@ ER_FLUSH_MASTER_BINLOG_CLOSED serbian "Binarni log file zatvoren, ne mogu da izvršim komandu 'RESET MASTER'" ukr "òÅÐ̦ËÁæÊÎÉÊ ÌÏÇ ÚÁËÒÉÔÏ, ÎÅ ÍÏÖÕ ×ÉËÏÎÁÔÉ RESET MASTER" ER_INDEX_REBUILD - cze "P-Bøebudování indexu dumpnuté tabulky '%-.64s' nebylo úspì¹né" - dan "Kunne ikke genopbygge indekset for den dumpede tabel '%-.64s'" - nla "Gefaald tijdens heropbouw index van gedumpte tabel '%-.64s'" - eng "Failed rebuilding the index of dumped table '%-.64s'" - fre "La reconstruction de l'index de la table copiée '%-.64s' a échoué" - ger "Neuerstellung des Index der Dump-Tabelle '%-.64s' fehlgeschlagen" - greek "Failed rebuilding the index of dumped table '%-.64s'" - hun "Failed rebuilding the index of dumped table '%-.64s'" - ita "Fallita la ricostruzione dell'indice della tabella copiata '%-.64s'" - por "Falhou na reconstrução do índice da tabela 'dumped' '%-.64s'" - rus "ïÛÉÂËÁ ÐÅÒÅÓÔÒÏÊËÉ ÉÎÄÅËÓÁ ÓÏÈÒÁÎÅÎÎÏÊ ÔÁÂÌÉÃÙ '%-.64s'" - serbian "Izgradnja indeksa dump-ovane tabele '%-.64s' nije uspela" - spa "Falla reconstruyendo el indice de la tabla dumped '%-.64s'" - ukr "îÅ×ÄÁÌŠצÄÎÏ×ÌÅÎÎÑ ¦ÎÄÅËÓÁ ÐÅÒÅÄÁÎϧ ÔÁÂÌÉæ '%-.64s'" + cze "P-Bøebudování indexu dumpnuté tabulky '%-.192s' nebylo úspì¹né" + dan "Kunne ikke genopbygge indekset for den dumpede tabel '%-.192s'" + nla "Gefaald tijdens heropbouw index van gedumpte tabel '%-.192s'" + eng "Failed rebuilding the index of dumped table '%-.192s'" + fre "La reconstruction de l'index de la table copiée '%-.192s' a échoué" + ger "Neuerstellung des Index der Dump-Tabelle '%-.192s' fehlgeschlagen" + greek "Failed rebuilding the index of dumped table '%-.192s'" + hun "Failed rebuilding the index of dumped table '%-.192s'" + ita "Fallita la ricostruzione dell'indice della tabella copiata '%-.192s'" + por "Falhou na reconstrução do índice da tabela 'dumped' '%-.192s'" + rus "ïÛÉÂËÁ ÐÅÒÅÓÔÒÏÊËÉ ÉÎÄÅËÓÁ ÓÏÈÒÁÎÅÎÎÏÊ ÔÁÂÌÉÃÙ '%-.192s'" + serbian "Izgradnja indeksa dump-ovane tabele '%-.192s' nije uspela" + spa "Falla reconstruyendo el indice de la tabla dumped '%-.192s'" + ukr "îÅ×ÄÁÌŠצÄÎÏ×ÌÅÎÎÑ ¦ÎÄÅËÓÁ ÐÅÒÅÄÁÎϧ ÔÁÂÌÉæ '%-.192s'" ER_MASTER cze "Chyba masteru: '%-.64s'" dan "Fejl fra master: '%-.64s'" @@ -4212,35 +4212,35 @@ ER_UNKNOWN_SYSTEM_VARIABLE swe "Okänd systemvariabel: '%-.64s'" ukr "îÅצÄÏÍÁ ÓÉÓÔÅÍÎÁ ÚͦÎÎÁ '%-.64s'" ER_CRASHED_ON_USAGE - cze "Tabulka '%-.64s' je ozna-Bèena jako poru¹ená a mìla by být opravena" - dan "Tabellen '%-.64s' er markeret med fejl og bør repareres" - nla "Tabel '%-.64s' staat als gecrashed gemarkeerd en dient te worden gerepareerd" - eng "Table '%-.64s' is marked as crashed and should be repaired" - est "Tabel '%-.64s' on märgitud vigaseks ja tuleb parandada" - fre "La table '%-.64s' est marquée 'crashed' et devrait être réparée" - ger "Tabelle '%-.64s' ist als defekt markiert und sollte repariert werden" - ita "La tabella '%-.64s' e` segnalata come corrotta e deve essere riparata" - por "Tabela '%-.64s' está marcada como danificada e deve ser reparada" - rus "ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÄÏÌÖÎÁ ÐÒÏÊÔÉ ÐÒÏ×ÅÒËÕ É ÒÅÍÏÎÔ" - serbian "Tabela '%-.64s' je markirana kao ošteæena i trebala bi biti popravljena" - spa "Tabla '%-.64s' está marcada como crashed y debe ser reparada" - swe "Tabell '%-.64s' är trasig och bör repareras med REPAIR TABLE" - ukr "ôÁÂÌÉÃÀ '%-.64s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ §§ ÐÏÔÒ¦ÂÎÏ ×¦ÄÎÏ×ÉÔÉ" + cze "Tabulka '%-.192s' je ozna-Bèena jako poru¹ená a mìla by být opravena" + dan "Tabellen '%-.192s' er markeret med fejl og bør repareres" + nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en dient te worden gerepareerd" + eng "Table '%-.192s' is marked as crashed and should be repaired" + est "Tabel '%-.192s' on märgitud vigaseks ja tuleb parandada" + fre "La table '%-.192s' est marquée 'crashed' et devrait être réparée" + ger "Tabelle '%-.192s' ist als defekt markiert und sollte repariert werden" + ita "La tabella '%-.192s' e` segnalata come corrotta e deve essere riparata" + por "Tabela '%-.192s' está marcada como danificada e deve ser reparada" + rus "ôÁÂÌÉÃÁ '%-.192s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÄÏÌÖÎÁ ÐÒÏÊÔÉ ÐÒÏ×ÅÒËÕ É ÒÅÍÏÎÔ" + serbian "Tabela '%-.192s' je markirana kao ošteæena i trebala bi biti popravljena" + spa "Tabla '%-.192s' está marcada como crashed y debe ser reparada" + swe "Tabell '%-.192s' är trasig och bör repareras med REPAIR TABLE" + ukr "ôÁÂÌÉÃÀ '%-.192s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ §§ ÐÏÔÒ¦ÂÎÏ ×¦ÄÎÏ×ÉÔÉ" ER_CRASHED_ON_REPAIR - cze "Tabulka '%-.64s' je ozna-Bèena jako poru¹ená a poslední (automatická?) oprava se nezdaøila" - dan "Tabellen '%-.64s' er markeret med fejl og sidste (automatiske?) REPAIR fejlede" - nla "Tabel '%-.64s' staat als gecrashed gemarkeerd en de laatste (automatische?) reparatie poging mislukte" - eng "Table '%-.64s' is marked as crashed and last (automatic?) repair failed" - est "Tabel '%-.64s' on märgitud vigaseks ja viimane (automaatne?) parandus ebaõnnestus" - fre "La table '%-.64s' est marquée 'crashed' et le dernier 'repair' a échoué" - ger "Tabelle '%-.64s' ist als defekt markiert und der letzte (automatische?) Reparaturversuch schlug fehl" - ita "La tabella '%-.64s' e` segnalata come corrotta e l'ultima ricostruzione (automatica?) e` fallita" - por "Tabela '%-.64s' está marcada como danificada e a última reparação (automática?) falhou" - rus "ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÐÏÓÌÅÄÎÉÊ (Á×ÔÏÍÁÔÉÞÅÓËÉÊ?) ÒÅÍÏÎÔ ÎÅ ÂÙÌ ÕÓÐÅÛÎÙÍ" - serbian "Tabela '%-.64s' je markirana kao ošteæena, a zadnja (automatska?) popravka je bila neuspela" - spa "Tabla '%-.64s' está marcada como crashed y la última reparación (automactica?) falló" - swe "Tabell '%-.64s' är trasig och senast (automatiska?) reparation misslyckades" - ukr "ôÁÂÌÉÃÀ '%-.64s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ ÏÓÔÁÎΤ (Á×ÔÏÍÁÔÉÞÎÅ?) צÄÎÏ×ÌÅÎÎÑ ÎÅ ×ÄÁÌÏÓÑ" + cze "Tabulka '%-.192s' je ozna-Bèena jako poru¹ená a poslední (automatická?) oprava se nezdaøila" + dan "Tabellen '%-.192s' er markeret med fejl og sidste (automatiske?) REPAIR fejlede" + nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en de laatste (automatische?) reparatie poging mislukte" + eng "Table '%-.192s' is marked as crashed and last (automatic?) repair failed" + est "Tabel '%-.192s' on märgitud vigaseks ja viimane (automaatne?) parandus ebaõnnestus" + fre "La table '%-.192s' est marquée 'crashed' et le dernier 'repair' a échoué" + ger "Tabelle '%-.192s' ist als defekt markiert und der letzte (automatische?) Reparaturversuch schlug fehl" + ita "La tabella '%-.192s' e` segnalata come corrotta e l'ultima ricostruzione (automatica?) e` fallita" + por "Tabela '%-.192s' está marcada como danificada e a última reparação (automática?) falhou" + rus "ôÁÂÌÉÃÁ '%-.192s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÐÏÓÌÅÄÎÉÊ (Á×ÔÏÍÁÔÉÞÅÓËÉÊ?) ÒÅÍÏÎÔ ÎÅ ÂÙÌ ÕÓÐÅÛÎÙÍ" + serbian "Tabela '%-.192s' je markirana kao ošteæena, a zadnja (automatska?) popravka je bila neuspela" + spa "Tabla '%-.192s' está marcada como crashed y la última reparación (automactica?) falló" + swe "Tabell '%-.192s' är trasig och senast (automatiska?) reparation misslyckades" + ukr "ôÁÂÌÉÃÀ '%-.192s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ ÏÓÔÁÎΤ (Á×ÔÏÍÁÔÉÞÎÅ?) צÄÎÏ×ÌÅÎÎÑ ÎÅ ×ÄÁÌÏÓÑ" ER_WARNING_NOT_COMPLETE_ROLLBACK dan "Advarsel: Visse data i tabeller der ikke understøtter transaktioner kunne ikke tilbagestilles" nla "Waarschuwing: Roll back mislukt voor sommige buiten transacties gewijzigde tabellen" @@ -4438,18 +4438,18 @@ ER_WRONG_ARGUMENTS swe "Felaktiga argument till %s" ukr "èÉÂÎÉÊ ÁÒÇÕÍÅÎÔ ÄÌÑ %s" ER_NO_PERMISSION_TO_CREATE_USER 42000 - nla "'%-.32s'@'%-.64s' mag geen nieuwe gebruikers creeren" - eng "'%-.32s'@'%-.64s' is not allowed to create new users" - est "Kasutajal '%-.32s'@'%-.64s' ei ole lubatud luua uusi kasutajaid" - fre "'%-.32s'@'%-.64s' n'est pas autorisé à créer de nouveaux utilisateurs" - ger "'%-.32s'@'%-.64s' ist nicht berechtigt, neue Benutzer hinzuzufügen" - ita "A '%-.32s'@'%-.64s' non e' permesso creare nuovi utenti" - por "Não é permitido a '%-.32s'@'%-.64s' criar novos usuários" - rus "'%-.32s'@'%-.64s' ÎÅ ÒÁÚÒÅÛÁÅÔÓÑ ÓÏÚÄÁ×ÁÔØ ÎÏ×ÙÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ" - serbian "Korisniku '%-.32s'@'%-.64s' nije dozvoljeno da kreira nove korisnike" - spa "'%-.32s`@`%-.64s` no es permitido para crear nuevos usuarios" - swe "'%-.32s'@'%-.64s' har inte rättighet att skapa nya användare" - ukr "ëÏÒÉÓÔÕ×ÁÞÕ '%-.32s'@'%-.64s' ÎÅ ÄÏÚ×ÏÌÅÎÏ ÓÔ×ÏÒÀ×ÁÔÉ ÎÏ×ÉÈ ËÏÒÉÓÔÕ×ÁÞ¦×" + nla "'%-.48s'@'%-.64s' mag geen nieuwe gebruikers creeren" + eng "'%-.48s'@'%-.64s' is not allowed to create new users" + est "Kasutajal '%-.48s'@'%-.64s' ei ole lubatud luua uusi kasutajaid" + fre "'%-.48s'@'%-.64s' n'est pas autorisé à créer de nouveaux utilisateurs" + ger "'%-.48s'@'%-.64s' ist nicht berechtigt, neue Benutzer hinzuzufügen" + ita "A '%-.48s'@'%-.64s' non e' permesso creare nuovi utenti" + por "Não é permitido a '%-.48s'@'%-.64s' criar novos usuários" + rus "'%-.48s'@'%-.64s' ÎÅ ÒÁÚÒÅÛÁÅÔÓÑ ÓÏÚÄÁ×ÁÔØ ÎÏ×ÙÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ" + serbian "Korisniku '%-.48s'@'%-.64s' nije dozvoljeno da kreira nove korisnike" + spa "'%-.48s`@`%-.64s` no es permitido para crear nuevos usuarios" + swe "'%-.48s'@'%-.64s' har inte rättighet att skapa nya användare" + ukr "ëÏÒÉÓÔÕ×ÁÞÕ '%-.48s'@'%-.64s' ÎÅ ÄÏÚ×ÏÌÅÎÏ ÓÔ×ÏÒÀ×ÁÔÉ ÎÏ×ÉÈ ËÏÒÉÓÔÕ×ÁÞ¦×" ER_UNION_TABLES_IN_DIFFERENT_DIR nla "Incorrecte tabel definitie; alle MERGE tabellen moeten tot dezelfde database behoren" eng "Incorrect table definition; all MERGE tables must be in the same database" @@ -4715,19 +4715,19 @@ ER_SLAVE_IGNORED_TABLE spa "Slave SQL thread ignorado el query debido a las reglas de replicación-*-tabla" swe "Slav SQL tråden ignorerade frågan pga en replicate-*-table regel" ER_INCORRECT_GLOBAL_LOCAL_VAR - eng "Variable '%-.64s' is a %s variable" - serbian "Incorrect foreign key definition for '%-.64s': %s" - ger "Variable '%-.64s' ist eine %s-Variable" - nla "Variabele '%-.64s' is geen %s variabele" - spa "Variable '%-.64s' es una %s variable" - swe "Variabel '%-.64s' är av typ %s" + eng "Variable '%-.192s' is a %s variable" + serbian "Incorrect foreign key definition for '%-.192s': %s" + ger "Variable '%-.192s' ist eine %s-Variable" + nla "Variabele '%-.192s' is geen %s variabele" + spa "Variable '%-.192s' es una %s variable" + swe "Variabel '%-.192s' är av typ %s" ER_WRONG_FK_DEF 42000 - eng "Incorrect foreign key definition for '%-.64s': %s" - ger "Falsche Fremdschlüssel-Definition für '%-.64s': %s" - nla "Incorrecte foreign key definitie voor '%-.64s': %s" - por "Definição errada da chave estrangeira para '%-.64s': %s" - spa "Equivocada definición de llave extranjera para '%-.64s': %s" - swe "Felaktig FOREIGN KEY-definition för '%-.64s': %s" + eng "Incorrect foreign key definition for '%-.192s': %s" + ger "Falsche Fremdschlüssel-Definition für '%-.192s': %s" + nla "Incorrecte foreign key definitie voor '%-.192s': %s" + por "Definição errada da chave estrangeira para '%-.192s': %s" + spa "Equivocada definición de llave extranjera para '%-.192s': %s" + swe "Felaktig FOREIGN KEY-definition för '%-.192s': %s" ER_KEY_REF_DO_NOT_MATCH_TABLE_REF eng "Key reference and table reference don't match" ger "Schlüssel- und Tabellenverweis passen nicht zusammen" @@ -4811,12 +4811,12 @@ ER_SELECT_REDUCED 01000 swe "Select %u reducerades vid optimiering" ukr "Select %u was ÓËÁÓÏ×ÁÎÏ ÐÒÉ ÏÐÔÉÍiÚÁÃii" ER_TABLENAME_NOT_ALLOWED_HERE 42000 - eng "Table '%-.64s' from one of the SELECTs cannot be used in %-.32s" - ger "Tabelle '%-.64s', die in einem der SELECT-Befehle verwendet wurde, kann nicht in %-.32s verwendet werden" - nla "Tabel '%-.64s' uit een van de SELECTS kan niet in %-.32s gebruikt worden" - por "Tabela '%-.64s' de um dos SELECTs não pode ser usada em %-.32s" - spa "Tabla '%-.64s' de uno de los SELECT no puede ser usada en %-.32s" - swe "Tabell '%-.64s' från en SELECT kan inte användas i %-.32s" + eng "Table '%-.192s' from one of the SELECTs cannot be used in %-.32s" + ger "Tabelle '%-.192s', die in einem der SELECT-Befehle verwendet wurde, kann nicht in %-.32s verwendet werden" + nla "Tabel '%-.192s' uit een van de SELECTS kan niet in %-.32s gebruikt worden" + por "Tabela '%-.192s' de um dos SELECTs não pode ser usada em %-.32s" + spa "Tabla '%-.192s' de uno de los SELECT no puede ser usada en %-.32s" + swe "Tabell '%-.192s' från en SELECT kan inte användas i %-.32s" ER_NOT_SUPPORTED_AUTH_MODE 08004 eng "Client does not support authentication protocol requested by server; consider upgrading MySQL client" ger "Client unterstützt das vom Server erwartete Authentifizierungsprotokoll nicht. Bitte aktualisieren Sie Ihren MySQL-Client" @@ -4959,12 +4959,12 @@ ER_SERVER_IS_IN_SECURE_AUTH_MODE rus "óÅÒ×ÅÒ ÚÁÐÕÝÅÎ × ÒÅÖÉÍÅ --secure-auth (ÂÅÚÏÐÁÓÎÏÊ Á×ÔÏÒÉÚÁÃÉÉ), ÎÏ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%s'@'%s' ÐÁÒÏÌØ ÓÏÈÒÁÎ£Î × ÓÔÁÒÏÍ ÆÏÒÍÁÔÅ; ÎÅÏÂÈÏÄÉÍÏ ÏÂÎÏ×ÉÔØ ÆÏÒÍÁÔ ÐÁÒÏÌÑ" spa "Servidor está rodando en modo --secure-auth, pero '%s'@'%s' tiene clave en el antiguo formato; por favor cambie la clave para el nuevo formato" ER_WARN_FIELD_RESOLVED - eng "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d" - ger "Feld oder Verweis '%-.64s%s%-.64s%s%-.64s' im SELECT-Befehl Nr. %d wurde im SELECT-Befehl Nr. %d aufgelöst" - por "Campo ou referência '%-.64s%s%-.64s%s%-.64s' de SELECT #%d foi resolvido em SELECT #%d" - rus "ðÏÌÅ ÉÌÉ ÓÓÙÌËÁ '%-.64s%s%-.64s%s%-.64s' ÉÚ SELECTÁ #%d ÂÙÌÁ ÎÁÊÄÅÎÁ × SELECTÅ #%d" - spa "Campo o referencia '%-.64s%s%-.64s%s%-.64s' de SELECT #%d fue resolvido en SELECT #%d" - ukr "óÔÏ×ÂÅÃØ ÁÂÏ ÐÏÓÉÌÁÎÎÑ '%-.64s%s%-.64s%s%-.64s' ¦Ú SELECTÕ #%d ÂÕÌÏ ÚÎÁÊÄÅÎÅ Õ SELECT¦ #%d" + eng "Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d" + ger "Feld oder Verweis '%-.192s%s%-.192s%s%-.192s' im SELECT-Befehl Nr. %d wurde im SELECT-Befehl Nr. %d aufgelöst" + por "Campo ou referência '%-.192s%s%-.192s%s%-.192s' de SELECT #%d foi resolvido em SELECT #%d" + rus "ðÏÌÅ ÉÌÉ ÓÓÙÌËÁ '%-.192s%s%-.192s%s%-.192s' ÉÚ SELECTÁ #%d ÂÙÌÁ ÎÁÊÄÅÎÁ × SELECTÅ #%d" + spa "Campo o referencia '%-.192s%s%-.192s%s%-.192s' de SELECT #%d fue resolvido en SELECT #%d" + ukr "óÔÏ×ÂÅÃØ ÁÂÏ ÐÏÓÉÌÁÎÎÑ '%-.192s%s%-.192s%s%-.192s' ¦Ú SELECTÕ #%d ÂÕÌÏ ÚÎÁÊÄÅÎÅ Õ SELECT¦ #%d" ER_BAD_SLAVE_UNTIL_COND eng "Incorrect parameter or combination of parameters for START SLAVE UNTIL" ger "Falscher Parameter oder falsche Kombination von Parametern für START SLAVE UNTIL" @@ -5001,11 +5001,11 @@ ER_WARN_QC_RESIZE swe "Storleken av "Query cache" kunde inte sättas till %lu, ny storlek är %lu" ukr "ëÅÛ ÚÁÐÉÔ¦× ÎÅÓÐÒÏÍÏÖÅÎ ×ÓÔÁÎÏ×ÉÔÉ ÒÏÚÍ¦Ò %lu, ÎÏ×ÉÊ ÒÏÚÍ¦Ò ËÅÛÁ ÚÁÐÉÔ¦× - %lu" ER_BAD_FT_COLUMN - eng "Column '%-.64s' cannot be part of FULLTEXT index" - ger "Feld '%-.64s' kann nicht Teil eines FULLTEXT-Index sein" - por "Coluna '%-.64s' não pode ser parte de índice FULLTEXT" - spa "Columna '%-.64s' no puede ser parte de FULLTEXT index" - swe "Kolumn '%-.64s' kan inte vara del av ett FULLTEXT index" + eng "Column '%-.192s' cannot be part of FULLTEXT index" + ger "Feld '%-.192s' kann nicht Teil eines FULLTEXT-Index sein" + por "Coluna '%-.192s' não pode ser parte de índice FULLTEXT" + spa "Columna '%-.192s' no puede ser parte de FULLTEXT index" + swe "Kolumn '%-.192s' kan inte vara del av ett FULLTEXT index" ER_UNKNOWN_KEY_CACHE eng "Unknown key cache '%-.100s'" ger "Unbekannter Schlüssel-Cache '%-.100s'" @@ -5063,10 +5063,10 @@ ER_TOO_MUCH_AUTO_TIMESTAMP_COLS por "Incorreta definição de tabela; Pode ter somente uma coluna TIMESTAMP com CURRENT_TIMESTAMP em DEFAULT ou ON UPDATE cláusula" spa "Incorrecta definición de tabla; Solamente debe haber una columna TIMESTAMP con CURRENT_TIMESTAMP en DEFAULT o ON UPDATE cláusula" ER_INVALID_ON_UPDATE - eng "Invalid ON UPDATE clause for '%-.64s' column" - ger "Ungültige ON-UPDATE-Klausel für Spalte '%-.64s'" - por "Inválida cláusula ON UPDATE para campo '%-.64s'" - spa "Inválido ON UPDATE cláusula para campo '%-.64s'" + eng "Invalid ON UPDATE clause for '%-.192s' column" + ger "Ungültige ON-UPDATE-Klausel für Spalte '%-.192s'" + por "Inválida cláusula ON UPDATE para campo '%-.192s'" + spa "Inválido ON UPDATE cláusula para campo '%-.192s'" ER_UNSUPPORTED_PS eng "This command is not supported in the prepared statement protocol yet" ger "Dieser Befehl wird im Protokoll für vorbereitete Anweisungen noch nicht unterstützt" @@ -5209,50 +5209,50 @@ ER_SP_CASE_NOT_FOUND 20000 eng "Case not found for CASE statement" ger "Fall für CASE-Anweisung nicht gefunden" ER_FPARSER_TOO_BIG_FILE - eng "Configuration file '%-.64s' is too big" - ger "Konfigurationsdatei '%-.64s' ist zu groß" - rus "óÌÉÛËÏÍ ÂÏÌØÛÏÊ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÙÊ ÆÁÊÌ '%-.64s'" - ukr "úÁÎÁÄÔÏ ×ÅÌÉËÉÊ ËÏÎÆ¦ÇÕÒÁæÊÎÉÊ ÆÁÊÌ '%-.64s'" + eng "Configuration file '%-.192s' is too big" + ger "Konfigurationsdatei '%-.192s' ist zu groß" + rus "óÌÉÛËÏÍ ÂÏÌØÛÏÊ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÙÊ ÆÁÊÌ '%-.192s'" + ukr "úÁÎÁÄÔÏ ×ÅÌÉËÉÊ ËÏÎÆ¦ÇÕÒÁæÊÎÉÊ ÆÁÊÌ '%-.192s'" ER_FPARSER_BAD_HEADER - eng "Malformed file type header in file '%-.64s'" - ger "Nicht wohlgeformter Dateityp-Header in Datei '%-.64s'" - rus "îÅ×ÅÒÎÙÊ ÚÁÇÏÌÏ×ÏË ÔÉÐÁ ÆÁÊÌÁ '%-.64s'" - ukr "îÅצÒÎÉÊ ÚÁÇÏÌÏ×ÏË ÔÉÐÕ Õ ÆÁÊ̦ '%-.64s'" + eng "Malformed file type header in file '%-.192s'" + ger "Nicht wohlgeformter Dateityp-Header in Datei '%-.192s'" + rus "îÅ×ÅÒÎÙÊ ÚÁÇÏÌÏ×ÏË ÔÉÐÁ ÆÁÊÌÁ '%-.192s'" + ukr "îÅצÒÎÉÊ ÚÁÇÏÌÏ×ÏË ÔÉÐÕ Õ ÆÁÊ̦ '%-.192s'" ER_FPARSER_EOF_IN_COMMENT eng "Unexpected end of file while parsing comment '%-.200s'" ger "Unerwartetes Dateiende beim Parsen des Kommentars '%-.200s'" rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ × ËÏÍÅÎÔÁÒÉÉ '%-.200s'" ukr "îÅÓÐÏĦ×ÁÎÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ Õ ËÏÍÅÎÔÁÒ¦ '%-.200s'" ER_FPARSER_ERROR_IN_PARAMETER - eng "Error while parsing parameter '%-.64s' (line: '%-.64s')" - ger "Fehler beim Parsen des Parameters '%-.64s' (Zeile: '%-.64s')" - rus "ïÛÉÂËÁ ÐÒÉ ÒÁÓÐÏÚÎÁ×ÁÎÉÉ ÐÁÒÁÍÅÔÒÁ '%-.64s' (ÓÔÒÏËÁ: '%-.64s')" - ukr "ðÏÍÉÌËÁ × ÒÏÓЦÚÎÁ×ÁÎΦ ÐÁÒÁÍÅÔÒÕ '%-.64s' (ÒÑÄÏË: '%-.64s')" + eng "Error while parsing parameter '%-.192s' (line: '%-.192s')" + ger "Fehler beim Parsen des Parameters '%-.192s' (Zeile: '%-.192s')" + rus "ïÛÉÂËÁ ÐÒÉ ÒÁÓÐÏÚÎÁ×ÁÎÉÉ ÐÁÒÁÍÅÔÒÁ '%-.192s' (ÓÔÒÏËÁ: '%-.192s')" + ukr "ðÏÍÉÌËÁ × ÒÏÓЦÚÎÁ×ÁÎΦ ÐÁÒÁÍÅÔÒÕ '%-.192s' (ÒÑÄÏË: '%-.192s')" ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER - eng "Unexpected end of file while skipping unknown parameter '%-.64s'" - ger "Unerwartetes Dateiende beim Überspringen des unbekannten Parameters '%-.64s'" - rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ ÐÒÉ ÐÒÏÐÕÓËÅ ÎÅÉÚ×ÅÓÔÎÏÇÏ ÐÁÒÁÍÅÔÒÁ '%-.64s'" - ukr "îÅÓÐÏĦ×ÁÎÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ Õ ÓÐÒϦ ÐÒÏÍÉÎÕÔÉ ÎÅצÄÏÍÉÊ ÐÁÒÁÍÅÔÒ '%-.64s'" + eng "Unexpected end of file while skipping unknown parameter '%-.192s'" + ger "Unerwartetes Dateiende beim Überspringen des unbekannten Parameters '%-.192s'" + rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ ÐÒÉ ÐÒÏÐÕÓËÅ ÎÅÉÚ×ÅÓÔÎÏÇÏ ÐÁÒÁÍÅÔÒÁ '%-.192s'" + ukr "îÅÓÐÏĦ×ÁÎÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ Õ ÓÐÒϦ ÐÒÏÍÉÎÕÔÉ ÎÅצÄÏÍÉÊ ÐÁÒÁÍÅÔÒ '%-.192s'" ER_VIEW_NO_EXPLAIN eng "EXPLAIN/SHOW can not be issued; lacking privileges for underlying table" ger "EXPLAIN/SHOW kann nicht verlangt werden. Rechte für zugrunde liegende Tabelle fehlen" rus "EXPLAIN/SHOW ÎÅ ÍÏÖÅÔ ÂÙÔØ ×ÙÐÏÌÎÅÎÎÏ; ÎÅÄÏÓÔÁÔÏÞÎÏ ÐÒÁ× ÎÁ ÔÁËÂÌÉÃÙ ÚÁÐÒÏÓÁ" ukr "EXPLAIN/SHOW ÎÅ ÍÏÖÅ ÂÕÔÉ ×¦ËÏÎÁÎÏ; ÎÅÍÁ¤ ÐÒÁ× ÎÁ ÔÉÂÌÉæ ÚÁÐÉÔÕ" ER_FRM_UNKNOWN_TYPE - eng "File '%-.64s' has unknown type '%-.64s' in its header" - ger "Datei '%-.64s' hat unbekannten Typ '%-.64s' im Header" - rus "æÁÊÌ '%-.64s' ÓÏÄÅÒÖÉÔ ÎÅÉÚ×ÅÓÔÎÙÊ ÔÉÐ '%-.64s' × ÚÁÇÏÌÏ×ËÅ" - ukr "æÁÊÌ '%-.64s' ÍÁ¤ ÎÅצÄÏÍÉÊ ÔÉÐ '%-.64s' Õ ÚÁÇÏÌÏ×ËÕ" + eng "File '%-.192s' has unknown type '%-.64s' in its header" + ger "Datei '%-.192s' hat unbekannten Typ '%-.64s' im Header" + rus "æÁÊÌ '%-.192s' ÓÏÄÅÒÖÉÔ ÎÅÉÚ×ÅÓÔÎÙÊ ÔÉÐ '%-.64s' × ÚÁÇÏÌÏ×ËÅ" + ukr "æÁÊÌ '%-.192s' ÍÁ¤ ÎÅצÄÏÍÉÊ ÔÉÐ '%-.64s' Õ ÚÁÇÏÌÏ×ËÕ" ER_WRONG_OBJECT - eng "'%-.64s.%-.64s' is not %s" - ger "'%-.64s.%-.64s' ist nicht %s" - rus "'%-.64s.%-.64s' - ÎÅ %s" - ukr "'%-.64s.%-.64s' ÎÅ ¤ %s" + eng "'%-.192s.%-.192s' is not %s" + ger "'%-.192s.%-.192s' ist nicht %s" + rus "'%-.192s.%-.192s' - ÎÅ %s" + ukr "'%-.192s.%-.192s' ÎÅ ¤ %s" ER_NONUPDATEABLE_COLUMN - eng "Column '%-.64s' is not updatable" - ger "Feld '%-.64s' ist nicht aktualisierbar" - rus "óÔÏÌÂÅà '%-.64s' ÎÅ ÏÂÎÏ×ÌÑÅÍÙÊ" - ukr "óÔÏ×ÂÅÃØ '%-.64s' ÎÅ ÍÏÖÅ ÂÕÔÉ ÚÍÉÎÅÎÉÊ" + eng "Column '%-.192s' is not updatable" + ger "Feld '%-.192s' ist nicht aktualisierbar" + rus "óÔÏÌÂÅà '%-.192s' ÎÅ ÏÂÎÏ×ÌÑÅÍÙÊ" + ukr "óÔÏ×ÂÅÃØ '%-.192s' ÎÅ ÍÏÖÅ ÂÕÔÉ ÚÍÉÎÅÎÉÊ" ER_VIEW_SELECT_DERIVED eng "View's SELECT contains a subquery in the FROM clause" ger "SELECT der View enthält eine Subquery in der FROM-Klausel" @@ -5269,10 +5269,10 @@ ER_VIEW_SELECT_VARIABLE rus "View SELECT ÓÏÄÅÒÖÉÔ ÐÅÒÅÍÅÎÎÕÀ ÉÌÉ ÐÁÒÁÍÅÔÒ" ukr "View SELECT ÍÁ¤ ÚÍÉÎÎÕ ÁÂÏ ÐÁÒÁÍÅÔÅÒ" ER_VIEW_SELECT_TMPTABLE - eng "View's SELECT refers to a temporary table '%-.64s'" - ger "SELECT der View verweist auf eine temporäre Tabelle '%-.64s'" - rus "View SELECT ÓÏÄÅÒÖÉÔ ÓÓÙÌËÕ ÎÁ ×ÒÅÍÅÎÎÕÀ ÔÁÂÌÉÃÕ '%-.64s'" - ukr "View SELECT ×ÉËÏÒÉÓÔÏ×Õ¤ ÔÉÍÞÁÓÏ×Õ ÔÁÂÌÉÃÀ '%-.64s'" + eng "View's SELECT refers to a temporary table '%-.192s'" + ger "SELECT der View verweist auf eine temporäre Tabelle '%-.192s'" + rus "View SELECT ÓÏÄÅÒÖÉÔ ÓÓÙÌËÕ ÎÁ ×ÒÅÍÅÎÎÕÀ ÔÁÂÌÉÃÕ '%-.192s'" + ukr "View SELECT ×ÉËÏÒÉÓÔÏ×Õ¤ ÔÉÍÞÁÓÏ×Õ ÔÁÂÌÉÃÀ '%-.192s'" ER_VIEW_WRONG_LIST eng "View's SELECT and view's field list have different column counts" ger "SELECT- und Feldliste der Views haben unterschiedliche Anzahlen von Spalten" @@ -5289,7 +5289,7 @@ ER_WARN_VIEW_WITHOUT_KEY rus "ïÂÎÏ×ÌÑÅÍÙÊ view ÎÅ ÓÏÄÅÒÖÉÔ ËÌÀÞÁ ÉÓÐÏÌØÚÏ×ÁÎÎÙÈ(ÏÊ) × ÎÅÍ ÔÁÂÌÉÃ(Ù)" ukr "View, ÝÏ ÏÎÏ×ÌÀÅÔØÓÑ, ΊͦÓÔÉÔØ ÐÏ×ÎÏÇÏ ËÌÀÞÁ ÔÁÂÌÉæ(Ø), ÝÏ ×ÉËÏÒ¦ÓÔÁÎÁ × ÎØÀÏÍÕ" ER_VIEW_INVALID - eng "View '%-.64s.%-.64s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" + eng "View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" ER_SP_NO_DROP_SP eng "Can't drop or alter a %s from within another stored routine" ger "Kann eine %s nicht von innerhalb einer anderen gespeicherten Routine löschen oder ändern" @@ -5303,8 +5303,8 @@ ER_TRG_DOES_NOT_EXIST eng "Trigger does not exist" ger "Trigger existiert nicht" ER_TRG_ON_VIEW_OR_TEMP_TABLE - eng "Trigger's '%-.64s' is view or temporary table" - ger "'%-.64s' des Triggers ist View oder temporäre Tabelle" + eng "Trigger's '%-.192s' is view or temporary table" + ger "'%-.192s' des Triggers ist View oder temporäre Tabelle" ER_TRG_CANT_CHANGE_ROW eng "Updating of %s row is not allowed in %strigger" ger "Aktualisieren einer %s-Zeile ist in einem %s-Trigger nicht erlaubt" @@ -5312,30 +5312,30 @@ ER_TRG_NO_SUCH_ROW_IN_TRG eng "There is no %s row in %s trigger" ger "Es gibt keine %s-Zeile im %s-Trigger" ER_NO_DEFAULT_FOR_FIELD - eng "Field '%-.64s' doesn't have a default value" - ger "Feld '%-.64s' hat keinen Vorgabewert" + eng "Field '%-.192s' doesn't have a default value" + ger "Feld '%-.192s' hat keinen Vorgabewert" ER_DIVISION_BY_ZERO 22012 eng "Division by 0" ger "Division durch 0" ER_TRUNCATED_WRONG_VALUE_FOR_FIELD - eng "Incorrect %-.32s value: '%-.128s' for column '%.64s' at row %ld" - ger "Falscher %-.32s-Wert: '%-.128s' für Feld '%.64s' in Zeile %ld" + eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld" + ger "Falscher %-.32s-Wert: '%-.128s' für Feld '%.192s' in Zeile %ld" ER_ILLEGAL_VALUE_FOR_TYPE 22007 - eng "Illegal %s '%-.64s' value found during parsing" - ger "Nicht zulässiger %s-Wert '%-.64s' beim Parsen gefunden" + eng "Illegal %s '%-.192s' value found during parsing" + ger "Nicht zulässiger %s-Wert '%-.192s' beim Parsen gefunden" ER_VIEW_NONUPD_CHECK - eng "CHECK OPTION on non-updatable view '%-.64s.%-.64s'" - ger "CHECK OPTION auf nicht-aktualisierbarem View '%-.64s.%-.64s'" - rus "CHECK OPTION ÄÌÑ ÎÅÏÂÎÏ×ÌÑÅÍÏÇÏ VIEW '%-.64s.%-.64s'" - ukr "CHECK OPTION ÄÌÑ VIEW '%-.64s.%-.64s' ÝÏ ÎÅ ÍÏÖÅ ÂÕÔÉ ÏÎÏ×ÌÅÎÎÉÍ" + eng "CHECK OPTION on non-updatable view '%-.192s.%-.192s'" + ger "CHECK OPTION auf nicht-aktualisierbarem View '%-.192s.%-.192s'" + rus "CHECK OPTION ÄÌÑ ÎÅÏÂÎÏ×ÌÑÅÍÏÇÏ VIEW '%-.192s.%-.192s'" + ukr "CHECK OPTION ÄÌÑ VIEW '%-.192s.%-.192s' ÝÏ ÎÅ ÍÏÖÅ ÂÕÔÉ ÏÎÏ×ÌÅÎÎÉÍ" ER_VIEW_CHECK_FAILED - eng "CHECK OPTION failed '%-.64s.%-.64s'" - ger "CHECK OPTION fehlgeschlagen: '%-.64s.%-.64s'" - rus "ÐÒÏ×ÅÒËÁ CHECK OPTION ÄÌÑ VIEW '%-.64s.%-.64s' ÐÒÏ×ÁÌÉÌÁÓØ" - ukr "ðÅÒÅצÒËÁ CHECK OPTION ÄÌÑ VIEW '%-.64s.%-.64s' ÎÅ ÐÒÏÊÛÌÁ" + eng "CHECK OPTION failed '%-.192s.%-.192s'" + ger "CHECK OPTION fehlgeschlagen: '%-.192s.%-.192s'" + rus "ÐÒÏ×ÅÒËÁ CHECK OPTION ÄÌÑ VIEW '%-.192s.%-.192s' ÐÒÏ×ÁÌÉÌÁÓØ" + ukr "ðÅÒÅצÒËÁ CHECK OPTION ÄÌÑ VIEW '%-.192s.%-.192s' ÎÅ ÐÒÏÊÛÌÁ" ER_PROCACCESS_DENIED_ERROR 42000 - eng "%-.16s command denied to user '%-.32s'@'%-.64s' for routine '%-.64s'" - ger "Befehl %-.16s nicht zulässig für Benutzer '%-.32s'@'%-.64s' in Routine '%-.64s'" + eng "%-.16s command denied to user '%-.48s'@'%-.64s' for routine '%-.192s'" + ger "Befehl %-.16s nicht zulässig für Benutzer '%-.48s'@'%-.64s' in Routine '%-.192s'" ER_RELAY_LOG_FAIL eng "Failed purging old relay logs: %s" ger "Bereinigen alter Relais-Logs fehlgeschlagen: %s" @@ -5397,28 +5397,28 @@ ER_PS_MANY_PARAM eng "Prepared statement contains too many placeholders" ger "Vorbereitete Anweisung enthält zu viele Platzhalter" ER_KEY_PART_0 - eng "Key part '%-.64s' length cannot be 0" - ger "Länge des Schlüsselteils '%-.64s' kann nicht 0 sein" + eng "Key part '%-.192s' length cannot be 0" + ger "Länge des Schlüsselteils '%-.192s' kann nicht 0 sein" ER_VIEW_CHECKSUM eng "View text checksum failed" ger "View-Text-Prüfsumme fehlgeschlagen" rus "ðÒÏ×ÅÒËÁ ËÏÎÔÒÏÌØÎÏÊ ÓÕÍÍÙ ÔÅËÓÔÁ VIEW ÐÒÏ×ÁÌÉÌÁÓØ" ukr "ðÅÒÅצÒËÁ ËÏÎÔÒÏÌØÎϧ ÓÕÍÉ ÔÅËÓÔÕ VIEW ÎÅ ÐÒÏÊÛÌÁ" ER_VIEW_MULTIUPDATE - eng "Can not modify more than one base table through a join view '%-.64s.%-.64s'" - ger "Kann nicht mehr als eine Basistabelle über Join-View '%-.64s.%-.64s' ändern" - rus "îÅÌØÚÑ ÉÚÍÅÎÉÔØ ÂÏÌØÛÅ ÞÅÍ ÏÄÎÕ ÂÁÚÏ×ÕÀ ÔÁÂÌÉÃÕ ÉÓÐÏÌØÚÕÑ ÍÎÏÇÏÔÁÂÌÉÞÎÙÊ VIEW '%-.64s.%-.64s'" - ukr "îÅÍÏÖÌÉ×Ï ÏÎÏ×ÉÔÉ Â¦ÌØÛ ÎÉÖ ÏÄÎÕ ÂÁÚÏ×Õ ÔÁÂÌÉÃÀ ×ÙËÏÒÉÓÔÏ×ÕÀÞÉ VIEW '%-.64s.%-.64s', ÝÏ Í¦ÓÔ¦ÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ" + eng "Can not modify more than one base table through a join view '%-.192s.%-.192s'" + ger "Kann nicht mehr als eine Basistabelle über Join-View '%-.192s.%-.192s' ändern" + rus "îÅÌØÚÑ ÉÚÍÅÎÉÔØ ÂÏÌØÛÅ ÞÅÍ ÏÄÎÕ ÂÁÚÏ×ÕÀ ÔÁÂÌÉÃÕ ÉÓÐÏÌØÚÕÑ ÍÎÏÇÏÔÁÂÌÉÞÎÙÊ VIEW '%-.192s.%-.192s'" + ukr "îÅÍÏÖÌÉ×Ï ÏÎÏ×ÉÔÉ Â¦ÌØÛ ÎÉÖ ÏÄÎÕ ÂÁÚÏ×Õ ÔÁÂÌÉÃÀ ×ÙËÏÒÉÓÔÏ×ÕÀÞÉ VIEW '%-.192s.%-.192s', ÝÏ Í¦ÓÔ¦ÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ" ER_VIEW_NO_INSERT_FIELD_LIST - eng "Can not insert into join view '%-.64s.%-.64s' without fields list" - ger "Kann nicht ohne Feldliste in Join-View '%-.64s.%-.64s' einfügen" - rus "îÅÌØÚÑ ×ÓÔÁ×ÌÑÔØ ÚÁÐÉÓÉ × ÍÎÏÇÏÔÁÂÌÉÞÎÙÊ VIEW '%-.64s.%-.64s' ÂÅÚ ÓÐÉÓËÁ ÐÏÌÅÊ" - ukr "îÅÍÏÖÌÉ×Ï ÕÓÔÁ×ÉÔÉ ÒÑÄËÉ Õ VIEW '%-.64s.%-.64s', ÝÏ Í¦ÓÔÉÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ, ÂÅÚ ÓÐÉÓËÕ ÓÔÏ×Âæ×" + eng "Can not insert into join view '%-.192s.%-.192s' without fields list" + ger "Kann nicht ohne Feldliste in Join-View '%-.192s.%-.192s' einfügen" + rus "îÅÌØÚÑ ×ÓÔÁ×ÌÑÔØ ÚÁÐÉÓÉ × ÍÎÏÇÏÔÁÂÌÉÞÎÙÊ VIEW '%-.192s.%-.192s' ÂÅÚ ÓÐÉÓËÁ ÐÏÌÅÊ" + ukr "îÅÍÏÖÌÉ×Ï ÕÓÔÁ×ÉÔÉ ÒÑÄËÉ Õ VIEW '%-.192s.%-.192s', ÝÏ Í¦ÓÔÉÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ, ÂÅÚ ÓÐÉÓËÕ ÓÔÏ×Âæ×" ER_VIEW_DELETE_MERGE_VIEW - eng "Can not delete from join view '%-.64s.%-.64s'" - ger "Kann nicht aus Join-View '%-.64s.%-.64s' löschen" - rus "îÅÌØÚÑ ÕÄÁÌÑÔØ ÉÚ ÍÎÏÇÏÔÁÂÌÉÞÎÏÇÏ VIEW '%-.64s.%-.64s'" - ukr "îÅÍÏÖÌÉ×Ï ×ÉÄÁÌÉÔÉ ÒÑÄËÉ Õ VIEW '%-.64s.%-.64s', ÝÏ Í¦ÓÔÉÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ" + eng "Can not delete from join view '%-.192s.%-.192s'" + ger "Kann nicht aus Join-View '%-.192s.%-.192s' löschen" + rus "îÅÌØÚÑ ÕÄÁÌÑÔØ ÉÚ ÍÎÏÇÏÔÁÂÌÉÞÎÏÇÏ VIEW '%-.192s.%-.192s'" + ukr "îÅÍÏÖÌÉ×Ï ×ÉÄÁÌÉÔÉ ÒÑÄËÉ Õ VIEW '%-.192s.%-.192s', ÝÏ Í¦ÓÔÉÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ" ER_CANNOT_USER eng "Operation %s failed for %.256s" ger "Operation %s schlug fehl für %.256s" @@ -5443,8 +5443,8 @@ ER_XA_RBROLLBACK XA100 eng "XA_RBROLLBACK: Transaction branch was rolled back" ger "XA_RBROLLBACK: Transaktionszweig wurde zurückgerollt" ER_NONEXISTING_PROC_GRANT 42000 - eng "There is no such grant defined for user '%-.32s' on host '%-.64s' on routine '%-.64s'" - ger "Es gibt diese Berechtigung für Benutzer '%-.32s' auf Host '%-.64s' für Routine '%-.64s' nicht" + eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on routine '%-.192s'" + ger "Es gibt diese Berechtigung für Benutzer '%-.48s' auf Host '%-.64s' für Routine '%-.192s' nicht" ER_PROC_AUTO_GRANT_FAIL eng "Failed to grant EXECUTE and ALTER ROUTINE privileges" ger "Gewährung von EXECUTE- und ALTER-ROUTINE-Rechten fehlgeschlagen" @@ -5503,20 +5503,20 @@ ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG eng "Explicit or implicit commit is not allowed in stored function or trigger." ger "Explizites oder implizites Commit ist in gespeicherten Funktionen und in Triggern nicht erlaubt" ER_NO_DEFAULT_FOR_VIEW_FIELD - eng "Field of view '%-.64s.%-.64s' underlying table doesn't have a default value" - ger "Ein Feld der dem View '%-.64s.%-.64s' zugrundeliegenden Tabelle hat keinen Vorgabewert" + eng "Field of view '%-.192s.%-.192s' underlying table doesn't have a default value" + ger "Ein Feld der dem View '%-.192s.%-.192s' zugrundeliegenden Tabelle hat keinen Vorgabewert" ER_SP_NO_RECURSION eng "Recursive stored functions and triggers are not allowed." ger "Rekursive gespeicherte Routinen und Triggers sind nicht erlaubt" ER_TOO_BIG_SCALE 42000 S1009 - eng "Too big scale %d specified for column '%-.64s'. Maximum is %d." - ger "Zu großer Skalierungsfaktor %d für Feld '%-.64s' angegeben. Maximum ist %d" + eng "Too big scale %d specified for column '%-.192s'. Maximum is %d." + ger "Zu großer Skalierungsfaktor %d für Feld '%-.192s' angegeben. Maximum ist %d" ER_TOO_BIG_PRECISION 42000 S1009 - eng "Too big precision %d specified for column '%-.64s'. Maximum is %d." - ger "Zu große Genauigkeit %d für Feld '%-.64s' angegeben. Maximum ist %d" + eng "Too big precision %d specified for column '%-.192s'. Maximum is %d." + ger "Zu große Genauigkeit %d für Feld '%-.192s' angegeben. Maximum ist %d" ER_M_BIGGER_THAN_D 42000 S1009 - eng "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.64s')." - ger "Für FLOAT(M,D), DOUBLE(M,D) oder DECIMAL(M,D) muss M >= D sein (Feld '%-.64s')" + eng "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s')." + ger "Für FLOAT(M,D), DOUBLE(M,D) oder DECIMAL(M,D) muss M >= D sein (Feld '%-.192s')" ER_WRONG_LOCK_OF_SYSTEM_TABLE eng "You can't combine write-locking of system tables with other tables or lock types" ER_CONNECT_TO_FOREIGN_DATA_SOURCE @@ -5550,8 +5550,8 @@ ER_WARN_CANT_DROP_DEFAULT_KEYCACHE eng "Cannot drop default keycache" ger "Der vorgabemäßige Schlüssel-Cache kann nicht gelöscht werden" ER_TOO_BIG_DISPLAYWIDTH 42000 S1009 - eng "Display width out of range for column '%-.64s' (max = %d)" - ger "Anzeigebreite außerhalb des zulässigen Bereichs für Spalte '%-.64s' (Maximum: %d)" + eng "Display width out of range for column '%-.192s' (max = %d)" + ger "Anzeigebreite außerhalb des zulässigen Bereichs für Spalte '%-.192s' (Maximum: %d)" ER_XAER_DUPID XAE08 eng "XAER_DUPID: The XID already exists" ger "XAER_DUPID: Die XID existiert bereits" @@ -5559,11 +5559,11 @@ ER_DATETIME_FUNCTION_OVERFLOW 22008 eng "Datetime function: %-.32s field overflow" ger "Datetime-Funktion: %-.32s Feldüberlauf" ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG - eng "Can't update table '%-.64s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger." - ger "Kann Tabelle '%-.64s' in gespeicherter Funktion oder Trigger nicht aktualisieren, weil sie bereits von der Anweisung verwendet wird, die diese gespeicherte Funktion oder den Trigger aufrief" + eng "Can't update table '%-.192s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger." + ger "Kann Tabelle '%-.192s' in gespeicherter Funktion oder Trigger nicht aktualisieren, weil sie bereits von der Anweisung verwendet wird, die diese gespeicherte Funktion oder den Trigger aufrief" ER_VIEW_PREVENT_UPDATE - eng "The definition of table '%-.64s' prevents operation %.64s on table '%-.64s'." - ger "Die Definition der Tabelle '%-.64s' verhindert die Operation %.64s auf Tabelle '%-.64s'" + eng "The definition of table '%-.192s' prevents operation %.192s on table '%-.192s'." + ger "Die Definition der Tabelle '%-.192s' verhindert die Operation %.192s auf Tabelle '%-.192s'" ER_PS_NO_RECURSION eng "The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner" ger "Die vorbereitete Anweisung enthält einen Aufruf einer gespeicherten Routine, die auf eben dieselbe Anweisung verweist. Es ist nicht erlaubt, eine vorbereitete Anweisung in solch rekursiver Weise auszuführen" @@ -5574,17 +5574,17 @@ ER_MALFORMED_DEFINER eng "Definer is not fully qualified" ger "Definierer des View ist nicht vollständig spezifiziert" ER_VIEW_FRM_NO_USER - eng "View '%-.64s'.'%-.64s' has no definer information (old table format). Current user is used as definer. Please recreate the view!" - ger "View '%-.64s'.'%-.64s' hat keine Definierer-Information (altes Tabellenformat). Der aktuelle Benutzer wird als Definierer verwendet. Bitte erstellen Sie den View neu" + eng "View '%-.192s'.'%-.192s' has no definer information (old table format). Current user is used as definer. Please recreate the view!" + ger "View '%-.192s'.'%-.192s' hat keine Definierer-Information (altes Tabellenformat). Der aktuelle Benutzer wird als Definierer verwendet. Bitte erstellen Sie den View neu" ER_VIEW_OTHER_USER - eng "You need the SUPER privilege for creation view with '%-.64s'@'%-.64s' definer" - ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.64s'@'%-.64s' zu erzeugen" + eng "You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer" + ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.192s'@'%-.192s' zu erzeugen" ER_NO_SUCH_USER eng "There is no '%-.64s'@'%-.64s' registered" ger "'%-.64s'@'%-.64s' ist nicht registriert" ER_FORBID_SCHEMA_CHANGE - eng "Changing schema from '%-.64s' to '%-.64s' is not allowed." - ger "Wechsel des Schemas von '%-.64s' auf '%-.64s' ist nicht erlaubt" + eng "Changing schema from '%-.192s' to '%-.192s' is not allowed." + ger "Wechsel des Schemas von '%-.192s' auf '%-.192s' ist nicht erlaubt" ER_ROW_IS_REFERENCED_2 23000 eng "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)" ger "Kann Eltern-Zeile nicht löschen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%.192s)" @@ -5595,22 +5595,22 @@ ER_SP_BAD_VAR_SHADOW 42000 eng "Variable '%-.64s' must be quoted with `...`, or renamed" ger "Variable '%-.64s' muss mit `...` geschützt oder aber umbenannt werden" ER_TRG_NO_DEFINER - eng "No definer attribute for trigger '%-.64s'.'%-.64s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger." - ger "Kein Definierer-Attribut für Trigger '%-.64s'.'%-.64s'. Der Trigger wird mit der Autorisierung des Aufrufers aktiviert, der möglicherweise keine zureichenden Berechtigungen hat. Bitte legen Sie den Trigger neu an." + eng "No definer attribute for trigger '%-.192s'.'%-.192s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger." + ger "Kein Definierer-Attribut für Trigger '%-.192s'.'%-.192s'. Der Trigger wird mit der Autorisierung des Aufrufers aktiviert, der möglicherweise keine zureichenden Berechtigungen hat. Bitte legen Sie den Trigger neu an." ER_OLD_FILE_FORMAT - eng "'%-.64s' has an old format, you should re-create the '%s' object(s)" - ger "'%-.64s' hat altes Format, Sie sollten die '%s'-Objekt(e) neu erzeugen" + eng "'%-.192s' has an old format, you should re-create the '%s' object(s)" + ger "'%-.192s' hat altes Format, Sie sollten die '%s'-Objekt(e) neu erzeugen" ER_SP_RECURSION_LIMIT - eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.64s" - ger "Rekursionsgrenze %d (durch Variable max_sp_recursion_depth gegeben) wurde für Routine %.64s überschritten" + eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s" + ger "Rekursionsgrenze %d (durch Variable max_sp_recursion_depth gegeben) wurde für Routine %.192s überschritten" ER_SP_PROC_TABLE_CORRUPT - eng "Failed to load routine %-.64s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)" - ger "Routine %-.64s konnte nicht geladen werden. Die Tabelle mysql.proc fehlt, ist beschädigt, oder enthält fehlerhaften Daten (interner Code: %d)" + eng "Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)" + ger "Routine %-.192s konnte nicht geladen werden. Die Tabelle mysql.proc fehlt, ist beschädigt, oder enthält fehlerhaften Daten (interner Code: %d)" ER_FOREIGN_SERVER_EXISTS eng "The foreign server, %s, you are trying to create already exists." ER_SP_WRONG_NAME 42000 - eng "Incorrect routine name '%-.64s'" - ger "Ungültiger Routinenname '%-.64s'" + eng "Incorrect routine name '%-.192s'" + ger "Ungültiger Routinenname '%-.192s'" ER_TABLE_NEEDS_UPGRADE eng "Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\" to fix it!" ger "Tabellenaktualisierung erforderlich. Bitte zum Reparieren \"REPAIR TABLE `%-.32s`\" eingeben!" @@ -5621,11 +5621,11 @@ ER_MAX_PREPARED_STMT_COUNT_REACHED 42000 eng "Can't create more than max_prepared_stmt_count statements (current value: %lu)" ger "Kann nicht mehr Anweisungen als max_prepared_stmt_count erzeugen (aktueller Wert: %lu)" ER_VIEW_RECURSIVE - eng "`%-.64s`.`%-.64s` contains view recursion" - ger "`%-.64s`.`%-.64s` enthält View-Rekursion" + eng "`%-.192s`.`%-.192s` contains view recursion" + ger "`%-.192s`.`%-.192s` enthält View-Rekursion" ER_NON_GROUPING_FIELD_USED 42000 - eng "non-grouping field '%-.64s' is used in %-.64s clause" - ger "In der %-.64s-Klausel wird das die Nicht-Gruppierungsspalte '%-.64s' verwendet" + eng "non-grouping field '%-.192s' is used in %-.64s clause" + ger "In der %-.192s-Klausel wird das die Nicht-Gruppierungsspalte '%-.64s' verwendet" ER_TABLE_CANT_HANDLE_SPKEYS eng "The used table type doesn't support SPATIAL indexes" ger "Der verwendete Tabellentyp unterstützt keine SPATIAL-Indizes" @@ -5681,9 +5681,9 @@ ER_INCONSISTENT_PARTITION_INFO_ERROR ger "Die Partitionierungsinformationen in der frm-Datei stimmen nicht mit dem überein, was in die frm-Datei geschrieben werden kann" swe "Partitioneringsinformationen i frm-filen är inte konsistent med vad som kan skrivas i frm-filen" ER_PARTITION_FUNC_NOT_ALLOWED_ERROR - eng "The %-.64s function returns the wrong type" - ger "Die %-.64s-Funktion gibt einen falschen Typ zurück" - swe "%-.64s-funktionen returnerar felaktig typ" + eng "The %-.192s function returns the wrong type" + ger "Die %-.192s-Funktion gibt einen falschen Typ zurück" + swe "%-.192s-funktionen returnerar felaktig typ" ER_PARTITIONS_MUST_BE_DEFINED_ERROR eng "For %-.64s partitions each partition must be defined" ger "Für %-.64s-Partitionen muss jede Partition definiert sein" @@ -5729,7 +5729,7 @@ ER_BLOB_FIELD_IN_PART_FUNC_ERROR ger "In der Partitionierungsfunktion sind BLOB-Spalten nicht erlaubt" swe "Ett BLOB-fält är inte tillåtet i partitioneringsfunktioner" ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF - eng "A %-.64s must include all columns in the table's partitioning function" + eng "A %-.192s must include all columns in the table's partitioning function" ER_NO_PARTS_ERROR eng "Number of %-.64s = 0 is not an allowed value" ger "Eine Anzahl von %-.64s = 0 ist kein erlaubter Wert" @@ -5783,9 +5783,9 @@ ER_REORG_PARTITION_NOT_EXIST ger "Es wurde versucht, mehr Partitionen als vorhanden zu reorganisieren" swe "Fler partitioner att reorganisera än det finns partitioner" ER_SAME_NAME_PARTITION - eng "Duplicate partition name %-.64s" - ger "Doppelter Partitionsname: %-.64s" - swe "Duplicerat partitionsnamn %-.64s" + eng "Duplicate partition name %-.192s" + ger "Doppelter Partitionsname: %-.192s" + swe "Duplicerat partitionsnamn %-.192s" ER_NO_BINLOG_ERROR eng "It is not allowed to shut off binlog on this command" ger "Es es nicht erlaubt, bei diesem Befehl binlog abzuschalten" @@ -5810,8 +5810,8 @@ ER_LIMITED_PART_RANGE ger "Der Handler %-.64s unterstützt in VALUES nur 32-Bit-Integers" swe "%-.64s stödjer endast 32 bitar i integers i VALUES" ER_PLUGIN_IS_NOT_LOADED - eng "Plugin '%-.64s' is not loaded" - ger "Plugin '%-.64s' ist nicht geladen" + eng "Plugin '%-.192s' is not loaded" + ger "Plugin '%-.192s' ist nicht geladen" ER_WRONG_VALUE eng "Incorrect %-.32s value: '%-.128s'" ger "Falscher %-.32s-Wert: '%-.128s'" @@ -5852,17 +5852,17 @@ ER_FOREIGN_SERVER_DOESNT_EXIST eng "The foreign server name you are trying to reference does not exist. Data source error: %-.64s" ger "Die externe Verbindung, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s" ER_EVENT_ALREADY_EXISTS - eng "Event '%-.64s' already exists" - ger "Event '%-.64s' existiert bereits" + eng "Event '%-.192s' already exists" + ger "Event '%-.192s' existiert bereits" ER_EVENT_STORE_FAILED eng "Failed to store event %s. Error code %d from storage engine." ger "Speichern von Event %s fehlgeschlagen. Fehlercode der Speicher-Engine: %d" ER_EVENT_DOES_NOT_EXIST - eng "Unknown event '%-.64s'" - ger "Unbekanntes Event '%-.64s'" + eng "Unknown event '%-.192s'" + ger "Unbekanntes Event '%-.192s'" ER_EVENT_CANT_ALTER - eng "Failed to alter event '%-.64s'" - ger "Ändern des Events '%-.64s' fehlgeschlagen" + eng "Failed to alter event '%-.192s'" + ger "Ändern des Events '%-.192s' fehlgeschlagen" ER_EVENT_DROP_FAILED eng "Failed to drop %s" ger "Löschen von %s fehlgeschlagen" @@ -5881,11 +5881,11 @@ ER_EVENT_NEITHER_M_EXPR_NOR_M_AT eng "No datetime expression provided" ger "Kein DATETIME-Ausdruck angegeben" ER_COL_COUNT_DOESNT_MATCH_CORRUPTED - eng "Column count of mysql.%s is wrong. Expected %d, found %d. Table probably corrupted" + eng "Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted" ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschädigt" ER_CANNOT_LOAD_FROM_TABLE - eng "Cannot load from mysql.%s. Table probably corrupted. See error log." - ger "Kann mysql.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt, siehe Fehlerlog" + eng "Cannot load from mysql.%s. The table is probably corrupted" + ger "Kann mysql.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt" ER_EVENT_CANNOT_DELETE eng "Failed to delete the event from mysql.event" ger "Löschen des Events aus mysql.event fehlgeschlagen" @@ -5899,8 +5899,8 @@ ER_EVENT_DATA_TOO_LONG eng "Data for column '%s' too long" ger "Daten der Spalte '%s' zu lang" ER_DROP_INDEX_FK - eng "Cannot drop index '%-.64s': needed in a foreign key constraint" - ger "Kann Index '%-.64s' nicht löschen: wird für einen Fremdschlüssel benötigt" + eng "Cannot drop index '%-.192s': needed in a foreign key constraint" + ger "Kann Index '%-.192s' nicht löschen: wird für einen Fremdschlüssel benötigt" ER_WARN_DEPRECATED_SYNTAX eng "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead" ger "Die Syntax '%s' ist veraltet und wird in MySQL %s entfernt. Bitte benutzen Sie statt dessen %s" @@ -5911,8 +5911,8 @@ ER_CANT_READ_LOCK_LOG_TABLE eng "You can't use usual read lock with log tables. Try READ LOCAL instead" ger "Log-Tabellen können nicht mit normalen Lesesperren gesperrt werden. Verwenden Sie statt dessen READ LOCAL" ER_FOREIGN_DUPLICATE_KEY 23000 S1009 - eng "Upholding foreign key constraints for table '%.64s', entry '%-.64s', key %d would lead to a duplicate entry" - ger "Aufrechterhalten der Fremdschlüssel-Constraints für Tabelle '%.64s', Eintrag '%-.64s', Schlüssel %d würde zu einem doppelten Eintrag führen" + eng "Upholding foreign key constraints for table '%.192s', entry '%-.192s', key %d would lead to a duplicate entry" + ger "Aufrechterhalten der Fremdschlüssel-Constraints für Tabelle '%.192s', Eintrag '%-.192s', Schlüssel %d würde zu einem doppelten Eintrag führen" ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use scripts/mysql_fix_privilege_tables" ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MySQL %d, jetzt unter %d. Bitte benutzen Sie scripts/mysql_fix_privilege_tables, um den Fehler zu beheben" @@ -5954,8 +5954,8 @@ ER_CANT_CHANGE_TX_ISOLATION 25001 eng "Transaction isolation level can't be changed while a transaction is in progress" ger "Transaktionsisolationsebene kann während einer laufenden Transaktion nicht geändert werden" ER_DUP_ENTRY_AUTOINCREMENT_CASE - eng "ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '%-.64s' for key '%-.64s'" - ger "ALTER TABLE führt zur Neusequenzierung von auto_increment, wodurch der doppelte Eintrag '%-.64s' für Schlüssel '%-.64s' auftritt" + eng "ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '%-.192s' for key '%-.192s'" + ger "ALTER TABLE führt zur Neusequenzierung von auto_increment, wodurch der doppelte Eintrag '%-.192s' für Schlüssel '%-.192s' auftritt" ER_EVENT_MODIFY_QUEUE_ERROR eng "Internal scheduler error %d" ger "Interner Scheduler-Fehler %d" @@ -5978,11 +5978,11 @@ ER_BASE64_DECODE_ERROR ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA eng "Triggers can not be created on system tables" ger "Trigger können nicht auf Systemtabellen erzeugt werden" -ER_EVENT_RECURSIVITY_FORBIDDEN - eng "Recursivity of EVENT DDL statements is forbidden when body is present" +ER_EVENT_RECURSION_FORBIDDEN + eng "Recursion of EVENT DDL statements is forbidden when body is present" ger "Rekursivität von EVENT-DDL-Anweisungen ist unzulässig wenn ein Hauptteil (Body) existiert" ER_EVENTS_DB_ERROR - eng "Cannot proceed because the tables used by events were found damaged at server start" + eng "Cannot proceed because system tables used by Event Scheduler were found damaged at server start" ger "Kann nicht weitermachen, weil die Tabellen, die von Events verwendet werden, beim Serverstart als beschädigt markiert wurden" ER_ONLY_INTEGERS_ALLOWED eng "Only integers allowed as number here" @@ -6012,42 +6012,42 @@ ER_CANT_RENAME_LOG_TABLE eng "Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'" ger "Kann '%s' nicht umbenennen. Wenn Loggen angeschaltet ist, müssen beim Umbenennen zu/von einer Logtabelle zwei Tabellen angegeben werden: die Logtabelle zu einer Archivtabelle und eine weitere Tabelle zurück zu '%s'" ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 42000 - eng "Incorrect parameter count in the call to native function '%-.64s'" - ger "Falsche Anzahl von Parametern beim Aufruf der nativen Funktion '%-.64s'" + eng "Incorrect parameter count in the call to native function '%-.192s'" + ger "Falsche Anzahl von Parametern beim Aufruf der nativen Funktion '%-.192s'" ER_WRONG_PARAMETERS_TO_NATIVE_FCT 42000 - eng "Incorrect parameters in the call to native function '%-.64s'" - ger "Falscher Parameter beim Aufruf der nativen Funktion '%-.64s'" + eng "Incorrect parameters in the call to native function '%-.192s'" + ger "Falscher Parameter beim Aufruf der nativen Funktion '%-.192s'" ER_WRONG_PARAMETERS_TO_STORED_FCT 42000 - eng "Incorrect parameters in the call to stored function '%-.64s'" - ger "Falsche Parameter beim Aufruf der gespeicherten Funktion '%-.64s'" + eng "Incorrect parameters in the call to stored function '%-.192s'" + ger "Falsche Parameter beim Aufruf der gespeicherten Funktion '%-.192s'" ER_NATIVE_FCT_NAME_COLLISION - eng "This function '%-.64s' has the same name as a native function" - ger "Die Funktion '%-.64s' hat denselben Namen wie eine native Funktion" + eng "This function '%-.192s' has the same name as a native function" + ger "Die Funktion '%-.192s' hat denselben Namen wie eine native Funktion" ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009 - cze "Zvojen-Bý klíè '%-.64s' (èíslo klíèe '%-.64s')" - dan "Ens værdier '%-.64s' for indeks '%-.64s'" - nla "Dubbele ingang '%-.64s' voor zoeksleutel '%-.64s'" - eng "Duplicate entry '%-.64s' for key '%-.64s'" - jps "'%-.64s' ‚Í key '%-.64s' ‚É‚¨‚¢‚Äd•¡‚µ‚Ä‚¢‚Ü‚·", - est "Kattuv väärtus '%-.64s' võtmele '%-.64s'" - fre "Duplicata du champ '%-.64s' pour la clef '%-.64s'" - ger "Doppelter Eintrag '%-.64s' für Schlüssel '%-.64s'" - greek "ÄéðëÞ åããñáöÞ '%-.64s' ãéá ôï êëåéäß '%-.64s'" - hun "Duplikalt bejegyzes '%-.64s' a '%-.64s' kulcs szerint." - ita "Valore duplicato '%-.64s' per la chiave '%-.64s'" - jpn "'%-.64s' ¤Ï key '%-.64s' ¤Ë¤ª¤¤¤Æ½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" - kor "Áߺ¹µÈ ÀÔ·Â °ª '%-.64s': key '%-.64s'" - nor "Like verdier '%-.64s' for nøkkel '%-.64s'" - norwegian-ny "Like verdiar '%-.64s' for nykkel '%-.64s'" - pol "Powtórzone wyst?pienie '%-.64s' dla klucza '%-.64s'" - por "Entrada '%-.64s' duplicada para a chave '%-.64s'" - rum "Cimpul '%-.64s' e duplicat pentru cheia '%-.64s'" - rus "äÕÂÌÉÒÕÀÝÁÑÓÑ ÚÁÐÉÓØ '%-.64s' ÐÏ ËÌÀÞÕ '%-.64s'" - serbian "Dupliran unos '%-.64s' za kljuè '%-.64s'" - slo "Opakovaný kµúè '%-.64s' (èíslo kµúèa '%-.64s')" - spa "Entrada duplicada '%-.64s' para la clave '%-.64s'" - swe "Dubbel nyckel '%-.64s' för nyckel '%-.64s'" - ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.64s' ÄÌÑ ËÌÀÞÁ '%-.64s'" + cze "Zvojen-Bý klíè '%-.64s' (èíslo klíèe '%-.192s')" + dan "Ens værdier '%-.64s' for indeks '%-.192s'" + nla "Dubbele ingang '%-.64s' voor zoeksleutel '%-.192s'" + eng "Duplicate entry '%-.64s' for key '%-.192s'" + jps "'%-.64s' ‚Í key '%-.192s' ‚É‚¨‚¢‚Äd•¡‚µ‚Ä‚¢‚Ü‚·", + est "Kattuv väärtus '%-.64s' võtmele '%-.192s'" + fre "Duplicata du champ '%-.64s' pour la clef '%-.192s'" + ger "Doppelter Eintrag '%-.64s' für Schlüssel '%-.192s'" + greek "ÄéðëÞ åããñáöÞ '%-.64s' ãéá ôï êëåéäß '%-.192s'" + hun "Duplikalt bejegyzes '%-.64s' a '%-.192s' kulcs szerint." + ita "Valore duplicato '%-.64s' per la chiave '%-.192s'" + jpn "'%-.64s' ¤Ï key '%-.192s' ¤Ë¤ª¤¤¤Æ½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" + kor "Áߺ¹µÈ ÀÔ·Â °ª '%-.64s': key '%-.192s'" + nor "Like verdier '%-.64s' for nøkkel '%-.192s'" + norwegian-ny "Like verdiar '%-.64s' for nykkel '%-.192s'" + pol "Powtórzone wyst?pienie '%-.64s' dla klucza '%-.192s'" + por "Entrada '%-.64s' duplicada para a chave '%-.192s'" + rum "Cimpul '%-.64s' e duplicat pentru cheia '%-.192s'" + rus "äÕÂÌÉÒÕÀÝÁÑÓÑ ÚÁÐÉÓØ '%-.64s' ÐÏ ËÌÀÞÕ '%-.192s'" + serbian "Dupliran unos '%-.64s' za kljuè '%-.192s'" + slo "Opakovaný kµúè '%-.64s' (èíslo kµúèa '%-.192s')" + spa "Entrada duplicada '%-.64s' para la clave '%-.192s'" + swe "Dubbel nyckel '%-.64s' för nyckel '%-.192s'" + ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.64s' ÄÌÑ ËÌÀÞÁ '%-.192s'" ER_BINLOG_PURGE_EMFILE eng "Too many files opened, please execute the command again" ger "Zu viele offene Dateien, bitte führen Sie den Befehl noch einmal aus" @@ -6057,3 +6057,5 @@ ER_EVENT_CANNOT_ALTER_IN_THE_PAST eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered" ER_SLAVE_INCIDENT eng "The incident %s occured on the master. Message: %-.64s" +ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT + eng "Table has no partition for some existing values" diff --git a/sql/slave.cc b/sql/slave.cc index bc6cef95fc6..2e2fd93ea86 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1252,6 +1252,8 @@ bool show_master_info(THD* thd, MASTER_INFO* mi) sizeof(mi->ssl_key))); field_list.push_back(new Item_return_int("Seconds_Behind_Master", 10, MYSQL_TYPE_LONGLONG)); + field_list.push_back(new Item_empty_string("Master_SSL_Verify_Server_Cert", + 3)); if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) @@ -1358,7 +1360,10 @@ bool show_master_info(THD* thd, MASTER_INFO* mi) max(0, time_diff) : 0)); } else + { protocol->store_null(); + } + protocol->store(mi->ssl_verify_server_cert? "Yes":"No", &my_charset_bin); pthread_mutex_unlock(&mi->rli.data_lock); pthread_mutex_unlock(&mi->data_lock); @@ -3142,12 +3147,16 @@ static int connect_to_master(THD* thd, MYSQL* mysql, MASTER_INFO* mi, #ifdef HAVE_OPENSSL if (mi->ssl) + { mysql_ssl_set(mysql, mi->ssl_key[0]?mi->ssl_key:0, mi->ssl_cert[0]?mi->ssl_cert:0, mi->ssl_ca[0]?mi->ssl_ca:0, mi->ssl_capath[0]?mi->ssl_capath:0, mi->ssl_cipher[0]?mi->ssl_cipher:0); + mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, + &mi->ssl_verify_server_cert); + } #endif mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset_info->csname); diff --git a/sql/sp.cc b/sql/sp.cc index c1a9aac0c24..a59e3507eac 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -384,7 +384,7 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp, if ((ret= sp_use_new_db(thd, name->m_db, &old_db, 1, &dbchanged))) goto end; - lex_start(thd, (uchar*)defstr.c_ptr(), defstr.length()); + lex_start(thd, defstr.c_ptr(), defstr.length()); thd->spcont= 0; if (MYSQLparse(thd) || thd->is_fatal_error || newlex.sphead == NULL) @@ -682,15 +682,15 @@ struct st_used_field static struct st_used_field init_fields[]= { - { "Db", NAME_LEN, MYSQL_TYPE_STRING, 0}, - { "Name", NAME_LEN, MYSQL_TYPE_STRING, 0}, - { "Type", 9, MYSQL_TYPE_STRING, 0}, - { "Definer", 77, MYSQL_TYPE_STRING, 0}, - { "Modified", 0, MYSQL_TYPE_TIMESTAMP, 0}, - { "Created", 0, MYSQL_TYPE_TIMESTAMP, 0}, - { "Security_type", 1, MYSQL_TYPE_STRING, 0}, - { "Comment", NAME_LEN, MYSQL_TYPE_STRING, 0}, - { 0, 0, MYSQL_TYPE_STRING, 0} + { "Db", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0}, + { "Name", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0}, + { "Type", 9, MYSQL_TYPE_STRING, 0}, + { "Definer", 77, MYSQL_TYPE_STRING, 0}, + { "Modified", 0, MYSQL_TYPE_TIMESTAMP, 0}, + { "Created", 0, MYSQL_TYPE_TIMESTAMP, 0}, + { "Security_type", 1, MYSQL_TYPE_STRING, 0}, + { "Comment", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0}, + { 0, 0, MYSQL_TYPE_STRING, 0} }; @@ -1041,7 +1041,7 @@ sp_exist_routines(THD *thd, TABLE_LIST *routines, bool any, bool no_error) lex_name.length= strlen(routine->table_name); lex_db.str= thd->strmake(routine->db, lex_db.length); lex_name.str= thd->strmake(routine->table_name, lex_name.length); - name= new sp_name(lex_db, lex_name); + name= new sp_name(lex_db, lex_name, true); name->init_qname(thd); sp_object_found= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, name, &thd->sp_proc_cache, FALSE) != NULL || @@ -1598,10 +1598,8 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex, rest of the server checks agains NAME_LEN bytes and not chars. Hence, the overrun happens only if the name is in length > 32 and uses multibyte (cyrillic, greek, etc.) - - !! Change 3 with SYSTEM_CHARSET_MBMAXLEN when it's defined. */ - char n[NAME_LEN*3*2+2]; + char n[NAME_LEN*2+2]; /* m_qname.str is not always \0 terminated */ memcpy(n, name.m_qname.str, name.m_qname.length); diff --git a/sql/sp_head.cc b/sql/sp_head.cc index f5e32847fb0..e3138d02ca5 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -408,9 +408,22 @@ sp_name::init_qname(THD *thd) */ bool -check_routine_name(LEX_STRING ident) +check_routine_name(LEX_STRING *ident) { - return (!ident.str || !ident.str[0] || ident.str[ident.length-1] == ' '); + if (!ident || !ident->str || !ident->str[0] || + ident->str[ident->length-1] == ' ') + { + my_error(ER_SP_WRONG_NAME, MYF(0), ident->str); + return TRUE; + } + if (check_string_char_length(ident, "", NAME_CHAR_LEN, + system_charset_info, 1)) + { + my_error(ER_TOO_LONG_IDENT, MYF(0), ident->str); + return TRUE; + } + + return FALSE; } /* ------------------------------------------------------------------ */ @@ -541,15 +554,14 @@ void sp_head::init_strings(THD *thd, LEX *lex) { DBUG_ENTER("sp_head::init_strings"); - const uchar *endp; /* Used to trim the end */ + const char *endp; /* Used to trim the end */ /* During parsing, we must use thd->mem_root */ MEM_ROOT *root= thd->mem_root; if (m_param_begin && m_param_end) { m_params.length= m_param_end - m_param_begin; - m_params.str= strmake_root(root, - (char *)m_param_begin, m_params.length); + m_params.str= strmake_root(root, m_param_begin, m_params.length); } /* If ptr has overrun end_of_query then end_of_query is the end */ @@ -561,9 +573,9 @@ sp_head::init_strings(THD *thd, LEX *lex) endp= skip_rear_comments(m_body_begin, endp); m_body.length= endp - m_body_begin; - m_body.str= strmake_root(root, (char *)m_body_begin, m_body.length); + m_body.str= strmake_root(root, m_body_begin, m_body.length); m_defstr.length= endp - lex->buf; - m_defstr.str= strmake_root(root, (char *)lex->buf, m_defstr.length); + m_defstr.str= strmake_root(root, lex->buf, m_defstr.length); DBUG_VOID_RETURN; } @@ -993,6 +1005,12 @@ sp_head::execute(THD *thd) m_first_instance->m_last_cached_sp == this) || (m_recursion_level + 1 == m_next_cached_sp->m_recursion_level)); + /* + NOTE: The SQL Standard does not specify the context that should be + preserved for stored routines. However, at SAP/Walldorf meeting it was + decided that current database should be preserved. + */ + if (m_db.length && (err_status= sp_use_new_db(thd, m_db, &old_db, 0, &dbchanged))) goto done; @@ -2105,24 +2123,18 @@ sp_head::show_create_procedure(THD *thd) String buffer(buff, sizeof(buff), system_charset_info); int res; List field_list; - byte *sql_mode_str; - ulong sql_mode_len; + LEX_STRING sql_mode; bool full_access; DBUG_ENTER("sp_head::show_create_procedure"); DBUG_PRINT("info", ("procedure %s", m_name.str)); - LINT_INIT(sql_mode_str); - LINT_INIT(sql_mode_len); - if (check_show_routine_access(thd, this, &full_access)) DBUG_RETURN(1); - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, - m_sql_mode, - &sql_mode_len); - field_list.push_back(new Item_empty_string("Procedure", NAME_LEN)); - field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len)); + sys_var_thd_sql_mode::symbolic_mode_representation(thd, m_sql_mode, + &sql_mode); + field_list.push_back(new Item_empty_string("Procedure", NAME_CHAR_LEN)); + field_list.push_back(new Item_empty_string("sql_mode", sql_mode.length)); // 1024 is for not to confuse old clients Item_empty_string *definition= new Item_empty_string("Create Procedure", max(buffer.length(),1024)); @@ -2134,7 +2146,7 @@ sp_head::show_create_procedure(THD *thd) DBUG_RETURN(1); protocol->prepare_for_resend(); protocol->store(m_name.str, m_name.length, system_charset_info); - protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info); + protocol->store((char*) sql_mode.str, sql_mode.length, system_charset_info); if (full_access) protocol->store(m_defstr.str, m_defstr.length, system_charset_info); else @@ -2177,23 +2189,18 @@ sp_head::show_create_function(THD *thd) String buffer(buff, sizeof(buff), system_charset_info); int res; List field_list; - byte *sql_mode_str; - ulong sql_mode_len; + LEX_STRING sql_mode; bool full_access; DBUG_ENTER("sp_head::show_create_function"); DBUG_PRINT("info", ("procedure %s", m_name.str)); - LINT_INIT(sql_mode_str); - LINT_INIT(sql_mode_len); if (check_show_routine_access(thd, this, &full_access)) DBUG_RETURN(1); - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, - m_sql_mode, - &sql_mode_len); - field_list.push_back(new Item_empty_string("Function",NAME_LEN)); - field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len)); + sys_var_thd_sql_mode::symbolic_mode_representation(thd, m_sql_mode, + &sql_mode); + field_list.push_back(new Item_empty_string("Function",NAME_CHAR_LEN)); + field_list.push_back(new Item_empty_string("sql_mode", sql_mode.length)); Item_empty_string *definition= new Item_empty_string("Create Function", max(buffer.length(),1024)); definition->maybe_null= TRUE; @@ -2204,7 +2211,7 @@ sp_head::show_create_function(THD *thd) DBUG_RETURN(1); protocol->prepare_for_resend(); protocol->store(m_name.str, m_name.length, system_charset_info); - protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info); + protocol->store(sql_mode.str, sql_mode.length, system_charset_info); if (full_access) protocol->store(m_defstr.str, m_defstr.length, system_charset_info); else diff --git a/sql/sp_head.h b/sql/sp_head.h index 19dc2dac476..551707fa7bd 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -59,9 +59,10 @@ public: calling set_routine_type(). */ LEX_STRING m_sroutines_key; + bool m_explicit_name; /**< Prepend the db name? */ - sp_name(LEX_STRING db, LEX_STRING name) - : m_db(db), m_name(name) + sp_name(LEX_STRING db, LEX_STRING name, bool use_explicit_name) + : m_db(db), m_name(name), m_explicit_name(use_explicit_name) { m_qname.str= m_sroutines_key.str= 0; m_qname.length= m_sroutines_key.length= 0; @@ -79,6 +80,7 @@ public: m_name.length= m_qname.length= key_len - 1; m_db.str= 0; m_db.length= 0; + m_explicit_name= false; } // Init. the qualified name from the db and name. @@ -95,7 +97,7 @@ public: bool -check_routine_name(LEX_STRING name); +check_routine_name(LEX_STRING *ident); class sp_head :private Query_arena { @@ -126,7 +128,7 @@ public: create_field m_return_field_def; /* This is used for FUNCTIONs only. */ - const uchar *m_tmp_query; // Temporary pointer to sub query string + const char *m_tmp_query; // Temporary pointer to sub query string st_sp_chistics *m_chistics; ulong m_sql_mode; // For SHOW CREATE and execution LEX_STRING m_qname; // db.name @@ -174,7 +176,7 @@ public: */ HASH m_sroutines; // Pointers set during parsing - const uchar *m_param_begin, *m_param_end, *m_body_begin; + const char *m_param_begin, *m_param_end, *m_body_begin; /* Security context for stored routine which should be run under diff --git a/sql/spatial.h b/sql/spatial.h index 0c0452b5abc..f806861290e 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -144,15 +144,46 @@ struct MBR return (xminx) && (yminy); } + /** + The dimension maps to an integer as: + - Polygon -> 2 + - Horizontal or vertical line -> 1 + - Point -> 0 + - Invalid MBR -> -1 + */ + int dimension() const + { + int d= 0; + + if (xmin > xmax) + return -1; + else if (xmin < xmax) + d++; + + if (ymin > ymax) + return -1; + else if (ymin < ymax) + d++; + + return d; + } + int overlaps(const MBR *mbr) { - int lb= mbr->inner_point(xmin, ymin); - int rb= mbr->inner_point(xmax, ymin); - int rt= mbr->inner_point(xmax, ymax); - int lt= mbr->inner_point(xmin, ymax); + /* + overlaps() requires that some point inside *this is also inside + *mbr, and that both geometries and their intersection are of the + same dimension. + */ + int d = dimension(); - int a = lb+rb+rt+lt; - return (a>0) && (a<4) && (!within(mbr)); + if (d != mbr->dimension() || d <= 0 || contains(mbr) || within(mbr)) + return 0; + + MBR intersection(max(xmin, mbr->xmin), max(ymin, mbr->ymin), + min(xmax, mbr->xmax), min(ymax, mbr->ymax)); + + return (d == intersection.dimension()); } }; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 82cce335f00..8cc54aa3c8c 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -5852,7 +5852,7 @@ bool setup_tables_and_check_access(THD *thd, { if (leaves_tmp->belong_to_view && check_single_table_access(thd, first_table ? want_access_first : - want_access, leaves_tmp)) + want_access, leaves_tmp, FALSE)) { tables->hide_view_error(thd); return TRUE; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index d4d8084b301..9a7a84bb274 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -897,7 +897,7 @@ int THD::send_explain_fields(select_result *result) CHARSET_INFO *cs= system_charset_info; field_list.push_back(new Item_return_int("id",3, MYSQL_TYPE_LONGLONG)); field_list.push_back(new Item_empty_string("select_type", 19, cs)); - field_list.push_back(item= new Item_empty_string("table", NAME_LEN, cs)); + field_list.push_back(item= new Item_empty_string("table", NAME_CHAR_LEN, cs)); item->maybe_null= 1; if (lex->describe & DESCRIBE_PARTITIONS) { @@ -910,15 +910,16 @@ int THD::send_explain_fields(select_result *result) field_list.push_back(item= new Item_empty_string("type", 10, cs)); item->maybe_null= 1; field_list.push_back(item=new Item_empty_string("possible_keys", - NAME_LEN*MAX_KEY, cs)); + NAME_CHAR_LEN*MAX_KEY, cs)); item->maybe_null=1; - field_list.push_back(item=new Item_empty_string("key", NAME_LEN, cs)); + field_list.push_back(item=new Item_empty_string("key", NAME_CHAR_LEN, cs)); item->maybe_null=1; field_list.push_back(item=new Item_empty_string("key_len", - NAME_LEN*MAX_KEY)); + NAME_CHAR_LEN*MAX_KEY)); item->maybe_null=1; field_list.push_back(item=new Item_empty_string("ref", - NAME_LEN*MAX_REF_PARTS, cs)); + NAME_CHAR_LEN*MAX_REF_PARTS, + cs)); item->maybe_null=1; field_list.push_back(item= new Item_return_int("rows", 10, MYSQL_TYPE_LONGLONG)); diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 4fd35b7e6e8..cc9dc4c1fec 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -953,7 +953,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) exit: (void)sp_drop_db_routines(thd, db); /* QQ Ignore errors for now */ - Events::get_instance()->drop_schema_events(thd, db); + Events::drop_schema_events(thd, db); /* If this database was the client's selected database, we silently change the client's selected database to nothing (to have an empty diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index d300edd6e18..4e865a12b66 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -221,7 +221,20 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, init_ftfuncs(thd, select_lex, 1); thd->proc_info="updating"; - will_batch= !table->file->start_bulk_delete(); + if (table->triggers && + table->triggers->has_triggers(TRG_EVENT_DELETE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER DELETE triggers that might access to subject table + and therefore might need delete to be done immediately. So we turn-off + the batching. + */ + (void) table->file->extra(HA_EXTRA_DELETE_CANNOT_BATCH); + will_batch= FALSE; + } + else + will_batch= !table->file->start_bulk_delete(); table->mark_columns_needed_for_delete(); @@ -563,6 +576,17 @@ multi_delete::initialize_tables(JOIN *join) transactional_tables= 1; else normal_tables= 1; + if (tbl->triggers && + tbl->triggers->has_triggers(TRG_EVENT_DELETE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER DELETE triggers that might access to subject + table and therefore might need delete to be done immediately. + So we turn-off the batching. + */ + (void) tbl->file->extra(HA_EXTRA_DELETE_CANNOT_BATCH); + } tbl->prepare_for_position(); tbl->mark_columns_needed_for_delete(); } diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index c0e0203ed86..9852c71e2b4 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -341,6 +341,47 @@ static int check_update_fields(THD *thd, TABLE_LIST *insert_table_list, return 0; } +/* + Prepare triggers for INSERT-like statement. + + SYNOPSIS + prepare_triggers_for_insert_stmt() + table Table to which insert will happen + + NOTE + Prepare triggers for INSERT-like statement by marking fields + used by triggers and inform handlers that batching of UPDATE/DELETE + cannot be done if there are BEFORE UPDATE/DELETE triggers. +*/ + +void prepare_triggers_for_insert_stmt(TABLE *table) +{ + if (table->triggers) + { + if (table->triggers->has_triggers(TRG_EVENT_DELETE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER DELETE triggers that might access to + subject table and therefore might need delete to be done + immediately. So we turn-off the batching. + */ + (void) table->file->extra(HA_EXTRA_DELETE_CANNOT_BATCH); + } + if (table->triggers->has_triggers(TRG_EVENT_UPDATE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER UPDATE triggers that might access to subject + table and therefore might need update to be done immediately. + So we turn-off the batching. + */ + (void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH); + } + } + table->mark_columns_needed_for_insert(); +} + bool mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, @@ -575,7 +616,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES))); - table->mark_columns_needed_for_insert(); + prepare_triggers_for_insert_stmt(table); + if (table_list->prepare_where(thd, 0, TRUE) || table_list->prepare_check_option(thd)) @@ -2646,7 +2688,7 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) table_list->prepare_check_option(thd)); if (!res) - table->mark_columns_needed_for_insert(); + prepare_triggers_for_insert_stmt(table); DBUG_RETURN(res); } diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index ad54289a9cc..26955c18342 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -33,10 +33,10 @@ sys_var *trg_new_row_fake_var= (sys_var*) 0x01; /* Macros to look like lex */ -#define yyGet() *(lex->ptr++) -#define yyGetLast() lex->ptr[-1] -#define yyPeek() lex->ptr[0] -#define yyPeek2() lex->ptr[1] +#define yyGet() ((uchar) *(lex->ptr++)) +#define yyGetLast() ((uchar) lex->ptr[-1]) +#define yyPeek() ((uchar) lex->ptr[0]) +#define yyPeek2() ((uchar) lex->ptr[1]) #define yyUnget() lex->ptr-- #define yySkip() lex->ptr++ #define yyLength() ((uint) (lex->ptr - lex->tok_start)-1) @@ -127,7 +127,7 @@ st_parsing_options::reset() (We already do too much here) */ -void lex_start(THD *thd, const uchar *buf, uint length) +void lex_start(THD *thd, const char *buf, uint length) { LEX *lex= thd->lex; DBUG_ENTER("lex_start"); @@ -238,9 +238,9 @@ void lex_end(LEX *lex) static int find_keyword(LEX *lex, uint len, bool function) { - const uchar *tok=lex->tok_start; + const char *tok= lex->tok_start; - SYMBOL *symbol= get_hash_symbol((const char *)tok,len,function); + SYMBOL *symbol= get_hash_symbol(tok, len, function); if (symbol) { lex->yylval->symbol.symbol=symbol; @@ -305,16 +305,16 @@ static LEX_STRING get_token(LEX *lex,uint length) static LEX_STRING get_quoted_token(LEX *lex,uint length, char quote) { LEX_STRING tmp; - const uchar *from, *end; - uchar *to; + const char *from, *end; + char *to; yyUnget(); // ptr points now after last token char tmp.length=lex->yytoklen=length; tmp.str=(char*) lex->thd->alloc(tmp.length+1); - for (from= lex->tok_start, to= (uchar*) tmp.str, end= to+length ; + for (from= lex->tok_start, to= tmp.str, end= to+length ; to != end ; ) { - if ((*to++= *from++) == (uchar) quote) + if ((*to++= *from++) == quote) from++; // Skip double quotes } *to= 0; // End null for safety @@ -341,9 +341,7 @@ static char *get_text(LEX *lex) { int l; if (use_mb(cs) && - (l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query))) { + (l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query))) { lex->ptr += l-1; continue; } @@ -368,12 +366,12 @@ static char *get_text(LEX *lex) yyUnget(); /* Found end. Unescape and return string */ - const uchar *str, *end; - uchar *start; + const char *str, *end; + char *start; str=lex->tok_start+1; end=lex->ptr-1; - if (!(start=(uchar*) lex->thd->alloc((uint) (end-str)+1))) + if (!(start= (char*) lex->thd->alloc((uint) (end-str)+1))) return (char*) ""; // Sql_alloc has set error flag if (!found_escape) { @@ -383,15 +381,14 @@ static char *get_text(LEX *lex) } else { - uchar *to; + char *to; for (to=start ; str != end ; str++) { #ifdef USE_MB int l; if (use_mb(cs) && - (l = my_ismbchar(cs, - (const char *)str, (const char *)end))) { + (l = my_ismbchar(cs, str, end))) { while (l--) *to++ = *str++; str--; @@ -437,7 +434,7 @@ static char *get_text(LEX *lex) *to=0; lex->yytoklen=(uint) (to-start); } - return (char*) start; + return start; } } return 0; // unexpected end of query @@ -556,7 +553,6 @@ int MYSQLlex(void *arg, void *yythd) lex->yylval=yylval; // The global state - lex->tok_end_prev= lex->tok_end; lex->tok_start_prev= lex->tok_start; lex->tok_start=lex->tok_end=lex->ptr; @@ -640,16 +636,14 @@ int MYSQLlex(void *arg, void *yythd) break; } case MY_LEX_IDENT: - const uchar *start; + const char *start; #if defined(USE_MB) && defined(USE_MB_IDENT) if (use_mb(cs)) { result_state= IDENT_QUOTED; if (my_mbcharlen(cs, yyGetLast()) > 1) { - int l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query); + int l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query); if (l == 0) { state = MY_LEX_CHAR; continue; @@ -661,9 +655,7 @@ int MYSQLlex(void *arg, void *yythd) if (my_mbcharlen(cs, c) > 1) { int l; - if ((l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query)) == 0) + if ((l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query)) == 0) break; lex->ptr += l-1; } @@ -786,9 +778,7 @@ int MYSQLlex(void *arg, void *yythd) if (my_mbcharlen(cs, c) > 1) { int l; - if ((l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query)) == 0) + if ((l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query)) == 0) break; lex->ptr += l-1; } @@ -1122,7 +1112,7 @@ int MYSQLlex(void *arg, void *yythd) Pointer to the last non-comment symbol of the statement. */ -const uchar *skip_rear_comments(const uchar *begin, const uchar *end) +const char *skip_rear_comments(const char *begin, const char *end) { while (begin < end && (end[-1] <= ' ' || end[-1] == '*' || end[-1] == '/' || end[-1] == ';')) diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 13786606412..850586c6098 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -188,12 +188,12 @@ typedef struct st_lex_master_info uint port, connect_retry; ulonglong pos; ulong server_id; - /* - Variable for MASTER_SSL option. - MASTER_SSL=0 in CHANGE MASTER TO corresponds to SSL_DISABLE - MASTER_SSL=1 corresponds to SSL_ENABLE - */ - enum {SSL_UNCHANGED=0, SSL_DISABLE, SSL_ENABLE} ssl; + /* + Enum is used for making it possible to detect if the user + changed variable or if it should be left at old value + */ + enum {SSL_UNCHANGED, SSL_DISABLE, SSL_ENABLE} + ssl, ssl_verify_server_cert; char *ssl_key, *ssl_cert, *ssl_ca, *ssl_capath, *ssl_cipher; char *relay_log_name; ulong relay_log_pos; @@ -542,7 +542,7 @@ public: void set_limit(st_select_lex *values); void set_thd(THD *thd_arg) { thd= thd_arg; } - friend void lex_start(THD *thd, const uchar *buf, uint length); + friend void lex_start(THD *thd, const char *buf, uint length); friend int subselect_union_engine::exec(); List *get_unit_column_types(); @@ -743,7 +743,7 @@ public: void cut_subtree() { slave= 0; } bool test_limit(); - friend void lex_start(THD *thd, const uchar *buf, uint length); + friend void lex_start(THD *thd, const char *buf, uint length); st_select_lex() : n_sum_items(0), n_child_sum_items(0) {} void make_empty_select() { @@ -996,11 +996,11 @@ typedef struct st_lex : public Query_tables_list SELECT_LEX *current_select; /* list of all SELECT_LEX */ SELECT_LEX *all_selects_list; - const uchar *buf; /* The beginning of string, used by SPs */ - const uchar *ptr,*tok_start,*tok_end,*end_of_query; + const char *buf; /* The beginning of string, used by SPs */ + const char *ptr,*tok_start,*tok_end,*end_of_query; - /* The values of tok_start/tok_end as they were one call of MYSQLlex before */ - const uchar *tok_start_prev, *tok_end_prev; + /* The value of tok_start as they were one call of MYSQLlex before */ + const char *tok_start_prev; char *length,*dec,*change; LEX_STRING name; @@ -1202,7 +1202,7 @@ typedef struct st_lex : public Query_tables_list Pointers to part of LOAD DATA statement that should be rewritten during replication ("LOCAL 'filename' REPLACE INTO" part). */ - const uchar *fname_start, *fname_end; + const char *fname_start, *fname_end; /* Reference to a struct that contains information in various commands @@ -1319,10 +1319,10 @@ struct st_lex_local: public st_lex extern void lex_init(void); extern void lex_free(void); -extern void lex_start(THD *thd, const uchar *buf, uint length); +extern void lex_start(THD *thd, const char *buf, uint length); extern void lex_end(LEX *lex); extern int MYSQLlex(void *arg, void *yythd); -extern const uchar *skip_rear_comments(const uchar *ubegin, const uchar *uend); +extern const char *skip_rear_comments(const char *ubegin, const char *uend); extern bool is_lex_native_function(const LEX_STRING *name); diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 7d2c2281bba..41de2c86740 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -226,7 +226,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, DBUG_RETURN(TRUE); } - table->mark_columns_needed_for_insert(); + prepare_triggers_for_insert_stmt(table); uint tot_length=0; bool use_blobs= 0, use_vars= 0; @@ -552,7 +552,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, Item_field *sql_field; TABLE *table= table_list->table; ulonglong id; - bool no_trans_update; + bool no_trans_update, err; DBUG_ENTER("read_fixed_length"); id= 0; @@ -644,7 +644,9 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, DBUG_RETURN(-1); } - if (write_record(thd, table, &info)) + err= write_record(thd, table, &info); + table->auto_increment_field_not_null= FALSE; + if (err) DBUG_RETURN(1); thd->no_trans_update= no_trans_update; @@ -681,7 +683,7 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, TABLE *table= table_list->table; uint enclosed_length; ulonglong id; - bool no_trans_update; + bool no_trans_update, err; DBUG_ENTER("read_sep_field"); enclosed_length=enclosed.length(); @@ -728,8 +730,6 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, DBUG_RETURN(1); } field->set_null(); - if (field == table->next_number_field) - table->auto_increment_field_not_null= TRUE; if (!field->maybe_null()) { if (field->type() == MYSQL_TYPE_TIMESTAMP) @@ -815,8 +815,9 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, DBUG_RETURN(-1); } - - if (write_record(thd, table, &info)) + err= write_record(thd, table, &info); + table->auto_increment_field_not_null= FALSE; + if (err) DBUG_RETURN(1); /* We don't need to reset auto-increment field since we are restoring diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 17f1c73dbcb..9d02053ec00 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -26,7 +26,6 @@ #include "sp.h" #include "sp_cache.h" #include "events.h" -#include "event_data_objects.h" #include "sql_trigger.h" /* Used in error handling only */ @@ -983,7 +982,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; /* init structures for VIEW processing */ table_list.select_lex= &(thd->lex->select_lex); - mysql_init_query(thd, (uchar*)"", 0); + mysql_init_query(thd, "", 0); thd->lex-> select_lex.table_list.link_in_list((byte*) &table_list, (byte**) &table_list.next_local); @@ -3181,13 +3180,16 @@ end_with_restore_list: switch (lex->sql_command) { case SQLCOM_CREATE_EVENT: - res= Events::get_instance()-> - create_event(thd, lex->event_parse_data, - lex->create_info.options & HA_LEX_CREATE_IF_NOT_EXISTS); + { + bool if_not_exists= (lex->create_info.options & + HA_LEX_CREATE_IF_NOT_EXISTS); + res= Events::create_event(thd, lex->event_parse_data, if_not_exists); break; + } case SQLCOM_ALTER_EVENT: - res= Events::get_instance()->update_event(thd, lex->event_parse_data, - lex->spname); + res= Events::update_event(thd, lex->event_parse_data, + lex->spname ? &lex->spname->m_db : NULL, + lex->spname ? &lex->spname->m_name : NULL); break; default: DBUG_ASSERT(0); @@ -3205,39 +3207,16 @@ end_with_restore_list: } /* lex->unit.cleanup() is called outside, no need to call it here */ break; - case SQLCOM_DROP_EVENT: case SQLCOM_SHOW_CREATE_EVENT: - { - DBUG_ASSERT(lex->spname); - if (! lex->spname->m_db.str) - { - my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0)); - goto error; - } - if (check_access(thd, EVENT_ACL, lex->spname->m_db.str, 0, 0, 0, - is_schema_db(lex->spname->m_db.str))) - break; - - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); - /* this jumps to the end of the function and skips own messaging */ - goto error; - } - - if (lex->sql_command == SQLCOM_SHOW_CREATE_EVENT) - res= Events::get_instance()->show_create_event(thd, lex->spname->m_db, - lex->spname->m_name); - else - { - if (!(res= Events::get_instance()->drop_event(thd, - lex->spname->m_db, - lex->spname->m_name, - lex->drop_if_exists))) - send_ok(thd); - } + res= Events::show_create_event(thd, lex->spname->m_db, + lex->spname->m_name); + break; + case SQLCOM_DROP_EVENT: + if (!(res= Events::drop_event(thd, + lex->spname->m_db, lex->spname->m_name, + lex->drop_if_exists))) + send_ok(thd); break; - } case SQLCOM_CREATE_FUNCTION: // UDF function { if (check_access(thd,INSERT_ACL,"mysql",0,1,0,0)) @@ -3996,11 +3975,6 @@ create_sp_error: } case SQLCOM_SHOW_CREATE_PROC: { - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); - goto error; - } if (sp_show_create_procedure(thd, lex->spname) != SP_OK) { /* We don't distinguish between errors for now */ my_error(ER_SP_DOES_NOT_EXIST, MYF(0), @@ -4011,11 +3985,6 @@ create_sp_error: } case SQLCOM_SHOW_CREATE_FUNC: { - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); - goto error; - } if (sp_show_create_function(thd, lex->spname) != SP_OK) { /* We don't distinguish between errors for now */ my_error(ER_SP_DOES_NOT_EXIST, MYF(0), @@ -4044,11 +4013,6 @@ create_sp_error: { sp_head *sp; - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); - goto error; - } if (lex->sql_command == SQLCOM_SHOW_PROC_CODE) sp= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, lex->spname, &thd->sp_proc_cache, FALSE); @@ -4473,6 +4437,8 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables) thd Thread handler privilege requested privilege all_tables global table list of query + no_errors FALSE/TRUE - report/don't report error to + the client (using my_error() call). RETURN 0 - OK @@ -4480,7 +4446,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables) */ bool check_single_table_access(THD *thd, ulong privilege, - TABLE_LIST *all_tables) + TABLE_LIST *all_tables, bool no_errors) { Security_context * backup_ctx= thd->security_ctx; @@ -4496,12 +4462,12 @@ bool check_single_table_access(THD *thd, ulong privilege, db_name= all_tables->db; if (check_access(thd, privilege, db_name, - &all_tables->grant.privilege, 0, 0, + &all_tables->grant.privilege, 0, no_errors, test(all_tables->schema_table))) goto deny; /* Show only 1 table for check_grant */ - if (grant_option && check_grant(thd, privilege, all_tables, 0, 1, 0)) + if (grant_option && check_grant(thd, privilege, all_tables, 0, 1, no_errors)) goto deny; thd->security_ctx= backup_ctx; @@ -4529,7 +4495,7 @@ deny: bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *all_tables) { - if (check_single_table_access (thd,privilege,all_tables)) + if (check_single_table_access (thd,privilege,all_tables, FALSE)) return 1; /* Check rights on tables of subselects and implictly opened tables */ @@ -4542,7 +4508,7 @@ bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *all_tables) */ if (view && subselects_tables->belong_to_view == view) { - if (check_single_table_access (thd, privilege, subselects_tables)) + if (check_single_table_access (thd, privilege, subselects_tables, FALSE)) return 1; subselects_tables= subselects_tables->next_global; } @@ -5011,7 +4977,7 @@ bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize) ****************************************************************************/ void -mysql_init_query(THD *thd, uchar *buf, uint length) +mysql_init_query(THD *thd, const char *buf, uint length) { DBUG_ENTER("mysql_init_query"); lex_start(thd, buf, length); @@ -5235,7 +5201,7 @@ void mysql_parse(THD *thd, char *inBuf, uint length) DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on();); - mysql_init_query(thd, (uchar*) inBuf, length); + mysql_init_query(thd, inBuf, length); if (query_cache_send_result_to_client(thd, inBuf, length) <= 0) { @@ -5315,7 +5281,7 @@ bool mysql_test_parse_for_slave(THD *thd, char *inBuf, uint length) bool error= 0; DBUG_ENTER("mysql_test_parse_for_slave"); - mysql_init_query(thd, (uchar*) inBuf, length); + mysql_init_query(thd, inBuf, length); if (!MYSQLparse((void*) thd) && ! thd->is_fatal_error && all_tables_not_ok(thd,(TABLE_LIST*) lex->select_lex.table_list.first)) error= 1; /* Ignore question */ @@ -5332,7 +5298,7 @@ bool mysql_test_parse_for_slave(THD *thd, char *inBuf, uint length) ** Return 0 if ok ******************************************************************************/ -bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, +bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum_field_types type, char *length, char *decimals, uint type_modifier, Item *default_value, Item *on_update_value, @@ -5345,14 +5311,15 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, LEX *lex= thd->lex; DBUG_ENTER("add_field_to_list"); - if (strlen(field_name) > NAME_LEN) + if (check_string_char_length(field_name, "", NAME_CHAR_LEN, + system_charset_info, 1)) { - my_error(ER_TOO_LONG_IDENT, MYF(0), field_name); /* purecov: inspected */ + my_error(ER_TOO_LONG_IDENT, MYF(0), field_name->str); /* purecov: inspected */ DBUG_RETURN(1); /* purecov: inspected */ } if (type_modifier & PRI_KEY_FLAG) { - lex->col_list.push_back(new key_part_spec(field_name,0)); + lex->col_list.push_back(new key_part_spec(field_name->str, 0)); lex->key_list.push_back(new Key(Key::PRIMARY, NullS, &default_key_create_info, 0, lex->col_list)); @@ -5360,7 +5327,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, } if (type_modifier & (UNIQUE_FLAG | UNIQUE_KEY_FLAG)) { - lex->col_list.push_back(new key_part_spec(field_name,0)); + lex->col_list.push_back(new key_part_spec(field_name->str, 0)); lex->key_list.push_back(new Key(Key::UNIQUE, NullS, &default_key_create_info, 0, lex->col_list)); @@ -5380,7 +5347,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, !(((Item_func*)default_value)->functype() == Item_func::NOW_FUNC && type == MYSQL_TYPE_TIMESTAMP)) { - my_error(ER_INVALID_DEFAULT, MYF(0), field_name); + my_error(ER_INVALID_DEFAULT, MYF(0), field_name->str); DBUG_RETURN(1); } else if (default_value->type() == Item::NULL_ITEM) @@ -5389,20 +5356,20 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, if ((type_modifier & (NOT_NULL_FLAG | AUTO_INCREMENT_FLAG)) == NOT_NULL_FLAG) { - my_error(ER_INVALID_DEFAULT, MYF(0), field_name); + my_error(ER_INVALID_DEFAULT, MYF(0), field_name->str); DBUG_RETURN(1); } } else if (type_modifier & AUTO_INCREMENT_FLAG) { - my_error(ER_INVALID_DEFAULT, MYF(0), field_name); + my_error(ER_INVALID_DEFAULT, MYF(0), field_name->str); DBUG_RETURN(1); } } if (on_update_value && type != MYSQL_TYPE_TIMESTAMP) { - my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name); + my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name->str); DBUG_RETURN(1); } @@ -5418,7 +5385,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, } if (!(new_field= new create_field()) || - new_field->init(thd, field_name, type, length, decimals, type_modifier, + new_field->init(thd, field_name->str, type, length, decimals, type_modifier, default_value, on_update_value, comment, change, interval_list, cs, uint_geom_type)) DBUG_RETURN(1); @@ -6970,26 +6937,62 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user) /* - Check that length of a string does not exceed some limit. + Check that byte length of a string does not exceed some limit. SYNOPSIS - check_string_length() - str string to be checked - err_msg error message to be displayed if the string is too long - max_length max length + check_string_byte_length() + str string to be checked + err_msg error message to be displayed if the string is too long + max_byte_length max length in bytes RETURN FALSE the passed string is not longer than max_length TRUE the passed string is longer than max_length + + NOTE + The function is not used in existing code but can be useful later? */ -bool check_string_length(LEX_STRING *str, const char *err_msg, - uint max_length) +bool check_string_byte_length(LEX_STRING *str, const char *err_msg, + uint max_byte_length) { - if (str->length <= max_length) + if (str->length <= max_byte_length) return FALSE; - my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_length); + my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_byte_length); return TRUE; } + + +/* + Check that char length of a string does not exceed some limit. + + SYNOPSIS + check_string_char_length() + str string to be checked + err_msg error message to be displayed if the string is too long + max_char_length max length in symbols + cs string charset + + RETURN + FALSE the passed string is not longer than max_char_length + TRUE the passed string is longer than max_char_length +*/ + + +bool check_string_char_length(LEX_STRING *str, const char *err_msg, + uint max_char_length, CHARSET_INFO *cs, + bool no_error) +{ + int well_formed_error; + uint res= cs->cset->well_formed_len(cs, str->str, str->str + str->length, + max_char_length, &well_formed_error); + + if (!well_formed_error && str->length == res) + return FALSE; + + if (!no_error) + my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_char_length); + return TRUE; +} diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index dbac53ed5f6..d445c8bfbe0 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -1892,12 +1892,15 @@ static int add_partition_options(File fptr, partition_element *p_elem) err+= add_keyword_int(fptr,"MAX_ROWS",(longlong)p_elem->part_max_rows); if (p_elem->part_min_rows) err+= add_keyword_int(fptr,"MIN_ROWS",(longlong)p_elem->part_min_rows); - if (p_elem->data_file_name) - err+= add_keyword_string(fptr, "DATA DIRECTORY", TRUE, - p_elem->data_file_name); - if (p_elem->index_file_name) - err+= add_keyword_string(fptr, "INDEX DIRECTORY", TRUE, - p_elem->index_file_name); + if (!(current_thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)) + { + if (p_elem->data_file_name) + err+= add_keyword_string(fptr, "DATA DIRECTORY", TRUE, + p_elem->data_file_name); + if (p_elem->index_file_name) + err+= add_keyword_string(fptr, "INDEX DIRECTORY", TRUE, + p_elem->index_file_name); + } if (p_elem->part_comment) err+= add_keyword_string(fptr, "COMMENT", TRUE, p_elem->part_comment); return err + add_engine(fptr,p_elem->engine_type); @@ -3700,9 +3703,9 @@ void get_partition_set(const TABLE *table, byte *buf, const uint index, possible to retrace this given an item tree. */ -bool mysql_unpack_partition(THD *thd, const uchar *part_buf, - uint part_info_len, - uchar *part_state, uint part_state_len, +bool mysql_unpack_partition(THD *thd, + const char *part_buf, uint part_info_len, + const char *part_state, uint part_state_len, TABLE* table, bool is_create_table_ind, handlerton *default_db_type) { diff --git a/sql/sql_partition.h b/sql/sql_partition.h index 7ed43527688..e0c0f1c5bd3 100644 --- a/sql/sql_partition.h +++ b/sql/sql_partition.h @@ -77,9 +77,9 @@ void get_full_part_id_from_key(const TABLE *table, byte *buf, KEY *key_info, const key_range *key_spec, part_id_range *part_spec); -bool mysql_unpack_partition(THD *thd, const uchar *part_buf, +bool mysql_unpack_partition(THD *thd, const char *part_buf, uint part_info_len, - uchar *part_state, uint part_state_len, + const char *part_state, uint part_state_len, TABLE *table, bool is_create_table_ind, handlerton *default_db_type); void make_used_partitions_str(partition_info *part_info, String *parts_str); diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 70bc9ef23d5..46fb1568df6 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -162,7 +162,8 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report) plugin directory are used (to make this even remotely secure). */ if (my_strchr(files_charset_info, dl->str, dl->str + dl->length, FN_LIBCHAR) || - dl->length > NAME_LEN || + check_string_char_length((LEX_STRING *) dl, "", NAME_CHAR_LEN, + system_charset_info, 1) || plugin_dir_len + dl->length + 1 >= FN_REFLEN) { if (report & REPORT_TO_USER) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 37a6f68cfe8..e97670ab2b1 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2850,7 +2850,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) old_stmt_arena= thd->stmt_arena; thd->stmt_arena= this; - lex_start(thd, (uchar*) thd->query, thd->query_length); + lex_start(thd, thd->query, thd->query_length); lex->stmt_prepare_mode= TRUE; error= MYSQLparse((void *)thd) || thd->is_fatal_error || diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index debc9a7b572..66dc1c97d56 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1130,6 +1130,11 @@ bool change_master(THD* thd, MASTER_INFO* mi) if (lex_mi->ssl != LEX_MASTER_INFO::SSL_UNCHANGED) mi->ssl= (lex_mi->ssl == LEX_MASTER_INFO::SSL_ENABLE); + + if (lex_mi->ssl_verify_server_cert != LEX_MASTER_INFO::SSL_UNCHANGED) + mi->ssl_verify_server_cert= + (lex_mi->ssl_verify_server_cert == LEX_MASTER_INFO::SSL_ENABLE); + if (lex_mi->ssl_ca) strmake(mi->ssl_ca, lex_mi->ssl_ca, sizeof(mi->ssl_ca)-1); if (lex_mi->ssl_capath) @@ -1142,7 +1147,8 @@ bool change_master(THD* thd, MASTER_INFO* mi) strmake(mi->ssl_key, lex_mi->ssl_key, sizeof(mi->ssl_key)-1); #ifndef HAVE_OPENSSL if (lex_mi->ssl || lex_mi->ssl_ca || lex_mi->ssl_capath || - lex_mi->ssl_cert || lex_mi->ssl_cipher || lex_mi->ssl_key ) + lex_mi->ssl_cert || lex_mi->ssl_cipher || lex_mi->ssl_key || + lex_mi->ssl_verify_server_cert ) push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_SLAVE_IGNORED_SSL_PARAMS, ER(ER_SLAVE_IGNORED_SSL_PARAMS)); #endif diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc index d21864e8572..a62ce98850b 100644 --- a/sql/sql_servers.cc +++ b/sql/sql_servers.cc @@ -237,7 +237,7 @@ bool servers_reload(THD *thd) if (simple_open_n_lock_tables(thd, tables)) { - sql_print_error("Fatal error: Can't open and lock privilege tables: %s", + sql_print_error("Can't open and lock privilege tables: %s", thd->net.last_error); goto end; } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 445890adedb..0d620d33dbb 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -362,7 +362,7 @@ bool mysqld_show_privileges(THD *thd) field_list.push_back(new Item_empty_string("Privilege",10)); field_list.push_back(new Item_empty_string("Context",15)); - field_list.push_back(new Item_empty_string("Comment",NAME_LEN)); + field_list.push_back(new Item_empty_string("Comment",NAME_CHAR_LEN)); if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) @@ -438,8 +438,8 @@ bool mysqld_show_column_types(THD *thd) field_list.push_back(new Item_empty_string("Zerofill",4)); field_list.push_back(new Item_empty_string("Searchable",4)); field_list.push_back(new Item_empty_string("Case_Sensitive",4)); - field_list.push_back(new Item_empty_string("Default",NAME_LEN)); - field_list.push_back(new Item_empty_string("Comment",NAME_LEN)); + field_list.push_back(new Item_empty_string("Default",NAME_CHAR_LEN)); + field_list.push_back(new Item_empty_string("Comment",NAME_CHAR_LEN)); if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) @@ -521,7 +521,7 @@ find_files(THD *thd, List *files, const char *db, for (i=0 ; i < (uint) dirp->number_off_files ; i++) { - char uname[NAME_LEN*3+1]; /* Unencoded name */ + char uname[NAME_LEN + 1]; /* Unencoded name */ file=dirp->dir_entry+i; if (dir) { /* Return databases */ @@ -651,13 +651,13 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list) List field_list; if (table_list->view) { - field_list.push_back(new Item_empty_string("View",NAME_LEN)); + field_list.push_back(new Item_empty_string("View",NAME_CHAR_LEN)); field_list.push_back(new Item_empty_string("Create View", max(buffer.length(),1024))); } else { - field_list.push_back(new Item_empty_string("Table",NAME_LEN)); + field_list.push_back(new Item_empty_string("Table",NAME_CHAR_LEN)); // 1024 is for not to confuse old clients field_list.push_back(new Item_empty_string("Create Table", max(buffer.length(),1024))); @@ -731,7 +731,7 @@ bool mysqld_show_create_db(THD *thd, char *dbname, load_db_opt_by_name(thd, dbname, &create); } List field_list; - field_list.push_back(new Item_empty_string("Database",NAME_LEN)); + field_list.push_back(new Item_empty_string("Database",NAME_CHAR_LEN)); field_list.push_back(new Item_empty_string("Create Database",1024)); if (protocol->send_fields(&field_list, @@ -1626,7 +1626,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) field_list.push_back(new Item_int("Id", 0, MY_INT32_NUM_DECIMAL_DIGITS)); field_list.push_back(new Item_empty_string("User",16)); field_list.push_back(new Item_empty_string("Host",LIST_PROCESS_HOST_LEN)); - field_list.push_back(field=new Item_empty_string("db",NAME_LEN)); + field_list.push_back(field=new Item_empty_string("db",NAME_CHAR_LEN)); field->maybe_null=1; field_list.push_back(new Item_empty_string("Command",16)); field_list.push_back(new Item_return_int("Time",7, MYSQL_TYPE_LONG)); @@ -3761,8 +3761,7 @@ static bool store_trigger(THD *thd, TABLE *table, const char *db, LEX_STRING *definer_buffer) { CHARSET_INFO *cs= system_charset_info; - byte *sql_mode_str; - ulong sql_mode_len; + LEX_STRING sql_mode_rep; restore_record(table, s->default_values); table->field[1]->store(db, strlen(db), cs); @@ -3778,11 +3777,9 @@ static bool store_trigger(THD *thd, TABLE *table, const char *db, table->field[14]->store(STRING_WITH_LEN("OLD"), cs); table->field[15]->store(STRING_WITH_LEN("NEW"), cs); - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, - sql_mode, - &sql_mode_len); - table->field[17]->store((const char*)sql_mode_str, sql_mode_len, cs); + sys_var_thd_sql_mode::symbolic_mode_representation(thd, sql_mode, + &sql_mode_rep); + table->field[17]->store(sql_mode_rep.str, sql_mode_rep.length, cs); table->field[18]->store((const char *)definer_buffer->str, definer_buffer->length, cs); return schema_table_store_record(thd, table); } @@ -4308,13 +4305,13 @@ copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table) CHARSET_INFO *scs= system_charset_info; TIME time; Event_timed et; - DBUG_ENTER("fill_events_copy_to_schema_tab"); + DBUG_ENTER("copy_event_to_schema_table"); restore_record(sch_table, s->default_values); if (et.load_from_row(thd, event_table)) { - my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0)); + my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), event_table->alias); DBUG_RETURN(1); } @@ -4349,13 +4346,11 @@ copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table) /* SQL_MODE */ { - byte *sql_mode_str; - ulong sql_mode_len= 0; - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, et.sql_mode, - &sql_mode_len); + LEX_STRING sql_mode; + sys_var_thd_sql_mode::symbolic_mode_representation(thd, et.sql_mode, + &sql_mode); sch_table->field[ISE_SQL_MODE]-> - store((const char*)sql_mode_str, sql_mode_len, scs); + store(sql_mode.str, sql_mode.length, scs); } int not_used=0; @@ -4709,6 +4704,12 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) DBUG_RETURN(0); } break; + case MYSQL_TYPE_FLOAT: + case MYSQL_TYPE_DOUBLE: + if ((item= new Item_float(fields_info->field_name, 0.0, NOT_FIXED_DEC, + fields_info->field_length)) == NULL) + DBUG_RETURN(NULL); + break; case MYSQL_TYPE_DECIMAL: if (!(item= new Item_decimal((longlong) fields_info->value, false))) { @@ -4725,6 +4726,9 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) strlen(fields_info->field_name), cs); break; default: + /* Don't let unimplemented types pass through. Could be a grave error. */ + DBUG_ASSERT(fields_info->field_type == MYSQL_TYPE_STRING); + /* this should be changed when Item_empty_string is fixed(in 4.1) */ if (!(item= new Item_empty_string("", 0, cs))) { @@ -5341,7 +5345,7 @@ int fill_schema_session_variables(THD *thd, TABLE_LIST *tables, COND *cond) ST_FIELD_INFO schema_fields_info[]= { {"CATALOG_NAME", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"SCHEMA_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Database"}, + {"SCHEMA_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Database"}, {"DEFAULT_CHARACTER_SET_NAME", 64, MYSQL_TYPE_STRING, 0, 0, 0}, {"DEFAULT_COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 0, 0}, {"SQL_PATH", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, @@ -5352,10 +5356,10 @@ ST_FIELD_INFO schema_fields_info[]= ST_FIELD_INFO tables_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, - {"TABLE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"ENGINE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Engine"}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, + {"TABLE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"ENGINE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, "Engine"}, {"VERSION", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, "Version"}, {"ROW_FORMAT", 10, MYSQL_TYPE_STRING, 0, 1, "Row_format"}, {"TABLE_ROWS", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, "Rows"}, @@ -5384,13 +5388,13 @@ ST_FIELD_INFO tables_fields_info[]= ST_FIELD_INFO columns_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Field"}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Field"}, {"ORDINAL_POSITION", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 0, 0}, {"COLUMN_DEFAULT", MAX_FIELD_VARCHARLENGTH, MYSQL_TYPE_STRING, 0, 1, "Default"}, {"IS_NULLABLE", 3, MYSQL_TYPE_STRING, 0, 0, "Null"}, - {"DATA_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"DATA_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"CHARACTER_MAXIMUM_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, 0}, {"CHARACTER_OCTET_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, 0}, @@ -5443,9 +5447,9 @@ ST_FIELD_INFO engines_fields_info[]= ST_FIELD_INFO events_fields_info[]= { - {"EVENT_CATALOG", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"EVENT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"}, - {"EVENT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, + {"EVENT_CATALOG", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"EVENT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"}, + {"EVENT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, {"DEFINER", 77, MYSQL_TYPE_STRING, 0, 0, "Definer"}, {"TIME_ZONE", 64, MYSQL_TYPE_STRING, 0, 0, "Time zone"}, {"EVENT_BODY", 8, MYSQL_TYPE_STRING, 0, 0, 0}, @@ -5462,7 +5466,7 @@ ST_FIELD_INFO events_fields_info[]= {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0}, {"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0}, {"LAST_EXECUTED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0}, - {"EVENT_COMMENT", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"EVENT_COMMENT", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"ORIGINATOR", 10, MYSQL_TYPE_LONG, 0, 0, "Originator"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5479,25 +5483,25 @@ ST_FIELD_INFO coll_charset_app_fields_info[]= ST_FIELD_INFO proc_fields_info[]= { - {"SPECIFIC_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"SPECIFIC_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"ROUTINE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"ROUTINE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"}, - {"ROUTINE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, + {"ROUTINE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"}, + {"ROUTINE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, {"ROUTINE_TYPE", 9, MYSQL_TYPE_STRING, 0, 0, "Type"}, - {"DTD_IDENTIFIER", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"DTD_IDENTIFIER", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"ROUTINE_BODY", 8, MYSQL_TYPE_STRING, 0, 0, 0}, {"ROUTINE_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 1, 0}, - {"EXTERNAL_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"EXTERNAL_LANGUAGE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"EXTERNAL_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"EXTERNAL_LANGUAGE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"PARAMETER_STYLE", 8, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_DETERMINISTIC", 3, MYSQL_TYPE_STRING, 0, 0, 0}, - {"SQL_DATA_ACCESS", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"SQL_PATH", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"SQL_DATA_ACCESS", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"SQL_PATH", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"SECURITY_TYPE", 7, MYSQL_TYPE_STRING, 0, 0, "Security_type"}, {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, "Created"}, {"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, "Modified"}, {"SQL_MODE", 65535, MYSQL_TYPE_STRING, 0, 0, 0}, - {"ROUTINE_COMMENT", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Comment"}, + {"ROUTINE_COMMENT", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Comment"}, {"DEFINER", 77, MYSQL_TYPE_STRING, 0, 0, "Definer"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5506,13 +5510,13 @@ ST_FIELD_INFO proc_fields_info[]= ST_FIELD_INFO stat_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, {"NON_UNIQUE", 1, MYSQL_TYPE_LONG, 0, 0, "Non_unique"}, - {"INDEX_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"INDEX_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Key_name"}, + {"INDEX_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"INDEX_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Key_name"}, {"SEQ_IN_INDEX", 2, MYSQL_TYPE_LONG, 0, 0, "Seq_in_index"}, - {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Column_name"}, + {"COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Column_name"}, {"COLLATION", 1, MYSQL_TYPE_STRING, 0, 1, "Collation"}, {"CARDINALITY", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 1, "Cardinality"}, {"SUB_PART", 3, MYSQL_TYPE_LONG, 0, 1, "Sub_part"}, @@ -5527,8 +5531,8 @@ ST_FIELD_INFO stat_fields_info[]= ST_FIELD_INFO view_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"VIEW_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 0, 0}, {"CHECK_OPTION", 8, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_UPDATABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, @@ -5542,7 +5546,7 @@ ST_FIELD_INFO user_privileges_fields_info[]= { {"GRANTEE", 81, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"PRIVILEGE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PRIVILEGE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_GRANTABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5552,8 +5556,8 @@ ST_FIELD_INFO schema_privileges_fields_info[]= { {"GRANTEE", 81, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PRIVILEGE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PRIVILEGE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_GRANTABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5563,9 +5567,9 @@ ST_FIELD_INFO table_privileges_fields_info[]= { {"GRANTEE", 81, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PRIVILEGE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PRIVILEGE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_GRANTABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5575,10 +5579,10 @@ ST_FIELD_INFO column_privileges_fields_info[]= { {"GRANTEE", 81, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PRIVILEGE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PRIVILEGE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_GRANTABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5587,11 +5591,11 @@ ST_FIELD_INFO column_privileges_fields_info[]= ST_FIELD_INFO table_constraints_fields_info[]= { {"CONSTRAINT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"CONSTRAINT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"CONSTRAINT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"CONSTRAINT_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5599,17 +5603,17 @@ ST_FIELD_INFO table_constraints_fields_info[]= ST_FIELD_INFO key_column_usage_fields_info[]= { {"CONSTRAINT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"CONSTRAINT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"CONSTRAINT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"ORDINAL_POSITION", 10 ,MYSQL_TYPE_LONG, 0, 0, 0}, {"POSITION_IN_UNIQUE_CONSTRAINT", 10 ,MYSQL_TYPE_LONG, 0, 1, 0}, - {"REFERENCED_TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"REFERENCED_TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"REFERENCED_COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"REFERENCED_TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"REFERENCED_TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"REFERENCED_COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5617,17 +5621,17 @@ ST_FIELD_INFO key_column_usage_fields_info[]= ST_FIELD_INFO table_names_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Tables_in_"}, - {"TABLE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table_type"}, + {"TABLE_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Tables_in_"}, + {"TABLE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table_type"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; ST_FIELD_INFO open_tables_fields_info[]= { - {"Database", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Database"}, - {"Table",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, + {"Database", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Database"}, + {"Table",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, {"In_use", 1, MYSQL_TYPE_LONG, 0, 0, "In_use"}, {"Name_locked", 4, MYSQL_TYPE_LONG, 0, 0, "Name_locked"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} @@ -5637,19 +5641,19 @@ ST_FIELD_INFO open_tables_fields_info[]= ST_FIELD_INFO triggers_fields_info[]= { {"TRIGGER_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TRIGGER_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TRIGGER_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Trigger"}, + {"TRIGGER_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TRIGGER_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Trigger"}, {"EVENT_MANIPULATION", 6, MYSQL_TYPE_STRING, 0, 0, "Event"}, {"EVENT_OBJECT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"EVENT_OBJECT_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"EVENT_OBJECT_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, + {"EVENT_OBJECT_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"EVENT_OBJECT_TABLE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, {"ACTION_ORDER", 4, MYSQL_TYPE_LONG, 0, 0, 0}, {"ACTION_CONDITION", 65535, MYSQL_TYPE_STRING, 0, 1, 0}, {"ACTION_STATEMENT", 65535, MYSQL_TYPE_STRING, 0, 0, "Statement"}, {"ACTION_ORIENTATION", 9, MYSQL_TYPE_STRING, 0, 0, 0}, {"ACTION_TIMING", 6, MYSQL_TYPE_STRING, 0, 0, "Timing"}, - {"ACTION_REFERENCE_OLD_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"ACTION_REFERENCE_NEW_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"ACTION_REFERENCE_OLD_TABLE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"ACTION_REFERENCE_NEW_TABLE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"ACTION_REFERENCE_OLD_ROW", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {"ACTION_REFERENCE_NEW_ROW", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Created"}, @@ -5662,10 +5666,10 @@ ST_FIELD_INFO triggers_fields_info[]= ST_FIELD_INFO partitions_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PARTITION_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"SUBPARTITION_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLE_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PARTITION_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"SUBPARTITION_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"PARTITION_ORDINAL_POSITION", 21 , MYSQL_TYPE_LONG, 0, 1, 0}, {"SUBPARTITION_ORDINAL_POSITION", 21 , MYSQL_TYPE_LONG, 0, 1, 0}, {"PARTITION_METHOD", 12, MYSQL_TYPE_STRING, 0, 1, 0}, @@ -5685,7 +5689,7 @@ ST_FIELD_INFO partitions_fields_info[]= {"CHECKSUM", 21 , MYSQL_TYPE_LONG, 0, 1, 0}, {"PARTITION_COMMENT", 80, MYSQL_TYPE_STRING, 0, 0, 0}, {"NODEGROUP", 12 , MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLESPACE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLESPACE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5719,7 +5723,7 @@ ST_FIELD_INFO processlist_fields_info[]= {"ID", 4, MYSQL_TYPE_LONG, 0, 0, "Id"}, {"USER", 16, MYSQL_TYPE_STRING, 0, 0, "User"}, {"HOST", LIST_PROCESS_HOST_LEN, MYSQL_TYPE_STRING, 0, 0, "Host"}, - {"DB", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Db"}, + {"DB", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, "Db"}, {"COMMAND", 16, MYSQL_TYPE_STRING, 0, 0, "Command"}, {"TIME", 7, MYSQL_TYPE_LONG, 0, 0, "Time"}, {"STATE", 64, MYSQL_TYPE_STRING, 0, 1, "State"}, @@ -5730,14 +5734,14 @@ ST_FIELD_INFO processlist_fields_info[]= ST_FIELD_INFO plugin_fields_info[]= { - {"PLUGIN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, + {"PLUGIN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, {"PLUGIN_VERSION", 20, MYSQL_TYPE_STRING, 0, 0, 0}, {"PLUGIN_STATUS", 10, MYSQL_TYPE_STRING, 0, 0, "Status"}, {"PLUGIN_TYPE", 80, MYSQL_TYPE_STRING, 0, 0, "Type"}, {"PLUGIN_TYPE_VERSION", 20, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PLUGIN_LIBRARY", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Library"}, + {"PLUGIN_LIBRARY", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, "Library"}, {"PLUGIN_LIBRARY_VERSION", 20, MYSQL_TYPE_STRING, 0, 1, 0}, - {"PLUGIN_AUTHOR", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"PLUGIN_AUTHOR", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"PLUGIN_DESCRIPTION", 65535, MYSQL_TYPE_STRING, 0, 1, 0}, {"PLUGIN_LICENSE", 80, MYSQL_TYPE_STRING, 0, 1, "License"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} @@ -5746,16 +5750,16 @@ ST_FIELD_INFO plugin_fields_info[]= ST_FIELD_INFO files_fields_info[]= { {"FILE_ID", 4, MYSQL_TYPE_LONG, 0, 0, 0}, - {"FILE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"FILE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"FILE_TYPE", 20, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLESPACE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_CATALOG", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"LOGFILE_GROUP_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLESPACE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLE_CATALOG", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"LOGFILE_GROUP_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"LOGFILE_GROUP_NUMBER", 4, MYSQL_TYPE_LONG, 0, 1, 0}, - {"ENGINE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"FULLTEXT_KEYS", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"ENGINE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"FULLTEXT_KEYS", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"DELETED_ROWS", 4, MYSQL_TYPE_LONG, 0, 1, 0}, {"UPDATE_COUNT", 4, MYSQL_TYPE_LONG, 0, 1, 0}, {"FREE_EXTENTS", 4, MYSQL_TYPE_LONG, 0, 1, 0}, @@ -5799,16 +5803,16 @@ void init_fill_schema_files_row(TABLE* table) ST_FIELD_INFO referential_constraints_fields_info[]= { {"CONSTRAINT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"CONSTRAINT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"CONSTRAINT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"UNIQUE_CONSTRAINT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"UNIQUE_CONSTRAINT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"UNIQUE_CONSTRAINT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"MATCH_OPTION", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"UPDATE_RULE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"DELETE_RULE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"REFERENCED_TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"UNIQUE_CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"UNIQUE_CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"MATCH_OPTION", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"UPDATE_RULE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"DELETE_RULE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"REFERENCED_TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 3eb47ebae6e..0ec0a8e0f86 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1922,6 +1922,7 @@ static int sort_keys(KEY *a, KEY *b) set_or_name "SET" or "ENUM" string for warning message name name of the checked column typelib list of values for the column + dup_val_count returns count of duplicate elements DESCRIPTION This function prints an warning for each value in list @@ -1933,11 +1934,12 @@ static int sort_keys(KEY *a, KEY *b) void check_duplicates_in_interval(const char *set_or_name, const char *name, TYPELIB *typelib, - CHARSET_INFO *cs) + CHARSET_INFO *cs, unsigned int *dup_val_count) { TYPELIB tmp= *typelib; const char **cur_value= typelib->type_names; unsigned int *cur_length= typelib->type_lengths; + *dup_val_count= 0; for ( ; tmp.count > 1; cur_value++, cur_length++) { @@ -1950,6 +1952,7 @@ void check_duplicates_in_interval(const char *set_or_name, ER_DUPLICATED_VALUE_IN_TYPE, ER(ER_DUPLICATED_VALUE_IN_TYPE), name,*cur_value,set_or_name); + (*dup_val_count)++; } } } @@ -2013,6 +2016,7 @@ int prepare_create_field(create_field *sql_field, int *timestamps, int *timestamps_with_niladic, longlong table_flags) { + unsigned int dup_val_count; DBUG_ENTER("prepare_field"); /* @@ -2088,7 +2092,7 @@ int prepare_create_field(create_field *sql_field, sql_field->unireg_check=Field::INTERVAL_FIELD; check_duplicates_in_interval("ENUM",sql_field->field_name, sql_field->interval, - sql_field->charset); + sql_field->charset, &dup_val_count); break; case MYSQL_TYPE_SET: sql_field->pack_flag=pack_length_to_packflag(sql_field->pack_length) | @@ -2098,7 +2102,13 @@ int prepare_create_field(create_field *sql_field, sql_field->unireg_check=Field::BIT_FIELD; check_duplicates_in_interval("SET",sql_field->field_name, sql_field->interval, - sql_field->charset); + sql_field->charset, &dup_val_count); + /* Check that count of unique members is not more then 64 */ + if (sql_field->interval->count - dup_val_count > sizeof(longlong)*8) + { + my_error(ER_TOO_BIG_SET, MYF(0), sql_field->field_name); + DBUG_RETURN(1); + } break; case MYSQL_TYPE_DATE: // Rest of string types case MYSQL_TYPE_NEWDATE: @@ -2541,6 +2551,7 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info, { DBUG_PRINT("info", ("key name: '%s' type: %d", key->name ? key->name : "(none)" , key->type)); + LEX_STRING key_name_str; if (key->type == Key::FOREIGN_KEY) { fk_key_count++; @@ -2562,7 +2573,10 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info, my_error(ER_TOO_MANY_KEY_PARTS,MYF(0),tmp); DBUG_RETURN(-1); } - if (key->name && strlen(key->name) > NAME_LEN) + key_name_str.str= (char*) key->name; + key_name_str.length= key->name ? strlen(key->name) : 0; + if (check_string_char_length(&key_name_str, "", NAME_CHAR_LEN, + system_charset_info, 1)) { my_error(ER_TOO_LONG_IDENT, MYF(0), key->name); DBUG_RETURN(-1); @@ -3488,6 +3502,7 @@ bool mysql_create_table_internal(THD *thd, { bool create_if_not_exists = create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS; + if (ha_table_exists_in_engine(thd, db, table_name)) { DBUG_PRINT("info", ("Table with same name already existed in handler")); @@ -3938,7 +3953,9 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list, /* Check if this is a table type that stores index and data separately, - like ISAM or MyISAM + like ISAM or MyISAM. We assume fixed order of engine file name + extentions array. First element of engine file name extentions array + is meta/index file extention. Second element - data file extention. */ ext= table->file->bas_ext(); if (!ext[0] || !ext[1]) @@ -4049,7 +4066,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, if (end_active_trans(thd)) DBUG_RETURN(1); - field_list.push_back(item = new Item_empty_string("Table", NAME_LEN*2)); + field_list.push_back(item = new Item_empty_string("Table", NAME_CHAR_LEN*2)); item->maybe_null = 1; field_list.push_back(item = new Item_empty_string("Op", 10)); item->maybe_null = 1; @@ -4618,6 +4635,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, #ifdef WITH_PARTITION_STORAGE_ENGINE char tmp_path[FN_REFLEN]; #endif + char ts_name[FN_LEN]; TABLE_LIST src_tables_list, dst_tables_list; DBUG_ENTER("mysql_create_like_table"); @@ -4631,7 +4649,8 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, /* Validate the source table */ - if (table_ident->table.length > NAME_LEN || + if (check_string_char_length(&table_ident->table, "", NAME_CHAR_LEN, + system_charset_info, 1) || (table_ident->table.length && check_table_name(src_table,table_ident->table.length))) { @@ -4698,6 +4717,18 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, if (simple_open_n_lock_tables(thd, &src_tables_list)) DBUG_RETURN(TRUE); + /* + For bug#25875, Newly created table through CREATE TABLE .. LIKE + has no ndb_dd attributes; + Add something to get possible tablespace info from src table, + it can get valid tablespace name only for disk-base ndb table + */ + if ((src_tables_list.table->file->get_tablespace_name(thd, ts_name, FN_LEN))) + { + create_info->tablespace= ts_name; + create_info->storage_media= HA_SM_DISK; + } + /* Validate the destination table diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 9e30cf5878c..d7573b42c5f 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -537,6 +537,6 @@ Estimated memory (with thread stack): %ld\n", (long) (thread_count * thread_stack + info.hblkhd + info.arena)); #endif - Events::get_instance()->dump_internal_status(); + Events::dump_internal_status(); puts(""); } diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 311bd089c64..66132efb8e4 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -976,7 +976,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db, LEX_STRING *trg_definer= it_definer++; thd->variables.sql_mode= (ulong)*trg_sql_mode; - lex_start(thd, (uchar*)trg_create_str->str, trg_create_str->length); + lex_start(thd, trg_create_str->str, trg_create_str->length); thd->spcont= 0; if (MYSQLparse((void *)thd) || thd->is_fatal_error) diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h index 707fcc4e380..7d99dd811cd 100644 --- a/sql/sql_trigger.h +++ b/sql/sql_trigger.h @@ -110,6 +110,11 @@ public: const char *old_table, const char *new_db, const char *new_table); + bool has_triggers(trg_event_type event_type, + trg_action_time_type action_time) + { + return (bodies[event_type][action_time] != NULL); + } bool has_delete_triggers() { return (bodies[TRG_EVENT_DELETE][TRG_ACTION_BEFORE] || diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index da5c1b0bc66..fd7ba698a93 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -169,8 +169,10 @@ void udf_init() This is done to ensure that only approved dll from the system directories are used (to make this even remotely secure). */ - if (my_strchr(files_charset_info, dl_name, dl_name + strlen(dl_name), FN_LIBCHAR) || - strlen(name.str) > NAME_LEN) + if (my_strchr(files_charset_info, dl_name, + dl_name + strlen(dl_name), FN_LIBCHAR) || + check_string_char_length(&name, "", NAME_CHAR_LEN, + system_charset_info, 1)) { sql_print_error("Invalid row in mysql.func table for function '%.64s'", name.str); @@ -397,7 +399,8 @@ int mysql_create_function(THD *thd,udf_func *udf) my_message(ER_UDF_NO_PATHS, ER(ER_UDF_NO_PATHS), MYF(0)); DBUG_RETURN(1); } - if (udf->name.length > NAME_LEN) + if (check_string_char_length(&udf->name, "", NAME_CHAR_LEN, + system_charset_info, 1)) { my_error(ER_TOO_LONG_IDENT, MYF(0), udf->name); DBUG_RETURN(1); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 0b4632edfbe..56c952f34ce 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -201,8 +201,10 @@ int mysql_update(THD *thd, table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; else { - bitmap_set_bit(table->write_set, - table->timestamp_field->field_index); + if (table->timestamp_field_type == TIMESTAMP_AUTO_SET_ON_UPDATE || + table->timestamp_field_type == TIMESTAMP_AUTO_SET_ON_BOTH) + bitmap_set_bit(table->write_set, + table->timestamp_field->field_index); } } @@ -452,7 +454,20 @@ int mysql_update(THD *thd, (thd->variables.sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES))); - will_batch= !table->file->start_bulk_update(); + if (table->triggers && + table->triggers->has_triggers(TRG_EVENT_UPDATE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER UPDATE triggers that might access to subject + table and therefore might need update to be done immediately. + So we turn-off the batching. + */ + (void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH); + will_batch= FALSE; + } + else + will_batch= !table->file->start_bulk_update(); /* We can use compare_record() to optimize away updates if @@ -1121,6 +1136,17 @@ int multi_update::prepare(List ¬_used_values, table->no_keyread=1; table->covering_keys.clear_all(); table->pos_in_table_list= tl; + if (table->triggers && + table->triggers->has_triggers(TRG_EVENT_UPDATE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER UPDATE triggers that might access to subject + table and therefore might need update to be done immediately. + So we turn-off the batching. + */ + (void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH); + } } } diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 32a21e377ba..f84847f2f9c 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -679,7 +679,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, char md5[MD5_BUFF_LENGTH]; bool can_be_merged; char dir_buff[FN_REFLEN], path_buff[FN_REFLEN]; - const uchar *endp; + const char *endp; LEX_STRING dir, file, path; DBUG_ENTER("mysql_register_view"); @@ -763,9 +763,9 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, view->query.str= (char*)str.ptr(); view->query.length= str.length()-1; // we do not need last \0 view->source.str= thd->query + thd->lex->create_view_select_start; - endp= (uchar*) view->source.str; - endp= skip_rear_comments(endp, (uchar*) (thd->query + thd->query_length)); - view->source.length= endp - (uchar*) view->source.str; + endp= view->source.str; + endp= skip_rear_comments(endp, thd->query + thd->query_length); + view->source.length= endp - view->source.str; view->file_version= 1; view->calc_md5(md5); view->md5.str= md5; @@ -974,7 +974,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, now Lex placed in statement memory */ table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local; - lex_start(thd, (uchar*)table->query.str, table->query.length); + lex_start(thd, table->query.str, table->query.length); view_select= &lex->select_lex; view_select->select_number= ++thd->select_number; { diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 36b09224796..0c7d2fc2187 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -780,6 +780,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token MASTER_SSL_CIPHER_SYM %token MASTER_SSL_KEY_SYM %token MASTER_SSL_SYM +%token MASTER_SSL_VERIFY_SERVER_CERT_SYM %token MASTER_SYM %token MASTER_USER_SYM %token MATCH /* SQL-2003-R */ @@ -948,7 +949,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token SIGNED_SYM %token SIMPLE_SYM /* SQL-2003-N */ %token SLAVE -%token SLAVESIDE_DISABLE_SYM %token SMALLINT /* SQL-2003-R */ %token SNAPSHOT_SYM %token SOCKET_SYM @@ -1529,6 +1529,11 @@ master_def: { Lex->mi.ssl_key= $3.str; } + | MASTER_SSL_VERIFY_SERVER_CERT_SYM EQ ulong_num + { + Lex->mi.ssl_verify_server_cert= $3 ? + LEX_MASTER_INFO::SSL_ENABLE : LEX_MASTER_INFO::SSL_DISABLE; + } | master_file_def ; @@ -1853,7 +1858,7 @@ ev_sql_stmt: */ if (lex->sphead) { - my_error(ER_EVENT_RECURSIVITY_FORBIDDEN, MYF(0)); + my_error(ER_EVENT_RECURSION_FORBIDDEN, MYF(0)); MYSQL_YYABORT; } @@ -1926,26 +1931,24 @@ sp_name: my_error(ER_WRONG_DB_NAME, MYF(0), $1.str); MYSQL_YYABORT; } - if (check_routine_name($3)) + if (check_routine_name(&$3)) { - my_error(ER_SP_WRONG_NAME, MYF(0), $3.str); MYSQL_YYABORT; } - $$= new sp_name($1, $3); + $$= new sp_name($1, $3, true); $$->init_qname(YYTHD); } | ident { THD *thd= YYTHD; LEX_STRING db; - if (check_routine_name($1)) + if (check_routine_name(&$1)) { - my_error(ER_SP_WRONG_NAME, MYF(0), $1.str); MYSQL_YYABORT; } if (thd->copy_db_to(&db.str, &db.length)) MYSQL_YYABORT; - $$= new sp_name(db, $1); + $$= new sp_name(db, $1, false); if ($$) $$->init_qname(YYTHD); } @@ -2701,7 +2704,7 @@ sp_proc_stmt_statement: else i->m_query.length= lex->tok_end - sp->m_tmp_query; i->m_query.str= strmake_root(YYTHD->mem_root, - (char *)sp->m_tmp_query, + sp->m_tmp_query, i->m_query.length); sp->add_instr(i); } @@ -4535,8 +4538,7 @@ field_spec: type opt_attribute { LEX *lex=Lex; - if (add_field_to_list(lex->thd, $1.str, - (enum enum_field_types) $3, + if (add_field_to_list(lex->thd, &$1, (enum enum_field_types) $3, lex->length,lex->dec,lex->type, lex->default_value, lex->on_update_value, &lex->comment, @@ -5492,7 +5494,7 @@ alter_list_item: type opt_attribute { LEX *lex=Lex; - if (add_field_to_list(lex->thd,$3.str, + if (add_field_to_list(lex->thd,&$3, (enum enum_field_types) $5, lex->length,lex->dec,lex->type, lex->default_value, lex->on_update_value, @@ -6923,7 +6925,7 @@ function_call_generic: builder= find_qualified_function_builder(thd); DBUG_ASSERT(builder); - item= builder->create(thd, $1, $3, $5); + item= builder->create(thd, $1, $3, true, $5); if (! ($$= item)) { @@ -9305,7 +9307,7 @@ param_marker: my_error(ER_VIEW_SELECT_VARIABLE, MYF(0)); MYSQL_YYABORT; } - item= new Item_param((uint) (lex->tok_start - (uchar *) thd->query)); + item= new Item_param((uint) (lex->tok_start - thd->query)); if (!($$= item) || lex->param_list.push_back(item)) { my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); @@ -9717,8 +9719,9 @@ user: $$->host.str= (char *) "%"; $$->host.length= 1; - if (check_string_length(&$$->user, - ER(ER_USERNAME), USERNAME_LENGTH)) + if (check_string_char_length(&$$->user, ER(ER_USERNAME), + USERNAME_CHAR_LENGTH, + system_charset_info, 0)) MYSQL_YYABORT; } | ident_or_text '@' ident_or_text @@ -9728,10 +9731,11 @@ user: MYSQL_YYABORT; $$->user = $1; $$->host=$3; - if (check_string_length(&$$->user, - ER(ER_USERNAME), USERNAME_LENGTH) || - check_string_length(&$$->host, - ER(ER_HOSTNAME), HOSTNAME_LENGTH)) + if (check_string_char_length(&$$->user, ER(ER_USERNAME), + USERNAME_CHAR_LENGTH, + system_charset_info, 0) || + check_string_byte_length(&$$->host, ER(ER_HOSTNAME), + HOSTNAME_LENGTH)) MYSQL_YYABORT; } | CURRENT_USER optional_braces @@ -10004,7 +10008,6 @@ keyword_sp: | SIMPLE_SYM {} | SHARE_SYM {} | SHUTDOWN {} - | SLAVESIDE_DISABLE_SYM {} | SNAPSHOT_SYM {} | SOUNDS_SYM {} | SQL_CACHE_SYM {} @@ -10142,7 +10145,7 @@ option_type_value: if (!(qbuff.str= alloc_root(YYTHD->mem_root, qbuff.length + 5))) MYSQL_YYABORT; - strmake(strmake(qbuff.str, "SET ", 4), (char *)sp->m_tmp_query, + strmake(strmake(qbuff.str, "SET ", 4), sp->m_tmp_query, qbuff.length); qbuff.length+= 4; i->m_query= qbuff; @@ -10840,7 +10843,8 @@ grant_ident: | table_ident { LEX *lex=Lex; - if (!lex->current_select->add_table_to_list(lex->thd, $1,NULL,0)) + if (!lex->current_select->add_table_to_list(lex->thd, $1,NULL, + TL_OPTION_UPDATING)) MYSQL_YYABORT; if (lex->grant == GLOBAL_ACLS) lex->grant = TABLE_ACLS & ~GRANT_ACL; @@ -11361,18 +11365,16 @@ view_select_aux: { THD *thd= YYTHD; LEX *lex= thd->lex; - char *stmt_beg= (lex->sphead ? - (char *)lex->sphead->m_tmp_query : - thd->query); + const char *stmt_beg= (lex->sphead ? + lex->sphead->m_tmp_query : thd->query); lex->create_view_select_start= $2 - stmt_beg; } | '(' remember_name select_paren ')' union_opt { THD *thd= YYTHD; LEX *lex= thd->lex; - char *stmt_beg= (lex->sphead ? - (char *)lex->sphead->m_tmp_query : - thd->query); + const char *stmt_beg= (lex->sphead ? + lex->sphead->m_tmp_query : thd->query); lex->create_view_select_start= $2 - stmt_beg; } ; diff --git a/sql/strfunc.cc b/sql/strfunc.cc index 71b52a5145d..9ffc5fd127f 100644 --- a/sql/strfunc.cc +++ b/sql/strfunc.cc @@ -104,7 +104,8 @@ ulonglong find_set(TYPELIB *lib, const char *str, uint length, CHARSET_INFO *cs, > 0 position in TYPELIB->type_names +1 */ -uint find_type(TYPELIB *lib, const char *find, uint length, bool part_match) +uint find_type(const TYPELIB *lib, const char *find, uint length, + bool part_match) { uint found_count=0, found_pos=0; const char *end= find+length; @@ -144,7 +145,8 @@ uint find_type(TYPELIB *lib, const char *find, uint length, bool part_match) >0 Offset+1 in typelib for matched string */ -uint find_type2(TYPELIB *typelib, const char *x, uint length, CHARSET_INFO *cs) +uint find_type2(const TYPELIB *typelib, const char *x, uint length, + CHARSET_INFO *cs) { int pos; const char *j; diff --git a/sql/table.cc b/sql/table.cc index 4123473cf1e..c0b04093f36 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -250,7 +250,7 @@ void free_table_share(TABLE_SHARE *share) Currently these are: help_category, help_keyword, help_relation, help_topic, - proc, + proc, event time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type @@ -283,7 +283,14 @@ inline bool is_system_table_name(const char *name, uint length) my_tolower(ci, name[0]) == 't' && my_tolower(ci, name[1]) == 'i' && my_tolower(ci, name[2]) == 'm' && - my_tolower(ci, name[3]) == 'e' + my_tolower(ci, name[3]) == 'e' || + + /* mysql.event table */ + my_tolower(ci, name[0]) == 'e' && + my_tolower(ci, name[1]) == 'v' && + my_tolower(ci, name[2]) == 'e' && + my_tolower(ci, name[3]) == 'n' && + my_tolower(ci, name[4]) == 't' ) ); } @@ -682,8 +689,8 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, if ((share->partition_info_len= partition_info_len)) { if (!(share->partition_info= - (uchar*) memdup_root(&share->mem_root, next_chunk + 4, - partition_info_len + 1))) + memdup_root(&share->mem_root, next_chunk + 4, + partition_info_len + 1))) { my_free(buff, MYF(0)); goto err; @@ -1528,7 +1535,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, tmp= mysql_unpack_partition(thd, share->partition_info, share->partition_info_len, - (uchar*)share->part_state, + share->part_state, share->part_state_len, outparam, is_create_table, share->default_part_db_type); @@ -2329,8 +2336,9 @@ uint calculate_key_len(TABLE *table, uint key, const byte *buf, bool check_db_name(LEX_STRING *org_name) { char *name= org_name->str; + uint name_length= org_name->length; - if (!org_name->length || org_name->length > NAME_LEN) + if (!name_length || name_length > NAME_LEN) return 1; if (lower_case_table_names && name != any_db) @@ -2339,6 +2347,7 @@ bool check_db_name(LEX_STRING *org_name) #if defined(USE_MB) && defined(USE_MB_IDENT) if (use_mb(system_charset_info)) { + name_length= 0; bool last_char_is_space= TRUE; char *end= name + org_name->length; while (name < end) @@ -2349,12 +2358,14 @@ bool check_db_name(LEX_STRING *org_name) if (!len) len= 1; name+= len; + name_length++; } - return last_char_is_space; + return (last_char_is_space || name_length > NAME_CHAR_LEN); } else #endif - return org_name->str[org_name->length - 1] != ' '; /* purecov: inspected */ + return ((org_name->str[org_name->length - 1] != ' ') || + (name_length > NAME_CHAR_LEN)); /* purecov: inspected */ } @@ -2367,6 +2378,7 @@ bool check_db_name(LEX_STRING *org_name) bool check_table_name(const char *name, uint length) { + uint name_length= 0; // name length in symbols const char *end= name+length; if (!length || length > NAME_LEN) return 1; @@ -2387,14 +2399,16 @@ bool check_table_name(const char *name, uint length) if (len) { name += len; + name_length++; continue; } } #endif name++; + name_length++; } #if defined(USE_MB) && defined(USE_MB_IDENT) - return last_char_is_space; + return (last_char_is_space || name_length > NAME_CHAR_LEN) ; #else return 0; #endif @@ -2403,7 +2417,7 @@ bool check_table_name(const char *name, uint length) bool check_column_name(const char *name) { - const char *start= name; + uint name_length= 0; // name length in symbols bool last_char_is_space= TRUE; while (*name) @@ -2417,6 +2431,7 @@ bool check_column_name(const char *name) if (len) { name += len; + name_length++; continue; } } @@ -2426,159 +2441,150 @@ bool check_column_name(const char *name) if (*name == NAMES_SEP_CHAR) return 1; name++; + name_length++; } /* Error if empty or too long column name */ - return last_char_is_space || (uint) (name - start) > NAME_LEN; + return last_char_is_space || (uint) name_length > NAME_CHAR_LEN; } -/* +/** Checks whether a table is intact. Should be done *just* after the table has been opened. - - SYNOPSIS - table_check_intact() - table The table to check - table_f_count Expected number of columns in the table - table_def Expected structure of the table (column name and type) - last_create_time The table->file->create_time of the table in memory - we have checked last time - error_num ER_XXXX from the error messages file. When 0 no error - is sent to the client in case types does not match. - If different col number either - ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE or - ER_COL_COUNT_DOESNT_MATCH_CORRUPTED is used - RETURNS - FALSE OK - TRUE There was an error + @param[in] table The table to check + @param[in] table_f_count Expected number of columns in the table + @param[in] table_def Expected structure of the table (column name + and type) + + @retval FALSE OK + @retval TRUE There was an error. An error message is output + to the error log. We do not push an error + message into the error stack because this + function is currently only called at start up, + and such errors never reach the user. */ my_bool table_check_intact(TABLE *table, const uint table_f_count, - const TABLE_FIELD_W_TYPE *table_def, - time_t *last_create_time, int error_num) + const TABLE_FIELD_W_TYPE *table_def) { uint i; my_bool error= FALSE; my_bool fields_diff_count; DBUG_ENTER("table_check_intact"); - DBUG_PRINT("info",("table: %s expected_count: %d last_create_time: %ld", - table->alias, table_f_count, *last_create_time)); - - if ((fields_diff_count= (table->s->fields != table_f_count)) || - (*last_create_time != table->file->stats.create_time)) - { - DBUG_PRINT("info", ("I am suspecting, checking table")); - if (fields_diff_count) - { - /* previous MySQL version */ - error= TRUE; - if (MYSQL_VERSION_ID > table->s->mysql_version) - { - my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0), table->alias, - table_f_count, table->s->fields, table->s->mysql_version, - MYSQL_VERSION_ID); - sql_print_error(ER(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE), - table->alias, table_f_count, table->s->fields, - table->s->mysql_version, MYSQL_VERSION_ID); - DBUG_RETURN(error); + DBUG_PRINT("info",("table: %s expected_count: %d", + table->alias, table_f_count)); - } - else if (MYSQL_VERSION_ID == table->s->mysql_version) - { - my_error(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED,MYF(0), table->alias, - table_f_count, table->s->fields); - sql_print_error(ER(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED), table->alias, - table_f_count, table->s->fields); - } - else - { - /* - Moving from newer mysql to older one -> let's say not an error but - will check the definition afterwards. If a column was added at the - end then we don't care much since it's not in the middle. - */ - error= FALSE; - } - } - /* definitely something has changed */ - char buffer[255]; - for (i=0 ; i < table_f_count; i++, table_def++) - { - String sql_type(buffer, sizeof(buffer), system_charset_info); - sql_type.length(0); - /* - Name changes are not fatal, we use sequence numbers => no problem - for us but this can show tampered table or broken table. - */ - if (i < table->s->fields) - { - Field *field= table->field[i]; - if (strncmp(field->field_name, table_def->name.str, - table_def->name.length)) - { - sql_print_error("(%s) Expected field %s at position %d, found %s", - table->alias, table_def->name.str, i, - field->field_name); - } - - /* - If the type does not match than something is really wrong - Check up to length - 1. Why? - 1. datetime -> datetim -> the same - 2. int(11) -> int(11 -> the same - 3. set('one','two') -> set('one','two' - so for sets if the same prefix is there it's ok if more are - added as part of the set. The same is valid for enum. So a new - table running on a old server will be valid. - */ - field->sql_type(sql_type); - if (strncmp(sql_type.c_ptr_safe(), table_def->type.str, - table_def->type.length - 1)) - { - sql_print_error("(%s) Expected field %s at position %d to have type " - "%s, found %s", table->alias, table_def->name.str, - i, table_def->type.str, sql_type.c_ptr_safe()); - error= TRUE; - } - else if (table_def->cset.str && !field->has_charset()) - { - sql_print_error("(%s) Expected field %s at position %d to have " - "character set '%s' but found no such", table->alias, - table_def->name.str, i, table_def->cset.str); - error= TRUE; - } - else if (table_def->cset.str && - strcmp(field->charset()->csname, table_def->cset.str)) - { - sql_print_error("(%s) Expected field %s at position %d to have " - "character set '%s' but found '%s'", table->alias, - table_def->name.str, i, table_def->cset.str, - field->charset()->csname); - error= TRUE; - } - } - else - { - sql_print_error("(%s) Expected field %s at position %d to have type %s " - " but no field found.", table->alias, - table_def->name.str, i, table_def->type.str); - error= TRUE; - } - } - if (!error) - *last_create_time= table->file->stats.create_time; - else if (!fields_diff_count && error_num) - my_error(error_num,MYF(0), table->alias, table_f_count, table->s->fields); - } - else + fields_diff_count= (table->s->fields != table_f_count); + if (fields_diff_count) { - DBUG_PRINT("info", ("Table seems ok without thorough checking.")); - *last_create_time= table->file->stats.create_time; + DBUG_PRINT("info", ("Column count has changed, checking the definition")); + + /* previous MySQL version */ + if (MYSQL_VERSION_ID > table->s->mysql_version) + { + sql_print_error(ER(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE), + table->alias, table_f_count, table->s->fields, + table->s->mysql_version, MYSQL_VERSION_ID); + DBUG_RETURN(TRUE); + } + else if (MYSQL_VERSION_ID == table->s->mysql_version) + { + sql_print_error(ER(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED), table->alias, + table_f_count, table->s->fields); + DBUG_RETURN(TRUE); + } + /* + Something has definitely changed, but we're running an older + version of MySQL with new system tables. + Let's check column definitions. If a column was added at + the end of the table, then we don't care much since such change + is backward compatible. + */ } - - DBUG_RETURN(error); + char buffer[STRING_BUFFER_USUAL_SIZE]; + for (i=0 ; i < table_f_count; i++, table_def++) + { + String sql_type(buffer, sizeof(buffer), system_charset_info); + sql_type.length(0); + if (i < table->s->fields) + { + Field *field= table->field[i]; + + if (strncmp(field->field_name, table_def->name.str, + table_def->name.length)) + { + /* + Name changes are not fatal, we use ordinal numbers to access columns. + Still this can be a sign of a tampered table, output an error + to the error log. + */ + sql_print_error("Incorrect definition of table %s.%s: " + "expected column '%s' at position %d, found '%s'.", + table->s->db.str, table->alias, table_def->name.str, i, + field->field_name); + } + field->sql_type(sql_type); + /* + Generally, if column types don't match, then something is + wrong. + + However, we only compare column definitions up to the + length of the original definition, since we consider the + following definitions compatible: + + 1. DATETIME and DATETIM + 2. INT(11) and INT(11 + 3. SET('one', 'two') and SET('one', 'two', 'more') + + For SETs or ENUMs, if the same prefix is there it's OK to + add more elements - they will get higher ordinal numbers and + the new table definition is backward compatible with the + original one. + */ + if (strncmp(sql_type.c_ptr_safe(), table_def->type.str, + table_def->type.length - 1)) + { + sql_print_error("Incorrect definition of table %s.%s: " + "expected column '%s' at position %d to have type " + "%s, found type %s.", table->s->db.str, table->alias, + table_def->name.str, i, table_def->type.str, + sql_type.c_ptr_safe()); + error= TRUE; + } + else if (table_def->cset.str && !field->has_charset()) + { + sql_print_error("Incorrect definition of table %s.%s: " + "expected the type of column '%s' at position %d " + "to have character set '%s' but the type has no " + "character set.", table->s->db.str, table->alias, + table_def->name.str, i, table_def->cset.str); + error= TRUE; + } + else if (table_def->cset.str && + strcmp(field->charset()->csname, table_def->cset.str)) + { + sql_print_error("Incorrect definition of table %s.%s: " + "expected the type of column '%s' at position %d " + "to have character set '%s' but found " + "character set '%s'.", table->s->db.str, table->alias, + table_def->name.str, i, table_def->cset.str, + field->charset()->csname); + error= TRUE; + } + } + else + { + sql_print_error("Incorrect definition of table %s.%s: " + "expected column '%s' at position %d to have type %s " + " but the column is not found.", + table->s->db.str, table->alias, + table_def->name.str, i, table_def->type.str); + error= TRUE; + } + } + DBUG_RETURN(error); } diff --git a/sql/table.h b/sql/table.h index 94df89ef992..bb9ced2e450 100644 --- a/sql/table.h +++ b/sql/table.h @@ -236,9 +236,9 @@ typedef struct st_table_share bool log_table; #ifdef WITH_PARTITION_STORAGE_ENGINE bool auto_partitioned; - const uchar *partition_info; + const char *partition_info; uint partition_info_len; - const uchar *part_state; + const char *part_state; uint part_state_len; handlerton *default_part_db_type; #endif @@ -689,6 +689,21 @@ class index_hint; typedef struct st_table_list { st_table_list() {} /* Remove gcc warning */ + + /** + Prepare TABLE_LIST that consists of one table instance to use in + simple_open_and_lock_tables + */ + inline void init_one_table(const char *db_name_arg, + const char *table_name_arg, + enum thr_lock_type lock_type_arg) + { + bzero((char*) this, sizeof(*this)); + db= (char*) db_name_arg; + table_name= alias= (char*) table_name_arg; + lock_type= lock_type_arg; + } + /* List of tables local to a subquery (used by SQL_LIST). Considers views as leaves (unlike 'next_leaf' below). Created at parse time @@ -1097,8 +1112,7 @@ typedef struct st_table_field_w_type my_bool table_check_intact(TABLE *table, const uint table_f_count, - const TABLE_FIELD_W_TYPE *table_def, - time_t *last_create_time, int error_num); + const TABLE_FIELD_W_TYPE *table_def); static inline my_bitmap_map *tmp_use_all_columns(TABLE *table, MY_BITMAP *bitmap) diff --git a/sql/time.cc b/sql/time.cc index 4854206b1c8..ef2c87673d5 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -313,6 +313,11 @@ void localtime_to_TIME(TIME *to, struct tm *from) void calc_time_from_sec(TIME *to, long seconds, long microseconds) { long t_seconds; + // to->neg is not cleared, it may already be set to a useful value + to->time_type= MYSQL_TIMESTAMP_TIME; + to->year= 0; + to->month= 0; + to->day= 0; to->hour= seconds/3600L; t_seconds= seconds%3600L; to->minute= t_seconds/60L; diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 999e36a4242..a4cdcafc6d0 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -247,6 +247,12 @@ ha_example::ha_example(handlerton *hton, TABLE_SHARE *table_arg) used by the default rename_table and delete_table method in handler.cc. + For engines that have two file name extentions (separate meta/index file + and data file), the order of elements is relevant. First element of engine + file name extentions array should be meta/index file extention. Second + element - data file extention. This order is assumed by + prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued. + @see rename_table method in handler.cc and delete_table method in handler.cc diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am index f433604f9d4..62c0f8e817c 100644 --- a/storage/innobase/Makefile.am +++ b/storage/innobase/Makefile.am @@ -89,6 +89,8 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr include/ut0sort.h include/ut0ut.h include/ut0ut.ic include/ut0vec.h include/ut0vec.ic include/ha_prototypes.h \ include/ut0list.h include/ut0list.ic \ include/ut0wqueue.h \ + pars/make_bison.sh pars/make_flex.sh \ + pars/pars0grm.y pars/pars0lex.l \ CMakeLists.txt plug.in noinst_LIBRARIES = libinnobase.a diff --git a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c index ad775fbd6d5..c847b8db9e2 100644 --- a/storage/innobase/buf/buf0buf.c +++ b/storage/innobase/buf/buf0buf.c @@ -802,9 +802,7 @@ buf_awe_map_page_to_frame( { buf_block_t* bck; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(block); if (block->frame) { @@ -900,9 +898,7 @@ buf_block_make_young( /*=================*/ buf_block_t* block) /* in: block to make younger */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* Note that we read freed_page_clock's without holding any mutex: this is allowed since the result is used only in heuristics */ @@ -1635,10 +1631,9 @@ buf_page_init( in units of a page */ buf_block_t* block) /* in: block to init */ { -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&(block->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state != BUF_BLOCK_FILE_PAGE); /* Set the state of the block */ diff --git a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c index 650c9d5d707..423c08c0569 100644 --- a/storage/innobase/buf/buf0flu.c +++ b/storage/innobase/buf/buf0flu.c @@ -48,10 +48,7 @@ buf_flush_insert_into_flush_list( /*=============================*/ buf_block_t* block) /* in: block which is modified */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - ut_a(block->state == BUF_BLOCK_FILE_PAGE); ut_ad((UT_LIST_GET_FIRST(buf_pool->flush_list) == NULL) @@ -77,9 +74,7 @@ buf_flush_insert_sorted_into_flush_list( buf_block_t* prev_b; buf_block_t* b; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ prev_b = NULL; b = UT_LIST_GET_FIRST(buf_pool->flush_list); @@ -111,10 +106,8 @@ buf_flush_ready_for_replace( buf_block_t* block) /* in: buffer control block, must be in state BUF_BLOCK_FILE_PAGE and in the LRU list */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&block->mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (block->state != BUF_BLOCK_FILE_PAGE) { ut_print_timestamp(stderr); fprintf(stderr, @@ -147,10 +140,8 @@ buf_flush_ready_for_flush( BUF_BLOCK_FILE_PAGE */ ulint flush_type)/* in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&(block->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state == BUF_BLOCK_FILE_PAGE); if ((ut_dulint_cmp(block->oldest_modification, ut_dulint_zero) > 0) diff --git a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c index 377552ece6c..1e27144bdbf 100644 --- a/storage/innobase/buf/buf0lru.c +++ b/storage/innobase/buf/buf0lru.c @@ -549,9 +549,7 @@ buf_LRU_old_adjust_len(void) ulint new_len; ut_a(buf_pool->LRU_old); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(3 * (BUF_LRU_OLD_MIN_LEN / 8) > BUF_LRU_OLD_TOLERANCE + 5); for (;;) { @@ -593,6 +591,7 @@ buf_LRU_old_init(void) { buf_block_t* block; + ut_ad(mutex_own(&(buf_pool->mutex))); ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == BUF_LRU_OLD_MIN_LEN); /* We first initialize all blocks in the LRU list as old and then use @@ -624,9 +623,7 @@ buf_LRU_remove_block( { ut_ad(buf_pool); ut_ad(block); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state == BUF_BLOCK_FILE_PAGE); ut_a(block->in_LRU_list); @@ -690,9 +687,7 @@ buf_LRU_add_block_to_end_low( ut_ad(buf_pool); ut_ad(block); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state == BUF_BLOCK_FILE_PAGE); @@ -755,9 +750,7 @@ buf_LRU_add_block_low( ut_ad(buf_pool); ut_ad(block); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state == BUF_BLOCK_FILE_PAGE); ut_a(!block->in_LRU_list); @@ -858,10 +851,9 @@ buf_LRU_block_free_non_file_page( /*=============================*/ buf_block_t* block) /* in: block, must not contain a file page */ { -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&block->mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(block); ut_a((block->state == BUF_BLOCK_MEMORY) @@ -898,10 +890,8 @@ buf_LRU_block_remove_hashed_page( be in a state where it can be freed; there may or may not be a hash index to the page */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&block->mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(block); ut_a(block->state == BUF_BLOCK_FILE_PAGE); @@ -961,10 +951,9 @@ buf_LRU_block_free_hashed_page( buf_block_t* block) /* in: block, must contain a file page and be in a state where it can be freed */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&block->mutex)); -#endif /* UNIV_SYNC_DEBUG */ + ut_a(block->state == BUF_BLOCK_REMOVE_HASH); block->state = BUF_BLOCK_MEMORY; diff --git a/storage/innobase/dict/dict0boot.c b/storage/innobase/dict/dict0boot.c index 08515d8fb13..f8849008854 100644 --- a/storage/innobase/dict/dict0boot.c +++ b/storage/innobase/dict/dict0boot.c @@ -86,9 +86,7 @@ dict_hdr_flush_row_id(void) dulint id; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ id = dict_sys->row_id; diff --git a/storage/innobase/dict/dict0crea.c b/storage/innobase/dict/dict0crea.c index 76474c72c43..e060d45768e 100644 --- a/storage/innobase/dict/dict0crea.c +++ b/storage/innobase/dict/dict0crea.c @@ -212,9 +212,7 @@ dict_build_table_def_step( ulint i; ulint row_len; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ table = node->table; @@ -312,9 +310,7 @@ dict_create_sys_indexes_tuple( dfield_t* dfield; byte* ptr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(index && heap); sys_indexes = dict_sys->sys_indexes; @@ -512,9 +508,7 @@ dict_build_index_def_step( dtuple_t* row; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = thr_get_trx(thr); @@ -585,9 +579,7 @@ dict_create_index_tree_step( btr_pcur_t pcur; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ index = node->index; table = node->table; @@ -642,10 +634,7 @@ dict_drop_index_tree( byte* ptr; ulint len; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - ut_a(!dict_table_is_comp(dict_sys->sys_indexes)); ptr = rec_get_nth_field_old(rec, DICT_SYS_INDEXES_PAGE_NO_FIELD, &len); @@ -718,10 +707,7 @@ dict_truncate_index_tree( ulint comp; dict_index_t* index; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - ut_a(!dict_table_is_comp(dict_sys->sys_indexes)); rec = btr_pcur_get_rec(pcur); ptr = rec_get_nth_field_old(rec, DICT_SYS_INDEXES_PAGE_NO_FIELD, &len); @@ -907,9 +893,7 @@ dict_create_table_step( trx_t* trx; ut_ad(thr); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = thr_get_trx(thr); @@ -1016,9 +1000,7 @@ dict_create_index_step( trx_t* trx; ut_ad(thr); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = thr_get_trx(thr); @@ -1440,9 +1422,7 @@ dict_create_add_foreigns_to_dictionary( ulint number = start_id + 1; ulint error; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (NULL == dict_table_get_low("SYS_FOREIGN")) { fprintf(stderr, diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index 6ae02c0b81a..f450d3553eb 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -689,9 +689,8 @@ dict_table_get_on_id( if we are doing a rollback to handle an error in TABLE CREATE, for example, we already have the mutex! */ -#ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + ut_ad(mutex_own(&(dict_sys->mutex)) + || trx->dict_operation_lock_mode == RW_X_LATCH); return(dict_table_get_on_id_low(table_id)); } @@ -854,9 +853,7 @@ dict_table_add_to_cache( ulint row_len; ut_ad(table); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->n_def == table->n_cols - DATA_N_SYS_COLS); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); ut_ad(table->cached == FALSE); @@ -1003,9 +1000,7 @@ dict_table_rename_in_cache( ibool success; ut_ad(table); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ old_size = mem_heap_get_size(table->heap); @@ -1209,9 +1204,7 @@ dict_table_change_id_in_cache( dulint new_id) /* in: new id to set */ { ut_ad(table); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); /* Remove the table from the hash table of id's */ @@ -1238,9 +1231,7 @@ dict_table_remove_from_cache( ulint size; ut_ad(table); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); #if 0 @@ -1354,9 +1345,7 @@ dict_index_add_to_cache( ulint i; ut_ad(index); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(index->n_def == index->n_fields); ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); @@ -1452,9 +1441,7 @@ dict_index_remove_from_cache( ut_ad(table && index); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ rw_lock_free(&index->lock); @@ -1484,9 +1471,7 @@ dict_index_find_cols( ut_ad(table && index); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ for (i = 0; i < index->n_fields; i++) { ulint j; @@ -1648,9 +1633,7 @@ dict_index_build_internal_clust( ut_ad(table && index); ut_ad(index->type & DICT_CLUSTERED); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); /* Create a new index object with certainly enough fields */ @@ -1803,9 +1786,7 @@ dict_index_build_internal_non_clust( ut_ad(table && index); ut_ad(0 == (index->type & DICT_CLUSTERED)); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); /* The clustered index should be the first in the list of indexes */ @@ -1918,9 +1899,7 @@ dict_foreign_remove_from_cache( /*===========================*/ dict_foreign_t* foreign) /* in, own: foreign constraint */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(foreign); if (foreign->referenced_table) { @@ -1951,9 +1930,7 @@ dict_foreign_find( { dict_foreign_t* foreign; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ foreign = UT_LIST_GET_FIRST(table->foreign_list); @@ -1994,9 +1971,12 @@ dict_foreign_find_index( ulint n_cols, /* in: number of columns */ dict_index_t* types_idx, /* in: NULL or an index to whose types the column types must match */ - ibool check_charsets) + ibool check_charsets, /* in: whether to check charsets. only has an effect if types_idx != NULL */ + ulint check_null) + /* in: nonzero if none of the columns must + be declared NOT NULL */ { dict_index_t* index; dict_field_t* field; @@ -2026,6 +2006,12 @@ dict_foreign_find_index( break; } + if (check_null + && (field->col->prtype & DATA_NOT_NULL)) { + + return(NULL); + } + if (types_idx && !cmp_cols_are_equal( dict_index_get_nth_col(index, i), dict_index_get_nth_col(types_idx, @@ -2113,9 +2099,7 @@ dict_foreign_add_to_cache( ibool added_to_referenced_list= FALSE; FILE* ef = dict_foreign_err_file; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ for_table = dict_table_check_if_in_cache_low( foreign->foreign_table_name); @@ -2144,7 +2128,7 @@ dict_foreign_add_to_cache( ref_table, (const char**) for_in_cache->referenced_col_names, for_in_cache->n_fields, for_in_cache->foreign_index, - check_charsets); + check_charsets, FALSE); if (index == NULL) { dict_foreign_error_report( @@ -2176,7 +2160,10 @@ dict_foreign_add_to_cache( for_table, (const char**) for_in_cache->foreign_col_names, for_in_cache->n_fields, - for_in_cache->referenced_index, check_charsets); + for_in_cache->referenced_index, check_charsets, + for_in_cache->type + & (DICT_FOREIGN_ON_DELETE_SET_NULL + | DICT_FOREIGN_ON_UPDATE_SET_NULL)); if (index == NULL) { dict_foreign_error_report( @@ -2186,7 +2173,9 @@ dict_foreign_add_to_cache( "the columns as the first columns," " or the data types in the\n" "table do not match" - " the ones in the referenced table."); + " the ones in the referenced table\n" + "or one of the ON ... SET NULL columns" + " is declared NOT NULL."); if (for_in_cache == foreign) { if (added_to_referenced_list) { @@ -2794,9 +2783,7 @@ dict_create_foreign_constraints_low( const char* column_names[500]; const char* referenced_table_name; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ table = dict_table_get_low(name); @@ -2994,7 +2981,8 @@ col_loop1: /* Try to find an index which contains the columns as the first fields and in the right order */ - index = dict_foreign_find_index(table, column_names, i, NULL, TRUE); + index = dict_foreign_find_index(table, column_names, i, + NULL, TRUE, FALSE); if (!index) { mutex_enter(&dict_foreign_err_mutex); @@ -3265,7 +3253,8 @@ try_find_index: if (referenced_table) { index = dict_foreign_find_index(referenced_table, column_names, i, - foreign->foreign_index, TRUE); + foreign->foreign_index, + TRUE, FALSE); if (!index) { dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); @@ -3425,9 +3414,7 @@ dict_foreign_parse_drop_constraints( str = dict_strip_comments(*(trx->mysql_query_str)); ptr = str; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ loop: ptr = dict_scan_to(ptr, "DROP"); @@ -3864,9 +3851,7 @@ dict_foreign_print_low( { ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ fprintf(stderr, " FOREIGN KEY CONSTRAINT %s: %s (", foreign->id, foreign->foreign_table_name); @@ -3931,9 +3916,7 @@ dict_table_print_low( dict_foreign_t* foreign; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ dict_update_statistics_low(table, TRUE); @@ -3989,9 +3972,7 @@ dict_col_print_low( { dtype_t type; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ dict_col_copy_type(col, &type); fprintf(stderr, "%s: ", dict_table_get_col_name(table, @@ -4011,9 +3992,7 @@ dict_index_print_low( ib_longlong n_vals; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (index->n_user_defined_cols > 0) { n_vals = index->stat_n_diff_key_vals[ @@ -4061,9 +4040,8 @@ dict_field_print_low( /*=================*/ dict_field_t* field) /* in: field */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + fprintf(stderr, " %s", field->name); if (field->prefix_len != 0) { diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c index e23795f9898..ba2e25cf031 100644 --- a/storage/innobase/dict/dict0load.c +++ b/storage/innobase/dict/dict0load.c @@ -67,9 +67,7 @@ dict_get_first_table_name_in_db( ulint len; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(1000); @@ -353,9 +351,7 @@ dict_load_columns( ulint i; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); @@ -478,11 +474,7 @@ dict_load_fields( ulint i; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - - UT_NOT_USED(table); mtr_start(&mtr); @@ -586,9 +578,7 @@ dict_load_indexes( dulint id; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if ((ut_dulint_get_high(table->id) == 0) && (ut_dulint_get_low(table->id) < DICT_HDR_FIRST_ID)) { @@ -754,9 +744,7 @@ dict_load_table( ulint err; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(1000); @@ -920,9 +908,7 @@ dict_load_table_on_id( dict_table_t* table; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* NOTE that the operation of this function is protected by the dictionary mutex, and therefore no deadlocks can occur @@ -1003,9 +989,7 @@ dict_load_sys_table( { mem_heap_t* heap; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(1000); @@ -1035,9 +1019,7 @@ dict_load_foreign_cols( ulint i; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ foreign->foreign_col_names = mem_heap_alloc( foreign->heap, foreign->n_fields * sizeof(void*)); @@ -1113,9 +1095,7 @@ dict_load_foreign( ulint n_fields_and_type; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ heap2 = mem_heap_create(1000); @@ -1243,9 +1223,7 @@ dict_load_foreigns( ulint err; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ sys_foreign = dict_table_get_low("SYS_FOREIGN"); diff --git a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c index 883fbd09ee4..c63d67cae60 100644 --- a/storage/innobase/fil/fil0fil.c +++ b/storage/innobase/fil/fil0fil.c @@ -409,9 +409,7 @@ fil_space_is_flushed( { fil_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(fil_system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ node = UT_LIST_GET_FIRST(space->chain); @@ -514,9 +512,7 @@ fil_node_open_file( ulint space_id; #endif /* !UNIV_HOTBACKUP */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(node->n_pending == 0); ut_a(node->open == FALSE); @@ -660,9 +656,7 @@ fil_node_close_file( ibool ret; ut_ad(node && system); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(node->open); ut_a(node->n_pending == 0); ut_a(node->n_pending_flushes == 0); @@ -705,9 +699,8 @@ fil_try_to_close_file_in_LRU( fil_system_t* system = fil_system; fil_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + node = UT_LIST_GET_LAST(system->LRU); if (print_info) { @@ -765,9 +758,7 @@ fil_mutex_enter_and_prepare_for_io( ulint count = 0; ulint count2 = 0; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ retry: mutex_enter(&(system->mutex)); @@ -881,9 +872,7 @@ fil_node_free( fil_space_t* space) /* in: space where the file node is chained */ { ut_ad(node && system && space); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(node->magic_n == FIL_NODE_MAGIC_N); ut_a(node->n_pending == 0); @@ -3870,9 +3859,7 @@ fil_node_prepare_for_io( fil_space_t* space) /* in: space */ { ut_ad(node && system && space); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (system->n_open > system->max_n_open + 5) { ut_print_timestamp(stderr); @@ -3917,9 +3904,7 @@ fil_node_complete_io( { ut_ad(node); ut_ad(system); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(node->n_pending > 0); diff --git a/storage/innobase/fsp/fsp0fsp.c b/storage/innobase/fsp/fsp0fsp.c index 00c5e582b3e..b5662fd24a4 100644 --- a/storage/innobase/fsp/fsp0fsp.c +++ b/storage/innobase/fsp/fsp0fsp.c @@ -2045,11 +2045,9 @@ fseg_create_general( mtr); } -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ latch = fil_space_get_latch(space); mtr_x_lock(latch, mtr); @@ -2205,11 +2203,10 @@ fseg_n_reserved_pages( space = buf_frame_get_space_id(header); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_x_lock(fil_space_get_latch(space), mtr); inode = fseg_inode_get(header, mtr); @@ -2601,11 +2598,9 @@ fseg_alloc_free_page_general( space = buf_frame_get_space_id(seg_header); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ latch = fil_space_get_latch(space); mtr_x_lock(latch, mtr); @@ -2751,11 +2746,9 @@ fsp_reserve_free_extents( ulint n_pages_added; ut_ad(mtr); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ *n_reserved = n_ext; latch = fil_space_get_latch(space); @@ -2853,9 +2846,8 @@ fsp_get_available_space_in_free_extents( rw_lock_t* latch; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_start(&mtr); latch = fil_space_get_latch(space); @@ -3113,11 +3105,10 @@ fseg_free_page( { fseg_inode_t* seg_inode; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_x_lock(fil_space_get_latch(space), mtr); seg_inode = fseg_inode_get(seg_header, mtr); @@ -3222,11 +3213,10 @@ fseg_free_step( space = buf_frame_get_space_id(header); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_x_lock(fil_space_get_latch(space), mtr); descr = xdes_get_descriptor(space, buf_frame_get_page_no(header), mtr); @@ -3297,11 +3287,10 @@ fseg_free_step_not_header( space = buf_frame_get_space_id(header); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_x_lock(fil_space_get_latch(space), mtr); inode = fseg_inode_get(header, mtr); diff --git a/storage/innobase/ha/ha0ha.c b/storage/innobase/ha/ha0ha.c index 07dfb66afa8..7f241140050 100644 --- a/storage/innobase/ha/ha0ha.c +++ b/storage/innobase/ha/ha0ha.c @@ -96,9 +96,8 @@ ha_insert_for_fold( ulint hash; ut_ad(table && data); -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ + hash = hash_calc_hash(fold, table); cell = hash_get_nth_cell(table, hash); @@ -194,9 +193,8 @@ ha_delete( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ + node = ha_search_with_data(table, fold, data); ut_a(node); @@ -218,9 +216,7 @@ ha_search_and_update_if_found( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_search_with_data(table, fold, data); @@ -248,9 +244,8 @@ ha_remove_all_nodes_to_page( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ + node = ha_chain_get_first(table, fold); while (node) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e9309f4f8b8..1932f775a3d 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -56,53 +56,6 @@ bool innodb_inited= 0; */ static handlerton *legacy_innodb_hton; -/*-----------------------------------------------------------------*/ -/* These variables are used to implement (semi-)synchronous MySQL binlog -replication for InnoDB tables. */ - -pthread_cond_t innobase_repl_cond; /* Posix cond variable; - this variable is signaled - when enough binlog has been - sent to slave, so that a - waiting trx can return the - 'ok' message to the client - for a commit */ -pthread_mutex_t innobase_repl_cond_mutex; /* Posix cond variable mutex - that also protects the next - innobase_repl_... variables */ -uint innobase_repl_state; /* 1 if synchronous replication - is switched on and is working - ok; else 0 */ -uint innobase_repl_file_name_inited = 0; /* This is set to 1 when - innobase_repl_file_name - contains meaningful data */ -char* innobase_repl_file_name; /* The binlog name up to which - we have sent some binlog to - the slave */ -my_off_t innobase_repl_pos; /* The position in that file - up to which we have sent the - binlog to the slave */ -uint innobase_repl_n_wait_threads = 0; /* This tells how many - transactions currently are - waiting for the binlog to be - sent to the client */ -uint innobase_repl_wait_file_name_inited = 0; /* This is set to 1 - when we know the 'smallest' - wait position */ -char* innobase_repl_wait_file_name; /* NULL, or the 'smallest' - innobase_repl_file_name that - a transaction is waiting for */ -my_off_t innobase_repl_wait_pos; /* The smallest position in - that file that a trx is - waiting for: the trx can - proceed and send an 'ok' to - the client when MySQL has sent - the binlog up to this position - to the slave */ -/*-----------------------------------------------------------------*/ - - - /* Store MySQL definition of 'byte': in Linux it is char while InnoDB uses unsigned char; the header univ.i which we include next defines 'byte' as a macro which expands to 'unsigned char' */ @@ -139,9 +92,6 @@ extern "C" { #include "../storage/innobase/include/ha_prototypes.h" } -#define HA_INNOBASE_ROWS_IN_TABLE 10000 /* to get optimization right */ -#define HA_INNOBASE_RANGE_COUNT 100 - ulong innobase_large_page_size = 0; /* The default values for the following, type long or longlong, start-up @@ -189,7 +139,7 @@ srv_active_wake_master_thread after each fetch or search, we only do it every INNOBASE_WAKE_INTERVAL'th step. */ #define INNOBASE_WAKE_INTERVAL 32 -ulong innobase_active_counter = 0; +static ulong innobase_active_counter = 0; static HASH innobase_open_tables; @@ -222,16 +172,149 @@ static handler *innobase_create_handler(handlerton *hton, return new (mem_root) ha_innobase(hton, table); } +/*********************************************************************** +This function is used to prepare X/Open XA distributed transaction */ +static +int +innobase_xa_prepare( +/*================*/ + /* out: 0 or error number */ + handlerton* hton, + THD* thd, /* in: handle to the MySQL thread of the user + whose XA transaction should be prepared */ + bool all); /* in: TRUE - commit transaction + FALSE - the current SQL statement ended */ +/*********************************************************************** +This function is used to recover X/Open XA distributed transactions */ +static +int +innobase_xa_recover( +/*================*/ + /* out: number of prepared transactions + stored in xid_list */ + handlerton* hton, + XID* xid_list, /* in/out: prepared transactions */ + uint len); /* in: number of slots in xid_list */ +/*********************************************************************** +This function is used to commit one X/Open XA distributed transaction +which is in the prepared state */ +static +int +innobase_commit_by_xid( +/*===================*/ + /* out: 0 or error number */ + handlerton* hton, + XID* xid); /* in: X/Open XA transaction identification */ +/*********************************************************************** +This function is used to rollback one X/Open XA distributed transaction +which is in the prepared state */ +static +int +innobase_rollback_by_xid( +/*=====================*/ + /* out: 0 or error number */ + handlerton* hton, + XID *xid); /* in: X/Open XA transaction identification */ +/*********************************************************************** +Create a consistent view for a cursor based on current transaction +which is created if the corresponding MySQL thread still lacks one. +This consistent view is then used inside of MySQL when accessing records +using a cursor. */ +static +void* +innobase_create_cursor_view( +/*========================*/ + /* out: pointer to cursor view or NULL */ + handlerton* hton, /* in: innobase hton */ + THD* thd); /* in: user thread handle */ +/*********************************************************************** +Set the given consistent cursor view to a transaction which is created +if the corresponding MySQL thread still lacks one. If the given +consistent cursor view is NULL global read view of a transaction is +restored to a transaction read view. */ +static +void +innobase_set_cursor_view( +/*=====================*/ + handlerton* hton, + THD* thd, /* in: user thread handle */ + void* curview);/* in: Consistent cursor view to be set */ +/*********************************************************************** +Close the given consistent cursor view of a transaction and restore +global read view to a transaction read view. Transaction is created if the +corresponding MySQL thread still lacks one. */ +static +void +innobase_close_cursor_view( +/*=======================*/ + handlerton* hton, + THD* thd, /* in: user thread handle */ + void* curview);/* in: Consistent read view to be closed */ +/********************************************************************* +Removes all tables in the named database inside InnoDB. */ +static +void +innobase_drop_database( +/*===================*/ + /* out: error number */ + handlerton* hton, /* in: handlerton of Innodb */ + char* path); /* in: database path; inside InnoDB the name + of the last directory in the path is used as + the database name: for example, in 'mysql/data/test' + the database name is 'test' */ +/*********************************************************************** +Closes an InnoDB database. */ +static +int +innobase_end(handlerton *hton, ha_panic_function type); + +/********************************************************************* +Creates an InnoDB transaction struct for the thd if it does not yet have one. +Starts a new InnoDB transaction if a transaction is not yet started. And +assigns a new snapshot for a consistent read if the transaction does not yet +have one. */ +static +int +innobase_start_trx_and_assign_read_view( +/*====================================*/ + /* out: 0 */ + handlerton* hton, /* in: Innodb handlerton */ + THD* thd); /* in: MySQL thread handle of the user for whom + the transaction should be committed */ +/******************************************************************** +Flushes InnoDB logs to disk and makes a checkpoint. Really, a commit flushes +the logs, and the name of this function should be innobase_checkpoint. */ +static +bool +innobase_flush_logs( +/*================*/ + /* out: TRUE if error */ + handlerton* hton); /* in: InnoDB handlerton */ + +/**************************************************************************** +Implements the SHOW INNODB STATUS command. Sends the output of the InnoDB +Monitor to the client. */ +static +bool +innodb_show_status( +/*===============*/ + handlerton* hton, /* in: the innodb handlerton */ + THD* thd, /* in: the MySQL query thread of the caller */ + stat_print_fn *stat_print); +static +bool innobase_show_status(handlerton *hton, THD* thd, + stat_print_fn* stat_print, + enum ha_stat_type stat_type); /********************************************************************* Commits a transaction in an InnoDB database. */ - +static void innobase_commit_low( /*================*/ trx_t* trx); /* in: transaction handle */ -SHOW_VAR innodb_status_variables[]= { +static SHOW_VAR innodb_status_variables[]= { {"buffer_pool_pages_data", (char*) &export_vars.innodb_buffer_pool_pages_data, SHOW_LONG}, {"buffer_pool_pages_dirty", @@ -379,11 +462,24 @@ innobase_release_stat_resources( } } +/************************************************************************ +Obtain the InnoDB transaction of a MySQL thread. */ +inline +trx_t*& +thd_to_trx( +/*=======*/ + /* out: reference to transaction pointer */ + THD* thd, /* in: MySQL thread */ + handlerton* hton) /* in: InnoDB handlerton */ +{ + return(*(trx_t**) thd_ha_data(thd, hton)); +} + /************************************************************************ Call this function when mysqld passes control to the client. That is to avoid deadlocks on the adaptive hash S-latch possibly held by thd. For more documentation, see handler.cc. */ - +static int innobase_release_temporary_latches( /*===============================*/ @@ -397,7 +493,7 @@ innobase_release_temporary_latches( return 0; } - trx = (trx_t*) thd->ha_data[hton->slot]; + trx = thd_to_trx(thd, hton); if (trx) { innobase_release_stat_resources(trx); @@ -857,12 +953,10 @@ check_trx_exists( handlerton* hton, /* in: handlerton for innodb */ THD* thd) /* in: user thread handle */ { - trx_t* trx; + trx_t*& trx = thd_to_trx(thd, hton); ut_ad(thd == current_thd); - trx = (trx_t*) thd->ha_data[hton->slot]; - if (trx == NULL) { DBUG_ASSERT(thd != NULL); trx = trx_allocate_for_mysql(); @@ -874,8 +968,6 @@ check_trx_exists( /* Update the info whether we should skip XA steps that eat CPU time */ trx->support_xa = (ibool)(thd->variables.innodb_support_xa); - - thd->ha_data[hton->slot] = trx; } else { if (trx->magic_n != TRX_MAGIC_N) { mem_analyze_corruption(trx); @@ -928,7 +1020,6 @@ ha_innobase::update_thd( /* out: 0 or error code */ THD* thd) /* in: thd to use the handle */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; trx = check_trx_exists(ht, thd); @@ -1046,7 +1137,7 @@ holding any InnoDB semaphores. The calling thread is holding the query cache mutex, and this function will reserver the InnoDB kernel mutex. Thus, the 'rank' in sync0sync.h of the MySQL query cache mutex is above the InnoDB kernel mutex. */ - +static my_bool innobase_query_caching_of_table_permitted( /*======================================*/ @@ -1271,8 +1362,6 @@ void ha_innobase::init_table_handle_for_HANDLER(void) /*============================================*/ { - row_prebuilt_t* prebuilt; - /* If current thd does not yet have a trx struct, create one. If the current handle does not yet have a prebuilt struct, create one. Update the trx pointers in the prebuilt struct. Normally @@ -1283,8 +1372,6 @@ ha_innobase::init_table_handle_for_HANDLER(void) /* Initialize the prebuilt struct much like it would be inited in external_lock */ - prebuilt = (row_prebuilt_t*)innobase_prebuilt; - innobase_release_stat_resources(prebuilt->trx); /* If the transaction is not started yet, start it */ @@ -1331,7 +1418,7 @@ ha_innobase::init_table_handle_for_HANDLER(void) /************************************************************************* Opens an InnoDB database. */ - +static int innobase_init(void *p) /*===============*/ @@ -1620,7 +1707,7 @@ error: /*********************************************************************** Closes an InnoDB database. */ - +static int innobase_end(handlerton *hton, ha_panic_function type) /*==============*/ @@ -1658,7 +1745,7 @@ innobase_end(handlerton *hton, ha_panic_function type) /******************************************************************** Flushes InnoDB logs to disk and makes a checkpoint. Really, a commit flushes the logs, and the name of this function should be innobase_checkpoint. */ - +static bool innobase_flush_logs(handlerton *hton) /*=====================*/ @@ -1675,7 +1762,7 @@ innobase_flush_logs(handlerton *hton) /********************************************************************* Commits a transaction in an InnoDB database. */ - +static void innobase_commit_low( /*================*/ @@ -1694,7 +1781,7 @@ Creates an InnoDB transaction struct for the thd if it does not yet have one. Starts a new InnoDB transaction if a transaction is not yet started. And assigns a new snapshot for a consistent read if the transaction does not yet have one. */ - +static int innobase_start_trx_and_assign_read_view( /*====================================*/ @@ -1759,12 +1846,11 @@ innobase_commit( /* Update the info whether we should skip XA steps that eat CPU time */ trx->support_xa = (ibool)(thd->variables.innodb_support_xa); - /* Release a possible FIFO ticket and search latch. Since we will - reserve the kernel mutex, we have to release the search system latch - first to obey the latching order. */ + /* Since we will reserve the kernel mutex, we have to release + the search system latch first to obey the latching order. */ if (trx->has_search_latch) { - trx_search_latch_release_if_reserved(trx); + trx_search_latch_release_if_reserved(trx); } /* The flag trx->active_trans is set to 1 in @@ -1851,18 +1937,20 @@ retry: trx_mark_sql_stat_end(trx); } + if (trx->declared_to_be_inside_innodb) { + /* Release our possible ticket in the FIFO */ + + srv_conc_force_exit_innodb(trx); + } + /* Tell the InnoDB server that there might be work for utility threads: */ - if (trx->declared_to_be_inside_innodb) { - /* Release our possible ticket in the FIFO */ - - srv_conc_force_exit_innodb(trx); - } srv_active_wake_master_thread(); DBUG_RETURN(0); } +#if 0 /* TODO: put the MySQL-4.1 functionality back to 5.0. This is needed to get InnoDB Hot Backup to work. */ @@ -1875,7 +1963,7 @@ transaction inside InnoDB but does NOT flush InnoDB log files to disk. To flush you have to call innobase_commit_complete(). We have separated flushing to eliminate the bottleneck of LOCK_log in log.cc which disabled InnoDB's group commit capability. */ - +static int innobase_report_binlog_offset_and_commit( /*=====================================*/ @@ -1905,10 +1993,9 @@ innobase_report_binlog_offset_and_commit( return(0); } -#if 0 /*********************************************************************** This function stores the binlog offset and flushes logs. */ - +static void innobase_store_binlog_offset_and_flush_log( /*=======================================*/ @@ -1936,12 +2023,11 @@ innobase_store_binlog_offset_and_flush_log( /* Synchronous flush of the log buffer to disk */ log_buffer_flush_to_disk(); } -#endif /********************************************************************* This is called after MySQL has written the binlog entry for the current transaction. Flushes the InnoDB log files to disk if required. */ - +static int innobase_commit_complete( /*=====================*/ @@ -1951,7 +2037,7 @@ innobase_commit_complete( { trx_t* trx; - trx = (trx_t*) thd->ha_data[hton->slot]; + trx = thd_to_trx(thd, hton); if (trx && trx->active_trans) { @@ -1967,6 +2053,7 @@ innobase_commit_complete( return(0); } +#endif /********************************************************************* Rolls back a transaction or the latest SQL statement. */ @@ -2020,7 +2107,7 @@ innobase_rollback( /********************************************************************* Rolls back a transaction */ - +static int innobase_rollback_trx( /*==================*/ @@ -2175,7 +2262,7 @@ innobase_close_connection( { trx_t* trx; - trx = (trx_t*)thd->ha_data[hton->slot]; + trx = thd_to_trx(thd, hton); ut_a(trx); @@ -2216,8 +2303,6 @@ ha_innobase::get_row_type() const /*=============================*/ /* out: ROW_TYPE_REDUNDANT or ROW_TYPE_COMPACT */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - if (prebuilt && prebuilt->table) { if (dict_table_is_comp_noninline(prebuilt->table)) { return(ROW_TYPE_COMPACT); @@ -2317,8 +2402,6 @@ ha_innobase::open( user_thd = NULL; - last_query_id = (ulong)-1; - if (!(share=get_share(name))) { DBUG_RETURN(1); @@ -2364,7 +2447,7 @@ ha_innobase::open( DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); } - if (ib_table->ibd_file_missing && !thd->tablespace_op) { + if (ib_table->ibd_file_missing && !thd_tablespace_op(thd)) { ut_print_timestamp(stderr); sql_print_error("MySQL is trying to open a table handle but " "the .ibd file for\ntable %s does not exist.\n" @@ -2382,10 +2465,9 @@ ha_innobase::open( DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); } - innobase_prebuilt = row_create_prebuilt(ib_table); + prebuilt = row_create_prebuilt(ib_table); - ((row_prebuilt_t*)innobase_prebuilt)->mysql_row_len = - table->s->reclength; + prebuilt->mysql_row_len = table->s->reclength; /* Looks like MySQL-3.23 sometimes has primary key number != 0 */ @@ -2404,8 +2486,8 @@ ha_innobase::open( "dictionary, but not in MySQL!", name); } - ((row_prebuilt_t*)innobase_prebuilt) - ->clust_index_was_generated = FALSE; + prebuilt->clust_index_was_generated = FALSE; + /* MySQL allocates the buffer for ref. key_info->key_length includes space for all key columns + one byte for each column that may be NULL. ref_length must be as exact as possible to @@ -2426,8 +2508,7 @@ ha_innobase::open( "of the table.", name); } - ((row_prebuilt_t*)innobase_prebuilt) - ->clust_index_was_generated = TRUE; + prebuilt->clust_index_was_generated = TRUE; ref_length = DATA_ROW_ID_LEN; @@ -2474,7 +2555,7 @@ ha_innobase::close(void) { DBUG_ENTER("ha_innobase::close"); - row_prebuilt_free((row_prebuilt_t*) innobase_prebuilt); + row_prebuilt_free(prebuilt); my_free((gptr) upd_buff, MYF(0)); free_share(share); @@ -3264,35 +3345,31 @@ ha_innobase::write_row( /* out: error code */ mysql_byte* record) /* in: a row in MySQL format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; int error; longlong auto_inc; longlong dummy; ibool auto_inc_used= FALSE; + THD* thd = current_thd; + trx_t* trx = thd_to_trx(thd, ht); DBUG_ENTER("ha_innobase::write_row"); - if (prebuilt->trx != - (trx_t*) current_thd->ha_data[ht->slot]) { + if (prebuilt->trx != trx) { sql_print_error("The transaction object for the table handle is at " "%p, but for the current thread it is at %p", - prebuilt->trx, - (trx_t*) current_thd->ha_data[ht->slot]); + prebuilt->trx, trx); fputs("InnoDB: Dump of 200 bytes around prebuilt: ", stderr); ut_print_buf(stderr, ((const byte*)prebuilt) - 100, 200); fputs("\n" - "InnoDB: Dump of 200 bytes around transaction.all: ", + "InnoDB: Dump of 200 bytes around ha_data: ", stderr); - ut_print_buf(stderr, - ((byte*)(&(current_thd->ha_data[ht->slot]))) - 100, - 200); + ut_print_buf(stderr, ((const byte*) trx) - 100, 200); putc('\n', stderr); ut_error; } - statistic_increment(current_thd->status_var.ha_write_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_write_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) table->timestamp_field->set_time(); @@ -3367,13 +3444,6 @@ no_commit: num_write_row++; - if (last_query_id != user_thd->query_id) { - prebuilt->sql_stat_start = TRUE; - last_query_id = user_thd->query_id; - - innobase_release_stat_resources(prebuilt->trx); - } - if (table->next_number_field && record == table->record[0]) { /* This is the case where the table has an auto-increment column */ @@ -3528,13 +3598,6 @@ calc_row_difference( for (i = 0; i < n_fields; i++) { field = table->field[i]; - /* if (thd->query_id != field->query_id) { */ - /* TODO: check that these fields cannot have - changed! */ - - /* goto skip_field; - }*/ - o_ptr = (byte*) old_row + get_field_offset(table, field); n_ptr = (byte*) new_row + get_field_offset(table, field); @@ -3655,25 +3718,17 @@ ha_innobase::update_row( const mysql_byte* old_row,/* in: old row in MySQL format */ mysql_byte* new_row)/* in: new row in MySQL format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; upd_t* uvect; int error = 0; + trx_t* trx = thd_to_trx(current_thd, ht); DBUG_ENTER("ha_innobase::update_row"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == trx); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) table->timestamp_field->set_time(); - if (last_query_id != user_thd->query_id) { - prebuilt->sql_stat_start = TRUE; - last_query_id = user_thd->query_id; - - innobase_release_stat_resources(prebuilt->trx); - } - if (prebuilt->upd_node) { uvect = prebuilt->upd_node->update; } else { @@ -3692,11 +3747,11 @@ ha_innobase::update_row( assert(prebuilt->template_type == ROW_MYSQL_WHOLE_ROW); - innodb_srv_conc_enter_innodb(prebuilt->trx); + innodb_srv_conc_enter_innodb(trx); error = row_update_for_mysql((byte*) old_row, prebuilt); - innodb_srv_conc_exit_innodb(prebuilt->trx); + innodb_srv_conc_exit_innodb(trx); error = convert_error_code_to_mysql(error, user_thd); @@ -3717,20 +3772,12 @@ ha_innobase::delete_row( /* out: error number or 0 */ const mysql_byte* record) /* in: a row in MySQL format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; int error = 0; + trx_t* trx = thd_to_trx(current_thd, ht); DBUG_ENTER("ha_innobase::delete_row"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); - - if (last_query_id != user_thd->query_id) { - prebuilt->sql_stat_start = TRUE; - last_query_id = user_thd->query_id; - - innobase_release_stat_resources(prebuilt->trx); - } + ut_a(prebuilt->trx == trx); if (!prebuilt->upd_node) { row_get_prebuilt_update_vector(prebuilt); @@ -3740,11 +3787,11 @@ ha_innobase::delete_row( prebuilt->upd_node->is_delete = TRUE; - innodb_srv_conc_enter_innodb(prebuilt->trx); + innodb_srv_conc_enter_innodb(trx); error = row_update_for_mysql((byte*) record, prebuilt); - innodb_srv_conc_exit_innodb(prebuilt->trx); + innodb_srv_conc_exit_innodb(trx); error = convert_error_code_to_mysql(error, user_thd); @@ -3765,19 +3812,8 @@ void ha_innobase::unlock_row(void) /*=========================*/ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - DBUG_ENTER("ha_innobase::unlock_row"); - if (UNIV_UNLIKELY(last_query_id != user_thd->query_id)) { - ut_print_timestamp(stderr); - sql_print_error("last_query_id is %lu != user_thd_query_id is " - "%lu", (ulong) last_query_id, - (ulong) user_thd->query_id); - mem_analyze_corruption((byte *) prebuilt->trx); - ut_error; - } - /* Consistent read does not take any locks, thus there is nothing to unlock. */ @@ -3808,8 +3844,6 @@ bool ha_innobase::was_semi_consistent_read(void) /*=======================================*/ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - return(prebuilt->row_read_type == ROW_READ_DID_SEMI_CONSISTENT); } @@ -3818,10 +3852,7 @@ void ha_innobase::try_semi_consistent_read(bool yes) /*===========================================*/ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); /* Row read type is set to semi consistent read if this was requested by the MySQL and either innodb_locks_unsafe_for_binlog @@ -3978,7 +4009,6 @@ ha_innobase::index_read( uint key_len,/* in: key value length */ enum ha_rkey_function find_flag)/* in: search flags from my_base.h */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; ulint mode; dict_index_t* index; ulint match_mode = 0; @@ -3987,18 +4017,9 @@ ha_innobase::index_read( DBUG_ENTER("index_read"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); - statistic_increment(current_thd->status_var.ha_read_key_count, - &LOCK_status); - - if (last_query_id != user_thd->query_id) { - prebuilt->sql_stat_start = TRUE; - last_query_id = user_thd->query_id; - - innobase_release_stat_resources(prebuilt->trx); - } + ha_statistic_increment(&SSV::ha_read_key_count); index = prebuilt->index; @@ -4095,15 +4116,12 @@ ha_innobase::change_active_index( index, even if it was internally generated by InnoDB */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; KEY* key=0; - statistic_increment(current_thd->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); DBUG_ENTER("change_active_index"); ut_ad(user_thd == current_thd); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(user_thd, ht)); active_index = keynr; @@ -4186,14 +4204,12 @@ ha_innobase::general_fetch( uint match_mode) /* in: 0, ROW_SEL_EXACT, or ROW_SEL_EXACT_PREFIX */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; ulint ret; int error = 0; DBUG_ENTER("general_fetch"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); innodb_srv_conc_enter_innodb(prebuilt->trx); @@ -4232,8 +4248,7 @@ ha_innobase::index_next( mysql_byte* buf) /* in/out: buffer for next row in MySQL format */ { - statistic_increment(current_thd->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); return(general_fetch(buf, ROW_SEL_NEXT, 0)); } @@ -4250,8 +4265,7 @@ ha_innobase::index_next_same( const mysql_byte* key, /* in: key value */ uint keylen) /* in: key value length */ { - statistic_increment(current_thd->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); return(general_fetch(buf, ROW_SEL_NEXT, last_match_mode)); } @@ -4268,8 +4282,7 @@ ha_innobase::index_prev( mysql_byte* buf) /* in/out: buffer for previous row in MySQL format */ { - statistic_increment(current_thd->status_var.ha_read_prev_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_prev_count); return(general_fetch(buf, ROW_SEL_PREV, 0)); } @@ -4288,8 +4301,7 @@ ha_innobase::index_first( int error; DBUG_ENTER("index_first"); - statistic_increment(current_thd->status_var.ha_read_first_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_first_count); error = index_read(buf, NULL, 0, HA_READ_AFTER_KEY); @@ -4315,8 +4327,7 @@ ha_innobase::index_last( int error; DBUG_ENTER("index_last"); - statistic_increment(current_thd->status_var.ha_read_last_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_last_count); error = index_read(buf, NULL, 0, HA_READ_BEFORE_KEY); @@ -4340,8 +4351,6 @@ ha_innobase::rnd_init( { int err; - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - /* Store the active index value so that we can restore the original value after a scan */ @@ -4388,8 +4397,7 @@ ha_innobase::rnd_next( int error; DBUG_ENTER("rnd_next"); - statistic_increment(current_thd->status_var.ha_read_rnd_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_next_count); if (start_of_scan) { error = index_first(buf); @@ -4419,17 +4427,14 @@ ha_innobase::rnd_pos( the length of data in pos has to be ref_length */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; int error; uint keynr = active_index; DBUG_ENTER("rnd_pos"); DBUG_DUMP("key", (char*) pos, ref_length); - statistic_increment(current_thd->status_var.ha_read_rnd_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_count); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); if (prebuilt->clust_index_was_generated) { /* No primary key was defined for the table and we @@ -4475,11 +4480,9 @@ ha_innobase::position( /*==================*/ const mysql_byte* record) /* in: row in MySQL format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; uint len; - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); if (prebuilt->clust_index_was_generated) { /* No primary key was defined for the table and we @@ -4970,16 +4973,15 @@ ha_innobase::discard_or_import_tablespace( /* out: 0 == success, -1 == error */ my_bool discard) /* in: TRUE if discard, else import */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; dict_table_t* dict_table; trx_t* trx; int err; DBUG_ENTER("ha_innobase::discard_or_import_tablespace"); - ut_a(prebuilt->trx && prebuilt->trx->magic_n == TRX_MAGIC_N); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx); + ut_a(prebuilt->trx->magic_n == TRX_MAGIC_N); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); dict_table = prebuilt->table; trx = prebuilt->trx; @@ -5003,7 +5005,6 @@ ha_innobase::delete_all_rows(void) /*==============================*/ /* out: error number */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; int error; THD* thd = current_thd; @@ -5121,7 +5122,7 @@ ha_innobase::delete_table( /********************************************************************* Removes all tables in the named database inside InnoDB. */ - +static void innobase_drop_database( /*===================*/ @@ -5288,7 +5289,6 @@ ha_innobase::records_in_range( key_range *max_key) /* in: range end key val, may also be 0 */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; KEY* key; dict_index_t* index; mysql_byte* key_val_buff2 = (mysql_byte*) my_malloc( @@ -5307,8 +5307,7 @@ ha_innobase::records_in_range( DBUG_ENTER("records_in_range"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); prebuilt->trx->op_info = (char*)"estimating records in index range"; @@ -5382,7 +5381,6 @@ ha_innobase::estimate_rows_upper_bound(void) /*======================================*/ /* out: upper bound of rows */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; dict_index_t* index; ulonglong estimate; ulonglong local_data_file_length; @@ -5431,8 +5429,6 @@ ha_innobase::scan_time() /*====================*/ /* out: estimated time measured in disk seeks */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - /* Since MySQL seems to favor table scans too much over index searches, we pretend that a sequential read takes the same time as a random disk read, that is, we do not divide the following @@ -5488,7 +5484,6 @@ ha_innobase::info( /*==============*/ uint flag) /* in: what information MySQL requests */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; dict_table_t* ib_table; dict_index_t* index; ha_rows rec_per_key; @@ -5741,12 +5736,10 @@ ha_innobase::check( HA_CHECK_OPT* check_opt) /* in: check options, currently ignored */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; ulint ret; ut_a(prebuilt->trx && prebuilt->trx->magic_n == TRX_MAGIC_N); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); if (prebuilt->mysql_template == NULL) { /* Build the template; we will use a dummy template @@ -5776,9 +5769,8 @@ ha_innobase::update_table_comment( info on foreign keys */ const char* comment)/* in: table comment defined by user */ { - uint length = (uint) strlen(comment); - char* str; - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; + uint length = (uint) strlen(comment); + char* str; long flen; /* We do not know if MySQL can call this function before calling @@ -5851,7 +5843,6 @@ ha_innobase::get_foreign_key_create_info(void) can be inserted to the CREATE TABLE statement, MUST be freed with ::free_foreign_key_create_info */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; char* str = 0; long flen; @@ -5909,7 +5900,6 @@ ha_innobase::get_foreign_key_list(THD *thd, List *f_key_list) dict_foreign_t* foreign; DBUG_ENTER("get_foreign_key_list"); - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; ut_a(prebuilt != NULL); update_thd(current_thd); prebuilt->trx->op_info = (char*)"getting list of foreign keys"; @@ -5922,8 +5912,8 @@ ha_innobase::get_foreign_key_list(THD *thd, List *f_key_list) FOREIGN_KEY_INFO f_key_info; LEX_STRING *name= 0; uint ulen; - char uname[NAME_LEN*3+1]; /* Unencoded name */ - char db_name[NAME_LEN*3+1]; + char uname[NAME_LEN+1]; /* Unencoded name */ + char db_name[NAME_LEN+1]; const char *tmp_buff; tmp_buff= foreign->id; @@ -6042,13 +6032,11 @@ bool ha_innobase::can_switch_engines(void) /*=================================*/ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; bool can_switch; DBUG_ENTER("ha_innobase::can_switch_engines"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); prebuilt->trx->op_info = "determining if there are foreign key constraints"; @@ -6074,8 +6062,6 @@ ha_innobase::referenced_by_foreign_key(void) /*========================================*/ /* out: > 0 if referenced by a FOREIGN KEY */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; - if (dict_table_referenced_by_foreign_key(prebuilt->table)) { return(1); @@ -6108,8 +6094,6 @@ ha_innobase::extra( enum ha_extra_function operation) /* in: HA_EXTRA_FLUSH or some other flag */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - /* Warning: since it is not sure that MySQL calls external_lock before calling this function, the trx field in prebuilt can be obsolete! */ @@ -6142,7 +6126,6 @@ ha_innobase::extra( int ha_innobase::reset() { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; if (prebuilt->blob_heap) { row_mysql_prebuilt_free_blob_heap(prebuilt); } @@ -6161,7 +6144,7 @@ on that table. MySQL-5.0 also calls this before each statement in an execution of a stored procedure. To make the execution more deterministic for binlogging, MySQL-5.0 locks all tables involved in a stored procedure with full explicit table -locks (thd->in_lock_tables is true in ::store_lock()) before executing the +locks (thd_in_lock_tables(thd) holds in store_lock()) before executing the procedure. */ int @@ -6171,7 +6154,6 @@ ha_innobase::start_stmt( THD* thd, /* in: handle to the user thread */ thr_lock_type lock_type) { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; update_thd(thd); @@ -6270,7 +6252,6 @@ ha_innobase::external_lock( THD* thd, /* in: handle to the user thread */ int lock_type) /* in: lock type */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; DBUG_ENTER("ha_innobase::external_lock"); @@ -6336,16 +6317,16 @@ ha_innobase::external_lock( VERY easily deadlocks. We do not set InnoDB table locks if user has not explicitly - requested a table lock. Note that thd->in_lock_tables - can be TRUE on some cases e.g. at the start of a stored + requested a table lock. Note that thd_in_lock_tables(thd) + can hold in some cases, e.g., at the start of a stored procedure call (SQLCOM_CALL). */ if (prebuilt->select_lock_type != LOCK_NONE) { - if (thd->in_lock_tables && - thd->lex->sql_command == SQLCOM_LOCK_TABLES && - thd->variables.innodb_table_locks && - (thd->options & OPTION_NOT_AUTOCOMMIT)) { + if (thd->lex->sql_command == SQLCOM_LOCK_TABLES + && thd->variables.innodb_table_locks + && (thd->options & OPTION_NOT_AUTOCOMMIT) + && thd_in_lock_tables(thd)) { ulint error = row_lock_table_for_mysql( prebuilt, NULL, 0); @@ -6412,7 +6393,6 @@ ha_innobase::transactional_table_lock( THD* thd, /* in: handle to the user thread */ int lock_type) /* in: lock type */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; DBUG_ENTER("ha_innobase::transactional_table_lock"); @@ -6424,7 +6404,8 @@ ha_innobase::transactional_table_lock( update_thd(thd); - if (prebuilt->table->ibd_file_missing && !current_thd->tablespace_op) { + if (prebuilt->table->ibd_file_missing + && !thd_tablespace_op(current_thd)) { ut_print_timestamp(stderr); fprintf(stderr, " InnoDB error:\n" "MySQL is trying to use a table handle but the .ibd file for\n" @@ -6469,7 +6450,7 @@ ha_innobase::transactional_table_lock( trx->active_trans = 1; } - if (thd->in_lock_tables && thd->variables.innodb_table_locks) { + if (thd->variables.innodb_table_locks && thd_in_lock_tables(thd)) { ulint error = DB_SUCCESS; error = row_lock_table_for_mysql(prebuilt, NULL, 0); @@ -6494,7 +6475,7 @@ ha_innobase::transactional_table_lock( /**************************************************************************** Here we export InnoDB status variables to MySQL. */ - +static int innodb_export_status() /*==================*/ @@ -6509,7 +6490,7 @@ innodb_export_status() /**************************************************************************** Implements the SHOW INNODB STATUS command. Sends the output of the InnoDB Monitor to the client. */ - +static bool innodb_show_status( /*===============*/ @@ -6600,7 +6581,7 @@ innodb_show_status( /**************************************************************************** Implements the SHOW MUTEX STATUS command. . */ - +static bool innodb_mutex_show_status( /*=====================*/ @@ -6699,6 +6680,7 @@ innodb_mutex_show_status( DBUG_RETURN(FALSE); } +static bool innobase_show_status(handlerton *hton, THD* thd, stat_print_fn* stat_print, enum ha_stat_type stat_type) @@ -6800,7 +6782,6 @@ ha_innobase::store_lock( 'lock'; this may also be TL_IGNORE */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; /* Note that trx in this function is NOT necessarily prebuilt->trx @@ -6821,16 +6802,28 @@ ha_innobase::store_lock( trx->isolation_level = innobase_map_isolation_level( (enum_tx_isolation) thd->variables.tx_isolation); + + if (trx->isolation_level <= TRX_ISO_READ_COMMITTED + && trx->global_read_view) { + + /* At low transaction isolation levels we let + each consistent read set its own snapshot */ + + read_view_close_for_mysql(trx); + } + } + const bool in_lock_tables = thd_in_lock_tables(thd); + if (thd->lex->sql_command == SQLCOM_DROP_TABLE) { /* MySQL calls this function in DROP TABLE though this table handle may belong to another thd that is running a query. Let us in that case skip any changes to the prebuilt struct. */ - } else if ((lock_type == TL_READ && thd->in_lock_tables) || - (lock_type == TL_READ_HIGH_PRIORITY && thd->in_lock_tables) || + } else if ((lock_type == TL_READ && in_lock_tables) || + (lock_type == TL_READ_HIGH_PRIORITY && in_lock_tables) || lock_type == TL_READ_WITH_SHARED_LOCKS || lock_type == TL_READ_NO_INSERT || (thd->lex->sql_command != SQLCOM_SELECT @@ -6901,7 +6894,7 @@ ha_innobase::store_lock( /* Starting from 5.0.7, we weaken also the table locks set at the start of a MySQL stored procedure call, just like we weaken the locks set at the start of an SQL statement. - MySQL does set thd->in_lock_tables TRUE there, but in reality + MySQL does set in_lock_tables TRUE there, but in reality we do not need table locks to make the execution of a single transaction stored procedure call deterministic (if it does not use a consistent read). */ @@ -6929,14 +6922,14 @@ ha_innobase::store_lock( We especially allow multiple writers if MySQL is at the start of a stored procedure call (SQLCOM_CALL) or a - stored function call (MySQL does have thd->in_lock_tables + stored function call (MySQL does have in_lock_tables TRUE there). */ if ((lock_type >= TL_WRITE_CONCURRENT_INSERT && lock_type <= TL_WRITE) - && !(thd->in_lock_tables + && !(in_lock_tables && thd->lex->sql_command == SQLCOM_LOCK_TABLES) - && !thd->tablespace_op + && !thd_tablespace_op(thd) && thd->lex->sql_command != SQLCOM_TRUNCATE && thd->lex->sql_command != SQLCOM_OPTIMIZE @@ -6963,7 +6956,7 @@ ha_innobase::store_lock( We especially allow concurrent inserts if MySQL is at the start of a stored procedure call (SQLCOM_CALL) - (MySQL does have thd->in_lock_tables TRUE there). */ + (MySQL does have in_lock_tables TRUE there). */ if (lock_type == TL_READ_NO_INSERT && thd->lex->sql_command != SQLCOM_LOCK_TABLES) { @@ -6992,7 +6985,6 @@ ha_innobase::innobase_read_and_init_auto_inc( timeout */ longlong* ret) /* out: auto-inc value */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; longlong auto_inc; ulint old_select_lock_type; ibool trx_was_not_started = FALSE; @@ -7172,8 +7164,7 @@ ha_innobase::reset_auto_increment(ulonglong value) { DBUG_ENTER("ha_innobase::reset_auto_increment"); - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - int error; + int error; update_thd(current_thd); @@ -7217,7 +7208,6 @@ ha_innobase::cmp_ref( const mysql_byte* ref2) /* in: an (internal) primary key value in the MySQL key value format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; enum_field_types mysql_type; Field* field; KEY_PART_INFO* key_part; @@ -7276,6 +7266,33 @@ ha_innobase::cmp_ref( return(0); } +/*********************************************************************** +Ask InnoDB if a query to a table can be cached. */ + +my_bool +ha_innobase::register_query_cache_table( +/*====================================*/ + /* out: TRUE if query caching + of the table is permitted */ + THD* thd, /* in: user thread handle */ + char* table_key, /* in: concatenation of database name, + the null character '\0', + and the table name */ + uint key_length, /* in: length of the full name, i.e. + len(dbname) + len(tablename) + 1 */ + qc_engine_callback* + call_back, /* out: pointer to function for + checking if query caching + is permitted */ + ulonglong *engine_data) /* in/out: data to call_back */ +{ + *call_back = innobase_query_caching_of_table_permitted; + *engine_data = 0; + return(innobase_query_caching_of_table_permitted(thd, table_key, + key_length, + engine_data)); +} + char* ha_innobase::get_mysql_bin_log_name() { @@ -7408,7 +7425,7 @@ innobase_query_is_update(void) /*********************************************************************** This function is used to prepare X/Open XA distributed transaction */ - +static int innobase_xa_prepare( /*================*/ @@ -7504,7 +7521,7 @@ innobase_xa_prepare( /*********************************************************************** This function is used to recover X/Open XA distributed transactions */ - +static int innobase_xa_recover( /*================*/ @@ -7525,7 +7542,7 @@ innobase_xa_recover( /*********************************************************************** This function is used to commit one X/Open XA distributed transaction which is in the prepared state */ - +static int innobase_commit_by_xid( /*===================*/ @@ -7549,7 +7566,7 @@ innobase_commit_by_xid( /*********************************************************************** This function is used to rollback one X/Open XA distributed transaction which is in the prepared state */ - +static int innobase_rollback_by_xid( /*=====================*/ @@ -7573,9 +7590,10 @@ Create a consistent view for a cursor based on current transaction which is created if the corresponding MySQL thread still lacks one. This consistent view is then used inside of MySQL when accessing records using a cursor. */ - +static void* innobase_create_cursor_view( +/*========================*/ /* out: pointer to cursor view or NULL */ handlerton *hton, /* in: innobase hton */ THD* thd) /* in: user thread handle */ @@ -7588,9 +7606,10 @@ innobase_create_cursor_view( Close the given consistent cursor view of a transaction and restore global read view to a transaction read view. Transaction is created if the corresponding MySQL thread still lacks one. */ - +static void innobase_close_cursor_view( +/*=======================*/ handlerton *hton, THD* thd, /* in: user thread handle */ void* curview)/* in: Consistent read view to be closed */ @@ -7604,7 +7623,7 @@ Set the given consistent cursor view to a transaction which is created if the corresponding MySQL thread still lacks one. If the given consistent cursor view is NULL global read view of a transaction is restored to a transaction read view. */ - +static void innobase_set_cursor_view( /*=====================*/ @@ -7651,12 +7670,12 @@ static int show_innodb_vars(THD *thd, SHOW_VAR *var, char *buff) return 0; } -SHOW_VAR innodb_status_variables_export[]= { +static SHOW_VAR innodb_status_variables_export[]= { {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC}, {NullS, NullS, SHOW_LONG} }; -struct st_mysql_storage_engine innobase_storage_engine= +static struct st_mysql_storage_engine innobase_storage_engine= { MYSQL_HANDLERTON_INTERFACE_VERSION }; mysql_declare_plugin(innobase) diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 339238a584e..f5df362b490 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -33,23 +33,17 @@ typedef struct st_innobase_share { struct row_prebuilt_struct; - -my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name, - uint full_name_len, - ulonglong *unused); +typedef struct row_prebuilt_struct row_prebuilt_t; /* The class defining a handle to an Innodb table */ class ha_innobase: public handler { - void* innobase_prebuilt;/* (row_prebuilt_t*) prebuilt - struct in InnoDB, used to save - CPU time with prebuilt data + row_prebuilt_t* prebuilt; /* prebuilt struct in InnoDB, used + to save CPU time with prebuilt data structures*/ THD* user_thd; /* the thread handle of the user currently using the handle; this is set in external_lock function */ - query_id_t last_query_id; /* the latest query id where the - handle was used */ THR_LOCK_DATA lock; INNOBASE_SHARE *share; @@ -186,14 +180,7 @@ class ha_innobase: public handler my_bool register_query_cache_table(THD *thd, char *table_key, uint key_length, qc_engine_callback *call_back, - ulonglong *engine_data) - { - *call_back= innobase_query_caching_of_table_permitted; - *engine_data= 0; - return innobase_query_caching_of_table_permitted(thd, table_key, - key_length, - engine_data); - } + ulonglong *engine_data); static char *get_mysql_bin_log_name(); static ulonglong get_mysql_bin_log_pos(); bool primary_key_is_clustered() { return true; } @@ -202,7 +189,6 @@ class ha_innobase: public handler uint table_changes); }; -extern SHOW_VAR innodb_status_variables[]; extern ulong innobase_fast_shutdown; extern ulong innobase_large_page_size; extern long innobase_mirrored_log_groups, innobase_log_files_in_group; @@ -238,11 +224,6 @@ extern ulong srv_commit_concurrency; extern ulong srv_flush_log_at_trx_commit; } -int innobase_init(void); -int innobase_end(handlerton *hton, ha_panic_function type); -bool innobase_flush_logs(handlerton *hton); -uint innobase_get_free_space(void); - /* don't delete it - it may be re-enabled later as an optimization for the most common case InnoDB+binlog @@ -256,93 +237,3 @@ int innobase_report_binlog_offset_and_commit( int innobase_commit_complete(void* trx_handle); void innobase_store_binlog_offset_and_flush_log(char *binlog_name,longlong offset); #endif - -void innobase_drop_database(handlerton *hton, char *path); -bool innobase_show_status(handlerton *hton, THD* thd, stat_print_fn*, enum ha_stat_type); - -int innobase_release_temporary_latches(handlerton *hton, THD *thd); - -void innobase_store_binlog_offset_and_flush_log(handlerton *hton, char *binlog_name,longlong offset); - -int innobase_start_trx_and_assign_read_view(handlerton *hton, THD* thd); - -/*********************************************************************** -This function is used to prepare X/Open XA distributed transaction */ - -int innobase_xa_prepare( -/*====================*/ - /* out: 0 or error number */ - handlerton *hton, /* in: innobase hton */ - THD* thd, /* in: handle to the MySQL thread of the user - whose XA transaction should be prepared */ - bool all); /* in: TRUE - commit transaction - FALSE - the current SQL statement ended */ - -/*********************************************************************** -This function is used to recover X/Open XA distributed transactions */ - -int innobase_xa_recover( -/*====================*/ - /* out: number of prepared transactions - stored in xid_list */ - handlerton *hton, /* in: innobase hton */ - XID* xid_list, /* in/out: prepared transactions */ - uint len); /* in: number of slots in xid_list */ - -/*********************************************************************** -This function is used to commit one X/Open XA distributed transaction -which is in the prepared state */ - -int innobase_commit_by_xid( -/*=======================*/ - /* out: 0 or error number */ - handlerton *hton, /* in: innobase hton */ - XID* xid); /* in : X/Open XA Transaction Identification */ - -/*********************************************************************** -This function is used to rollback one X/Open XA distributed transaction -which is in the prepared state */ - -int innobase_rollback_by_xid( - /* out: 0 or error number */ - handlerton *hton, /* in: innobase hton */ - XID *xid); /* in : X/Open XA Transaction Identification */ - - -/*********************************************************************** -Create a consistent view for a cursor based on current transaction -which is created if the corresponding MySQL thread still lacks one. -This consistent view is then used inside of MySQL when accessing records -using a cursor. */ - -void* -innobase_create_cursor_view( - /* out: Pointer to cursor view or NULL */ - handlerton *hton, /* in: innobase hton */ - THD* thd); /* in: user thread handle */ - -/*********************************************************************** -Close the given consistent cursor view of a transaction and restore -global read view to a transaction read view. Transaction is created if the -corresponding MySQL thread still lacks one. */ - -void -innobase_close_cursor_view( -/*=======================*/ - handlerton *hton, /* in: innobase hton */ - THD* thd, /* in: user thread handle */ - void* curview); /* in: Consistent read view to be closed */ - - -/*********************************************************************** -Set the given consistent cursor view to a transaction which is created -if the corresponding MySQL thread still lacks one. If the given -consistent cursor view is NULL global read view of a transaction is -restored to a transaction read view. */ - -void -innobase_set_cursor_view( -/*=====================*/ - handlerton *hton, /* in: innobase hton */ - THD* thd, /* in: user thread handle */ - void* curview); /* in: Consistent read view to be set */ diff --git a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c index 96ab928a436..1cbb6003cfc 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.c +++ b/storage/innobase/ibuf/ibuf0ibuf.c @@ -417,9 +417,7 @@ ibuf_data_sizes_update( { ulint old_size; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&ibuf_mutex)); -#endif /* UNIV_SYNC_DEBUG */ old_size = data->size; @@ -1576,9 +1574,7 @@ ibuf_data_enough_free_for_insert( /* out: TRUE if enough free pages in list */ ibuf_data_t* data) /* in: ibuf data for the space */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&ibuf_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* We want a big margin of free pages, because a B-tree can sometimes grow in size also if records are deleted from it, as the node pointers @@ -1604,16 +1600,9 @@ ibuf_data_too_much_free( /* out: TRUE if enough free pages in list */ ibuf_data_t* data) /* in: ibuf data for the space */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&ibuf_mutex)); -#endif /* UNIV_SYNC_DEBUG */ - if (data->free_list_len >= 3 + data->size / 2 + 3 * data->height) { - - return(TRUE); - } - - return(FALSE); + return(data->free_list_len >= 3 + data->size / 2 + 3 * data->height); } /************************************************************************* @@ -3451,9 +3440,7 @@ ibuf_validate_low(void) ibuf_data_t* data; ulint sum_sizes; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&ibuf_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sum_sizes = 0; diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic index c448c28933a..031bf6c51b4 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/storage/innobase/include/buf0buf.ic @@ -128,9 +128,7 @@ buf_pool_clock_tic(void) /*====================*/ /* out: new clock value */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ buf_pool->ulint_clock++; @@ -456,7 +454,7 @@ buf_frame_modify_clock_inc( #ifdef UNIV_SYNC_DEBUG ut_ad((mutex_own(&(buf_pool->mutex)) && (block->buf_fix_count == 0)) || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); -#endif /*UNIV_SYNC_DEBUG */ +#endif /* UNIV_SYNC_DEBUG */ UT_DULINT_INC(block->modify_clock); @@ -513,14 +511,12 @@ buf_block_buf_fix_inc_debug( const char* file __attribute__ ((unused)), /* in: file name */ ulint line __attribute__ ((unused))) /* in: line */ { -#ifdef UNIV_SYNC_DEBUG ibool ret; ret = rw_lock_s_lock_func_nowait(&(block->debug_latch), file, line); ut_ad(ret == TRUE); ut_ad(mutex_own(&block->mutex)); -#endif block->buf_fix_count++; } #else /* UNIV_SYNC_DEBUG */ @@ -532,9 +528,8 @@ buf_block_buf_fix_inc( /*==================*/ buf_block_t* block) /* in: block to bufferfix */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&block->mutex)); -#endif + block->buf_fix_count++; } #endif /* UNIV_SYNC_DEBUG */ @@ -552,9 +547,7 @@ buf_page_hash_get( ulint fold; ut_ad(buf_pool); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* Look for the page in the hash table */ diff --git a/storage/innobase/include/buf0flu.ic b/storage/innobase/include/buf0flu.ic index b304673f8be..ae873c42088 100644 --- a/storage/innobase/include/buf0flu.ic +++ b/storage/innobase/include/buf0flu.ic @@ -42,8 +42,8 @@ buf_flush_note_modification( ut_ad(block->buf_fix_count > 0); #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&(block->lock), RW_LOCK_EX)); - ut_ad(mutex_own(&(buf_pool->mutex))); #endif /* UNIV_SYNC_DEBUG */ + ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(ut_dulint_cmp(mtr->start_lsn, ut_dulint_zero) != 0); ut_ad(mtr->modifications); diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index d59e99277da..4a9afd2f3f5 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -551,9 +551,7 @@ dict_table_check_if_in_cache_low( ulint table_fold; ut_ad(table_name); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* Look for the table name in the hash table */ table_fold = ut_fold_string(table_name); @@ -576,9 +574,7 @@ dict_table_get_low( dict_table_t* table; ut_ad(table_name); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ table = dict_table_check_if_in_cache_low(table_name); @@ -601,9 +597,7 @@ dict_table_get_on_id_low( dict_table_t* table; ulint fold; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* Look for the table name in the hash table */ fold = ut_fold_dulint(table_id); diff --git a/storage/innobase/include/ha0ha.ic b/storage/innobase/include/ha0ha.ic index 1584e1ff4bf..fb264377f28 100644 --- a/storage/innobase/include/ha0ha.ic +++ b/storage/innobase/include/ha0ha.ic @@ -81,9 +81,7 @@ ha_search( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_chain_get_first(table, fold); @@ -113,9 +111,7 @@ ha_search_and_get_data( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_chain_get_first(table, fold); @@ -145,9 +141,7 @@ ha_search_with_data( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_chain_get_first(table, fold); @@ -177,9 +171,7 @@ ha_search_and_delete_if_found( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_search_with_data(table, fold, data); diff --git a/storage/innobase/include/lock0lock.ic b/storage/innobase/include/lock0lock.ic index feec460bec8..311623b190b 100644 --- a/storage/innobase/include/lock0lock.ic +++ b/storage/innobase/include/lock0lock.ic @@ -65,9 +65,7 @@ lock_clust_rec_some_has_impl( { dulint trx_id; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(index->type & DICT_CLUSTERED); ut_ad(page_rec_is_user_rec(rec)); diff --git a/storage/innobase/include/log0log.ic b/storage/innobase/include/log0log.ic index 06deff196bc..df0a8baf2d5 100644 --- a/storage/innobase/include/log0log.ic +++ b/storage/innobase/include/log0log.ic @@ -255,9 +255,7 @@ log_block_init( { ulint no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ no = log_block_convert_lsn_to_no(lsn); @@ -279,9 +277,7 @@ log_block_init_in_old_format( { ulint no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ no = log_block_convert_lsn_to_no(lsn); diff --git a/storage/innobase/include/mem0mem.h b/storage/innobase/include/mem0mem.h index f68d45d83df..2d5fd1db6c3 100644 --- a/storage/innobase/include/mem0mem.h +++ b/storage/innobase/include/mem0mem.h @@ -279,17 +279,6 @@ mem_strdupl( const char* str, /* in: string to be copied */ ulint len); /* in: length of str, in bytes */ -/************************************************************************** -Makes a NUL-terminated quoted copy of a NUL-terminated string. */ -UNIV_INLINE -char* -mem_strdupq( -/*========*/ - /* out, own: a quoted copy of the string, - must be deallocated with mem_free */ - const char* str, /* in: string to be copied */ - char q); /* in: quote character */ - /************************************************************************** Duplicates a NUL-terminated string, allocated from a memory heap. */ diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.ic index 069f8de36cb..cb8fbe92cf0 100644 --- a/storage/innobase/include/mem0mem.ic +++ b/storage/innobase/include/mem0mem.ic @@ -589,41 +589,6 @@ mem_strdupl( return(memcpy(s, str, len)); } -/************************************************************************** -Makes a NUL-terminated quoted copy of a NUL-terminated string. */ -UNIV_INLINE -char* -mem_strdupq( -/*========*/ - /* out, own: a quoted copy of the string, - must be deallocated with mem_free */ - const char* str, /* in: string to be copied */ - char q) /* in: quote character */ -{ - char* dst; - char* d; - const char* s = str; - size_t len = strlen(str) + 3; - /* calculate the number of quote characters in the string */ - while((s = strchr(s, q)) != NULL) { - s++; - len++; - } - /* allocate the quoted string, and copy it */ - d = dst = mem_alloc(len); - *d++ = q; - s = str; - while(*s) { - if ((*d++ = *s++) == q) { - *d++ = q; - } - } - *d++ = q; - *d++ = '\0'; - ut_ad((ssize_t) len == d - dst); - return(dst); -} - /************************************************************************** Makes a NUL-terminated copy of a nonterminated string, allocated from a memory heap. */ diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.ic index ace90247b80..90a35af74dc 100644 --- a/storage/innobase/include/rem0rec.ic +++ b/storage/innobase/include/rem0rec.ic @@ -995,6 +995,9 @@ rec_offs_nth_size( { ut_ad(rec_offs_validate(NULL, NULL, offsets)); ut_ad(n < rec_offs_n_fields(offsets)); + if (!n) { + return(rec_offs_base(offsets)[1 + n] & REC_OFFS_MASK); + } return((rec_offs_base(offsets)[1 + n] - rec_offs_base(offsets)[n]) & REC_OFFS_MASK); } diff --git a/storage/innobase/include/sync0rw.ic b/storage/innobase/include/sync0rw.ic index defe0692aa8..f8b5367739a 100644 --- a/storage/innobase/include/sync0rw.ic +++ b/storage/innobase/include/sync0rw.ic @@ -133,9 +133,8 @@ rw_lock_s_lock_low( const char* file_name, /* in: file name where lock requested */ ulint line) /* in: line where requested */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(rw_lock_get_mutex(lock))); -#endif /* UNIV_SYNC_DEBUG */ + /* Check if the writer field is free */ if (UNIV_LIKELY(lock->writer == RW_LOCK_NOT_LOCKED)) { diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index e7e135c0c7e..69c0cd9e39b 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -114,13 +114,20 @@ mutex_enter_func( mutex_t* mutex, /* in: pointer to mutex */ const char* file_name, /* in: file name where locked */ ulint line); /* in: line where locked */ +/****************************************************************** +NOTE! The following macro should be used in mutex locking, not the +corresponding function. */ + +#define mutex_enter_nowait(M) \ + mutex_enter_nowait_func((M), __FILE__, __LINE__) /************************************************************************ -Tries to lock the mutex for the current thread. If the lock is not acquired -immediately, returns with return value 1. */ +NOTE! Use the corresponding macro in the header file, not this function +directly. Tries to lock the mutex for the current thread. If the lock is not +acquired immediately, returns with return value 1. */ ulint -mutex_enter_nowait( -/*===============*/ +mutex_enter_nowait_func( +/*====================*/ /* out: 0 if succeed, 1 if not */ mutex_t* mutex, /* in: pointer to mutex */ const char* file_name, /* in: file name where mutex @@ -170,7 +177,16 @@ Checks that the mutex has been initialized. */ ibool mutex_validate( /*===========*/ - mutex_t* mutex); + const mutex_t* mutex); +/********************************************************************** +Checks that the current thread owns the mutex. Works only +in the debug version. */ + +ibool +mutex_own( +/*======*/ + /* out: TRUE if owns */ + const mutex_t* mutex); /* in: mutex */ #endif /* UNIV_DEBUG */ #ifdef UNIV_SYNC_DEBUG /********************************************************************** @@ -215,15 +231,6 @@ sync_thread_levels_empty_gen( also purge_is_running mutex is allowed */ /********************************************************************** -Checks that the current thread owns the mutex. Works only -in the debug version. */ - -ibool -mutex_own( -/*======*/ - /* out: TRUE if owns */ - mutex_t* mutex); /* in: mutex */ -/********************************************************************** Gets the debug information for a reserved mutex. */ void @@ -248,7 +255,7 @@ UNIV_INLINE ulint mutex_get_lock_word( /*================*/ - mutex_t* mutex); /* in: mutex */ + const mutex_t* mutex); /* in: mutex */ #ifdef UNIV_SYNC_DEBUG /********************************************************************** NOT to be used outside this module except in debugging! Gets the waiters @@ -258,7 +265,7 @@ ulint mutex_get_waiters( /*==============*/ /* out: value to set */ - mutex_t* mutex); /* in: mutex */ + const mutex_t* mutex); /* in: mutex */ #endif /* UNIV_SYNC_DEBUG */ /* @@ -479,13 +486,13 @@ struct mutex_struct { #ifdef UNIV_SYNC_DEBUG const char* file_name; /* File where the mutex was locked */ ulint line; /* Line where the mutex was locked */ - os_thread_id_t thread_id; /* Debug version: The thread id of the - thread which locked the mutex. */ ulint level; /* Level in the global latching order */ #endif /* UNIV_SYNC_DEBUG */ const char* cfile_name;/* File name where mutex created */ ulint cline; /* Line where created */ #ifdef UNIV_DEBUG + os_thread_id_t thread_id; /* The thread id of the thread + which locked the mutex. */ ulint magic_n; # define MUTEX_MAGIC_N (ulint)979585 #endif /* UNIV_DEBUG */ diff --git a/storage/innobase/include/sync0sync.ic b/storage/innobase/include/sync0sync.ic index 4b48a1469ff..9bd5ac2a518 100644 --- a/storage/innobase/include/sync0sync.ic +++ b/storage/innobase/include/sync0sync.ic @@ -6,6 +6,16 @@ Mutex, the basic synchronization primitive Created 9/5/1995 Heikki Tuuri *******************************************************/ +#if defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) +/* %z0: Use the size of operand %0 which in our case is *m to determine +instruction size, it should end up as xchgl. "1" in the input constraint, +says that "in" has to go in the same place as "out".*/ +#define TAS(m, in, out) \ + asm volatile ("xchg%z0 %2, %0" \ + : "=g" (*(m)), "=r" (out) \ + : "1" (in)) /* Note: "1" here refers to "=r" (out) */ +#endif + /********************************************************************** Sets the waiters field in a mutex. */ @@ -89,20 +99,10 @@ mutex_test_and_set( return(res); #elif defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) - ulint* lw; ulint res; - lw = &(mutex->lock_word); + TAS(&mutex->lock_word, 1, res); - /* In assembly we use the so-called AT & T syntax where - the order of operands is inverted compared to the ordinary Intel - syntax. The 'l' after the mnemonics denotes a 32-bit operation. - The line after the code tells which values come out of the asm - code, and the second line tells the input to the asm code. */ - - asm volatile("movl $1, %%eax; xchgl (%%ecx), %%eax" : - "=eax" (res), "=m" (*lw) : - "ecx" (lw)); return(res); #else ibool ret; @@ -141,20 +141,9 @@ mutex_reset_lock_word( __asm MOV ECX, lw __asm XCHG EDX, DWORD PTR [ECX] #elif defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) - ulint* lw; + ulint res; - lw = &(mutex->lock_word); - - /* In assembly we use the so-called AT & T syntax where - the order of operands is inverted compared to the ordinary Intel - syntax. The 'l' after the mnemonics denotes a 32-bit operation. */ - - asm volatile("movl $0, %%eax; xchgl (%%ecx), %%eax" : - "=m" (*lw) : - "ecx" (lw) : - "eax"); /* gcc does not seem to understand - that our asm code resets eax: tell it - explicitly that after the third ':' */ + TAS(&mutex->lock_word, 0, res); #else mutex->lock_word = 0; @@ -168,9 +157,9 @@ UNIV_INLINE ulint mutex_get_lock_word( /*================*/ - mutex_t* mutex) /* in: mutex */ + const mutex_t* mutex) /* in: mutex */ { - volatile ulint* ptr; /* declared volatile to ensure that + const volatile ulint* ptr; /* declared volatile to ensure that lock_word is loaded from memory */ ut_ad(mutex); @@ -186,9 +175,9 @@ ulint mutex_get_waiters( /*==============*/ /* out: value to set */ - mutex_t* mutex) /* in: mutex */ + const mutex_t* mutex) /* in: mutex */ { - volatile ulint* ptr; /* declared volatile to ensure that + const volatile ulint* ptr; /* declared volatile to ensure that the value is read from memory */ ut_ad(mutex); @@ -206,11 +195,11 @@ mutex_exit( /*=======*/ mutex_t* mutex) /* in: pointer to mutex */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(mutex)); - mutex->thread_id = ULINT_UNDEFINED; + ut_d(mutex->thread_id = ULINT_UNDEFINED); +#ifdef UNIV_SYNC_DEBUG sync_thread_reset_level(mutex); #endif mutex_reset_lock_word(mutex); @@ -250,6 +239,7 @@ mutex_enter_func( ulint line) /* in: line where locked */ { ut_ad(mutex_validate(mutex)); + ut_ad(!mutex_own(mutex)); /* Note that we do not peek at the value of lock_word before trying the atomic test_and_set; we could peek, and possibly save time. */ @@ -259,6 +249,7 @@ mutex_enter_func( #endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */ if (!mutex_test_and_set(mutex)) { + ut_d(mutex->thread_id = os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif diff --git a/storage/innobase/include/trx0sys.ic b/storage/innobase/include/trx0sys.ic index 9c950be09f0..86b71df08d6 100644 --- a/storage/innobase/include/trx0sys.ic +++ b/storage/innobase/include/trx0sys.ic @@ -62,9 +62,7 @@ trx_sys_get_nth_rseg( trx_sys_t* sys, /* in: trx system */ ulint n) /* in: index of slot */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(n < TRX_SYS_N_RSEGS); return(sys->rseg_array[n]); @@ -121,9 +119,7 @@ trx_sysf_rseg_get_space( ulint i, /* in: slot index == rseg id */ mtr_t* mtr) /* in: mtr */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sys_header); ut_ad(i < TRX_SYS_N_RSEGS); @@ -146,9 +142,7 @@ trx_sysf_rseg_get_page_no( mtr_t* mtr) /* in: mtr */ { ut_ad(sys_header); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(i < TRX_SYS_N_RSEGS); return(mtr_read_ulint(sys_header + TRX_SYS_RSEGS @@ -168,9 +162,7 @@ trx_sysf_rseg_set_space( ulint space, /* in: space id */ mtr_t* mtr) /* in: mtr */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sys_header); ut_ad(i < TRX_SYS_N_RSEGS); @@ -194,9 +186,7 @@ trx_sysf_rseg_set_page_no( slot is reset to unused */ mtr_t* mtr) /* in: mtr */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sys_header); ut_ad(i < TRX_SYS_N_RSEGS); @@ -250,9 +240,7 @@ trx_get_on_id( { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = UT_LIST_GET_FIRST(trx_sys->trx_list); @@ -282,9 +270,7 @@ trx_list_get_min_trx_id(void) { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = UT_LIST_GET_LAST(trx_sys->trx_list); @@ -307,9 +293,7 @@ trx_is_active( { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (ut_dulint_cmp(trx_id, trx_list_get_min_trx_id()) < 0) { @@ -346,9 +330,7 @@ trx_sys_get_new_trx_id(void) { dulint id; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* VERY important: after the database is started, max_trx_id value is divisible by TRX_SYS_TRX_ID_WRITE_MARGIN, and the following if @@ -378,9 +360,7 @@ trx_sys_get_new_trx_no(void) /*========================*/ /* out: new, allocated trx number */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ return(trx_sys_get_new_trx_id()); } diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 8232699c7f9..fe36b0d1a01 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -375,8 +375,6 @@ trx_is_interrupted( /* Signal to a transaction */ struct trx_sig_struct{ ulint type; /* signal type */ - ulint state; /* TRX_SIG_WAITING or - TRX_SIG_BEING_HANDLED */ ulint sender; /* TRX_SIG_SELF or TRX_SIG_OTHER_SESS */ que_thr_t* receiver; /* non-NULL if the sender of the signal @@ -404,7 +402,7 @@ struct trx_struct{ const char* op_info; /* English text describing the current operation, or an empty string */ - ulint type; /* TRX_USER, TRX_PURGE */ + unsigned is_purge:1; /* 0=user transaction, 1=purge */ ulint conc_state; /* state of the trx from the point of view of concurrency control: TRX_ACTIVE, TRX_COMMITTED_IN_MEMORY, @@ -675,12 +673,6 @@ struct trx_struct{ single operation of a transaction, e.g., a parallel query */ -/* Transaction types */ -#define TRX_USER 1 /* normal user transaction */ -#define TRX_PURGE 2 /* purge transaction: this is not - inserted to the trx list of trx_sys - and no rollback segment is assigned to - this */ /* Transaction concurrency states */ #define TRX_NOT_STARTED 1 #define TRX_ACTIVE 2 @@ -742,9 +734,6 @@ struct trx_struct{ session */ #define TRX_SIG_OTHER_SESS 2 /* sent by another session (which must hold rights to this) */ -/* Signal states */ -#define TRX_SIG_WAITING 1 -#define TRX_SIG_BEING_HANDLED 2 /* Commit command node in a query graph */ struct commit_node_struct{ diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 7a5cb21f07a..957baa0391f 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -40,9 +40,9 @@ if we are compiling on Windows. */ # undef VERSION /* Include the header file generated by GNU autoconf */ -#ifndef __WIN__ -# include "config.h" -#endif +# ifndef __WIN__ +# include "config.h" +# endif # ifdef HAVE_SCHED_H # include @@ -51,9 +51,9 @@ if we are compiling on Windows. */ /* When compiling for Itanium IA64, undefine the flag below to prevent use of the 32-bit x86 assembler in mutex operations. */ -#if defined(__WIN__) && !defined(WIN64) && !defined(_WIN64) -#define UNIV_CAN_USE_X86_ASSEMBLER -#endif +# if defined(__WIN__) && !defined(WIN64) && !defined(_WIN64) +# define UNIV_CAN_USE_X86_ASSEMBLER +# endif /* We only try to do explicit inlining of functions with gcc and Microsoft Visual C++ */ diff --git a/storage/innobase/include/ut0lst.h b/storage/innobase/include/ut0lst.h index 9735bf315c6..ebe2803fe23 100644 --- a/storage/innobase/include/ut0lst.h +++ b/storage/innobase/include/ut0lst.h @@ -74,6 +74,7 @@ the pointer to the node to be added to the list. NAME is the list name. */ ((N)->NAME).next = (BASE).start;\ ((N)->NAME).prev = NULL;\ if ((BASE).start != NULL) {\ + ut_ad((BASE).start != (N));\ (((BASE).start)->NAME).prev = (N);\ }\ (BASE).start = (N);\ @@ -94,6 +95,7 @@ the pointer to the node to be added to the list. NAME is the list name. */ ((N)->NAME).prev = (BASE).end;\ ((N)->NAME).next = NULL;\ if ((BASE).end != NULL) {\ + ut_ad((BASE).end != (N));\ (((BASE).end)->NAME).next = (N);\ }\ (BASE).end = (N);\ @@ -111,6 +113,7 @@ name, NODE1 and NODE2 are pointers to nodes. */ {\ ut_ad(NODE1);\ ut_ad(NODE2);\ + ut_ad((NODE1) != (NODE2));\ ((BASE).count)++;\ ((NODE2)->NAME).prev = (NODE1);\ ((NODE2)->NAME).next = ((NODE1)->NAME).next;\ diff --git a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c index 84b64b146dc..93a43d9a30f 100644 --- a/storage/innobase/lock/lock0lock.c +++ b/storage/innobase/lock/lock0lock.c @@ -1162,9 +1162,7 @@ lock_rec_get_next_on_page( ulint space; ulint page_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(lock) == LOCK_REC); space = lock->un_member.rec_lock.space; @@ -1201,9 +1199,7 @@ lock_rec_get_first_on_page_addr( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = HASH_GET_FIRST(lock_sys->rec_hash, lock_rec_hash(space, page_no)); @@ -1261,9 +1257,7 @@ lock_rec_get_first_on_page( ulint space; ulint page_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ hash = buf_frame_get_lock_hash_val(ptr); @@ -1295,9 +1289,7 @@ lock_rec_get_next( rec_t* rec, /* in: record on a page */ lock_t* lock) /* in: lock */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(lock) == LOCK_REC); if (page_rec_is_comp(rec)) { @@ -1326,9 +1318,7 @@ lock_rec_get_first( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = lock_rec_get_first_on_page(rec); if (UNIV_LIKELY_NULL(lock)) { @@ -1414,9 +1404,7 @@ lock_rec_get_prev( ulint page_no; lock_t* found_lock = NULL; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(in_lock) == LOCK_REC); space = in_lock->un_member.rec_lock.space; @@ -1456,9 +1444,7 @@ lock_table_has( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* Look for stronger locks the same trx already has on the table */ @@ -1502,9 +1488,7 @@ lock_rec_has_expl( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((precise_mode & LOCK_MODE_MASK) == LOCK_S || (precise_mode & LOCK_MODE_MASK) == LOCK_X); ut_ad(!(precise_mode & LOCK_INSERT_INTENTION)); @@ -1552,9 +1536,7 @@ lock_rec_other_has_expl_req( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(mode == LOCK_X || mode == LOCK_S); ut_ad(gap == 0 || gap == LOCK_GAP); ut_ad(wait == 0 || wait == LOCK_WAIT); @@ -1594,9 +1576,8 @@ lock_rec_other_has_conflicting( trx_t* trx) /* in: our transaction */ { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = lock_rec_get_first(rec); @@ -1629,9 +1610,7 @@ lock_rec_find_similar_on_page( lock_t* lock; ulint heap_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ heap_no = rec_get_heap_no(rec, page_rec_is_comp(rec)); lock = lock_rec_get_first_on_page(rec); @@ -1665,9 +1644,7 @@ lock_sec_rec_some_has_impl_off_kernel( { page_t* page; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(!(index->type & DICT_CLUSTERED)); ut_ad(page_rec_is_user_rec(rec)); ut_ad(rec_offs_validate(rec, index, offsets)); @@ -1760,9 +1737,7 @@ lock_rec_create( ulint n_bits; ulint n_bytes; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ page = buf_frame_align(rec); space = buf_frame_get_space_id(page); @@ -1842,9 +1817,7 @@ lock_rec_enqueue_waiting( lock_t* lock; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* Test if there already is some other reason to suspend thread: we do not enqueue a lock request if the query thread should be @@ -1934,9 +1907,7 @@ lock_rec_add_to_queue( ulint heap_no; ibool somebody_waits = FALSE; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((type_mode & (LOCK_WAIT | LOCK_GAP)) || ((type_mode & LOCK_MODE_MASK) != LOCK_S) || !lock_rec_other_has_expl_req(LOCK_X, 0, LOCK_WAIT, @@ -2017,9 +1988,7 @@ lock_rec_lock_fast( ulint heap_no; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((LOCK_MODE_MASK & mode) != LOCK_S || lock_table_has(thr_get_trx(thr), index->table, LOCK_IS)); ut_ad((LOCK_MODE_MASK & mode) != LOCK_X @@ -2102,9 +2071,7 @@ lock_rec_lock_slow( trx_t* trx; ulint err; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((LOCK_MODE_MASK & mode) != LOCK_S || lock_table_has(thr_get_trx(thr), index->table, LOCK_IS)); ut_ad((LOCK_MODE_MASK & mode) != LOCK_X @@ -2176,9 +2143,7 @@ lock_rec_lock( { ulint err; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((LOCK_MODE_MASK & mode) != LOCK_S || lock_table_has(thr_get_trx(thr), index->table, LOCK_IS)); ut_ad((LOCK_MODE_MASK & mode) != LOCK_X @@ -2216,9 +2181,7 @@ lock_rec_has_to_wait_in_queue( ulint page_no; ulint heap_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_wait(wait_lock)); ut_ad(lock_get_type(wait_lock) == LOCK_REC); @@ -2251,9 +2214,7 @@ lock_grant( /*=======*/ lock_t* lock) /* in: waiting lock request */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock_reset_lock_and_trx_wait(lock); @@ -2298,9 +2259,7 @@ lock_rec_cancel( /*============*/ lock_t* lock) /* in: waiting record lock request */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(lock) == LOCK_REC); /* Reset the bit (there can be only one set bit) in the lock bitmap */ @@ -2333,9 +2292,7 @@ lock_rec_dequeue_from_page( lock_t* lock; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(in_lock) == LOCK_REC); trx = in_lock->trx; @@ -2378,9 +2335,7 @@ lock_rec_discard( ulint page_no; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(in_lock) == LOCK_REC); trx = in_lock->trx; @@ -2409,9 +2364,7 @@ lock_rec_free_all_from_discard_page( lock_t* lock; lock_t* next_lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ space = buf_frame_get_space_id(page); page_no = buf_frame_get_page_no(page); @@ -2444,9 +2397,7 @@ lock_rec_reset_and_release_wait( lock_t* lock; ulint heap_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ heap_no = rec_get_heap_no(rec, page_rec_is_comp(rec)); @@ -2477,9 +2428,8 @@ lock_rec_inherit_to_gap( the locks on this record */ { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = lock_rec_get_first(rec); @@ -2518,9 +2468,8 @@ lock_rec_inherit_to_gap_if_gap_lock( the locks on this record */ { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = lock_rec_get_first(rec); @@ -2554,9 +2503,7 @@ lock_rec_move( ulint heap_no; ulint type_mode; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ heap_no = rec_get_heap_no(donator, comp); @@ -3228,9 +3175,7 @@ lock_deadlock_occurs( ulint cost = 0; ut_ad(trx && lock); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ retry: /* We check that adding this trx to the waits-for graph does not produce a cycle. First mark all active transactions @@ -3302,9 +3247,7 @@ lock_deadlock_recursive( ulint ret; ut_a(trx && start && wait_lock); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (trx->deadlock_mark == 1) { /* We have already exhaustively searched the subtree starting @@ -3315,12 +3258,6 @@ lock_deadlock_recursive( *cost = *cost + 1; - if ((depth > LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK) - || (*cost > LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK)) { - - return(LOCK_VICTIM_IS_START); - } - lock = wait_lock; if (lock_get_type(wait_lock) == LOCK_REC) { @@ -3353,11 +3290,18 @@ lock_deadlock_recursive( if (lock_has_to_wait(wait_lock, lock)) { + ibool too_far + = depth > LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK + || *cost > LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK; + lock_trx = lock->trx; - if (lock_trx == start) { + if (lock_trx == start || too_far) { + /* We came back to the recursion starting - point: a deadlock detected */ + point: a deadlock detected; or we have + searched the waits-for graph too long */ + FILE* ef = lock_latest_err_file; rewind(ef); @@ -3399,9 +3343,20 @@ lock_deadlock_recursive( } #ifdef UNIV_DEBUG if (lock_print_waits) { - fputs("Deadlock detected\n", stderr); + fputs("Deadlock detected" + " or too long search\n", + stderr); } #endif /* UNIV_DEBUG */ + if (too_far) { + + fputs("TOO DEEP OR LONG SEARCH" + " IN THE LOCK TABLE" + " WAITS-FOR GRAPH\n", ef); + + return(LOCK_VICTIM_IS_START); + } + if (ut_dulint_cmp(wait_lock->trx->undo_no, start->undo_no) >= 0) { /* Our recursion starting point @@ -3472,9 +3427,7 @@ lock_table_create( lock_t* lock; ut_ad(table && trx); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (type_mode == LOCK_AUTO_INC) { /* Only one trx can have the lock on the table @@ -3519,9 +3472,7 @@ lock_table_remove_low( dict_table_t* table; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ table = lock->un_member.tab_lock.table; trx = lock->trx; @@ -3555,9 +3506,7 @@ lock_table_enqueue_waiting( lock_t* lock; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* Test if there already is some other reason to suspend thread: we do not enqueue a lock request if the query thread should be @@ -3630,9 +3579,7 @@ lock_table_other_has_incompatible( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = UT_LIST_GET_LAST(table->locks); @@ -3786,9 +3733,7 @@ lock_table_dequeue( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_a(lock_get_type(in_lock) == LOCK_TABLE); lock = UT_LIST_GET_NEXT(un_member.tab_lock.locks, in_lock); @@ -3930,9 +3875,7 @@ lock_release_off_kernel( ulint count; lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = UT_LIST_GET_LAST(trx->trx_locks); @@ -3993,9 +3936,7 @@ lock_cancel_waiting_and_release( /*============================*/ lock_t* lock) /* in: waiting lock request */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (lock_get_type(lock) == LOCK_REC) { @@ -4028,9 +3969,7 @@ lock_reset_all_on_table_for_trx( lock_t* lock; lock_t* prev_lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = UT_LIST_GET_LAST(trx->trx_locks); @@ -4091,9 +4030,7 @@ lock_table_print( FILE* file, /* in: file where to print */ lock_t* lock) /* in: table type lock */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_a(lock_get_type(lock) == LOCK_TABLE); fputs("TABLE LOCK table ", file); @@ -4143,9 +4080,7 @@ lock_rec_print( ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_a(lock_get_type(lock) == LOCK_REC); space = lock->un_member.rec_lock.space; @@ -4250,9 +4185,7 @@ lock_get_n_rec_locks(void) ulint n_locks = 0; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ for (i = 0; i < hash_get_n_cells(lock_sys->rec_hash); i++) { @@ -4492,9 +4425,7 @@ lock_table_queue_validate( lock_t* lock; ibool is_waiting; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ is_waiting = FALSE; @@ -4665,9 +4596,7 @@ lock_rec_validate_page( ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); @@ -4943,9 +4872,7 @@ lock_rec_convert_impl_to_expl( { trx_t* impl_trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(page_rec_is_user_rec(rec)); ut_ad(rec_offs_validate(rec, index, offsets)); ut_ad(!page_rec_is_comp(rec) == !rec_offs_comp(offsets)); diff --git a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c index 5d8875f1bd0..e9dedf6aac4 100644 --- a/storage/innobase/log/log0log.c +++ b/storage/innobase/log/log0log.c @@ -165,9 +165,7 @@ log_buf_pool_get_oldest_modification(void) { dulint lsn; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ lsn = buf_pool_get_oldest_modification(); @@ -269,9 +267,7 @@ log_write_low( ulint data_len; byte* log_block; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log->mutex))); -#endif /* UNIV_SYNC_DEBUG */ part_loop: /* Calculate a part length */ @@ -340,9 +336,7 @@ log_close(void) log_t* log = log_sys; ulint checkpoint_age; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log->mutex))); -#endif /* UNIV_SYNC_DEBUG */ lsn = log->lsn; @@ -464,9 +458,7 @@ log_group_get_capacity( /* out: capacity in bytes */ log_group_t* group) /* in: log group */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ return((group->file_size - LOG_FILE_HDR_SIZE) * group->n_files); } @@ -482,9 +474,7 @@ log_group_calc_size_offset( ulint offset, /* in: real offset within the log group */ log_group_t* group) /* in: log group */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ return(offset - LOG_FILE_HDR_SIZE * (1 + offset / group->file_size)); } @@ -500,9 +490,7 @@ log_group_calc_real_offset( ulint offset, /* in: size offset within the log group */ log_group_t* group) /* in: log group */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ return(offset + LOG_FILE_HDR_SIZE * (1 + offset / (group->file_size - LOG_FILE_HDR_SIZE))); @@ -525,9 +513,7 @@ log_group_calc_lsn_offset( ib_longlong group_size; ib_longlong offset; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* If total log file size is > 2 GB we can easily get overflows with 32-bit integers. Use 64-bit integers instead. */ @@ -642,9 +628,7 @@ log_calc_max_ages(void) ulint archive_margin; ulint smallest_archive_margin; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ mutex_enter(&(log_sys->mutex)); @@ -942,9 +926,7 @@ log_flush_do_unlocks( ulint code) /* in: any ORed combination of LOG_UNLOCK_FLUSH_LOCK and LOG_UNLOCK_NONE_FLUSHED_LOCK */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* NOTE that we must own the log mutex when doing the setting of the events: this is because transactions will wait for these events to @@ -976,9 +958,7 @@ log_group_check_flush_completion( /* out: LOG_UNLOCK_NONE_FLUSHED_LOCK or 0 */ log_group_t* group) /* in: log group */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (!log_sys->one_flushed && group->n_pending_writes == 0) { #ifdef UNIV_DEBUG @@ -1015,9 +995,7 @@ log_sys_check_flush_completion(void) ulint move_start; ulint move_end; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (log_sys->n_pending_writes == 0) { @@ -1129,10 +1107,8 @@ log_group_file_header_flush( { byte* buf; ulint dest_offset; -#ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + ut_ad(mutex_own(&(log_sys->mutex))); ut_a(nth_file < group->n_files); buf = *(group->file_header_bufs + nth_file); @@ -1203,9 +1179,7 @@ log_group_write_buf( ulint next_offset; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(len % OS_FILE_LOG_BLOCK_SIZE == 0); ut_a(ut_dulint_get_low(start_lsn) % OS_FILE_LOG_BLOCK_SIZE == 0); @@ -1626,9 +1600,7 @@ void log_complete_checkpoint(void) /*=========================*/ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(log_sys->n_pending_checkpoint_writes == 0); log_sys->next_checkpoint_no @@ -1715,9 +1687,7 @@ log_group_checkpoint( byte* buf; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ #if LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE # error "LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE" #endif @@ -1882,9 +1852,7 @@ log_group_read_checkpoint_info( log_group_t* group, /* in: log group */ ulint field) /* in: LOG_CHECKPOINT_1 or LOG_CHECKPOINT_2 */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ log_sys->n_log_ios++; @@ -1902,9 +1870,7 @@ log_groups_write_checkpoint_info(void) { log_group_t* group; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ group = UT_LIST_GET_FIRST(log_sys->log_groups); @@ -2162,9 +2128,7 @@ log_group_read_log_seg( ulint source_offset; ibool sync; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ sync = FALSE; @@ -2237,9 +2201,7 @@ log_group_archive_file_header_write( byte* buf; ulint dest_offset; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(nth_file < group->n_files); @@ -2276,9 +2238,7 @@ log_group_archive_completed_header_write( byte* buf; ulint dest_offset; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(nth_file < group->n_files); buf = *(group->archive_file_header_bufs + nth_file); @@ -2317,9 +2277,7 @@ log_group_archive( ulint n_files; ulint open_mode; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ start_lsn = log_sys->archived_lsn; @@ -2452,9 +2410,7 @@ log_archive_groups(void) { log_group_t* group; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ group = UT_LIST_GET_FIRST(log_sys->log_groups); @@ -2477,9 +2433,7 @@ log_archive_write_complete_groups(void) dulint end_lsn; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ group = UT_LIST_GET_FIRST(log_sys->log_groups); @@ -2546,9 +2500,7 @@ void log_archive_check_completion_low(void) /*==================================*/ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (log_sys->n_pending_archive_ios == 0 && log_sys->archiving_phase == LOG_ARCHIVE_READ) { @@ -2784,9 +2736,7 @@ log_archive_close_groups( log_group_t* group; ulint trunc_len; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (log_sys->archiving_state == LOG_ARCH_OFF) { @@ -3278,9 +3228,7 @@ log_check_log_recs( byte* buf1; byte* scan_buf; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (len == 0) { @@ -3322,7 +3270,7 @@ log_peek_lsn( log system mutex */ dulint* lsn) /* out: if returns TRUE, current lsn is here */ { - if (0 == mutex_enter_nowait(&(log_sys->mutex), __FILE__, __LINE__)) { + if (0 == mutex_enter_nowait(&(log_sys->mutex))) { *lsn = log_sys->lsn; mutex_exit(&(log_sys->mutex)); diff --git a/storage/innobase/log/log0recv.c b/storage/innobase/log/log0recv.c index 41e2b921664..ab5f42e3a13 100644 --- a/storage/innobase/log/log0recv.c +++ b/storage/innobase/log/log0recv.c @@ -171,9 +171,8 @@ void recv_sys_empty_hash(void) /*=====================*/ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(recv_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + if (recv_sys->n_addrs != 0) { fprintf(stderr, "InnoDB: Error: %lu pages with log records" @@ -1396,9 +1395,8 @@ loop: goto loop; } -#ifdef UNIV_SYNC_DEBUG ut_ad(!allow_ibuf == mutex_own(&log_sys->mutex)); -#endif /* UNIV_SYNC_DEBUG */ + if (!allow_ibuf) { recv_no_ibuf_operations = TRUE; } @@ -1842,9 +1840,7 @@ recv_parse_log_recs( byte* body; ulint n_recs; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(!ut_dulint_is_zero(recv_sys->parse_start_lsn)); loop: ptr = recv_sys->buf + recv_sys->recovered_offset; @@ -2894,9 +2890,8 @@ recv_reset_logs( { log_group_t* group; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + log_sys->lsn = ut_dulint_align_up(lsn, OS_FILE_LOG_BLOCK_SIZE); group = UT_LIST_GET_FIRST(log_sys->log_groups); diff --git a/storage/innobase/mem/mem0pool.c b/storage/innobase/mem/mem0pool.c index a7acd331e16..c010ae61160 100644 --- a/storage/innobase/mem/mem0pool.c +++ b/storage/innobase/mem/mem0pool.c @@ -257,9 +257,7 @@ mem_pool_fill_free_list( mem_area_t* area2; ibool ret; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (i >= 63) { /* We come here when we have run out of space in the diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c index c4d051ec771..60ba941dbbf 100644 --- a/storage/innobase/os/os0file.c +++ b/storage/innobase/os/os0file.c @@ -930,7 +930,7 @@ try_again: file = CreateFile((LPCTSTR) name, access, FILE_SHARE_READ | FILE_SHARE_WRITE, - /* file can be read ansd written also + /* file can be read and written also by other processes */ NULL, /* default security attributes */ create_flag, @@ -1509,7 +1509,7 @@ os_file_rename( return(TRUE); } - os_file_handle_error(oldpath, "rename"); + os_file_handle_error_no_exit(oldpath, "rename"); return(FALSE); #else @@ -1518,7 +1518,7 @@ os_file_rename( ret = rename((const char*)oldpath, (const char*)newpath); if (ret != 0) { - os_file_handle_error(oldpath, "rename"); + os_file_handle_error_no_exit(oldpath, "rename"); return(FALSE); } diff --git a/storage/innobase/pars/pars0pars.c b/storage/innobase/pars/pars0pars.c index 6861844870c..16530494a96 100644 --- a/storage/innobase/pars/pars0pars.c +++ b/storage/innobase/pars/pars0pars.c @@ -1859,10 +1859,9 @@ pars_sql( heap = mem_heap_create(256); -#ifdef UNIV_SYNC_DEBUG /* Currently, the parser is not reentrant: */ ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + pars_sym_tab_global = sym_tab_create(heap); pars_sym_tab_global->string_len = strlen(str); diff --git a/storage/innobase/que/que0que.c b/storage/innobase/que/que0que.c index f5a63ae6ffa..bf83f28f04e 100644 --- a/storage/innobase/que/que0que.c +++ b/storage/innobase/que/que0que.c @@ -127,9 +127,7 @@ que_graph_publish( que_t* graph, /* in: graph */ sess_t* sess) /* in: session */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ UT_LIST_ADD_LAST(graphs, sess->graphs, graph); } @@ -238,9 +236,7 @@ que_thr_end_wait( { ibool was_active; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(thr); ut_ad((thr->state == QUE_THR_LOCK_WAIT) || (thr->state == QUE_THR_PROCEDURE_WAIT) @@ -280,9 +276,7 @@ que_thr_end_wait_no_next_thr( ut_a(thr->state == QUE_THR_LOCK_WAIT); /* In MySQL this is the only possible state here */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(thr); ut_ad((thr->state == QUE_THR_LOCK_WAIT) || (thr->state == QUE_THR_PROCEDURE_WAIT) @@ -419,9 +413,7 @@ que_fork_error_handle( { que_thr_t* thr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->sess->state == SESS_ERROR); ut_ad(UT_LIST_GET_LEN(trx->reply_signals) == 0); ut_ad(UT_LIST_GET_LEN(trx->wait_thrs) == 0); @@ -698,9 +690,7 @@ que_graph_try_free( { sess_t* sess; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sess = (graph->trx)->sess; @@ -931,9 +921,7 @@ que_thr_stop( que_t* graph; ibool ret = TRUE; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ graph = thr->graph; trx = graph->trx; @@ -1309,10 +1297,7 @@ que_run_threads_low( ut_ad(thr->state == QUE_THR_RUNNING); ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS); - -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* cumul_resource counts how much resources the OS thread (NOT the query thread) has spent in this function */ diff --git a/storage/innobase/read/read0read.c b/storage/innobase/read/read0read.c index 2375c35190a..10a6e07e96a 100644 --- a/storage/innobase/read/read0read.c +++ b/storage/innobase/read/read0read.c @@ -162,9 +162,8 @@ read_view_oldest_copy_or_open_new( ulint n; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + old_view = UT_LIST_GET_LAST(trx_sys->view_list); if (old_view == NULL) { @@ -245,9 +244,9 @@ read_view_open_now( read_view_t* view; trx_t* trx; ulint n; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + view = read_view_create_low(UT_LIST_GET_LEN(trx_sys->trx_list), heap); view->creator_trx_id = cr_trx_id; @@ -313,9 +312,8 @@ read_view_close( /*============*/ read_view_t* view) /* in: read view */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + UT_LIST_REMOVE(view_list, trx_sys->view_list, view); } diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index 78851c7b4f9..7c9427db0d2 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -1748,8 +1748,8 @@ row_create_table_for_mysql( ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); - ut_ad(mutex_own(&(dict_sys->mutex))); #endif /* UNIV_SYNC_DEBUG */ + ut_ad(mutex_own(&(dict_sys->mutex))); ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); if (srv_created_new_raw) { @@ -1964,8 +1964,8 @@ row_create_index_for_mysql( #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); - ut_ad(mutex_own(&(dict_sys->mutex))); #endif /* UNIV_SYNC_DEBUG */ + ut_ad(mutex_own(&(dict_sys->mutex))); ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); trx->op_info = "creating index"; @@ -2080,8 +2080,8 @@ row_table_add_foreign_constraints( { ulint err; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ ut_a(sql_string); @@ -2246,9 +2246,7 @@ row_get_background_drop_list_len_low(void) /*======================================*/ /* out: how many tables in list */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (!row_mysql_drop_list_inited) { @@ -2726,8 +2724,8 @@ row_truncate_table_for_mysql( row_mysql_lock_data_dictionary(trx); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ @@ -3001,8 +2999,8 @@ row_drop_table_for_mysql( locked_dictionary = TRUE; } -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ diff --git a/storage/innobase/row/row0undo.c b/storage/innobase/row/row0undo.c index 2f04e65e8ee..f03f84ed1b0 100644 --- a/storage/innobase/row/row0undo.c +++ b/storage/innobase/row/row0undo.c @@ -213,7 +213,7 @@ row_undo( ulint err; trx_t* trx; dulint roll_ptr; - ibool froze_data_dict = FALSE; + ibool locked_data_dict; ut_ad(node && thr); @@ -266,13 +266,13 @@ row_undo( /* Prevent DROP TABLE etc. while we are rolling back this row. If we are doing a TABLE CREATE or some other dictionary operation, then we already have dict_operation_lock locked in x-mode. Do not - try to lock again in s-mode, because that would cause a hang. */ + try to lock again, because that would cause a hang. */ - if (trx->dict_operation_lock_mode == 0) { + locked_data_dict = (trx->dict_operation_lock_mode == 0); - row_mysql_freeze_data_dictionary(trx); + if (locked_data_dict) { - froze_data_dict = TRUE; + row_mysql_lock_data_dictionary(trx); } if (node->state == UNDO_NODE_INSERT) { @@ -285,9 +285,9 @@ row_undo( err = row_undo_mod(node, thr); } - if (froze_data_dict) { + if (locked_data_dict) { - row_mysql_unfreeze_data_dictionary(trx); + row_mysql_unlock_data_dictionary(trx); } /* Do some cleanup */ diff --git a/storage/innobase/row/row0vers.c b/storage/innobase/row/row0vers.c index c8b71965f75..03d9a2f1203 100644 --- a/storage/innobase/row/row0vers.c +++ b/storage/innobase/row/row0vers.c @@ -63,8 +63,8 @@ row_vers_impl_x_locked_off_kernel( mtr_t mtr; ulint comp; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); +#ifdef UNIV_SYNC_DEBUG ut_ad(!rw_lock_own(&(purge_sys->latch), RW_LOCK_SHARED)); #endif /* UNIV_SYNC_DEBUG */ diff --git a/storage/innobase/srv/srv0que.c b/storage/innobase/srv/srv0que.c index 9c261cbb00e..e2b4e217980 100644 --- a/storage/innobase/srv/srv0que.c +++ b/storage/innobase/srv/srv0que.c @@ -82,10 +82,7 @@ srv_que_task_enqueue_low( que_thr_t* thr) /* in: query thread */ { ut_ad(thr); - -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr); diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 2a177ed26cd..72e8fe751d0 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -726,9 +726,7 @@ srv_suspend_thread(void) ulint slot_no; ulint type; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ slot_no = thr_local_get_slot_no(os_thread_get_curr_id()); @@ -780,9 +778,7 @@ srv_release_threads( ut_ad(type >= SRV_WORKER); ut_ad(type <= SRV_MASTER); ut_ad(n > 0); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ for (i = 0; i < OS_THREAD_MAX_N; i++) { @@ -1305,9 +1301,7 @@ srv_table_reserve_slot_for_mysql(void) srv_slot_t* slot; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ i = 0; slot = srv_mysql_table + i; @@ -1387,9 +1381,7 @@ srv_suspend_mysql_thread( ulint sec; ulint ms; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx = thr_get_trx(thr); @@ -1535,9 +1527,7 @@ srv_release_mysql_thread_if_suspended( srv_slot_t* slot; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ for (i = 0; i < OS_THREAD_MAX_N; i++) { @@ -1830,15 +1820,15 @@ srv_export_innodb_status(void) export_vars.innodb_row_lock_waits = srv_n_lock_wait_count; export_vars.innodb_row_lock_current_waits = srv_n_lock_wait_current_count; - export_vars.innodb_row_lock_time = srv_n_lock_wait_time / 10000; + export_vars.innodb_row_lock_time = srv_n_lock_wait_time / 1000; if (srv_n_lock_wait_count > 0) { export_vars.innodb_row_lock_time_avg = (ulint) - (srv_n_lock_wait_time / 10000 / srv_n_lock_wait_count); + (srv_n_lock_wait_time / 1000 / srv_n_lock_wait_count); } else { export_vars.innodb_row_lock_time_avg = 0; } export_vars.innodb_row_lock_time_max - = srv_n_lock_max_wait_time / 10000; + = srv_n_lock_max_wait_time / 1000; export_vars.innodb_rows_read = srv_n_rows_read; export_vars.innodb_rows_inserted = srv_n_rows_inserted; export_vars.innodb_rows_updated = srv_n_rows_updated; diff --git a/storage/innobase/sync/sync0rw.c b/storage/innobase/sync/sync0rw.c index f06db577bad..34b45e2c1c3 100644 --- a/storage/innobase/sync/sync0rw.c +++ b/storage/innobase/sync/sync0rw.c @@ -339,9 +339,8 @@ rw_lock_x_lock_low( const char* file_name,/* in: file name where lock requested */ ulint line) /* in: line where requested */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(rw_lock_get_mutex(lock))); -#endif /* UNIV_SYNC_DEBUG */ + if (rw_lock_get_writer(lock) == RW_LOCK_NOT_LOCKED) { if (rw_lock_get_reader_count(lock) == 0) { @@ -564,8 +563,7 @@ rw_lock_debug_mutex_enter(void) /*==========================*/ { loop: - if (0 == mutex_enter_nowait(&rw_lock_debug_mutex, - __FILE__, __LINE__)) { + if (0 == mutex_enter_nowait(&rw_lock_debug_mutex)) { return; } @@ -573,8 +571,7 @@ loop: rw_lock_debug_waiters = TRUE; - if (0 == mutex_enter_nowait(&rw_lock_debug_mutex, - __FILE__, __LINE__)) { + if (0 == mutex_enter_nowait(&rw_lock_debug_mutex)) { return; } diff --git a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c index c0198469491..672e1f93aad 100644 --- a/storage/innobase/sync/sync0sync.c +++ b/storage/innobase/sync/sync0sync.c @@ -311,12 +311,13 @@ mutex_free( } /************************************************************************ -Tries to lock the mutex for the current thread. If the lock is not acquired -immediately, returns with return value 1. */ +NOTE! Use the corresponding macro in the header file, not this function +directly. Tries to lock the mutex for the current thread. If the lock is not +acquired immediately, returns with return value 1. */ ulint -mutex_enter_nowait( -/*===============*/ +mutex_enter_nowait_func( +/*====================*/ /* out: 0 if succeed, 1 if not */ mutex_t* mutex, /* in: pointer to mutex */ const char* file_name __attribute__((unused)), @@ -329,6 +330,7 @@ mutex_enter_nowait( if (!mutex_test_and_set(mutex)) { + ut_d(mutex->thread_id = os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif @@ -346,13 +348,29 @@ Checks that the mutex has been initialized. */ ibool mutex_validate( /*===========*/ - mutex_t* mutex) + const mutex_t* mutex) { ut_a(mutex); ut_a(mutex->magic_n == MUTEX_MAGIC_N); return(TRUE); } + +/********************************************************************** +Checks that the current thread owns the mutex. Works only in the debug +version. */ + +ibool +mutex_own( +/*======*/ + /* out: TRUE if owns */ + const mutex_t* mutex) /* in: mutex */ +{ + ut_ad(mutex_validate(mutex)); + + return(mutex_get_lock_word(mutex) == 1 + && os_thread_eq(mutex->thread_id, os_thread_get_curr_id())); +} #endif /* UNIV_DEBUG */ /********************************************************************** @@ -451,6 +469,7 @@ spin_loop: if (mutex_test_and_set(mutex) == 0) { /* Succeeded! */ + ut_d(mutex->thread_id = os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif @@ -492,6 +511,7 @@ spin_loop: sync_array_free_cell_protected(sync_primary_wait_array, index); + ut_d(mutex->thread_id = os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif @@ -592,7 +612,6 @@ mutex_set_debug_info( mutex->file_name = file_name; mutex->line = line; - mutex->thread_id = os_thread_get_curr_id(); } /********************************************************************** @@ -614,31 +633,6 @@ mutex_get_debug_info( *thread_id = mutex->thread_id; } -/********************************************************************** -Checks that the current thread owns the mutex. Works only in the debug -version. */ - -ibool -mutex_own( -/*======*/ - /* out: TRUE if owns */ - mutex_t* mutex) /* in: mutex */ -{ - ut_ad(mutex_validate(mutex)); - - if (mutex_get_lock_word(mutex) != 1) { - - return(FALSE); - } - - if (!os_thread_eq(mutex->thread_id, os_thread_get_curr_id())) { - - return(FALSE); - } - - return(TRUE); -} - /********************************************************************** Prints debug info of currently reserved mutexes. */ static diff --git a/storage/innobase/thr/thr0loc.c b/storage/innobase/thr/thr0loc.c index f22e909f392..b803bd53101 100644 --- a/storage/innobase/thr/thr0loc.c +++ b/storage/innobase/thr/thr0loc.c @@ -64,9 +64,7 @@ thr_local_get( try_again: ut_ad(thr_local_hash); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&thr_local_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* Look for the local struct in the hash table */ diff --git a/storage/innobase/trx/trx0purge.c b/storage/innobase/trx/trx0purge.c index 11e089ac90e..f0e85ef1604 100644 --- a/storage/innobase/trx/trx0purge.c +++ b/storage/innobase/trx/trx0purge.c @@ -197,9 +197,7 @@ void trx_purge_sys_create(void) /*======================*/ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ purge_sys = mem_alloc(sizeof(trx_purge_t)); @@ -223,7 +221,7 @@ trx_purge_sys_create(void) purge_sys->trx = purge_sys->sess->trx; - purge_sys->trx->type = TRX_PURGE; + purge_sys->trx->is_purge = 1; ut_a(trx_start_low(purge_sys->trx, ULINT_UNDEFINED)); @@ -260,9 +258,8 @@ trx_purge_add_update_undo_to_history( ut_ad(undo); rseg = undo->rseg; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ rseg_header = trx_rsegf_get(rseg->space, rseg->page_no, mtr); @@ -341,9 +338,7 @@ trx_purge_free_segment( /* fputs("Freeing an update undo log segment\n", stderr); */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ loop: mtr_start(&mtr); mutex_enter(&(rseg->mutex)); @@ -445,9 +440,7 @@ trx_purge_truncate_rseg_history( ulint n_removed_logs = 0; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); mutex_enter(&(rseg->mutex)); @@ -537,9 +530,7 @@ trx_purge_truncate_history(void) dulint limit_trx_no; dulint limit_undo_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx_purge_arr_get_biggest(purge_sys->arr, &limit_trx_no, &limit_undo_no); @@ -579,9 +570,7 @@ trx_purge_truncate_if_arr_empty(void) /*=================================*/ /* out: TRUE if array empty */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (purge_sys->arr->n_used == 0) { @@ -610,9 +599,7 @@ trx_purge_rseg_get_next_history_log( ibool del_marks; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ mutex_enter(&(rseg->mutex)); @@ -715,9 +702,7 @@ trx_purge_choose_next_log(void) ulint offset = 0; /* remove warning (??? bug ???) */ mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(purge_sys->next_stored == FALSE); rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); @@ -818,9 +803,7 @@ trx_purge_get_next_rec( ulint cmpl_info; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(purge_sys->next_stored); space = purge_sys->rseg->space; diff --git a/storage/innobase/trx/trx0roll.c b/storage/innobase/trx/trx0roll.c index 201d1be3656..91dcf035f96 100644 --- a/storage/innobase/trx/trx0roll.c +++ b/storage/innobase/trx/trx0roll.c @@ -785,10 +785,8 @@ trx_roll_try_truncate( dulint limit; dulint biggest; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); ut_ad(mutex_own(&((trx->rseg)->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx->pages_undone = 0; @@ -831,9 +829,7 @@ trx_roll_pop_top_rec( trx_undo_rec_t* prev_rec; page_t* prev_rec_page; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); -#endif /* UNIV_SYNC_DEBUG */ undo_page = trx_undo_page_get_s_latched(undo->space, undo->top_page_no, mtr); @@ -1060,9 +1056,7 @@ trx_rollback( que_thr_t* thr; /* que_thr_t* thr2; */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((trx->undo_no_arr == NULL) || ((trx->undo_no_arr)->n_used == 0)); /* Initialize the rollback field in the transaction */ @@ -1131,9 +1125,7 @@ trx_roll_graph_build( que_thr_t* thr; /* que_thr_t* thr2; */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(512); fork = que_fork_create(NULL, NULL, QUE_FORK_ROLLBACK, heap); @@ -1160,9 +1152,7 @@ trx_finish_error_processing( trx_sig_t* sig; trx_sig_t* next_sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sig = UT_LIST_GET_FIRST(trx->signals); @@ -1195,9 +1185,7 @@ trx_finish_partial_rollback_off_kernel( { trx_sig_t* sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sig = UT_LIST_GET_FIRST(trx->signals); @@ -1228,9 +1216,7 @@ trx_finish_rollback_off_kernel( trx_sig_t* sig; trx_sig_t* next_sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_a(trx->undo_no_arr == NULL || trx->undo_no_arr->n_used == 0); diff --git a/storage/innobase/trx/trx0rseg.c b/storage/innobase/trx/trx0rseg.c index 7a6989c7b4f..020f217c90b 100644 --- a/storage/innobase/trx/trx0rseg.c +++ b/storage/innobase/trx/trx0rseg.c @@ -60,9 +60,7 @@ trx_rseg_header_create( page_t* page; ut_ad(mtr); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); sys_header = trx_sysf_get(mtr); @@ -138,9 +136,7 @@ trx_rseg_mem_create( ulint sum_of_undo_sizes; ulint len; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ rseg = mem_alloc(sizeof(trx_rseg_t)); diff --git a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c index b87f3d5e090..307a03bfbc3 100644 --- a/storage/innobase/trx/trx0sys.c +++ b/storage/innobase/trx/trx0sys.c @@ -547,9 +547,7 @@ trx_in_trx_list( { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = UT_LIST_GET_FIRST(trx_sys->trx_list); @@ -576,9 +574,7 @@ trx_sys_flush_max_trx_id(void) trx_sysf_t* sys_header; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); @@ -799,9 +795,7 @@ trx_sysf_rseg_find_free( ulint page_no; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ sys_header = trx_sysf_get(mtr); diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c index 6f59d2659ec..cdea3e9c477 100644 --- a/storage/innobase/trx/trx0trx.c +++ b/storage/innobase/trx/trx0trx.c @@ -101,9 +101,7 @@ trx_create( { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx = mem_alloc(sizeof(trx_t)); @@ -111,7 +109,7 @@ trx_create( trx->op_info = ""; - trx->type = TRX_USER; + trx->is_purge = 0; trx->conc_state = TRX_NOT_STARTED; trx->start_time = time(NULL); @@ -280,9 +278,7 @@ trx_free( /*=====*/ trx_t* trx) /* in, own: trx object */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (trx->declared_to_be_inside_innodb) { ut_print_timestamp(stderr); @@ -406,9 +402,7 @@ trx_list_insert_ordered( { trx_t* trx2; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx2 = UT_LIST_GET_FIRST(trx_sys->trx_list); @@ -633,9 +627,7 @@ trx_assign_rseg(void) { trx_rseg_t* rseg = trx_sys->latest_rseg; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ loop: /* Get next rseg in a round-robin fashion */ @@ -672,12 +664,10 @@ trx_start_low( { trx_rseg_t* rseg; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->rseg == NULL); - if (trx->type == TRX_PURGE) { + if (trx->is_purge) { trx->id = ut_dulint_zero; trx->conc_state = TRX_ACTIVE; trx->start_time = time(NULL); @@ -749,9 +739,7 @@ trx_commit_off_kernel( ibool must_flush_log = FALSE; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx->must_flush_log_later = FALSE; @@ -851,9 +839,7 @@ trx_commit_off_kernel( ut_ad(trx->conc_state == TRX_ACTIVE || trx->conc_state == TRX_PREPARED); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* The following assignment makes the transaction committed in memory and makes its changes to data visible to other transactions. @@ -1036,9 +1022,7 @@ trx_handle_commit_sig_off_kernel( trx_sig_t* sig; trx_sig_t* next_sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx->que_state = TRX_QUE_COMMITTING; @@ -1078,9 +1062,7 @@ trx_end_lock_wait( { que_thr_t* thr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT); thr = UT_LIST_GET_FIRST(trx->wait_thrs); @@ -1107,9 +1089,7 @@ trx_lock_wait_to_suspended( { que_thr_t* thr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT); thr = UT_LIST_GET_FIRST(trx->wait_thrs); @@ -1137,9 +1117,7 @@ trx_sig_reply_wait_to_suspended( trx_sig_t* sig; que_thr_t* thr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sig = UT_LIST_GET_FIRST(trx->reply_signals); @@ -1172,9 +1150,7 @@ trx_sig_is_compatible( { trx_sig_t* sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (UT_LIST_GET_LEN(trx->signals) == 0) { @@ -1260,9 +1236,7 @@ trx_sig_send( trx_t* receiver_trx; ut_ad(trx); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (!trx_sig_is_compatible(trx, type, sender)) { /* The signal is not compatible with the other signals in @@ -1288,7 +1262,6 @@ trx_sig_send( UT_LIST_ADD_LAST(signals, trx->signals, sig); sig->type = type; - sig->state = TRX_SIG_WAITING; sig->sender = sender; sig->receiver = receiver_thr; @@ -1332,9 +1305,7 @@ trx_end_signal_handling( /*====================*/ trx_t* trx) /* in: trx */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->handling_signals == TRUE); trx->handling_signals = FALSE; @@ -1368,9 +1339,7 @@ loop: we can process immediately */ ut_ad(trx); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (trx->handling_signals && (UT_LIST_GET_LEN(trx->signals) == 0)) { @@ -1471,9 +1440,7 @@ trx_sig_reply( trx_t* receiver_trx; ut_ad(sig); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (sig->receiver != NULL) { ut_ad((sig->receiver)->state == QUE_THR_SIG_REPLY_WAIT); @@ -1501,9 +1468,7 @@ trx_sig_remove( trx_sig_t* sig) /* in, own: signal */ { ut_ad(trx && sig); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sig->receiver == NULL); @@ -1743,7 +1708,7 @@ trx_print( fputs(trx->op_info, f); } - if (trx->type != TRX_USER) { + if (trx->is_purge) { fputs(" purge trx", f); } @@ -1820,9 +1785,7 @@ trx_prepare_off_kernel( dulint lsn; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ rseg = trx->rseg; @@ -1868,9 +1831,7 @@ trx_prepare_off_kernel( mutex_enter(&kernel_mutex); } -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /*--------------------------------------*/ trx->conc_state = TRX_PREPARED; diff --git a/storage/innobase/trx/trx0undo.c b/storage/innobase/trx/trx0undo.c index fbcfab38f01..831e337f513 100644 --- a/storage/innobase/trx/trx0undo.c +++ b/storage/innobase/trx/trx0undo.c @@ -395,9 +395,7 @@ trx_undo_seg_create( ibool success; ut_ad(mtr && id && rseg_hdr); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* fputs(type == TRX_UNDO_INSERT ? "Creating insert undo log segment\n" @@ -836,11 +834,9 @@ trx_undo_add_page( ulint n_reserved; ibool success; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); ut_ad(!mutex_own(&kernel_mutex)); ut_ad(mutex_own(&(trx->rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ rseg = trx->rseg; @@ -911,10 +907,8 @@ trx_undo_free_page( ulint hist_size; ut_a(hdr_page_no != page_no); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ undo_page = trx_undo_page_get(space, page_no, mtr); @@ -961,9 +955,7 @@ trx_undo_free_page_in_rollback( ulint last_page_no; ut_ad(undo->hdr_page_no != page_no); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); -#endif /* UNIV_SYNC_DEBUG */ last_page_no = trx_undo_free_page(undo->rseg, FALSE, undo->space, undo->hdr_page_no, page_no, mtr); @@ -1016,10 +1008,8 @@ trx_undo_truncate_end( trx_rseg_t* rseg; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); ut_ad(mutex_own(&(trx->rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ rseg = trx->rseg; @@ -1096,9 +1086,7 @@ trx_undo_truncate_start( ulint page_no; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (0 == ut_dulint_cmp(limit, ut_dulint_zero)) { @@ -1164,9 +1152,9 @@ trx_undo_seg_free( while (!finished) { mtr_start(&mtr); -#ifdef UNIV_SYNC_DEBUG + ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + mutex_enter(&(rseg->mutex)); seg_header = trx_undo_page_get(undo->space, undo->hdr_page_no, @@ -1389,9 +1377,7 @@ trx_undo_mem_create( { trx_undo_t* undo; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (id >= TRX_RSEG_N_SLOTS) { fprintf(stderr, @@ -1437,11 +1423,9 @@ trx_undo_mem_init_for_reuse( XID* xid, /* in: X/Open XA transaction identification*/ ulint offset) /* in: undo log header byte offset on page */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&((undo->rseg)->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - if (undo->id >= TRX_RSEG_N_SLOTS) { + if (UNIV_UNLIKELY(undo->id >= TRX_RSEG_N_SLOTS)) { fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", (ulong) undo->id); @@ -1501,9 +1485,7 @@ trx_undo_create( trx_undo_t* undo; page_t* undo_page; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (rseg->curr_size == rseg->max_size) { @@ -1561,9 +1543,7 @@ trx_undo_reuse_cached( page_t* undo_page; ulint offset; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (type == TRX_UNDO_INSERT) { @@ -1671,15 +1651,12 @@ trx_undo_assign_undo( rseg = trx->rseg; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + mutex_enter(&(rseg->mutex)); undo = trx_undo_reuse_cached(trx, rseg, type, trx->id, &trx->xid, @@ -1836,9 +1813,8 @@ trx_undo_update_cleanup( undo = trx->update_undo; rseg = trx->rseg; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + trx_purge_add_update_undo_to_history(trx, undo_page, mtr); UT_LIST_REMOVE(undo_list, rseg->update_undo_list, undo); diff --git a/storage/innobase/usr/usr0sess.c b/storage/innobase/usr/usr0sess.c index ca97ea23e95..3740c05eaab 100644 --- a/storage/innobase/usr/usr0sess.c +++ b/storage/innobase/usr/usr0sess.c @@ -32,9 +32,8 @@ sess_open(void) { sess_t* sess; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + sess = mem_alloc(sizeof(sess_t)); sess->state = SESS_ACTIVE; @@ -54,9 +53,7 @@ sess_close( /*=======*/ sess_t* sess) /* in, own: session object */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sess->trx == NULL); mem_free(sess); @@ -72,9 +69,8 @@ sess_try_close( /* out: TRUE if closed */ sess_t* sess) /* in, own: session object */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + if (UT_LIST_GET_LEN(sess->graphs) == 0) { sess_close(sess); diff --git a/storage/innobase/ut/ut0ut.c b/storage/innobase/ut/ut0ut.c index d805cc3b4b2..bc6778f4c2f 100644 --- a/storage/innobase/ut/ut0ut.c +++ b/storage/innobase/ut/ut0ut.c @@ -20,6 +20,55 @@ Created 5/11/1994 Heikki Tuuri ibool ut_always_false = FALSE; +#ifdef __WIN__ +/********************************************************************* +NOTE: The Windows epoch starts from 1601/01/01 whereas the Unix +epoch starts from 1970/1/1. For selection of constant see: +http://support.microsoft.com/kb/167296/ */ +#define WIN_TO_UNIX_DELTA_USEC ((ib_longlong) 11644473600000000ULL) + + +/********************************************************************* +This is the Windows version of gettimeofday(2).*/ +static +int +ut_gettimeofday( +/*============*/ + /* out: 0 if all OK else -1 */ + struct timeval* tv, /* out: Values are relative to Unix epoch */ + void* tz) /* in: not used */ +{ + FILETIME ft; + ib_longlong tm; + + if (!tv) { + errno = EINVAL; + return(-1); + } + + GetSystemTimeAsFileTime(&ft); + + tm = (ib_longlong) ft.dwHighDateTime << 32; + tm |= ft.dwLowDateTime; + + ut_a(tm >= 0); /* If tm wraps over to negative, the quotient / 10 + does not work */ + + tm /= 10; /* Convert from 100 nsec periods to usec */ + + /* If we don't convert to the Unix epoch the value for + struct timeval::tv_sec will overflow.*/ + tm -= WIN_TO_UNIX_DELTA_USEC; + + tv->tv_sec = (long) (tm / 1000000L); + tv->tv_usec = (long) (tm % 1000000L); + + return(0); +} +#else +#define ut_gettimeofday gettimeofday +#endif + #ifndef UNIV_HOTBACKUP /********************************************************************* Display an SQL identifier. @@ -85,17 +134,11 @@ ut_usectime( ulint* sec, /* out: seconds since the Epoch */ ulint* ms) /* out: microseconds since the Epoch+*sec */ { -#ifdef __WIN__ - SYSTEMTIME st; - GetLocalTime(&st); - *sec = (ulint) st.wSecond; - *ms = (ulint) st.wMilliseconds; -#else struct timeval tv; - gettimeofday(&tv,NULL); + + ut_gettimeofday(&tv, NULL); *sec = (ulint) tv.tv_sec; *ms = (ulint) tv.tv_usec; -#endif } /************************************************************** diff --git a/storage/ndb/include/kernel/AttributeHeader.hpp b/storage/ndb/include/kernel/AttributeHeader.hpp index 2d013b31156..8ee1e33d851 100644 --- a/storage/ndb/include/kernel/AttributeHeader.hpp +++ b/storage/ndb/include/kernel/AttributeHeader.hpp @@ -45,7 +45,8 @@ public: STATIC_CONST( ROWID = 0xFFF6 ); STATIC_CONST( ROW_GCI = 0xFFF5 ); STATIC_CONST( FRAGMENT_VARSIZED_MEMORY = 0xFFF4 ); - STATIC_CONST( ANY_VALUE = 0xFFF3 ); + // 0xFFF3 to be used for read packed when merged + STATIC_CONST( ANY_VALUE = 0xFFF2 ); // NOTE: in 5.1 ctors and init take size in bytes diff --git a/storage/ndb/include/kernel/signaldata/Extent.hpp b/storage/ndb/include/kernel/signaldata/Extent.hpp index 88f2e394233..283ea7ba85a 100644 --- a/storage/ndb/include/kernel/signaldata/Extent.hpp +++ b/storage/ndb/include/kernel/signaldata/Extent.hpp @@ -31,7 +31,8 @@ struct AllocExtentReq { enum ErrorCode { UnmappedExtentPageIsNotImplemented = 1, - NoExtentAvailable = 1601 + NoExtentAvailable = 1601, + NoDatafile = 1602 }; union diff --git a/storage/ndb/src/common/transporter/TCP_Transporter.cpp b/storage/ndb/src/common/transporter/TCP_Transporter.cpp index 18171a09974..298e43710b0 100644 --- a/storage/ndb/src/common/transporter/TCP_Transporter.cpp +++ b/storage/ndb/src/common/transporter/TCP_Transporter.cpp @@ -152,6 +152,8 @@ TCP_Transporter::initTransporter() { void TCP_Transporter::setSocketOptions(){ + int sockOptKeepAlive = 1; + if (setsockopt(theSocket, SOL_SOCKET, SO_RCVBUF, (char*)&sockOptRcvBufSize, sizeof(sockOptRcvBufSize)) < 0) { #ifdef DEBUG_TRANSPORTER @@ -166,6 +168,11 @@ TCP_Transporter::setSocketOptions(){ #endif }//if + if (setsockopt(theSocket, SOL_SOCKET, SO_KEEPALIVE, + (char*)&sockOptKeepAlive, sizeof(sockOptKeepAlive)) < 0) { + ndbout_c("The setsockopt SO_KEEPALIVE error code = %d", InetErrno); + }//if + //----------------------------------------------- // Set the TCP_NODELAY option so also small packets are sent // as soon as possible diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp index 6fb9ef774d0..aa124770d23 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp @@ -105,11 +105,11 @@ Ndbfs::execREAD_CONFIG_REQ(Signal* signal) theRequestPool = new Pool; - m_maxFiles = 40; + m_maxFiles = 0; ndb_mgm_get_int_parameter(p, CFG_DB_MAX_OPEN_FILES, &m_maxFiles); Uint32 noIdleFiles = 27; ndb_mgm_get_int_parameter(p, CFG_DB_INITIAL_OPEN_FILES, &noIdleFiles); - if (noIdleFiles > m_maxFiles) + if (noIdleFiles > m_maxFiles && m_maxFiles != 0) m_maxFiles = noIdleFiles; // Create idle AsyncFiles for (Uint32 i = 0; i < noIdleFiles; i++){ @@ -650,7 +650,7 @@ AsyncFile* Ndbfs::createAsyncFile(){ // Check limit of open files - if (theFiles.size()+1 == m_maxFiles) { + if (m_maxFiles !=0 && theFiles.size()+1 == m_maxFiles) { // Print info about all open files for (unsigned i = 0; i < theFiles.size(); i++){ AsyncFile* file = theFiles[i]; diff --git a/storage/ndb/src/kernel/blocks/tsman.cpp b/storage/ndb/src/kernel/blocks/tsman.cpp index 99fbc683cee..62aa80a67fe 100644 --- a/storage/ndb/src/kernel/blocks/tsman.cpp +++ b/storage/ndb/src/kernel/blocks/tsman.cpp @@ -1483,6 +1483,12 @@ Tsman::execALLOC_EXTENT_REQ(Signal* signal) { jam(); err = AllocExtentReq::NoExtentAvailable; + Local_datafile_list full_tmp(m_file_pool, ts_ptr.p->m_full_files); + if (tmp.isEmpty() && full_tmp.isEmpty()) + { + jam(); + err = AllocExtentReq::NoDatafile; + } } /** diff --git a/storage/ndb/src/mgmclient/CommandInterpreter.cpp b/storage/ndb/src/mgmclient/CommandInterpreter.cpp index 793b2e3cc98..93fc3d46e43 100644 --- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp @@ -1966,6 +1966,9 @@ CommandInterpreter::executeRestart(Vector &command_list, return -1; } + if (!nostart) + ndbout_c("Shutting down nodes with \"-n, no start\" option, to subsequently start the nodes."); + result= ndb_mgm_restart3(m_mgmsrv, no_of_nodes, node_ids, initialstart, nostart, abort, &need_disconnect); @@ -2492,6 +2495,7 @@ CommandInterpreter::executeStartBackup(char* parameters, bool interactive) { flags = 0; result = ndb_mgm_start_backup(m_mgmsrv, 0, &backupId, &reply); + goto END_BACKUP; } else if (sz == 1 || (sz == 3 && args[1] == "WAIT" && args[2] == "COMPLETED")) { @@ -2525,6 +2529,7 @@ CommandInterpreter::executeStartBackup(char* parameters, bool interactive) } result = ndb_mgm_start_backup(m_mgmsrv, flags, &backupId, &reply); +END_BACKUP: if (result != 0) { ndbout << "Backup failed" << endl; printError(); diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.cpp b/storage/ndb/src/mgmsrv/ConfigInfo.cpp index ba04ceee7ec..05abe4ced9e 100644 --- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp @@ -879,7 +879,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_USED, false, ConfigInfo::CI_INT, - "40", + "0", "20", STR_VALUE(MAX_INT_RNIL) }, diff --git a/storage/ndb/src/mgmsrv/ParamInfo.cpp b/storage/ndb/src/mgmsrv/ParamInfo.cpp index 888b7948c05..26a759e43d2 100644 --- a/storage/ndb/src/mgmsrv/ParamInfo.cpp +++ b/storage/ndb/src/mgmsrv/ParamInfo.cpp @@ -380,10 +380,10 @@ const ParamInfo ParamInfoArray[] = { "If set to yes, then NDB Cluster data will not be swapped out to disk", CI_USED, true, - CI_BOOL, - "false", - "false", - "true" }, + CI_INT, + "0", + "1", + "2" }, { CFG_DB_WATCHDOG_INTERVAL, @@ -705,7 +705,7 @@ const ParamInfo ParamInfoArray[] = { CI_USED, false, CI_INT, - "40", + "0", "20", STR_VALUE(MAX_INT_RNIL) }, @@ -1114,6 +1114,18 @@ const ParamInfo ParamInfoArray[] = { "0", "0", STR_VALUE(MAX_INT_RNIL) }, + + { + CFG_DB_MEMREPORT_FREQUENCY, + "MemReportFrequency", + DB_TOKEN, + "Frequency of mem reports in seconds, 0 = only when passing %-limits", + CI_USED, + false, + CI_INT, + "0", + "0", + STR_VALUE(MAX_INT_RNIL) }, /*************************************************************************** * API diff --git a/storage/ndb/src/ndbapi/NdbScanFilter.cpp b/storage/ndb/src/ndbapi/NdbScanFilter.cpp index 89abba2eddc..eb0ef4ba391 100644 --- a/storage/ndb/src/ndbapi/NdbScanFilter.cpp +++ b/storage/ndb/src/ndbapi/NdbScanFilter.cpp @@ -328,12 +328,18 @@ NdbScanFilterImpl::cond_col(Interpreter::UnaryCondition op, Uint32 AttrId){ int NdbScanFilter::isnull(int AttrId){ - return m_impl.cond_col(Interpreter::IS_NULL, AttrId); + if(m_impl.m_negative == 1) + return m_impl.cond_col(Interpreter::IS_NOT_NULL, AttrId); + else + return m_impl.cond_col(Interpreter::IS_NULL, AttrId); } int NdbScanFilter::isnotnull(int AttrId){ - return m_impl.cond_col(Interpreter::IS_NOT_NULL, AttrId); + if(m_impl.m_negative == 1) + return m_impl.cond_col(Interpreter::IS_NULL, AttrId); + else + return m_impl.cond_col(Interpreter::IS_NOT_NULL, AttrId); } struct tab3 { diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index 7dd16f2d57f..b21b64156c8 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -201,7 +201,8 @@ ErrorBundle ErrorCodes[] = { { 904, HA_ERR_INDEX_FILE_FULL, IS, "Out of fragment records (increase MaxNoOfOrderedIndexes)" }, { 905, DMEC, IS, "Out of attribute records (increase MaxNoOfAttributes)" }, { 1601, HA_ERR_RECORD_FILE_FULL, IS, "Out extents, tablespace full" }, - + { 1602, DMEC, IS,"No datafile in tablespace" }, + /** * TimeoutExpired */ diff --git a/storage/ndb/tools/delete_all.cpp b/storage/ndb/tools/delete_all.cpp index c925e22d3ec..4e3037f1941 100644 --- a/storage/ndb/tools/delete_all.cpp +++ b/storage/ndb/tools/delete_all.cpp @@ -75,6 +75,7 @@ int main(int argc, char** argv){ return NDBT_ProgramExit(NDBT_WRONGARGS); Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_delete_all"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/storage/ndb/tools/desc.cpp b/storage/ndb/tools/desc.cpp index 4d9d6dff72a..9eb0cf67ceb 100644 --- a/storage/ndb/tools/desc.cpp +++ b/storage/ndb/tools/desc.cpp @@ -81,6 +81,7 @@ int main(int argc, char** argv){ return NDBT_ProgramExit(NDBT_WRONGARGS); Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_desc"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/storage/ndb/tools/drop_index.cpp b/storage/ndb/tools/drop_index.cpp index 23ebfff6cf4..256c40e1924 100644 --- a/storage/ndb/tools/drop_index.cpp +++ b/storage/ndb/tools/drop_index.cpp @@ -61,6 +61,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_drop_index"); if(con.connect(12, 5, 1) != 0) { return NDBT_ProgramExit(NDBT_FAILED); diff --git a/storage/ndb/tools/drop_tab.cpp b/storage/ndb/tools/drop_tab.cpp index d965be29f31..a7accb904a4 100644 --- a/storage/ndb/tools/drop_tab.cpp +++ b/storage/ndb/tools/drop_tab.cpp @@ -61,6 +61,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_drop_table"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/storage/ndb/tools/listTables.cpp b/storage/ndb/tools/listTables.cpp index 359e308dcb8..6a73bcc54f5 100644 --- a/storage/ndb/tools/listTables.cpp +++ b/storage/ndb/tools/listTables.cpp @@ -307,6 +307,7 @@ int main(int argc, char** argv){ _tabname = argv[0]; ndb_cluster_connection = new Ndb_cluster_connection(opt_connect_str); + ndb_cluster_connection->set_name("ndb_show_tables"); if (ndb_cluster_connection->connect(12,5,1)) fatal("Unable to connect to management server."); if (ndb_cluster_connection->wait_until_ready(30,0) < 0) diff --git a/storage/ndb/tools/select_all.cpp b/storage/ndb/tools/select_all.cpp index 9adde165003..e2072f30edf 100644 --- a/storage/ndb/tools/select_all.cpp +++ b/storage/ndb/tools/select_all.cpp @@ -129,6 +129,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_select_all"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/storage/ndb/tools/select_count.cpp b/storage/ndb/tools/select_count.cpp index 8933d803f53..552d156b665 100644 --- a/storage/ndb/tools/select_count.cpp +++ b/storage/ndb/tools/select_count.cpp @@ -83,6 +83,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_select_count"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index b12d5fa1db0..6b0092e3880 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -7811,16 +7811,16 @@ static void test_explain_bug() "", "", "", 19, 0); verify_prepare_field(result, 2, "table", "", MYSQL_TYPE_VAR_STRING, - "", "", "", NAME_LEN, 0); + "", "", "", NAME_CHAR_LEN, 0); verify_prepare_field(result, 3, "type", "", MYSQL_TYPE_VAR_STRING, "", "", "", 10, 0); verify_prepare_field(result, 4, "possible_keys", "", MYSQL_TYPE_VAR_STRING, - "", "", "", NAME_LEN*MAX_KEY, 0); + "", "", "", NAME_CHAR_LEN*MAX_KEY, 0); verify_prepare_field(result, 5, "key", "", MYSQL_TYPE_VAR_STRING, - "", "", "", NAME_LEN, 0); + "", "", "", NAME_CHAR_LEN, 0); if (mysql_get_server_version(mysql) <= 50000) { @@ -7830,11 +7830,11 @@ static void test_explain_bug() else { verify_prepare_field(result, 6, "key_len", "", MYSQL_TYPE_VAR_STRING, "", - "", "", NAME_LEN*MAX_KEY, 0); + "", "", NAME_CHAR_LEN*MAX_KEY, 0); } verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_VAR_STRING, - "", "", "", NAME_LEN*16, 0); + "", "", "", NAME_CHAR_LEN*16, 0); verify_prepare_field(result, 8, "rows", "", MYSQL_TYPE_LONGLONG, "", "", "", 10, 0); diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index e4d856624d3..d318f1b0122 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -309,6 +309,14 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file, { struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER; + + /* + Turn off verification of servers certificate if both + ca_file and ca_path is set to NULL + */ + if (ca_file == 0 && ca_path == 0) + verify= SSL_VERIFY_NONE; + if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, ca_path, cipher, TLSv1_client_method()))) {