Re: [Maria-developers] Rev 2746: Fix mysql-test-run on windows: in file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/
Sergey Petrunya pser...@askmonty.org writes: At file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/ revno: 2746 revision-id: pser...@askmonty.org-20090917001350-pyxja2suxylxhez1 parent: pser...@askmonty.org-20090916190503-kgckwua1roxhonsy committer: Sergey Petrunya pser...@askmonty.org branch nick: mysql-5.1-maria-contd4 timestamp: Thu 2009-09-17 04:13:50 +0400 message: Fix mysql-test-run on windows: - Make it not to add '--console' when '--log-error' option is present === modified file 'mysql-test/mysql-test-run.pl' --- a/mysql-test/mysql-test-run.pl2009-09-15 10:46:35 + +++ b/mysql-test/mysql-test-run.pl2009-09-17 00:13:50 + @@ -4433,7 +4433,9 @@ if (IS_WINDOWS) { # Trick the server to send output to stderr, with --console -mtr_add_arg($args, --console); +if (!(join(' ', @$args) =~ /--log-error/)) { + mtr_add_arg($args, --console); +} There is no need to create a joined string to grep here. It can be simplified like this: if (!(grep(/^--log-error/, @$args))) { ... } or, if you really want to catch _all_ occurences of --log-error (including --tmpdir=/var/--log-error/tmp), then this: if (!(grep(/--log-error/, @$args))) { ... } Hope this helps, - 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
Re: [Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (igor:2744)
Igor Babaev i...@askmonty.org writes: #At lp:maria based on revid:i...@askmonty.org-20090916174301-lzzh1r0khn3dxwvp 2744 Igor Babaev 2009-09-16 Fixed a failure of the merge_innodb test on windows. modified: storage/myisammrg/ha_myisammrg.cc === modified file 'storage/myisammrg/ha_myisammrg.cc' --- a/storage/myisammrg/ha_myisammrg.cc 2009-09-07 20:50:10 + +++ b/storage/myisammrg/ha_myisammrg.cc 2009-09-17 03:36:21 + @@ -309,7 +309,7 @@ static MI_INFO *myisammrg_attach_childre TABLE *parent; TABLE *child; TABLE_LIST*child_l; - MI_INFO *myisam; + MI_INFO *myisam= NULL; DBUG_ENTER(myisammrg_attach_children_callback); my_errno= 0; Are you sure this fixes the failure? The reason I ask is that this change does not appear to be able to affect the result of the code in any way... The only code path where myisam is referenced without being assigned is when the table is not MYISAM (child-file-ht-db_type != DB_TYPE_MYISAM), and in this case the only reference is in a DBUG_PRINT(). So this could maybe fix a Valgrind warning, but how could it have any effect on a failure on Windows? The patch looks ok as it is, as it prevents the debug printout of an undefined value. I am just curious how this could fix a failure, maybe it is just hiding the real bug? - 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
Re: [Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (igor:2744)
Kristian Nielsen wrote: Igor Babaev i...@askmonty.org writes: #At lp:maria based on revid:i...@askmonty.org-20090916174301-lzzh1r0khn3dxwvp 2744 Igor Babaev2009-09-16 Fixed a failure of the merge_innodb test on windows. modified: storage/myisammrg/ha_myisammrg.cc === modified file 'storage/myisammrg/ha_myisammrg.cc' --- a/storage/myisammrg/ha_myisammrg.cc 2009-09-07 20:50:10 + +++ b/storage/myisammrg/ha_myisammrg.cc 2009-09-17 03:36:21 + @@ -309,7 +309,7 @@ static MI_INFO *myisammrg_attach_childre TABLE *parent; TABLE *child; TABLE_LIST*child_l; - MI_INFO *myisam; + MI_INFO *myisam= NULL; DBUG_ENTER(myisammrg_attach_children_callback); my_errno= 0; Are you sure this fixes the failure? The reason I ask is that this change does not appear to be able to affect the result of the code in any way... The only code path where myisam is referenced without being assigned is when the table is not MYISAM (child-file-ht-db_type != DB_TYPE_MYISAM), and in this case the only reference is in a DBUG_PRINT(). So this could maybe fix a Valgrind warning, but how could it have any effect on a failure on Windows? Kristian, The failure is exactly in DBUG_PRINT with debug mode on Windows. Regards, Igor. The patch looks ok as it is, as it prevents the debug printout of an undefined value. I am just curious how this could fix a failure, maybe it is just hiding the real bug? - 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
[Maria-developers] Rev 2747: Apply the following MySQL's fix: in file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/
At file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/ revno: 2747 revision-id: pser...@askmonty.org-20090917224610-zeizjpwa3xp740bs parent: pser...@askmonty.org-20090917001350-pyxja2suxylxhez1 committer: Sergey Petrunya pser...@askmonty.org branch nick: mysql-5.1-maria-contd4 timestamp: Fri 2009-09-18 02:46:10 +0400 message: Apply the following MySQL's fix: Bug #46212 safe_process: FATAL ERROR, Unknown option: --nocore Also fixed mysqld.cc to avoid popup-boxes === modified file 'mysql-test/lib/My/SafeProcess/safe_process_win.cc' --- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc 2009-05-14 19:56:53 + +++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc 2009-09-17 22:46:10 + @@ -163,6 +163,7 @@ HANDLE job_handle; HANDLE wait_handles[NUM_HANDLES]= {0}; PROCESS_INFORMATION process_info= {0}; + BOOL nocore= FALSE; sprintf(safe_process_name, safe_process[%d], pid); @@ -192,18 +193,22 @@ } break; } else { - if ( strcmp(arg, --verbose) == 0 ) + if (strcmp(arg, --verbose) == 0) verbose++; - else if ( strncmp(arg, --parent-pid, 10) == 0 ) - { - /* Override parent_pid with a value provided by user */ - const char* start; + else if (strncmp(arg, --parent-pid, 10) == 0) + { +/* Override parent_pid with a value provided by user */ +const char* start; if ((start= strstr(arg, =)) == NULL) - die(Could not find start of option value in '%s', arg); - start++; /* Step past = */ - if ((parent_pid= atoi(start)) == 0) - die(Invalid value '%s' passed to --parent-id, start); - } + die(Could not find start of option value in '%s', arg); +start++; /* Step past = */ +if ((parent_pid= atoi(start)) == 0) + die(Invalid value '%s' passed to --parent-id, start); + } + else if (strcmp(arg, --nocore) == 0) + { +nocore= TRUE; + } else die(Unknown option: %s, arg); } @@ -241,6 +246,11 @@ jeli, sizeof(jeli)) == 0) message(SetInformationJobObject failed, continue anyway...); + /* Avoid popup box */ + if (nocore) +SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX + | SEM_NOOPENFILEERRORBOX); + #if 0 /* Setup stdin, stdout and stderr redirect */ si.dwFlags= STARTF_USESTDHANDLES; === modified file 'sql/mysqld.cc' --- a/sql/mysqld.cc 2009-09-15 10:46:35 + +++ b/sql/mysqld.cc 2009-09-17 22:46:10 + @@ -2194,15 +2194,14 @@ win_install_sigabrt_handler(); if(opt_console) SetConsoleCtrlHandler(console_event_handler,TRUE); - else - { + /* Avoid MessageBox()es*/ - _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); - _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); - _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); - _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); - _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); - _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); /* Do not use SEM_NOGPFAULTERRORBOX in the following SetErrorMode (), @@ -2211,8 +2210,8 @@ exception filter is not guaranteed to work in all situation (like heap corruption or stack overflow) */ - SetErrorMode(SetErrorMode(0)|SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); - } + SetErrorMode(SetErrorMode(0) | SEM_FAILCRITICALERRORS + | SEM_NOOPENFILEERRORBOX); SetUnhandledExceptionFilter(my_unhandler_exception_filter); } ___ 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 2748: Apply Igor's fix: in file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/
At file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/ revno: 2748 revision-id: pser...@askmonty.org-20090917230109-mni2vfp5mtgxpbhw parent: pser...@askmonty.org-20090917224610-zeizjpwa3xp740bs committer: Sergey Petrunya pser...@askmonty.org branch nick: mysql-5.1-maria-contd4 timestamp: Fri 2009-09-18 03:01:09 +0400 message: Apply Igor's fix: Fixed a failure of the merge_innodb test on windows. === modified file 'storage/myisammrg/ha_myisammrg.cc' --- a/storage/myisammrg/ha_myisammrg.cc 2009-09-07 20:50:10 + +++ b/storage/myisammrg/ha_myisammrg.cc 2009-09-17 23:01:09 + @@ -309,7 +309,7 @@ TABLE *parent; TABLE *child; TABLE_LIST*child_l; - MI_INFO *myisam; + MI_INFO *myisam= NULL; DBUG_ENTER(myisammrg_attach_children_callback); my_errno= 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 2749: Fix mysql-test-run on windows: in file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/
At file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/ revno: 2749 revision-id: pser...@askmonty.org-20090918005527-k589m56f8q89zwol parent: pser...@askmonty.org-20090917230109-mni2vfp5mtgxpbhw committer: Sergey Petrunya pser...@askmonty.org branch nick: mysql-5.1-maria-contd4 timestamp: Fri 2009-09-18 04:55:27 +0400 message: Fix mysql-test-run on windows: Make it not to add '--console' when '--log-error' option is present - Review feedback === modified file 'mysql-test/mysql-test-run.pl' --- a/mysql-test/mysql-test-run.pl 2009-09-17 00:13:50 + +++ b/mysql-test/mysql-test-run.pl 2009-09-18 00:55:27 + @@ -4433,7 +4433,7 @@ if (IS_WINDOWS) { # Trick the server to send output to stderr, with --console -if (!(join(' ', @$args) =~ /--log-error/)) { +if (!(grep(/^--log-error/, @$args))) { mtr_add_arg($args, --console); } } @@ -5058,7 +5058,7 @@ if (IS_WINDOWS) { # Trick the server to send output to stderr, with --console - if (!(join(' ', @$args) =~ /--log-error/)) { + if (!(grep(/^--server-arg=--log-error/, @$args))) { mtr_add_arg($args, --server-arg=--console); } } ___ 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 2750: A change of direction for fix 10 csets ago: in file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/
At file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/ revno: 2750 revision-id: pser...@askmonty.org-20090918010443-56tli4pjvy9gb4cs parent: pser...@askmonty.org-20090918005527-k589m56f8q89zwol committer: Sergey Petrunya pser...@askmonty.org branch nick: mysql-5.1-maria-contd4 timestamp: Fri 2009-09-18 05:04:43 +0400 message: A change of direction for fix 10 csets ago: - When the table is created with an attribute that is not supported by the storage engine, the attribute ought to be still kept. === modified file 'mysql-test/r/myisam.result' --- a/mysql-test/r/myisam.result2009-09-07 20:50:10 + +++ b/mysql-test/r/myisam.result2009-09-18 01:04:43 + @@ -2234,7 +2234,7 @@ t1 CREATE TABLE `t1` ( `n` int(11) NOT NULL, `c` char(1) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 TRANSACTIONAL=1 drop table t1; CREATE TABLE t1 (line LINESTRING NOT NULL) engine=myisam; INSERT INTO t1 VALUES (GeomFromText(POINT(0 0))); === modified file 'mysql-test/suite/maria/r/maria3.result' --- a/mysql-test/suite/maria/r/maria3.result2009-09-16 18:25:18 + +++ b/mysql-test/suite/maria/r/maria3.result2009-09-18 01:04:43 + @@ -518,7 +518,7 @@ t1 CREATE TABLE `t1` ( `n` int(11) NOT NULL, `c` char(1) DEFAULT NULL -) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1 drop table t1; create table t1 (n int not null, c char(1)) engine=myisam transactional=1; Warnings: @@ -529,7 +529,7 @@ t1 CREATE TABLE `t1` ( `n` int(11) NOT NULL, `c` char(1) DEFAULT NULL -) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1 drop table t1; create table t1 (a int, key(a)) transactional=0; insert into t1 values (0),(1),(2),(3),(4); === modified file 'mysql-test/t/myisam.test' --- a/mysql-test/t/myisam.test 2009-09-07 20:50:10 + +++ b/mysql-test/t/myisam.test 2009-09-18 01:04:43 + @@ -1478,7 +1478,10 @@ --exec $MYISAMCHK -d $MYSQLD_DATADIR/test/t1 DROP TABLE t1; +# # Test warnings with transactional=1 with MyISAM +# MariaDB: Note that the table will still have 'TRANSACTIONAL=1' attribute. +# That's the intended behavior atm. # create table t1 (n int not null, c char(1)) transactional=1; show create table t1; === modified file 'sql/sql_table.cc' --- a/sql/sql_table.cc 2009-09-16 11:31:20 + +++ b/sql/sql_table.cc 2009-09-18 01:04:43 + @@ -3747,19 +3747,11 @@ /* Give warnings for not supported table options */ if (create_info-transactional !file-ht-commit) - { push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_ILLEGAL_HA_CREATE_OPTION, ER(ER_ILLEGAL_HA_CREATE_OPTION), file-engine_name()-str, TRANSACTIONAL=1); -/* - MariaDB: need to do the same for row_format and page_checksum - options. See MBUG#425916 -*/ -create_info-transactional= HA_CHOICE_UNDEF; -create_info-used_fields = ~HA_CREATE_USED_TRANSACTIONAL; - } VOID(pthread_mutex_lock(LOCK_open)); if (!internal_tmp_table !(create_info-options HA_LEX_CREATE_TMP_TABLE)) ___ 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] Rev 2746: Fix mysql-test-run on windows: in file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/
On Thu, Sep 17, 2009 at 08:24:42AM +0200, Kristian Nielsen wrote: Sergey Petrunya pser...@askmonty.org writes: At file:///home/psergey/bzr-new/mysql-5.1-maria-contd4/ revno: 2746 revision-id: pser...@askmonty.org-20090917001350-pyxja2suxylxhez1 parent: pser...@askmonty.org-20090916190503-kgckwua1roxhonsy committer: Sergey Petrunya pser...@askmonty.org branch nick: mysql-5.1-maria-contd4 timestamp: Thu 2009-09-17 04:13:50 +0400 message: Fix mysql-test-run on windows: - Make it not to add '--console' when '--log-error' option is present === modified file 'mysql-test/mysql-test-run.pl' --- a/mysql-test/mysql-test-run.pl 2009-09-15 10:46:35 + +++ b/mysql-test/mysql-test-run.pl 2009-09-17 00:13:50 + @@ -4433,7 +4433,9 @@ if (IS_WINDOWS) { # Trick the server to send output to stderr, with --console -mtr_add_arg($args, --console); +if (!(join(' ', @$args) =~ /--log-error/)) { + mtr_add_arg($args, --console); +} There is no need to create a joined string to grep here. It can be simplified like this: if (!(grep(/^--log-error/, @$args))) { ... } or, if you really want to catch _all_ occurences of --log-error (including --tmpdir=/var/--log-error/tmp), then this: if (!(grep(/--log-error/, @$args))) { ... } Addressed, thanks. BR Sergey -- Sergey Petrunia, Software Developer Monty Program AB, http://askmonty.org Blog: http://s.petrunia.net/blog ___ 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] Rev 2747: Gcov support improvements in file:///home/psergey/dev/maria-5.1-table-elim-r11-gcov/
On Thu, Aug 27, 2009 at 01:36:06PM +0200, Kristian Nielsen wrote: Sergey Petrunya pser...@askmonty.org writes: At file:///home/psergey/dev/maria-5.1-table-elim-r11-gcov/ revno: 2747 revision-id: pser...@askmonty.org-20090825150255-46i5gvl2ctd0jcm2 parent: pser...@askmonty.org-20090825145915-rxwmfczgqe69r5ju committer: Sergey Petrunya pser...@askmonty.org branch nick: maria-5.1-table-elim-r11-gcov timestamp: Tue 2009-08-25 18:02:55 +0300 message: Gcov support improvements - add process-gcov-annotations.pl script that processes .gcov files according to purecov annotations in source code - add --gcov-src-dir=subdir option to mysql-test-run so that one can do gcov processing only for source files in a certain directory. (Addressed all the omitted review feedback) +# Besides purecov annotations, also remove uncovered code mark from cases +# like the following: +# +# -: 211:*/ +# -: 212:class Field_value : public Value_dep +# #: 213:{ +# -: 214:public: +# +# I have no idea why would gcov think there is uncovered code there Maybe generated default constructor, destructor, or the like that was not run? IIRC it wasn't the constructor (as it was used at some point and the warning was still there). It could be the destructor - objects were never delete'd. I'd prefer the removal to be still there though as it doesn't seem that we're at a point where we'll go and add default constructor, copy constructor, and destructor declaration to every class. For MySQL/Maria codebase, I don't remember a single case where there was an error that would have been prevented by such safeguards. BR Sergey -- Sergey Petrunia, Software Developer Monty Program AB, http://askmonty.org Blog: http://s.petrunia.net/blog ___ 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] [Branch ~maria-captains/maria/5.1] Rev 2732: Gcov support improvements
revno: 2732 committer: Sergey Petrunya pser...@askmonty.org branch nick: maria-5.1 timestamp: Fri 2009-09-18 05:15:29 +0400 message: Gcov support improvements - address review feedback (cleaner perl code) modified: mysql-test/lib/mtr_gcov.pl mysql-test/lib/process-purecov-annotations.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_gcov.pl' --- mysql-test/lib/mtr_gcov.pl 2009-08-25 15:02:55 + +++ mysql-test/lib/mtr_gcov.pl 2009-09-18 01:15:29 + @@ -64,7 +64,8 @@ $dir_reported= 1; } system($gcov $f 2$start_dir/$gcov_err $start_dir/$gcov_msg); - system(perl $basedir/mysql-test/lib/process-purecov-annotations.pl $f.gcov); + system(perl, $basedir/mysql-test/lib/process-purecov-annotations.pl, $f.gcov); + } chdir($start_dir); } === modified file 'mysql-test/lib/process-purecov-annotations.pl' --- mysql-test/lib/process-purecov-annotations.pl 2009-08-25 15:02:55 + +++ mysql-test/lib/process-purecov-annotations.pl 2009-09-18 01:15:29 + @@ -47,7 +47,7 @@ # my @arr= split(/:/, $line); if ($skipping || $line =~ /purecov: *(inspected|deadcode)/ || -$arr[2] =~ m/^{ */) +$arr[2] =~ m/^{ *$/) { # Change '' to '-'. $arr[0] =~ s/#/-/g; @@ -57,8 +57,7 @@ } close(IN); close(OUT); - system(cat $out_file_name $in_file_name); - system(rm $out_file_name); + system(mv, -f, $out_file_name, $in_file_name); } ___ 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 2731: Fix for in file:///Users/hakan/work/monty_program/maria-debug/
At file:///Users/hakan/work/monty_program/maria-debug/ revno: 2731 revision-id: ha...@askmonty.org-20090918033054-zi01ib0tg2qt1l7m parent: kniel...@knielsen-hq.org-20090907131358-6bq1e3qfcgi30hu8 committer: Hakan Kuecuekyilmaz ha...@askmonty.org branch nick: maria-debug timestamp: Fri 2009-09-18 05:30:54 +0200 message: Fix for mysqlslap: setting --engine does not get replicated http://bugs.mysql.com/bug.php?id=46967 and mysqlslap: specifying --engine and --create does not work with --engine=storage_engine:option https://bugs.launchpad.net/maria/+bug/429773 Problems were that an --engine=storage_engine was translated to a set storage_engine = storage_engine, wich is _not_ replicated. A --engine=storage_engine:option was not always properly parsed and in some cases crashed. Fixed by eliminating set storage_engine = ... and adding proper DDL generation. Initialized an unitialized buffer to prevent crashes and fixed to use proper pointer for in case of --engine=storage_engine:option being the last element in list of --engines. Also cleaned up code for better readability. Q: Should MySQL's replication actually replicate a set storage_engine = ... command or not? A: No it should not. It is documented here: http://dev.mysql.com/doc/refman/5.1/en/replication-features-variables.html ... The storage_engine system variable is not replicated, which is a good thing for replication between different storage engines. ... Before the patch, mysqlslap was behaving this way: +---++-+ | | single | replication | +---++-+ | Before patch | +---++-+ | --engine[1] | +-+-++-+ | 1.1 | eng1 | OK | Not OK | | 1.2 | eng1,eng2 | OK | Not OK | | 1.3 | eng1,eng2,eng3 | OK | Not OK | | 1.4 | memory:option | OK | Not OK | | 1.5 | memory:option,eng1 | OK | Not OK | | 1.6 | eng1,memory:option | Not OK | Not OK | | 1.7 | memory:option,eng1,eng2 | Crash | Not OK | | 1.8 | eng1,memory:option,eng2 | OK | Not OK | | 1.9 | eng1,eng2,memory:option | Not OK | Not OK | +-+-++-+ +---++-+ | --create --engine[2] | +-+-++-+ | 2.1 | eng1 | OK | Not OK | | 2.2 | eng1,eng2 | OK | Not OK | | 2.3 | eng1,eng2,eng3 | OK | Not OK | | 2.4 | memory:option | Not OK | Not OK | | 2.5 | memory:option,eng1 | Not OK | Not OK | | 2.6 | eng1,memory:option | Not OK | Not OK | | 2.7 | memory:option,eng1,eng2 | Crash | Not OK | | 2.8 | eng1,memory:option,eng2 | Not OK | Not OK | | 2.9 | eng1,eng2,memory:option | Not OK | Not OK | +-+-++-+ After my final patch, mysqlslap now runs like this: +---++-+ | | single | replication | +---++-+ | After third patch | +---++-+ | --engine[1] | +-+-++-+ | 1.1 | eng1 | OK | OK | | 1.2 | eng1,eng2 | OK | OK | | 1.3 | eng1,eng2,eng3 | OK | OK | | 1.4 | memory:option | OK | OK | | 1.5 | memory:option,eng1 | OK | OK | | 1.6 | eng1,memory:option | OK | OK | | 1.7 | memory:option,eng1,eng2 | OK | OK | | 1.8 | eng1,memory:option,eng2 | OK | OK | | 1.9 | eng1,eng2,memory:option | OK | OK | +-+-++-+ +---++-+ | --create --engine[2] | +-+-++-+ | 2.1 | eng1 | OK | OK | | 2.2 | eng1,eng2 | OK | OK | | 2.3 | eng1,eng2,eng3 | OK | OK | | 2.4 | memory:option | OK | OK | | 2.5 | memory:option,eng1 | OK | OK | | 2.6 | eng1,memory:option | OK
[Maria-developers] Rev 2732: Merge. in file:///Users/hakan/work/monty_program/maria-debug/
At file:///Users/hakan/work/monty_program/maria-debug/ revno: 2732 [merge] revision-id: ha...@askmonty.org-20090918033703-3ztdey1rpydiaeds parent: ha...@askmonty.org-20090918033054-zi01ib0tg2qt1l7m parent: pser...@askmonty.org-20090918011529-3d7glu6ot7n0xqc9 committer: Hakan Kuecuekyilmaz ha...@askmonty.org branch nick: maria-debug timestamp: Fri 2009-09-18 05:37:03 +0200 message: Merge. modified: mysql-test/lib/mtr_gcov.pl sp1f-mtr_gcov.pl-20041230152646-g7ukx2aojk6vlfbrurijutdkqshwljue mysql-test/lib/process-purecov-annotations.pl processpurecovannota-20090825145959-3tgucpo20ms8b5yb-1 storage/maria/CMakeLists.txt sp1f-cmakelists.txt-20060904145307-qtvi5bxnxyt7nzs4gtpsyte5vv3fwm2i === modified file 'mysql-test/lib/mtr_gcov.pl' --- a/mysql-test/lib/mtr_gcov.pl2009-08-25 15:02:55 + +++ b/mysql-test/lib/mtr_gcov.pl2009-09-18 01:15:29 + @@ -64,7 +64,8 @@ $dir_reported= 1; } system($gcov $f 2$start_dir/$gcov_err $start_dir/$gcov_msg); - system(perl $basedir/mysql-test/lib/process-purecov-annotations.pl $f.gcov); + system(perl, $basedir/mysql-test/lib/process-purecov-annotations.pl, $f.gcov); + } chdir($start_dir); } === modified file 'mysql-test/lib/process-purecov-annotations.pl' --- a/mysql-test/lib/process-purecov-annotations.pl 2009-08-25 15:02:55 + +++ b/mysql-test/lib/process-purecov-annotations.pl 2009-09-18 01:15:29 + @@ -47,7 +47,7 @@ # my @arr= split(/:/, $line); if ($skipping || $line =~ /purecov: *(inspected|deadcode)/ || -$arr[2] =~ m/^{ */) +$arr[2] =~ m/^{ *$/) { # Change '' to '-'. $arr[0] =~ s/#/-/g; @@ -57,8 +57,7 @@ } close(IN); close(OUT); - system(cat $out_file_name $in_file_name); - system(rm $out_file_name); + system(mv, -f, $out_file_name, $in_file_name); } === modified file 'storage/maria/CMakeLists.txt' --- a/storage/maria/CMakeLists.txt 2008-06-09 09:06:06 + +++ b/storage/maria/CMakeLists.txt 2009-09-09 18:11:31 + @@ -50,6 +50,8 @@ ADD_LIBRARY(maria ${MARIA_SOURCES}) + ADD_DEPENDENCIES(maria GenError) + ADD_EXECUTABLE(maria_ftdump maria_ftdump.c) TARGET_LINK_LIBRARIES(maria_ftdump maria myisam mysys dbug strings zlib wsock32) ___ 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