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
parent f07738ca
...@@ -567,7 +567,7 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag) ...@@ -567,7 +567,7 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag)
void *create_embedded_thd(int client_flag) void *create_embedded_thd(int client_flag)
{ {
THD * thd= new THD; THD * thd= new THD;
thd->thread_id= thread_id++; thd->thread_id= thd->variables.pseudo_thread_id= thread_id++;
thd->thread_stack= (char*) &thd; thd->thread_stack= (char*) &thd;
if (thd->store_globals()) if (thd->store_globals())
......
...@@ -4162,7 +4162,7 @@ sub stop_all_servers () { ...@@ -4162,7 +4162,7 @@ sub stop_all_servers () {
my $pid; my $pid;
# Start shutdown of all started masters # Start shutdown of all started masters
foreach my $mysqld (@{$master}, @{$slave}) foreach my $mysqld (@{$slave}, @{$master})
{ {
if ( $mysqld->{'pid'} ) if ( $mysqld->{'pid'} )
{ {
......
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); 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) 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 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) ); ...@@ -56,7 +57,6 @@ select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) );
a a
2004-01-06 12:34:00 2004-01-06 12:34:00
drop table t1; drop table t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (conn CHAR(7), connection_id INT); CREATE TABLE t1 (conn CHAR(7), connection_id INT);
INSERT INTO t1 VALUES ('default', CONNECTION_ID()); INSERT INTO t1 VALUES ('default', CONNECTION_ID());
SELECT GET_LOCK('bug16501',600); SELECT GET_LOCK('bug16501',600);
......
...@@ -16,13 +16,11 @@ unlock tables; ...@@ -16,13 +16,11 @@ unlock tables;
lock tables t1 read; lock tables t1 read;
update t1 set n = 3; update t1 set n = 3;
unlock tables; unlock tables;
show status like 'Table_lock%'; show status like 'Table_locks_waited%';
Variable_name Value Variable_name Value
Table_locks_immediate 17
Table_locks_waited 1 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 VARIABLE_NAME VARIABLE_VALUE
TABLE_LOCKS_IMMEDIATE 18
TABLE_LOCKS_WAITED 1 TABLE_LOCKS_WAITED 1
drop table t1; drop table t1;
select 1; select 1;
......
...@@ -31,9 +31,6 @@ inserts updates deletes ...@@ -31,9 +31,6 @@ inserts updates deletes
2 1 1 2 1 1
flush logs; flush logs;
purge master logs before now(); 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 table t1 (a int primary key, b int) engine=ndb;
create database mysqltest; create database mysqltest;
use mysqltest; use mysqltest;
......
...@@ -46,10 +46,18 @@ select inserts,updates,deletes from ...@@ -46,10 +46,18 @@ select inserts,updates,deletes from
# #
# check that purge clears the ndb_binlog_index # 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; flush logs;
--sleep 1 --sleep 1
purge master logs before now(); purge master logs before now();
--disable_parsing
select count(*) from mysql.ndb_binlog_index; select count(*) from mysql.ndb_binlog_index;
--enable_parsing
# #
# several tables in different databases # several tables in different databases
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
# Testing of misc functions # 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 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")); select inet_ntoa(inet_aton("255.255.255.255.255.255.255.255"));
...@@ -48,9 +52,6 @@ drop table t1; ...@@ -48,9 +52,6 @@ drop table t1;
# #
# Bug#16501: IS_USED_LOCK does not appear to work # 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); CREATE TABLE t1 (conn CHAR(7), connection_id INT);
INSERT INTO t1 VALUES ('default', CONNECTION_ID()); INSERT INTO t1 VALUES ('default', CONNECTION_ID());
......
...@@ -33,8 +33,8 @@ let $wait_condition= select 1 from INFORMATION_SCHEMA.PROCESSLIST where ID = $ID ...@@ -33,8 +33,8 @@ let $wait_condition= select 1 from INFORMATION_SCHEMA.PROCESSLIST where ID = $ID
unlock tables; unlock tables;
connection con1; connection con1;
reap; reap;
show status like 'Table_lock%'; show status like 'Table_locks_waited%';
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%';
drop table t1; drop table t1;
disconnect con2; disconnect con2;
......
...@@ -692,7 +692,7 @@ bool Log_event::write_header(IO_CACHE* file, ulong event_data_length) ...@@ -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; 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 Header will be of size LOG_EVENT_HEADER_LEN for all events, except for
......
...@@ -774,11 +774,11 @@ class Log_event ...@@ -774,11 +774,11 @@ class Log_event
{ return 0; } { return 0; }
virtual bool write_data_body(IO_CACHE* file __attribute__((unused))) virtual bool write_data_body(IO_CACHE* file __attribute__((unused)))
{ return 0; } { return 0; }
inline ulong get_time() inline time_t get_time()
{ {
THD *tmp_thd; THD *tmp_thd;
if (when) if (when)
return (ulong) when; return when;
if (thd) if (thd)
return thd->start_time; return thd->start_time;
if ((tmp_thd= current_thd)) if ((tmp_thd= current_thd))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment