From c99c44805c4104ad885e93a55b0986abfbb1e122 Mon Sep 17 00:00:00 2001 From: "lars@mysql.com" <> Date: Thu, 24 Feb 2005 17:25:06 +0100 Subject: [PATCH 1/4] Fix of an incorrect merge --- mysql-test/r/rpl_insert_id.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/rpl_insert_id.result b/mysql-test/r/rpl_insert_id.result index 514ab60dafe..8482f631553 100644 --- a/mysql-test/r/rpl_insert_id.result +++ b/mysql-test/r/rpl_insert_id.result @@ -72,4 +72,4 @@ SET TIMESTAMP=1000000000; CREATE TABLE t1 ( a INT UNIQUE ); SET FOREIGN_KEY_CHECKS=0; INSERT INTO t1 VALUES (1),(1); -Duplicate entry '1' for key 1 +ERROR 23000: Duplicate entry '1' for key 1 From 05eb8af434950a66dd0e3b5416d85b3c008e5c57 Mon Sep 17 00:00:00 2001 From: "ramil@mysql.com" <> Date: Thu, 24 Feb 2005 20:55:20 +0400 Subject: [PATCH 2/4] fixed compilation failure affects build without InnoDB --- sql/mysql_priv.h | 6 ++++++ sql/sql_parse.cc | 10 ++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 7c625c208e1..2d4a1c3a0ad 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -171,6 +171,12 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset; #define FLUSH_TIME 0 /* Don't flush tables */ #define MAX_CONNECT_ERRORS 10 // errors before disabling host +#ifdef HAVE_INNOBASE_DB +#define IF_INNOBASE_DB(A, B) (A) +#else +#define IF_INNOBASE_DB(A, B) (B) +#endif + #if defined(__WIN__) || defined(OS2) #define IF_WIN(A,B) (A) #undef FLUSH_TIME diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6e28f5bcefb..9a78daa1479 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1810,9 +1810,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd, TABLE_LIST table_list; LEX_STRING conv_name; /* Saved variable value */ -#ifdef HAVE_INNOBASE_DB - my_bool old_innodb_table_locks= thd->variables.innodb_table_locks; -#endif + my_bool old_innodb_table_locks= + IF_INNOBASE_DB(thd->variables.innodb_table_locks, FALSE); statistic_increment(thd->status_var.com_stat[SQLCOM_SHOW_FIELDS], @@ -2336,9 +2335,8 @@ mysql_execute_command(THD *thd) /* Locked closure of all tables */ TABLE_LIST *locked_tables= NULL; /* Saved variable value */ -#ifdef HAVE_INNOBASE_DB - my_bool old_innodb_table_locks= thd->variables.innodb_table_locks; -#endif + my_bool old_innodb_table_locks= + IF_INNOBASE_DB(thd->variables.innodb_table_locks, FALSE); DBUG_ENTER("mysql_execute_command"); thd->net.no_send_error= 0; From 91d1cf4931cbb4697bc5a2ac2744a803af29cf9c Mon Sep 17 00:00:00 2001 From: "guilhem@mysql.com" <> Date: Thu, 24 Feb 2005 19:13:55 +0100 Subject: [PATCH 3/4] Fix for BUG#8783 kill.test must always sleep 2 seconds, even if mysql-test-run runs with --sleep=10; otherwise GET_LOCK() times out before being killed so we get 0 instead of NULL. Verified that it works on our powermacg5 where the test was failing. --- mysql-test/t/kill.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index c8adff32eb7..8a9d96d4946 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -44,7 +44,7 @@ select get_lock("a", 10); connection con2; let $ID= `select connection_id()`; send select get_lock("a", 10); --- sleep 2 +--real_sleep 2; connection con1; disable_query_log; eval kill query $ID; From b6ed75e9a9a125e3e6754f60bd9d0020c1db063d Mon Sep 17 00:00:00 2001 From: "brian@zim.(none)" <> Date: Thu, 24 Feb 2005 12:42:06 -0800 Subject: [PATCH 4/4] Solved bug 8691. Funny sometimes how things work when in reality you would think it would crash pretty hard :) --- sql/examples/ha_archive.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc index 98ed65fc786..e0c9173f8da 100644 --- a/sql/examples/ha_archive.cc +++ b/sql/examples/ha_archive.cc @@ -575,7 +575,7 @@ error: int ha_archive::write_row(byte * buf) { z_off_t written; - uint *ptr, *end; + uint *bptr, *end; DBUG_ENTER("ha_archive::write_row"); if (share->crashed) @@ -596,16 +596,16 @@ int ha_archive::write_row(byte * buf) We should probably mark the table as damagaged if the record is written but the blob fails. */ - for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ; - ptr != end ; - ptr++) + for (bptr= table->s->blob_field, end=bptr + table->s->blob_fields ; + bptr != end ; + bptr++) { char *ptr; - uint32 size= ((Field_blob*) table->field[*ptr])->get_length(); + uint32 size= ((Field_blob*) table->field[*bptr])->get_length(); if (size) { - ((Field_blob*) table->field[*ptr])->get_ptr(&ptr); + ((Field_blob*) table->field[*bptr])->get_ptr(&ptr); written= gzwrite(share->archive_write, ptr, (unsigned)size); if (written != size) goto error;