diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_innobase.cc | 9 | ||||
-rw-r--r-- | sql/item_func.cc | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 9 | ||||
-rw-r--r-- | sql/share/german/errmsg.txt | 28 | ||||
-rw-r--r-- | sql/share/swedish/errmsg.OLD | 3 | ||||
-rw-r--r-- | sql/sql_base.cc | 3 | ||||
-rw-r--r-- | sql/sql_insert.cc | 1 | ||||
-rw-r--r-- | sql/sql_table.cc | 16 |
8 files changed, 51 insertions, 20 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 4a69056a9e2..6bae31902c3 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -679,7 +679,7 @@ ha_innobase::bas_ext() const /* out: file extension strings, currently not used */ { - static const char* ext[] = {".not_used", NullS}; + static const char* ext[] = {".InnoDB", NullS}; return(ext); } @@ -779,6 +779,13 @@ ha_innobase::open( if (NULL == (ib_table = dict_table_get(norm_name, NULL))) { + fprintf(stderr, "\ +Cannot find table %s from the internal data dictionary\n\ +of InnoDB though the .frm file for the table exists. Maybe you have deleted\n\ +and created again an InnoDB database but forgotten to delete the\n\ +corresponding .frm files of old InnoDB tables?\n", + norm_name); + free_share(share); my_free((char*) upd_buff, MYF(0)); my_errno = ENOENT; diff --git a/sql/item_func.cc b/sql/item_func.cc index 84bc972608e..8a2bd15ae6d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1758,7 +1758,7 @@ Item_func_get_user_var::val_str(String *str) return NULL; switch (entry->type) { case REAL_RESULT: - str->set(*(double*) entry->value); + str->set(*(double*) entry->value,decimals); break; case INT_RESULT: str->set(*(longlong*) entry->value); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 8de9da444bd..b155b313e8b 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1194,8 +1194,8 @@ bad corruption, the above values may be invalid\n\n", thd->thread_id); } fprintf(stderr, "\ -Please use the information above to create a repeatable test case for the\n\ -crash, and send it to bugs@lists.mysql.com\n"); +The manual page at http://www.mysql.com/doc/C/r/Crashing.html contains\n\ +information that should help you find out what is causing the crash\n"); fflush(stderr); #endif /* HAVE_STACKTRACE */ @@ -2587,7 +2587,7 @@ static struct option long_options[] = { {"skip-show-database", no_argument, 0, (int) OPT_SKIP_SHOW_DB}, {"skip-slave-start", no_argument, 0, (int) OPT_SKIP_SLAVE_START}, {"skip-stack-trace", no_argument, 0, (int) OPT_SKIP_STACK_TRACE}, - {"skip-symlinks", no_argument, 0, (int) OPT_SKIP_SYMLINKS}, + {"skip-symlink", no_argument, 0, (int) OPT_SKIP_SYMLINKS}, {"skip-thread-priority", no_argument, 0, (int) OPT_SKIP_PRIOR}, {"sql-bin-update-same", no_argument, 0, (int) OPT_SQL_BIN_UPDATE_SAME}, #include "sslopt-longopts.h" @@ -2796,7 +2796,7 @@ struct show_var_st init_vars[]= { {"innodb_log_arch_dir", (char*) &innobase_log_arch_dir, SHOW_CHAR_PTR}, {"innodb_log_archive", (char*) &innobase_log_archive, SHOW_MY_BOOL}, {"innodb_log_group_home_dir", (char*) &innobase_log_group_home_dir, SHOW_CHAR_PTR}, - {"innodb_unix_file_flush_method", (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR}, + {"innodb_flush_method", (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR}, #endif {"interactive_timeout", (char*) &net_interactive_timeout, SHOW_LONG}, {"join_buffer_size", (char*) &join_buff_size, SHOW_LONG}, @@ -3073,6 +3073,7 @@ static void usage(void) puts("\ --innodb_data_home_dir=dir The common part for Innodb table spaces\n\ --innodb_data_file_path=dir Path to individual files and their sizes\n\ + --innodb_flush_method=# Which method to flush data\n\ --innodb_flush_log_at_trx_commit[=#]\n\ Set to 0 if you don't want to flush logs\n\ --innodb_log_arch_dir=dir Where full logs should be archived\n\ diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 7a86a4368e7..2f41fbf30c2 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -2,7 +2,7 @@ This file is public domain and comes with NO WARRANTY of any kind Dirk Munzinger (dmun@4t2.com) - Version: 17.03.1999 */ + Version: 07.06.2001 */ "hashchk", "isamchk", @@ -196,19 +196,19 @@ "Netzfehler beim Lesen vom Master", "Netzfehler beim Schreiben zum Master", "Kann keinen FULLTEXT-Index finden der der Spaltenliste entspricht", -"Can't execute the given command because you have active locked tables or an active transaction", -"Unknown system variable '%-.64'", -"Table '%-.64s' is marked as crashed and should be repaired", -"Table '%-.64s' is marked as crashed and last (automatic?) repair failed", -"Warning: Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again', -"This operation cannot be performed with a running slave, run SLAVE STOP first", -"This operation requires a running slave, configure slave and do SLAVE START", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, check permisions on master.info", -"Could not create slave thread, check system resources", -"User %-.64s has already more than 'max_user_connections' active connections", -"You may only use constant expressions with SET", +"Kann das aktuelle Kommando wegen aktiver Tabellensperre oder aktiver Transaktion nicht ausführen", +"Unbekannte System-Variabel '%-.64'", +"Tabelle '%-.64s' ist als defekt makiert und sollte repariert werden", +"Tabelle '%-.64s' ist als defekt makiert und der letzte (automatische) Reparaturversuch schlug fehl.", +"Warnung: Das Rollback konnte bei einigen Tabellen, die nicht mittels Transaktionen geändert wurden, nicht ausgeführt werden.", +"Multi-Statement Transaktionen benötigen mehr als 'max_binlog_cache_size' Bytes An Speicher. Diese mysqld-Variabel vergrössern und nochmal versuchen.', +"Diese Operation kann nicht bei einem aktiven Slave durchgeführt werden. Das Kommand SLAVE STOP muss zuerst ausgeführt werden.", +"Diese Operationbenötigt einen aktiven Slave. Slave konfigurieren und mittels SLAVE START aktivieren.", +"Der Server ist nicht als Slave konfigiriert. Im Konfigurations-File oder mittel CHANGE MASTER TO beheben.", +"Konnte Master-Info-Struktur nicht initialisieren; Berechtigungen von master.info prüfen.", +"Konnte keinen Slave-Thread starten. System-Resourcen überprüfen.", +"Benutzer %-.64s hat mehr als 'max_user_connections' aktive Verbindungen", +"Bei der Verwendung mit SET dürfen nur Constante Ausdrücke verwendet werden", "Lock wait timeout exceeded", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", diff --git a/sql/share/swedish/errmsg.OLD b/sql/share/swedish/errmsg.OLD index 672ce97c575..fc26a08e9ee 100644 --- a/sql/share/swedish/errmsg.OLD +++ b/sql/share/swedish/errmsg.OLD @@ -206,3 +206,6 @@ "Kunde inte starta en tråd för replikering", "Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar", "Du kan endast använda konstant-uttryck med SET", +"Lock wait timeout exceeded", +"The total number of locks exceeds the lock table size", +"Update locks cannot be acquired during a READ UNCOMMITTED transaction", diff --git a/sql/sql_base.cc b/sql/sql_base.cc index d9470ee0b59..d068dd500bc 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -389,6 +389,9 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh, thd->in_lock_tables=1; result=reopen_tables(thd,1,1); thd->in_lock_tables=0; + /* Set version for table */ + for (TABLE *table=thd->open_tables; table ; table=table->next) + table->version=refresh_version; } VOID(pthread_mutex_unlock(&LOCK_open)); if (if_wait_for_refresh) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index cfd16df5d17..14f4a732eac 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1362,6 +1362,7 @@ select_create::prepare(List<Item> &values) if (info.handle_duplicates == DUP_IGNORE || info.handle_duplicates == DUP_REPLACE) table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); + table->file->deactivate_non_unique_index((ha_rows) 0); DBUG_RETURN(0); } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index f287481921d..207f9dd324d 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -221,6 +221,13 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, db_options|=HA_OPTION_PACK_RECORD; file=get_new_handler((TABLE*) 0, create_info->db_type); + if ((create_info->options & HA_LEX_CREATE_TMP_TABLE) && + (file->option_flag() & HA_NO_TEMP_TABLES)) + { + my_error(ER_ILLEGAL_HA,MYF(0),table_name); + DBUG_RETURN(-1); + } + /* Don't pack keys in old tables if the user has requested this */ while ((sql_field=it++)) @@ -1226,7 +1233,16 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, { if (drop->type == Alter_drop::COLUMN && !my_strcasecmp(field->field_name, drop->name)) + { + /* Reset auto_increment value if it was dropped */ + if (MTYP_TYPENR(field->unireg_check) == Field::NEXT_NUMBER && + !(create_info->used_fields & HA_CREATE_USED_AUTO)) + { + create_info->auto_increment_value=0; + create_info->used_fields|=HA_CREATE_USED_AUTO; + } break; + } } if (drop) { |