[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (igor:2755)
#At lp:maria based on revid:i...@askmonty.org-20090925064243-2kf7ah4m6u25ex58 2755 Igor Babaev 2009-09-24 [merge] Merge modified: mysql-test/r/create.result mysql-test/r/information_schema.result mysql-test/t/information_schema.test mysql-test/t/not_embedded_server.test sql/sql_show.cc === modified file 'mysql-test/r/create.result' --- a/mysql-test/r/create.result2009-09-07 20:50:10 + +++ b/mysql-test/r/create.result2009-09-23 11:03:47 + @@ -1749,7 +1749,8 @@ t1CREATE TABLE `t1` ( `COMMAND` varchar(16) NOT NULL DEFAULT '', `TIME` int(7) NOT NULL DEFAULT '0', `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000' ) DEFAULT CHARSET=utf8 drop table t1; create temporary table t1 like information_schema.processlist; @@ -1763,7 +1764,8 @@ t1CREATE TEMPORARY TABLE `t1` ( `COMMAND` varchar(16) NOT NULL DEFAULT '', `TIME` int(7) NOT NULL DEFAULT '0', `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000' ) DEFAULT CHARSET=utf8 drop table t1; create table t1 like information_schema.character_sets; === modified file 'mysql-test/r/information_schema.result' --- a/mysql-test/r/information_schema.result2009-09-07 20:50:10 + +++ b/mysql-test/r/information_schema.result2009-09-23 11:03:47 + @@ -1380,6 +1380,17 @@ select user,db from information_schema.p user db user3148 test drop user user3...@localhost; +SELECT 'other connection here' AS who; +who +other connection here +SELECT IF(`time` > 0, 'OK', `time`) AS time_low, +IF(`time` < 1000, 'OK', `time`) AS time_high, +IF(time_ms > 900, 'OK', time_ms) AS time_ms_low, +IF(time_ms < 100, 'OK', time_ms) AS time_ms_high +FROM INFORMATION_SCHEMA.PROCESSLIST +WHERE i...@tid; +time_low time_high time_ms_low time_ms_high +OK OK OK OK DROP TABLE IF EXISTS server_status; DROP EVENT IF EXISTS event_status; SET GLOBAL event_scheduler=1; @@ -1602,8 +1613,7 @@ CREATE_OPTIONS key_block_size=1 DROP TABLE t1; SET TIMESTAMP=@@TIMESTAMP + 1000; -SELECT 'OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; +SELECT 'NOT_OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; TEST_RESULT -OK SET TIMESTAMP=DEFAULT; End of 5.1 tests. === modified file 'mysql-test/t/information_schema.test' --- a/mysql-test/t/information_schema.test 2009-09-07 20:50:10 + +++ b/mysql-test/t/information_schema.test 2009-09-23 11:03:47 + @@ -1099,6 +1099,25 @@ disconnect con3148; drop user user3...@localhost; # +# `time` and `time_ms` columns of INFORMATION_SCHEMA.PROCESSLIST. +# +connect (pslistcon,localhost,root,,test); +let $ID= `select connection_id()`; +SELECT 'other connection here' AS who; +connection default; +sleep 1; +--disable_query_log +eval SET @tid=$ID; +--enable_query_log +SELECT IF(`time` > 0, 'OK', `time`) AS time_low, + IF(`time` < 1000, 'OK', `time`) AS time_high, + IF(time_ms > 900, 'OK', time_ms) AS time_ms_low, + IF(time_ms < 100, 'OK', time_ms) AS time_ms_high + FROM INFORMATION_SCHEMA.PROCESSLIST + WHERE i...@tid; +disconnect pslistcon; + +# # Bug#26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS # in Event (see also openssl_1.test) # @@ -1352,9 +1371,16 @@ DROP TABLE t1; # Bug #22047: Time in SHOW PROCESSLIST for SQL thread in replication seems # to become negative # +# Note that at the time of writing, MariaDB differs in behaviour from MySQL on +# the `time` column. In MySQL this changes depending on the setting of +# @TIMESTAMP, which is contrary to the documented (and sensible) behaviour. +# In MariaDB, the `time` column is independent of @TIMESTAMP. +# (The rationale for this is to keep `time` and `time_ms` consistent; +# @TIMESTAMP has no microsecond precision). +# SET TIMESTAMP=@@TIMESTAMP + 1000; -SELECT 'OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; +SELECT 'NOT_OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; SET TIMESTAMP=DEFAULT; --echo End of 5.1 tests. === modified file 'mysql-test/t/not_embedded_server.test' --- a/mysql-test/t/not_embedded_server.test 2009-04-30 10:29:19 + +++ b/mysql-test/t/not_embedded_server.test 2009-09-23 11:03:47 + @@ -32,7 +32,7 @@ select 1; ## End of 4.1 tests # #prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' '; -#--replace_column 1 number 6 time 3 localhost +#--replace_column 1 number 6 time 3 localhost 9 time_ms #execute stmt1; #deallocate prepare stmt1; === modified file 'sql/sql_show.cc' --- a/sql/sql_show.cc 2009-09-15 10:46:35 + +++ b/sql/sql_show.cc 2009-09-23 11:03:47 + @@ -1819,7 +1819,7 @@ int fill_schema_processlist(THD* thd, TA TABLE *table= tables->table; CHARSET_INFO *cs= system_charset_info; c
[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (igor:2754)
#At lp:maria based on revid:i...@askmonty.org-20090920030226-xxh7a4i3gre9rqhe 2754 Igor Babaev 2009-09-24 Took care of mysql test suite failures on Windows. modified: mysql-test/suite/rpl/t/rpl_binlog_corruption.test mysql-test/suite/rpl/t/rpl_killed_ddl.test vio/viosocket.c per-file messages: mysql-test/suite/rpl/t/rpl_binlog_corruption.test Disabled the test for Windows (see bug #47639) mysql-test/suite/rpl/t/rpl_killed_ddl.test Disabled the test for Windows (see bug #47638) vio/viosocket.c Added an implementation of vio_poll_read for Windows. Winsock does not support the poll function. So the existing generic implementation of vio_poll_read could not be used for Windows. === modified file 'mysql-test/suite/rpl/t/rpl_binlog_corruption.test' --- a/mysql-test/suite/rpl/t/rpl_binlog_corruption.test 2009-04-15 11:43:17 + +++ b/mysql-test/suite/rpl/t/rpl_binlog_corruption.test 2009-09-25 06:42:43 + @@ -15,6 +15,9 @@ # BUG#31793: log event corruption causes crash # BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event +# Temporarily disabled on Windows due to bug #47639 +--source include/not_windows.inc + source include/have_log_bin.inc; # BUG#40482 only manifested itself in debug-compiled binaries. source include/have_debug.inc; === modified file 'mysql-test/suite/rpl/t/rpl_killed_ddl.test' --- a/mysql-test/suite/rpl/t/rpl_killed_ddl.test2009-04-08 23:42:51 + +++ b/mysql-test/suite/rpl/t/rpl_killed_ddl.test2009-09-25 06:42:43 + @@ -31,6 +31,9 @@ # - BUG#25705 # - BUG#44171 +# Temporarily disabled on Windows due to bug #47638 +--source include/not_windows.inc + source include/have_debug.inc; source include/master-slave.inc; === modified file 'vio/viosocket.c' --- a/vio/viosocket.c 2009-09-07 20:50:10 + +++ b/vio/viosocket.c 2009-09-25 06:42:43 + @@ -361,7 +361,20 @@ void vio_in_addr(Vio *vio, struct in_add my_bool vio_poll_read(Vio *vio,uint timeout) { #ifndef HAVE_POLL +#if __WIN__ + int res; + struct fd_set fds; + struct timeval tv; + DBUG_ENTER("vio_poll"); + fds.fd_count= 1; + fds.fd_array[0]= vio->sd; + tv.tv_sec= timeout; + tv.tv_usec= 0; + res= select(1, &fds, NULL, NULL, &tv) ? 0 : 1; + DBUG_RETURN(res); +#else return 0; +#endif #else struct pollfd fds; int res; ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
[Maria-developers] WL40: Notes/questions
With WL36 and WL40 we have: mysqlbinlog options: --database=db --rewrite-db=db_from->db_to --do-table=db.tbl --ignore-table=db.tbl --wild-do-table=pattern.pattern --wild-ignore-table=pattern.pattern replication options: --replicate-rewrite-db=db_from->db_to --replicate-do-db=db --replicate-ignore-db=db --replicate-do-table=tbl --replicate-ignore-table=tbl --replicate-wild-do-table=db.tbl --replicate-wild-ignore-table=db.tbl 1. In mysqlbinlog we do not have --do_db and --ignore_db options. Does it mean that instead it is supposed to use: --replicate-wild-do-table=db.% --replicate-wild-ignore-table=db.% respectively? Compared with other options, --database option looks like a "foreign body" : - contrary to other options, it allows to specify only one database (with multiple --database's only the last one is used); - having with --database an analog of do_db, we have no similar analog of ignore_db. 2. In replication two functions are used for filtering databases: - db_ok(const char* db) which matches db only with do-db and ignore-db rules; - db_ok_with_wild_table(const char* db) which matches db only with wild-do-table=db.% and wild-ignore-table=db.% rules. This function is applied only to CREATE DB, DROP DB, and ALTER DATABASE statements. In mysqlbinlog, should we follow the same scheme, namely: - db_ok() for matching db with --database option only; - db_ok_with_wild_table() for statements listed above? 3. According to replication filtering rules, --replicate-rewrite_db is always done _before_ other --replicate-* rules are tested; see explanation for --replicate-rewrite-db in RefMan (16.1.3.3. Replication Slave Options and Variables), or the following piece of code in og_event.cc: int Table_map_log_event::do_apply_event(Relay_log_info const* rli) { RPL_TABLE_LIST* table_list; ... strmov(table_list->db, rpl_filter->get_rewrite_db(m_dbnam, &dummy_len)); ... if (...!rpl_filter->db_ok(table_list->db) ...) ... } And what about --database + rewrite-db for mysqlbinlog? If we mean to output only database xxx with renaming it to yyy, should we use (1) mysqlbinlog --database=xxx --rewrite-db=xxx->yyy or (2) mysqlbinlog --database=yyy --rewrite-db=xxx->yyy In current WL36 design it is supposed that (1) should be used (surely, this can easily be redesigned). But this becomes confused with using of --wild-do-table + replication filtering rules, for which we should use: (3) --wild-do-table=yyy.% --rewrite-db=xxx->yyy ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
[Maria-developers] Information for release notes
Hi Daniel, Here is a rough changelog written from reading through bzr history. I took a dump of every commit in MariaDB that is not in MySQL 5.1.38, and wrote this summary of the changes. I don't have sufficient knowledge to parse through all of the Maria changes from before MariaDB started. Instead I wrote a generic entry for the Maria storage engine, and also added entries for what is already written (by Monty I think) on http://askmonty.org/wiki/index.php/MariaDB_versus_MySQL So this is probably the best shot we have at a complete list of relevant differences between MySQL and MariaDB. Do let me know if anyone finds anything missing or any errors. Daniel, I hope you can use this as the basis for the release notes. Maybe this list will also be useful for you to fill out the Manual on the Wiki. I am thinking you could check that all new features are documented, and add pages for those that are not. If not trivial, you could just make a stub page and ask on maria-developers@ for someone to fill them out? - Kristian. --- Generally: MariaDB-5.1.38-beta1 is based on MySQL-5.1.38, but has these additional features and bug fixes. Feature: mysql-test-run now has options --stop-file and --stop-keep-alive (also accessible with environment variables MTR_STOP_FILE and MTR_STOP_KEEP_ALIVE). With these, it is possible to pause a running test temporarily and let it continue later. Bug fix: mysqlslap: setting --engine does not get replicated http://bugs.mysql.com/bug.php?id=46967 mysqlslap: specifying --engine and --create does not work with --engine=: https://bugs.launchpad.net/maria/+bug/429773 Feature: Improvements to Gcov support in testing. Feature: New column TIME_MS in SHOW FULL PROCESSLIST and INFORMATION_SCHEMA.PROCESSLIST, similar to the old TIME column, but with microsecond resolution. Also fixes old TIME column to not be influenced by @TIMESTAMP. Patch by Percona. Bug fix: rpl_do_grant fails on PB-2 with a failing connect http://bugs.mysql.com/bug.php?id=47016 Bug fix: Windows: mysql-test-run --log-error fixed to not add --console. Bug fix: The myisam_crash_before_flush_keys test fails on Windows http://bugs.mysql.com/bug.php?id=47455 Bug fix: rpl.rpl_get_master_version_and_clock fails on hpux11.31 http://bugs.mysql.com/bug.php?id=46931 Bug fix: safe_process: FATAL ERROR, Unknown option: --nocore http://bugs.mysql.com/bug.php?id=46212 Feature: Optimizer improvement: Table elimination. http://askmonty.org/worklog/Server-Sprint/?tid=17 Bug fix: XtraDB crashes on startup on windows https://bugs.launchpad.net/maria/+bug/417751 Bug fix: Eliminate compiler warnings. Bug fix: Fix parsing of enum-valued options for plugins. https://bugs.launchpad.net/maria/+bug/423035 Feature: Enhancements to slow log. Includes details of execution plan and microsecond-precision resolution. Based on microslow patch by Percona. Feature: PBXT storage engine. PBXT is developed by PrimeBase Technologies, http://www.primebase.org/ Bug fix: Solaris build fixes. Feature: XtraDB storage engine as a replacement for the MySQL built-in InnoDB. XtraDB is based on the Oracle/Innobase InnoDB plugin version 1.0.3, with enhancements. XtraDB is developed by Percona. Feature: Performance improvements for common cases of character set conversion. Feature: Pool-of-threads, allowing to map a high number of simultaneous connections onto a lower number of operating system treads, to reduce overhead with using large number of threads. Feature: New handler call prepare_index_scan() and other small improvements to the internal storage engine handler API. Bug fix: query_cache_debug.test fails http://bugs.mysql.com/bug.php?id=45632 Bug fix: enum-style command-line options are not honoured (maria.maria-recover fails) http://bugs.mysql.com/bug.php?id=41010 Bug fix: mysql-test-run sometimes terminated mysqld early, causing loss of memory leak error reports from Valgrind and GCov test coverage output. http://bugs.mysql.com/bug.php?id=43418 Bug fix: Several Valgrind reported bugs in the source code fixed. Bug fix: Save SAFE_MUTEX configure #define in config.h, to facilitate correct build options for plugins. Feature: ./configure now outputs a summary section at the end of the output. (By C.J. Adams-Collier). Bug fix: test maria.maria fails if server built without '--with-partition' https://bugs.launchpad.net/maria/+bug/330611 Feature: NDB storage engine disabled in MariaDB builds. (NDB is not supported in MariaDB). Feature: Added --abort-source-on-error to the mysql client. Feature: Faster CHECKSUM TABLE. Feature: Debugging code to check for taking mutexes in the wrong order, which enables to ca
[Maria-developers] [Branch ~maria-captains/maria/5.1] Rev 2734: merge
Merge authors: Oleksandr "Sanja" Byelkin (sanja-byelkin) revno: 2734 [merge] committer: sa...@askmonty.org branch nick: work-maria-5.1-mysql-test-run-merge timestamp: Thu 2009-09-24 15:49:39 +0300 message: merge modified: mysql-test/lib/mtr_misc.pl mysql-test/mysql-test-run.pl -- lp:maria https://code.launchpad.net/~maria-captains/maria/5.1 Your team Maria developers is subscribed to branch lp:maria. To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription. === modified file 'mysql-test/lib/mtr_misc.pl' --- mysql-test/lib/mtr_misc.pl 2009-02-19 09:01:25 + +++ mysql-test/lib/mtr_misc.pl 2009-09-24 12:19:15 + @@ -174,4 +174,24 @@ select(undef, undef, undef, ($millis/1000)); } +sub mtr_wait_lock_file { + die "usage: mtr_wait_lock_file(path_to_file, keep_alive)" unless @_ == 2; + my ($file, $keep_alive)= @_; + my $waited= 0; + my $msg_counter= $keep_alive; + + while ( -e $file) + { +if ($keep_alive && !$msg_counter) +{ + print "\n-STOPPED- [pass] ".$keep_alive."\n"; + $msg_counter= $keep_alive; +} +mtr_milli_sleep(1000); +$waited= 1; +$msg_counter--; + } + return ($waited); +} + 1; === modified file 'mysql-test/mysql-test-run.pl' --- mysql-test/mysql-test-run.pl 2009-09-04 07:45:34 + +++ mysql-test/mysql-test-run.pl 2009-09-24 12:49:39 + @@ -253,6 +253,11 @@ my $opt_parallel= $ENV{MTR_PARALLEL} || 1; +# lock file to stop tests +my $opt_stop_file= $ENV{MTR_STOP_FILE}; +# print messages when test suite is stopped (for buildbot) +my $opt_stop_keep_alive= $ENV{MTR_STOP_KEEP_ALIVE}; + select(STDOUT); $| = 1; # Automatically flush STDOUT @@ -451,6 +456,15 @@ my $s= IO::Select->new(); $s->add($server); while (1) { +if ($opt_stop_file) +{ + if (mtr_wait_lock_file($opt_stop_file, $opt_stop_keep_alive)) + { +# We were waiting so restart timer process +$suite_timeout_proc->kill(); +$suite_timeout_proc= My::SafeProcess->timer(suite_timeout()); + } +} my @ready = $s->can_read(1); # Wake up once every second foreach my $sock (@ready) { if ($sock == $server) { @@ -933,6 +947,8 @@ 'warnings!'=> \$opt_warnings, 'timestamp'=> \&report_option, 'timediff' => \&report_option, + 'stop-file=s' => \$opt_stop_file, + 'stop-keep-alive=i'=> \$opt_stop_keep_alive, 'help|h' => \$opt_usage, 'list-options' => \$opt_list_options, @@ -5409,6 +5425,14 @@ warnings Scan the log files for warnings. Use --nowarnings to turn off. + stop-file=file(also MTR_STOP_FILE environment variable) if this +file detected mysql test will not start new tests +until the file will be removed. + stop-keep-alive=sec (also MTR_STOP_KEEP_ALIVE environment variable) +works with stop-file, print messages every sec +seconds when mysql test is waiting to removing +the file (for buildbot) + sleep=SECONDS Passed to mysqltest, will be used as fixed sleep time debug-sync-timeout=NUM Set default timeout for WAIT_FOR debug sync actions. Disable facility with NUM=0. ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
[Maria-developers] Rev 2734: merge in file:///Users/bell/maria/bzr/work-maria-5.1-mysql-test-run-merge/
At file:///Users/bell/maria/bzr/work-maria-5.1-mysql-test-run-merge/ revno: 2734 [merge] revision-id: sa...@askmonty.org-20090924124939-nwi2kr48x0as70n8 parent: ha...@askmonty.org-20090918193250-imuhuvjq1n21b01n parent: sa...@askmonty.org-20090924121915-k4ooompd72l2hkn5 committer: sa...@askmonty.org branch nick: work-maria-5.1-mysql-test-run-merge timestamp: Thu 2009-09-24 15:49:39 +0300 message: merge modified: mysql-test/lib/mtr_misc.pl sp1f-mtr_misc.pl-20041230152647-z3fkxvkkqfydzuwdmzjgkfo3tyetnp3a mysql-test/mysql-test-run.pl sp1f-mysqltestrun.pl-20041230152716-xjnn5ndv4rr4by6ijmj5a4ysubxc7qh3 === modified file 'mysql-test/lib/mtr_misc.pl' --- a/mysql-test/lib/mtr_misc.pl2009-02-19 09:01:25 + +++ b/mysql-test/lib/mtr_misc.pl2009-09-24 12:19:15 + @@ -174,4 +174,24 @@ select(undef, undef, undef, ($millis/1000)); } +sub mtr_wait_lock_file { + die "usage: mtr_wait_lock_file(path_to_file, keep_alive)" unless @_ == 2; + my ($file, $keep_alive)= @_; + my $waited= 0; + my $msg_counter= $keep_alive; + + while ( -e $file) + { +if ($keep_alive && !$msg_counter) +{ + print "\n-STOPPED- [pass] ".$keep_alive."\n"; + $msg_counter= $keep_alive; +} +mtr_milli_sleep(1000); +$waited= 1; +$msg_counter--; + } + return ($waited); +} + 1; === modified file 'mysql-test/mysql-test-run.pl' --- a/mysql-test/mysql-test-run.pl 2009-09-04 07:45:34 + +++ b/mysql-test/mysql-test-run.pl 2009-09-24 12:49:39 + @@ -253,6 +253,11 @@ my $opt_parallel= $ENV{MTR_PARALLEL} || 1; +# lock file to stop tests +my $opt_stop_file= $ENV{MTR_STOP_FILE}; +# print messages when test suite is stopped (for buildbot) +my $opt_stop_keep_alive= $ENV{MTR_STOP_KEEP_ALIVE}; + select(STDOUT); $| = 1; # Automatically flush STDOUT @@ -451,6 +456,15 @@ my $s= IO::Select->new(); $s->add($server); while (1) { +if ($opt_stop_file) +{ + if (mtr_wait_lock_file($opt_stop_file, $opt_stop_keep_alive)) + { +# We were waiting so restart timer process +$suite_timeout_proc->kill(); +$suite_timeout_proc= My::SafeProcess->timer(suite_timeout()); + } +} my @ready = $s->can_read(1); # Wake up once every second foreach my $sock (@ready) { if ($sock == $server) { @@ -933,6 +947,8 @@ 'warnings!'=> \$opt_warnings, 'timestamp'=> \&report_option, 'timediff' => \&report_option, + 'stop-file=s' => \$opt_stop_file, + 'stop-keep-alive=i'=> \$opt_stop_keep_alive, 'help|h' => \$opt_usage, 'list-options' => \$opt_list_options, @@ -5409,6 +5425,14 @@ warnings Scan the log files for warnings. Use --nowarnings to turn off. + stop-file=file(also MTR_STOP_FILE environment variable) if this +file detected mysql test will not start new tests +until the file will be removed. + stop-keep-alive=sec (also MTR_STOP_KEEP_ALIVE environment variable) +works with stop-file, print messages every sec +seconds when mysql test is waiting to removing +the file (for buildbot) + sleep=SECONDS Passed to mysqltest, will be used as fixed sleep time debug-sync-timeout=NUM Set default timeout for WAIT_FOR debug sync actions. Disable facility with NUM=0. ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
[Maria-developers] Rev 2724: Ability to stop mysql-test-run.pl temporary (useful for them who run buildbot slave on thier work computers) in file:///Users/bell/maria/bzr/work-maria-5.1/
At file:///Users/bell/maria/bzr/work-maria-5.1/ revno: 2724 revision-id: sa...@askmonty.org-20090924121915-k4ooompd72l2hkn5 parent: pser...@askmonty.org-20090901115954-nge2brzh3akkmtlz committer: sa...@askmonty.org branch nick: work-maria-5.1 timestamp: Thu 2009-09-24 15:19:15 +0300 message: Ability to stop mysql-test-run.pl temporary (useful for them who run buildbot slave on thier work computers) === modified file 'mysql-test/lib/mtr_misc.pl' --- a/mysql-test/lib/mtr_misc.pl2009-02-19 09:01:25 + +++ b/mysql-test/lib/mtr_misc.pl2009-09-24 12:19:15 + @@ -174,4 +174,24 @@ select(undef, undef, undef, ($millis/1000)); } +sub mtr_wait_lock_file { + die "usage: mtr_wait_lock_file(path_to_file, keep_alive)" unless @_ == 2; + my ($file, $keep_alive)= @_; + my $waited= 0; + my $msg_counter= $keep_alive; + + while ( -e $file) + { +if ($keep_alive && !$msg_counter) +{ + print "\n-STOPPED- [pass] ".$keep_alive."\n"; + $msg_counter= $keep_alive; +} +mtr_milli_sleep(1000); +$waited= 1; +$msg_counter--; + } + return ($waited); +} + 1; === modified file 'mysql-test/mysql-test-run.pl' --- a/mysql-test/mysql-test-run.pl 2009-06-22 08:06:35 + +++ b/mysql-test/mysql-test-run.pl 2009-09-24 12:19:15 + @@ -252,6 +252,11 @@ my $opt_parallel= $ENV{MTR_PARALLEL} || 1; +# lock file to stop tests +my $opt_stop_file= $ENV{MTR_STOP_FILE}; +# print messages when test suite is stopped (for buildbot) +my $opt_stop_keep_alive= $ENV{MTR_STOP_KEEP_ALIVE}; + select(STDOUT); $| = 1; # Automatically flush STDOUT @@ -450,6 +455,15 @@ my $s= IO::Select->new(); $s->add($server); while (1) { +if ($opt_stop_file) +{ + if (mtr_wait_lock_file($opt_stop_file, $opt_stop_keep_alive)) + { +# We were waiting so restart timer process +$suite_timeout_proc->kill(); +$suite_timeout_proc= My::SafeProcess->timer(suite_timeout()); + } +} my @ready = $s->can_read(1); # Wake up once every second foreach my $sock (@ready) { if ($sock == $server) { @@ -931,6 +945,8 @@ 'warnings!'=> \$opt_warnings, 'timestamp'=> \&report_option, 'timediff' => \&report_option, + 'stop-file=s' => \$opt_stop_file, + 'stop-keep-alive=i'=> \$opt_stop_keep_alive, 'help|h' => \$opt_usage, 'list-options' => \$opt_list_options, @@ -5392,6 +5408,14 @@ warnings Scan the log files for warnings. Use --nowarnings to turn off. + stop-file=file(also MTR_STOP_FILE environment variable) if this +file detected mysql test will not start new tests +until the file will be removed. + stop-keep-alive=sec (also MTR_STOP_KEEP_ALIVE environment variable) +works with stop-file, print messages every sec +seconds when mysql test is waiting to removing +the file (for buildbot) + sleep=SECONDS Passed to mysqltest, will be used as fixed sleep time debug-sync-timeout=NUM Set default timeout for WAIT_FOR debug sync actions. Disable facility with NUM=0. ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
Re: [Maria-developers] Updated (by Guest): Add a mysqlbinlog option to change the used database (36)
24.09.09, 12:04, "Kristian Nielsen" : > Alexi1952 writes: > > Agree. BTW tables_ok() is just the only member I had already #ifdef'ed out > > from Rpl_filter for client context. > Ah, I see. > > As for your suggestion to have a separate class, is it OK to do something > > like this? > > > > class Binlog_filter > > { > > < ... all members from Rpl_filter except for tables_ok() > > ... (will also check carefully for other members) ...> > > }; > > > > class Rpl_filter: public Binlog_filter > > { > > <... tables_ok() ...> > > }; > Yes, that sounds good. > > > > BTW in this case declaring > > > > Binlog_filter* binlog_filter; > > > > will look like more natural than > > > > Rpl_filter* binlog_filter; > > > > (why indeed *replication filter* in mysqlbinlog which actully *doesn't > > replicate* :) > Indeed :-) Sorry. It's a bit hasty decision. For WL#40 we have to have a modification of tables_ok(TABLE_LIST*) to support table-rules. So it should be something like this: class A_filter /* TODO: choose more appropriate name*/ { < ... all members from Rpl_filter except for tables_ok() ...> }; class Binlog_filter: public A_filter { <... tables_ok() for client with appropriate argument instead of TABLE_LIST ..> }; class Rpl_filter: public A_filter { <... tables_ok() for replication...> }; Note. This is also preliminary because curently I have no final/clear decision how to do WL40 for SBR. (I'm itching to detach the parser but this is too huge task within these binlog WL's) > ___ > Mailing list: https://launchpad.net/~maria-developers > Post to : maria-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~maria-developers > More help : https://help.launchpad.net/ListHelp -- Новая Яндекс.Почта http://mail.yandex.ru/promo/new/sign ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
Re: [Maria-developers] Updated (by Guest): Add a mysqlbinlog option to change the used database (36)
Alexi1952 writes: > Agree. BTW tables_ok() is just the only member I had already #ifdef'ed out > from Rpl_filter for client context. Ah, I see. > As for your suggestion to have a separate class, is it OK to do something > like this? > > class Binlog_filter > { > < ... all members from Rpl_filter except for tables_ok() > ... (will also check carefully for other members) ...> > }; > > class Rpl_filter: public Binlog_filter > { > <... tables_ok() ...> > }; Yes, that sounds good. > > BTW in this case declaring > > Binlog_filter* binlog_filter; > > will look like more natural than > > Rpl_filter* binlog_filter; > > (why indeed *replication filter* in mysqlbinlog which actully *doesn't > replicate* :) Indeed :-) Thanks, - Kristian. ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp