summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-07-01 15:02:16 +0300
committerunknown <monty@mashka.mysql.fi>2003-07-01 15:02:16 +0300
commit5a3c12effb4a0d32bf6b77d4b19edcf1757bb823 (patch)
tree1dd88e8c946c87dfaa131fd495d71766127a0e94 /sql
parent23a9a5805cd258c5699e782cebdb5763acb1d85d (diff)
parent1726ae86be52bc129b5788406d60808b15b8bd9f (diff)
downloadmariadb-git-5a3c12effb4a0d32bf6b77d4b19edcf1757bb823.tar.gz
Merge with 3.23 tree to get latest bug fixes
BitKeeper/etc/logging_ok: auto-union sql/item_func.cc: Auto merged mysql-test/t/user_var.test: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/nt_servc.cc: Auto merged configure.in: Use local version innobase/os/os0file.c: Use local version innobase/page/page0page.c: Use local version innobase/row/row0sel.c: Use local version innobase/row/row0vers.c: Use local version mysql-test/r/order_by.result: Use local version mysql-test/r/user_var.result: merge with 3.23 mysql-test/t/order_by.test: Use local version (test is already in range.test) sql/log.cc: Use local version sql/share/spanish/errmsg.txt: merge sql/slave.cc: Use local version sql/sql_class.h: Use local version sql/sql_select.cc: Use patch in 4.0 for range with NULL problem
Diffstat (limited to 'sql')
-rw-r--r--sql/item_func.cc1
-rw-r--r--sql/log_event.cc4
-rw-r--r--sql/log_event.h20
-rw-r--r--sql/share/spanish/errmsg.txt16
-rw-r--r--sql/sql_select.cc2
5 files changed, 34 insertions, 9 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 23bec0c3c81..8e9677cc459 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1830,6 +1830,7 @@ bool Item_func_set_user_var::fix_fields(THD *thd,TABLE_LIST *tables)
if (Item_func::fix_fields(thd,tables) ||
!(entry= get_variable(&thd->user_vars, name, 1)))
return 1;
+ entry->type= cached_result_type;
entry->update_query_id=thd->query_id;
return 0;
}
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 53289888242..ae4a429e35f 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -724,7 +724,9 @@ void Start_log_event::print(FILE* file, bool short_form, char* last_db)
print_header(file);
fprintf(file, "\tStart: binlog v %d, server v %s created ", binlog_version,
server_version);
- print_timestamp(file, &created);
+ print_timestamp(file);
+ if (created)
+ fprintf(file," at startup");
fputc('\n', file);
fflush(file);
}
diff --git a/sql/log_event.h b/sql/log_event.h
index 4b32894d787..a55efffa319 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -452,6 +452,26 @@ extern char server_version[SERVER_VERSION_LENGTH];
class Start_log_event: public Log_event
{
public:
+ /*
+ If this event is at the start of the first binary log since server startup
+ 'created' should be the timestamp when the event (and the binary log) was
+ created.
+ In the other case (i.e. this event is at the start of a binary log created
+ by FLUSH LOGS or automatic rotation), 'created' should be 0.
+ This "trick" is used by MySQL >=4.0.14 slaves to know if they must drop the
+ stale temporary tables or not.
+ Note that when 'created'!=0, it is always equal to the event's timestamp;
+ indeed Start_log_event is written only in log.cc where the first
+ constructor below is called, in which 'created' is set to 'when'.
+ So in fact 'created' is a useless variable. When it is 0
+ we can read the actual value from timestamp ('when') and when it is
+ non-zero we can read the same value from timestamp ('when'). Conclusion:
+ - we use timestamp to print when the binlog was created.
+ - we use 'created' only to know if this is a first binlog or not.
+ In 3.23.57 we did not pay attention to this identity, so mysqlbinlog in
+ 3.23.57 does not print 'created the_date' if created was zero. This is now
+ fixed.
+ */
time_t created;
uint16 binlog_version;
char server_version[ST_SERVER_VER_LEN];
diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt
index d566642f1c9..c8e33325786 100644
--- a/sql/share/spanish/errmsg.txt
+++ b/sql/share/spanish/errmsg.txt
@@ -212,14 +212,14 @@
"Bloqueos de actualización no pueden ser adqueridos durante una transición READ UNCOMMITTED",
"DROP DATABASE no permitido mientras un thread está ejerciendo un bloqueo de lectura global",
"CREATE DATABASE no permitido mientras un thread está ejerciendo un bloqueo de lectura global",
-"Wrong arguments to %s",
-"%-.32s@%-.64s is not allowed to create new users",
-"Incorrect table definition; All MERGE tables must be in the same database",
-"Deadlock found when trying to get lock; Try restarting transaction",
-"The used table type doesn't support FULLTEXT indexes",
-"Cannot add foreign key constraint",
-"Cannot add a child row: a foreign key constraint fails",
-"Cannot delete a parent row: a foreign key constraint fails",
+"Argumentos errados para %s",
+"%-.32s@%-.64s no es permitido para crear nuevos usuarios",
+"Incorrecta definición de la tabla; Todas las tablas MERGE deben estar en el mismo banco de datos",
+"Encontrado deadlock cuando tentando obtener el bloqueo; Tente recomenzar la transición",
+"El tipo de tabla usada no soporta índices FULLTEXT",
+"No puede adicionar clave extranjera constraint",
+"No puede adicionar una línea hijo: falla de clave extranjera constraint",
+"No puede deletar una línea padre: falla de clave extranjera constraint",
"Error de coneccion a master: %-128s",
"Error executando el query en master: %-128%",
"Error de %s: %-128%",
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 9c31064cd27..14e1bebbc4a 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -5961,6 +5961,8 @@ create_sort_index(JOIN_TAB *tab, ORDER *order, ha_rows filesort_limit,
/*
We have a ref on a const; Change this to a range that filesort
can use.
+ For impossible ranges (like when doing a lookup on NULL on a NOT NULL
+ field, quick will contain an empty record set.
*/
if (!(select->quick=get_ft_or_quick_select_for_ref(table, tab)))
goto err;