diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_heap.cc | 3 | ||||
-rw-r--r-- | sql/mysqld.cc | 7 | ||||
-rw-r--r-- | sql/share/czech/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/danish/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/dutch/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/english/errmsg.txt | 2 | ||||
-rw-r--r-- | sql/share/estonian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/french/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/german/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/greek/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/hungarian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/italian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/japanese/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/korean/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/norwegian-ny/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/norwegian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/polish/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/portuguese/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/romanian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/russian/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/slovak/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/spanish/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/share/swedish/errmsg.txt | 1 | ||||
-rw-r--r-- | sql/sql_base.cc | 12 | ||||
-rw-r--r-- | sql/sql_parse.cc | 21 |
25 files changed, 40 insertions, 25 deletions
diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index 13dccc2bf64..eff69893502 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -247,7 +247,7 @@ THR_LOCK_DATA **ha_heap::store_lock(THD *thd, int ha_heap::delete_table(const char *name) { - int error=heap_delete_all(name); + int error=heap_delete_table(name); return error == ENOENT ? 0 : error; } @@ -272,7 +272,6 @@ ha_rows ha_heap::records_in_range(int inx, return 10; // Good guess } -/* We can just delete the heap on creation */ int ha_heap::create(const char *name, TABLE *form, HA_CREATE_INFO *create_info) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index e3670ff9803..c719da38961 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1406,7 +1406,10 @@ static void *signal_hand(void *arg __attribute__((unused))) } break; case SIGHUP: - reload_acl_and_cache((THD*) 0,REFRESH_LOG, + reload_acl_and_cache((THD*) 0, + (REFRESH_LOG | REFRESH_TABLES | REFRESH_FAST | + REFRESH_STATUS | REFRESH_GRANT | REFRESH_THREADS | + REFRESH_HOSTS), (TABLE_LIST*) 0); // Flush logs mysql_print_status((THD*) 0); // Send debug some info break; @@ -2613,7 +2616,9 @@ static struct option long_options[] = { {"safemalloc-mem-limit", required_argument, 0, (int) OPT_SAFEMALLOC_MEM_LIMIT}, {"new", no_argument, 0, 'n'}, +#ifdef NOT_YET {"no-mix-table-types", no_argument, 0, (int)OPT_NO_MIX_TYPE}, +#endif {"old-protocol", no_argument, 0, 'o'}, {"old-rpl-compat", no_argument, 0, (int)OPT_OLD_RPL_COMPAT}, #ifdef ONE_THREAD diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 39c9fb8f030..4ae22776344 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -228,3 +228,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 70f9e0f1088..f511a5d177c 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -222,3 +222,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index bd19abe99b1..91237c691c0 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -223,3 +223,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index b2b298d62a8..d120575d9af 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -219,4 +219,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", -"Mixing transactional and non-transactional tables disabled by option",
\ No newline at end of file +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index a4f9fa2223f..929b97e6146 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -223,3 +223,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index edc24953296..03589a91c77 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -219,3 +219,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 43f77d698f4..deded796403 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -222,3 +222,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index 7466abea5b4..c6255689ee4 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -219,3 +219,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 6eabaf1fbd9..fbedda7e329 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -221,3 +221,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 036b59fe320..f419ddb7e0c 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -219,3 +219,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 0ee0e80a541..2f4b72f8cc1 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -221,3 +221,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 8864acb5e7e..f5f5539b8a2 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -219,3 +219,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 29b9c260fb9..d87da187577 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -221,3 +221,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index c2cad5de067..1d54c9aec03 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -221,3 +221,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 38515256a3c..1c93fcc7f8f 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -223,3 +223,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 0d907aa4f14..29a52900b24 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -219,3 +219,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 3c47a149e3a..8f957302f30 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -223,3 +223,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index e030072c686..dc350a242a3 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -222,3 +222,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 22360c08c9b..f7db353db3f 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -227,3 +227,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 237e1d2716f..f10908a33ba 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -220,3 +220,4 @@ "Wrong usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", +"Mixing of transactional and non-transactional tables is disabled", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index 3dd14c8b613..5bdbf78e6cf 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -219,3 +219,4 @@ "Felaktig använding av %s and %s", "SELECT kommandona har olika antal kolumner" "Kan inte utföra kommandot emedan du har ett READ lås", +"Blandning av transaktionella och icke-transaktionella tabeller är stoppat", diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 0198f0ce176..2a9043cc0d7 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1368,18 +1368,6 @@ int open_tables(THD *thd,TABLE_LIST *start) tables->table->reginfo.lock_type=tables->lock_type; tables->table->grant= tables->grant; } - if (opt_no_mix_types && start) - { - bool checking; TABLE_LIST *tl; - for (tl=start, checking = tl->table->file->has_transactions(), tl=tl->next; tl ; tl=tl->next) - { - if (((tl->table->file->has_transactions()) ^ checking)) - { - send_error(&thd->net,ER_MIXING_NOT_ALLOWED); - DBUG_RETURN(-1); - } - } - } thd->proc_info=0; DBUG_RETURN(result); } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 386fd61c61e..81e65c3b99d 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -47,7 +47,7 @@ static void mysql_init_query(THD *thd); static void remove_escape(char *name); static void refresh_status(void); static bool append_file_to_dir(char **filename_ptr, char *table_name); -static int create_total_list(THD *thd, LEX *lex, TABLE_LIST **result); +static bool create_total_list(THD *thd, LEX *lex, TABLE_LIST **result); const char *any_db="*any*"; // Special symbol for check_access @@ -1075,11 +1075,10 @@ mysql_execute_command(void) /* Skip if we are in the slave thread, some table rules have been given and the table list says the query should not be replicated - TODO: UPDATE this for UNION. Updated by Sinisa !!!!!!!!!!!!!!!!!!!!!! */ - if (lex->select_lex.next && tables && (res = create_total_list(thd,lex,&tables))) - DBUG_VOID_RETURN; - if (table_rules_on && thd->slave_thread && tables && !tables_ok(thd,tables)) + if ((lex->select_lex.next && create_total_list(thd,lex,&tables)) || + (table_rules_on && tables && thd->slave_thread && + !tables_ok(thd,tables))) DBUG_VOID_RETURN; switch (lex->sql_command) { @@ -2364,6 +2363,7 @@ mysql_init_query(THD *thd) thd->lex.select = &thd->lex.select_lex; thd->lex.select_lex.table_list.first=0; thd->lex.select_lex.table_list.next= (byte**) &thd->lex.select_lex.table_list.first; + thd->lex.select_lex.next=0; thd->fatal_error=0; // Safety thd->last_insert_id_used=thd->query_start_used=thd->insert_id_used=0; thd->sent_row_count=thd->examined_row_count=0; @@ -2836,7 +2836,7 @@ TABLE_LIST *add_table_to_list(Table_ident *table, LEX_STRING *alias, ** to the entries in this list. */ -static int create_total_list(THD *thd, LEX *lex, TABLE_LIST **result) +static bool create_total_list(THD *thd, LEX *lex, TABLE_LIST **result) { /* Handle the case when we are not using union */ if (!lex->select_lex.next) @@ -2853,8 +2853,8 @@ static int create_total_list(THD *thd, LEX *lex, TABLE_LIST **result) { if (sl->order_list.first && sl->next) { - my_error(ER_WRONG_USAGE,MYF(0),"UNION","ORDER BY"); - return -1; + net_printf(&thd->net,ER_WRONG_USAGE,"UNION","ORDER BY"); + return 1; } if ((aux= (TABLE_LIST*) sl->table_list.first)) { @@ -2874,7 +2874,10 @@ static int create_total_list(THD *thd, LEX *lex, TABLE_LIST **result) aux->lock_type= lex->lock_option; if (!(cursor = (TABLE_LIST *) thd->memdup((byte*) aux, sizeof(*aux)))) - return -1; + { + send_error(&thd->net,0); + return 1; + } *new_table_list= cursor; new_table_list= &cursor->next; *new_table_list=0; // end result list |