From: Mayank Prasad Date: June 13 2011 6:46pm Subject: bzr push into mysql-5.5 branch (mayank.prasad:3447 to 3448) Bug#12561297 List-Archive: http://lists.mysql.com/commits/139167 X-Bug: 12561297 Message-Id: <201106131846.p5DIkagB017396@acsmt357.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3448 Mayank Prasad 2011-06-14 BUG#12561297:LIBMYSQLD/EXAMPLE/MYSQL_EMBEDDED IS ABORTING. Issue: When libmysqld/example/mysql_embedded is executed, it was getting abort. Its a regression as it was working in 5.1 and failed in 5.5. Issue is there because remaining_argc/remaining_argv were not getting assigned correctly in init_embedded_server() which were being used later in init_common_variable(). Solution: Rectified code to pass correct argc/argv to be used in init_common_variable(). @ libmysqld/lib_sql.cc Rectified remaining_argc/remaining_argv assignment. @ mysql-test/r/mysql_embedded.result Result file for the test case added. @ mysql-test/t/mysql_embedded.test Added test case to verify libmysqld/example/mysql_embedded works. added: mysql-test/r/mysql_embedded.result mysql-test/t/mysql_embedded.test modified: libmysqld/lib_sql.cc 3447 Mattias Jonsson 2011-06-13 [merge] merge modified: mysql-test/r/partition.result mysql-test/r/partition_datatype.result mysql-test/t/partition.test mysql-test/t/partition_datatype.test sql/item_timefunc.cc sql/item_timefunc.h === modified file 'libmysqld/lib_sql.cc' --- a/libmysqld/lib_sql.cc 2011-05-20 09:18:36 +0000 +++ b/libmysqld/lib_sql.cc 2011-06-13 18:41:24 +0000 @@ -531,8 +531,8 @@ int init_embedded_server(int argc, char return 1; defaults_argc= *argcp; defaults_argv= *argvp; - remaining_argc= argc; - remaining_argv= argv; + remaining_argc= *argcp; + remaining_argv= *argvp; /* Must be initialized early for comparison of options name */ system_charset_info= &my_charset_utf8_general_ci; === added file 'mysql-test/r/mysql_embedded.result' --- a/mysql-test/r/mysql_embedded.result 1970-01-01 00:00:00 +0000 +++ b/mysql-test/r/mysql_embedded.result 2011-06-13 18:41:24 +0000 @@ -0,0 +1,5 @@ +# +# Bug#12561297 : LIBMYSQLD/EXAMPLE/MYSQL_EMBEDDED IS ABORTING. +# +1 +1 === added file 'mysql-test/t/mysql_embedded.test' --- a/mysql-test/t/mysql_embedded.test 1970-01-01 00:00:00 +0000 +++ b/mysql-test/t/mysql_embedded.test 2011-06-13 18:41:24 +0000 @@ -0,0 +1,6 @@ +--echo # +--echo # Bug#12561297 : LIBMYSQLD/EXAMPLE/MYSQL_EMBEDDED IS ABORTING. +--echo # + +--source include/is_embedded.inc +--exec $MYSQL_TEST_DIR/../libmysqld/examples/mysql_embedded -e 'select 1' No bundle (reason: useless for push emails).