summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/join.result3
-rw-r--r--mysql-test/t/join.test14
-rw-r--r--mysql-test/t/rpl_alter.test22
-rw-r--r--mysys/charset.c2
-rw-r--r--sql/ha_innodb.cc2
-rw-r--r--sql/log_event.cc2
-rw-r--r--sql/log_event.h4
-rw-r--r--sql/mysqld.cc5
8 files changed, 36 insertions, 18 deletions
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index 3211dcf76a9..1b5766e3ab4 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -273,6 +273,9 @@ cust 20
SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith';
rate_code base_rate
cust 20
+ID Value1 ID Value2
+ID Value1 ID Value2
+ID Value1 ID Value2
drop table t1,t2;
create table t1 (i int);
create table t2 (i int);
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index 7a9868e60ef..08cc5731723 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -273,6 +273,20 @@ SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (site
drop table t1,t2;
#
+# Problem with internal list handling when reducing WHERE
+#
+
+CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, Value1 VARCHAR(255));
+CREATE TABLE t2 (ID INTEGER NOT NULL PRIMARY KEY, Value2 VARCHAR(255));
+INSERT INTO t1 VALUES (1, 'A');
+INSERT INTO t2 VALUES (1, 'B');
+
+SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND (Value1 = 'A' AND Value2 <> 'B');
+SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND Value1 = 'A' AND Value2 <> 'B';
+SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1;
+drop table t1,t2;
+
+#
# Test combination of join methods
#
diff --git a/mysql-test/t/rpl_alter.test b/mysql-test/t/rpl_alter.test
index 710dd2d09d6..f1fbf60776b 100644
--- a/mysql-test/t/rpl_alter.test
+++ b/mysql-test/t/rpl_alter.test
@@ -1,19 +1,19 @@
source include/master-slave.inc;
-drop database if exists d1;
-create database d1;
-create table d1.t1 ( n int);
-alter table d1.t1 add m int;
-insert into d1.t1 values (1,2);
-create table d1.t2 (n int);
-insert into d1.t2 values (45);
-rename table d1.t2 to d1.t3, d1.t1 to d1.t2;
+drop database if exists test_$1;
+create database test_$1;
+create table test_$1.t1 ( n int);
+alter table test_$1.t1 add m int;
+insert into test_$1.t1 values (1,2);
+create table test_$1.t2 (n int);
+insert into test_$1.t2 values (45);
+rename table test_$1.t2 to test_$1.t3, test_$1.t1 to test_$1.t2;
save_master_pos;
connection slave;
sync_with_master;
-select * from d1.t2;
-select * from d1.t3;
+select * from test_$1.t2;
+select * from test_$1.t3;
connection master;
-drop database d1;
+drop database test_$1;
save_master_pos;
connection slave;
sync_with_master;
diff --git a/mysys/charset.c b/mysys/charset.c
index 235fcb08023..0a76cf86a54 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -77,7 +77,7 @@ static my_bool get_word(struct simpleconfig_buf_st *fb, char *buf)
endptr = fb->buf;
}
- while (!isspace(*endptr))
+ while (*endptr && !isspace(*endptr))
*buf++= *endptr++;
*buf=0;
fb->p = endptr;
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 1363227605e..e0a3a69c819 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -100,7 +100,7 @@ char* innobase_unix_file_flush_method = NULL;
/* Below we have boolean-valued start-up parameters, and their default
values */
-uint innobase_flush_log_at_trx_commit = 0;
+uint innobase_flush_log_at_trx_commit = 1;
my_bool innobase_log_archive = FALSE;
my_bool innobase_use_native_aio = FALSE;
my_bool innobase_fast_shutdown = TRUE;
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 05d5788f5ae..bbea89bfd3f 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -717,7 +717,7 @@ 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, (time_t*)&created);
+ print_timestamp(file, &created);
fputc('\n', file);
fflush(file);
}
diff --git a/sql/log_event.h b/sql/log_event.h
index b46f78d2ce0..4b32894d787 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -452,14 +452,14 @@ extern char server_version[SERVER_VERSION_LENGTH];
class Start_log_event: public Log_event
{
public:
- uint32 created;
+ time_t created;
uint16 binlog_version;
char server_version[ST_SERVER_VER_LEN];
#ifndef MYSQL_CLIENT
Start_log_event() :Log_event(), binlog_version(BINLOG_VERSION)
{
- created = (uint32) when;
+ created = (time_t) when;
memcpy(server_version, ::server_version, ST_SERVER_VER_LEN);
}
void pack_info(String* packet);
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 211237b8443..fc2baf5784c 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1694,9 +1694,10 @@ extern "C" void *signal_hand(void *arg __attribute__((unused)))
/*
Setup alarm handler
- The two extra handlers are for slave threads
+ This should actually be '+ max_number_of_slaves' instead of +10,
+ but the +10 should be quite safe.
*/
- init_thr_alarm(max_connections+max_insert_delayed_threads+2);
+ init_thr_alarm(max_connections+max_insert_delayed_threads+10);
#if SIGINT != THR_KILL_SIGNAL
(void) sigemptyset(&set); // Setup up SIGINT for debug
(void) sigaddset(&set,SIGINT); // For debugging