Commit 10ef77fc authored by unknown's avatar unknown

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


libmysqld/lib_sql.cc:
  Fixed failing func_misc test for embedded server
mysql-test/mysql-test-run.pl:
  Shut first down slaves, then masters.
  This should avoid some errors in the log file about not being able to connect to master during shutdown
mysql-test/r/func_misc.result:
  Move DROP TABLE's first
mysql-test/r/status.result:
  Removed Table_locks_immediate as it's depending on log file cacheing
mysql-test/suite/ndb/r/ndb_binlog_basic.result:
  Removed testing if purger master logs succeded as this is not deterministic
mysql-test/suite/ndb/t/ndb_binlog_basic.test:
  Removed testing if purger master logs succeded as this is not deterministic
mysql-test/t/func_misc.test:
  Move DROP TABLE's first
mysql-test/t/status.test:
  Removed Table_locks_immediate as it's depending on log file cacheing
sql/log_event.cc:
  Added cast to avoid warnings
sql/log_event.h:
  Changed type of get_time() to avoid warnings
parent c492a239
......@@ -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())
......
......@@ -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'} )
{
......
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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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());
......
......@@ -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;
......
......@@ -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
......
......@@ -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))
......
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