List:Commits« Previous MessageNext Message »
From:Mayank Prasad Date:June 13 2011 6:41pm
Subject:bzr commit into mysql-5.5 branch (mayank.prasad:3448) Bug#12561297
View as plain text  
#At file:///home/mayank/mysql-tree/mydefects/5.5_12561297/ based on revid:mattias.jonsson@stripped

 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
=== 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'


Attachment: [text/bzr-bundle] bzr/mayank.prasad@oracle.com-20110613184124-vgcphlqj87i157h0.bundle
Thread
bzr commit into mysql-5.5 branch (mayank.prasad:3448) Bug#12561297Mayank Prasad13 Jun