diff options
author | monty@mysql.com/narttu.mysql.fi <> | 2007-08-16 16:47:31 +0300 |
---|---|---|
committer | monty@mysql.com/narttu.mysql.fi <> | 2007-08-16 16:47:31 +0300 |
commit | 9b6b53f0d0d747e47a707d7c579b9e2b66020ed3 (patch) | |
tree | f9598e9e8fe756a0c983e7674d577a97dc2f85f9 | |
parent | f07738caac5497de8c896670e9ea53dc5c1e5fbe (diff) | |
download | mariadb-git-9b6b53f0d0d747e47a707d7c579b9e2b66020ed3.tar.gz |
Fixed errors found by pushbuild:
Fixed failing func_misc test for embedded server
Added casts to avoid compiler warnings
Removed Table_locks_immediate as it's depending on log file cacheing
Changed type of get_time() to avoid warnings
Removed testing if purger master logs succeded as this is not deterministic
-rw-r--r-- | libmysqld/lib_sql.cc | 2 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 | ||||
-rw-r--r-- | mysql-test/r/func_misc.result | 2 | ||||
-rw-r--r-- | mysql-test/r/status.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/ndb/r/ndb_binlog_basic.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/ndb/t/ndb_binlog_basic.test | 8 | ||||
-rw-r--r-- | mysql-test/t/func_misc.test | 7 | ||||
-rw-r--r-- | mysql-test/t/status.test | 4 | ||||
-rw-r--r-- | sql/log_event.cc | 2 | ||||
-rw-r--r-- | sql/log_event.h | 4 |
10 files changed, 22 insertions, 18 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 4a8387e9944..42d2752f6e1 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -567,7 +567,7 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag) void *create_embedded_thd(int client_flag) { THD * thd= new THD; - thd->thread_id= thread_id++; + thd->thread_id= thd->variables.pseudo_thread_id= thread_id++; thd->thread_stack= (char*) &thd; if (thd->store_globals()) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 22b9499c37a..1c74df53b48 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4162,7 +4162,7 @@ sub stop_all_servers () { my $pid; # Start shutdown of all started masters - foreach my $mysqld (@{$master}, @{$slave}) + foreach my $mysqld (@{$slave}, @{$master}) { if ( $mysqld->{'pid'} ) { diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 86b237d9afe..447d5620a4d 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -1,3 +1,4 @@ +DROP TABLE IF EXISTS t1; select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.55555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2); format(1.5555,0) format(123.5555,1) format(1234.5555,2) format(12345.55555,3) format(123456.5555,4) format(1234567.5555,5) format("12345.2399",2) 2 123.6 1,234.56 12,345.556 123,456.5555 1,234,567.55550 12,345.24 @@ -56,7 +57,6 @@ select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) ); a 2004-01-06 12:34:00 drop table t1; -DROP TABLE IF EXISTS t1; CREATE TABLE t1 (conn CHAR(7), connection_id INT); INSERT INTO t1 VALUES ('default', CONNECTION_ID()); SELECT GET_LOCK('bug16501',600); diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result index 8f10625744b..cf35781d008 100644 --- a/mysql-test/r/status.result +++ b/mysql-test/r/status.result @@ -16,13 +16,11 @@ unlock tables; lock tables t1 read; update t1 set n = 3; unlock tables; -show status like 'Table_lock%'; +show status like 'Table_locks_waited%'; Variable_name Value -Table_locks_immediate 17 Table_locks_waited 1 -select * from information_schema.session_status where variable_name like 'Table_lock%'; +select * from information_schema.session_status where variable_name like 'Table_locks_waited%'; VARIABLE_NAME VARIABLE_VALUE -TABLE_LOCKS_IMMEDIATE 18 TABLE_LOCKS_WAITED 1 drop table t1; select 1; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_basic.result b/mysql-test/suite/ndb/r/ndb_binlog_basic.result index 931d01dbebe..09edd78bdb3 100644 --- a/mysql-test/suite/ndb/r/ndb_binlog_basic.result +++ b/mysql-test/suite/ndb/r/ndb_binlog_basic.result @@ -31,9 +31,6 @@ inserts updates deletes 2 1 1 flush logs; purge master logs before now(); -select count(*) from mysql.ndb_binlog_index; -count(*) -0 create table t1 (a int primary key, b int) engine=ndb; create database mysqltest; use mysqltest; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_basic.test b/mysql-test/suite/ndb/t/ndb_binlog_basic.test index 0f63ced0697..4d8b7a8b127 100644 --- a/mysql-test/suite/ndb/t/ndb_binlog_basic.test +++ b/mysql-test/suite/ndb/t/ndb_binlog_basic.test @@ -46,10 +46,18 @@ select inserts,updates,deletes from # # check that purge clears the ndb_binlog_index # +# TODO: make this deterministic +# This test is disabled until we can make this determistic under load. +# The problem is that in some cases, the binlog writing thread gets +# scheduled after the purge, writes pending things, then the select +# gets scheduled +# flush logs; --sleep 1 purge master logs before now(); +--disable_parsing select count(*) from mysql.ndb_binlog_index; +--enable_parsing # # several tables in different databases diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 9e0e6b9caf9..a48f619dc34 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -2,6 +2,10 @@ # Testing of misc functions # +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.55555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2); select inet_ntoa(inet_aton("255.255.255.255.255.255.255.255")); @@ -48,9 +52,6 @@ drop table t1; # # Bug#16501: IS_USED_LOCK does not appear to work # ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings CREATE TABLE t1 (conn CHAR(7), connection_id INT); INSERT INTO t1 VALUES ('default', CONNECTION_ID()); diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 9fd54d4766d..c16b22c035c 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -33,8 +33,8 @@ let $wait_condition= select 1 from INFORMATION_SCHEMA.PROCESSLIST where ID = $ID unlock tables; connection con1; reap; -show status like 'Table_lock%'; -select * from information_schema.session_status where variable_name like 'Table_lock%'; +show status like 'Table_locks_waited%'; +select * from information_schema.session_status where variable_name like 'Table_locks_waited%'; drop table t1; disconnect con2; diff --git a/sql/log_event.cc b/sql/log_event.cc index b5f83d393d9..f71d1bb3622 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -692,7 +692,7 @@ bool Log_event::write_header(IO_CACHE* file, ulong event_data_length) log_pos= my_b_safe_tell(file)+data_written; } - now= get_time(); // Query start time + now= (ulong) get_time(); // Query start time /* Header will be of size LOG_EVENT_HEADER_LEN for all events, except for diff --git a/sql/log_event.h b/sql/log_event.h index 33f94f7ab22..05854c2195c 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -774,11 +774,11 @@ public: { return 0; } virtual bool write_data_body(IO_CACHE* file __attribute__((unused))) { return 0; } - inline ulong get_time() + inline time_t get_time() { THD *tmp_thd; if (when) - return (ulong) when; + return when; if (thd) return thd->start_time; if ((tmp_thd= current_thd)) |