summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-11-18 23:13:48 +0200
committerunknown <monty@donna.mysql.com>2000-11-18 23:13:48 +0200
commit5dae19b394e3385c0e48d896fec1174437f2308a (patch)
tree287897ebd815b64a05c0ca7076beccd5245a2f8d /sql
parent469fce643c6f71c3bcaaa62454604fbb30bcbacc (diff)
downloadmariadb-git-5dae19b394e3385c0e48d896fec1174437f2308a.tar.gz
Fixed some reported bugs
BUILD/compile-alpha-cxx: Building on Alpha with Compaq C and C+++ Docs/manual.texi: Changelogs and update of links myisam/mi_key.c: Fixed multi_part keys where first part where of TEXT/BLOB type mysys/Makefile.am: Makefile.am now works with Compaq make sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha: New benchmark results sql-bench/test-select.sh: Made the count_distinct_big test a bit smaller sql/log.cc: Changed the slow log format to have more information by default sql/mysqld.cc: false->FALSE sql/share/german/errmsg.sys: Update of messages sql/share/german/errmsg.txt: Update of messages sql/sql_base.cc: Fixed SELECT DISTINCT * sql/sql_insert.cc: Cleanup sql/sql_table.cc: Added logging of DROP of temporary tables vio/VioFd.cc: false -> FALSE vio/VioSSL.cc: false -> FALSE vio/VioSSLFactoriesFd.cc: false -> FALSE vio/VioSocket.cc: false -> FALSE
Diffstat (limited to 'sql')
-rw-r--r--sql/log.cc12
-rw-r--r--sql/mysqld.cc2
-rw-r--r--sql/share/german/errmsg.sysbin10867 -> 11109 bytes
-rw-r--r--sql/share/german/errmsg.txt60
-rw-r--r--sql/sql_base.cc1
-rw-r--r--sql/sql_insert.cc9
-rw-r--r--sql/sql_table.cc3
7 files changed, 44 insertions, 43 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 3563b7b1a08..2dda594ea59 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -703,7 +703,7 @@ void MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
VOID(pthread_mutex_unlock(&LOCK_log));
return;
}
- if (specialflag & SPECIAL_LONG_LOG_FORMAT)
+ if ((specialflag & SPECIAL_LONG_LOG_FORMAT) || query_start)
{
current_time=time(NULL);
if (current_time != last_time)
@@ -724,28 +724,26 @@ void MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
if (my_b_write(&log_file, (byte*) buff,24))
error=errno;
}
- if (my_b_printf(&log_file, "# User@Host: %s [%s] @ %s [%s]\n",
+ if (my_b_printf(&log_file, "# User@Host: %s[%s] @ %s [%s]\n",
thd->priv_user,
thd->user,
thd->host ? thd->host : "",
- thd->ip ? thd->ip : ""))
+ thd->ip ? thd->ip : "") == (uint) -1)
error=errno;
}
if (query_start)
{
/* For slow query log */
- if (!(specialflag & SPECIAL_LONG_LOG_FORMAT))
- current_time=time(NULL);
if (my_b_printf(&log_file,
"# Time: %lu Lock_time: %lu Rows_sent: %lu\n",
(ulong) (current_time - query_start),
(ulong) (thd->time_after_lock - query_start),
- (ulong) thd->sent_row_count))
+ (ulong) thd->sent_row_count) == (uint) -1)
error=errno;
}
if (thd->db && strcmp(thd->db,db))
{ // Database changed
- if (my_b_printf(&log_file,"use %s;\n",thd->db))
+ if (my_b_printf(&log_file,"use %s;\n",thd->db) == (uint) -1)
error=errno;
strmov(db,thd->db);
}
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 42221be9176..ca529417172 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -172,7 +172,7 @@ static char **defaults_argv,time_zone[30];
static const char *default_table_type_name;
#ifdef HAVE_OPENSSL
-static bool opt_use_ssl = false;
+static bool opt_use_ssl = FALSE;
static char *opt_ssl_key = 0;
static char *opt_ssl_cert = 0;
static char *opt_ssl_ca = 0;
diff --git a/sql/share/german/errmsg.sys b/sql/share/german/errmsg.sys
index 055541ae3d9..755783a4d20 100644
--- a/sql/share/german/errmsg.sys
+++ b/sql/share/german/errmsg.sys
Binary files differ
diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt
index bdb3ee40844..580eddc0cb1 100644
--- a/sql/share/german/errmsg.txt
+++ b/sql/share/german/errmsg.txt
@@ -166,35 +166,35 @@
"Timeout beim Lesen eines Communication-Packets",
"Fehler beim Schreiben eines Communication-Packets",
"Timeout beim Schreiben eines Communication-Packets",
-"Result string is longer than max_allowed_packet",
-"The used table type doesn't support BLOB/TEXT columns",
-"The used table type doesn't support AUTO_INCREMENT columns",
-"INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES",
-"Incorrect column name '%-.100s'",
-"The used table handler can't index column '%-.64s'",
-"All tables in the MERGE table are not defined identically",
-"Can't write, because of unique constraint, to table '%-.64s'",
-"BLOB column '%-.64s' used in key specification without a key length",
-"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead",
-"Result consisted of more than one row",
-"This table type requires a primary key",
-"This version of MySQL is not compiled with RAID support",
-"You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
-"Key '%-.64s' doesn't exist in table '%-.64s'",
-"Can't open table",
-"The handler for the table doesn't support check/repair",
-"You are not allowed to execute this command in a transaction",
-"Got error %d during COMMIT",
-"Got error %d during ROLLBACK",
-"Got error %d during FLUSH_LOGS",
-"Got error %d during CHECKPOINT",
-"Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)",
-"The handler for the table does not support binary table dump",
-"Binlog closed while trying to FLUSH MASTER",
-"Failed rebuilding the index of dumped table '%-.64s'",
-"Error from master: '%-.64s'",
-"Net error reading from master",
-"Net error writing to master",
-"Can't find FULLTEXT index matching the column list",
+"Ergebnisstring ist länger als max_allowed_packet",
+"Der verwendete Tabellentyp unterstützt keine BLOB/TEXT Spalten",
+"Der verwendete Tabellentyp unterstützt keine AUTO_INCREMENT Spalte",
+"INSERT DELAYED kann nicht auf Tabelle '%-.64s' angewendet werden, da diese mit LOCK TABLES gesperrt ist",
+"Falscher Spaltenname '%-.100s'",
+"Der verwendete Tabellen-Handler kann die Spalte '%-.64s' nicht indizieren",
+"Alle Tabelle in der MERGE-Tabelle sind nicht gleich definiert",
+"Schreiben in Tabelle '%-.64s' nicht möglich wegen eines Unique Constraint",
+"BLOB Spalte '%-.64s' wird in der Key-Definition ohne Längenangabe verwendet",
+"Alle Teile eines PRIMARY KEY müssen als NOT NULL definiert sein; Wenn NULL benötigt wird sollte ein UNIQUE Key verwendet werden",
+"Ergebnis besteht aus mehr als einer Reihe",
+"Dieser Tabellentyp verlangt nach einem PRIMARY KEY",
+"Diese MySQL-Version ist nicht mit RAID-Unterstützung kompiliert",
+"Unter Verwendung des Sicheren Updatemodes wurde versucht eine Tabelle zu updaten ohne eine KEY-Spalte in der WHERE-Klausel",
+"Schlüssel '%-.64s' existiert nicht in der Tabelle '%-.64s'",
+"Kann Tabelle nicht öffnen",
+"Der Tabellen-Handler für diese Tabelle unterstützt kein check/repair",
+"Keine Berechtigung dieses Kommando in einer Transaktion auszuführen",
+"Fehler %d wärend COMMIT",
+"Fehler %d wärend ROLLBACK",
+"Fehler %d wärend FLUSH_LOGS",
+"Fehler %d wärend CHECKPOINT",
+"Verbindungsabbruch %ld zu db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)",
+"Der Tabellenhandler für die Tabelle unterstützt kein Binary Tabellendump",
+"Binlog wurde beendet wärend FLUSH MASTER",
+"Neubau des Index der gedumpten Tabelle '%-.64s' fehlgeschlagen",
+"Fehler vom Master: '%-.64s'",
+"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'",
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 1c006a83ce7..d0877aed1bd 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1687,6 +1687,7 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *table_name,
if (!table_name || !strcmp(table_name,tables->name))
{
Field **ptr=table->field,*field;
+ thd->used_tables|=table->map;
while ((field = *ptr++))
{
Item_field *item= new Item_field(field);
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index ec727591e2a..25ca7d76e03 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -118,11 +118,10 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
if we are told to replace duplicates, the insert cannot be concurrent
delayed insert changed to regular in slave thread
*/
- if (lock_type == TL_WRITE_DELAYED &&
- ((specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) ||
- thd->slave_thread
- ) ||
- lock_type == TL_WRITE_CONCURRENT_INSERT && duplic == DUP_REPLACE)
+ if ((lock_type == TL_WRITE_DELAYED &&
+ ((specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) ||
+ thd->slave_thread)) ||
+ (lock_type == TL_WRITE_CONCURRENT_INSERT && duplic == DUP_REPLACE))
lock_type=TL_WRITE;
if (lock_type == TL_WRITE_DELAYED)
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 173511083e4..68b5d90217c 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -79,7 +79,10 @@ int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists)
{
char *db=table->db ? table->db : thd->db;
if (!close_temporary_table(thd, db, table->real_name))
+ {
+ some_tables_deleted=1; // Log query
continue; // removed temporary table
+ }
abort_locked_tables(thd,db,table->real_name);
while (remove_table_from_cache(thd,db,table->real_name) && !thd->killed)