List:Commits« Previous MessageNext Message »
From:Mayank Prasad Date:April 6 2012 7:00pm
Subject:bzr push into mysql-5.1 branch (mayank.prasad:3717 to 3718) Bug#13738989
View as plain text  
 3718 Mayank Prasad	2012-04-06
      BUG#13738989 : 62136 : FAILED TO FETCH SELECT RESULT USING EMBEDDED MYSQLD
      
      Background : 
      In mysql-5.1, in a fix for bug#47485, code has been changed for 
      mysql client (libmysql/libmysql.c) but corresponding code was not
      changed for embedded mysql. In that code change, after execution
      of a statement, mysql_stmt_store_result() checks for mysql->state
      to be MYSQL_STATUS_STATEMENT_GET_RESULT, instead of
      MYSQL_STATUS_GET_RESULT (earlier).
      
      Reason:
      In embedded mysql code, after execution, mysql->state was not
      set to MYSQL_STATUS_STATEMENT_GET_RESULT, so it was throwing
      OUT_OF_SYNC error.
      
      Fix:
      Fixed the code in libmysqld/lib_sql.cc to have mysql->state
      to be set to MYSQL_STATUS_STATEMENT_GET_RESULT after execution.

    modified:
      libmysqld/lib_sql.cc
 3717 Praveenkumar Hulakund	2012-03-28
      Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE
      
      Analysis:
      -------------------------------
      According to the Manual
      (http://dev.mysql.com/doc/refman/5.1/en/identifier-case-sensitivity.html):
      "Column, index, stored routine, and event names are not case sensitive on any
      platform, nor are column aliases."
      
      In other words, 'lower_case_table_names' does not affect the behaviour of 
      those identifiers.
      
      On the other hand, trigger names are case sensitive on some platforms,
      and case insensitive on others. 'lower_case_table_names' does not affect
      the behaviour of trigger names either.
      
      The bug was that SHOW statements did case sensitive comparison
      for stored procedure / stored function / event names.
      
      Fix:
      Modified the code so that comparison in case insensitive for routines 
      and events for "SHOW" operation.
      
      As part of this commit, only fixing the test failures due to the actual code fix.

    modified:
      mysql-test/r/sp-bugs.result
      mysql-test/r/sp-code.result
      mysql-test/r/sp_notembedded.result
      mysql-test/t/sp-bugs.test
      mysql-test/t/sp-code.test
      mysql-test/t/sp_notembedded.test
=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc	2011-05-18 14:40:01 +0000
+++ b/libmysqld/lib_sql.cc	2012-04-06 11:33:13 +0000
@@ -343,6 +343,8 @@ static int emb_stmt_execute(MYSQL_STMT *
     set_stmt_errmsg(stmt, net);
     DBUG_RETURN(1);
   }
+  else if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT)
+           stmt->mysql->status= MYSQL_STATUS_STATEMENT_GET_RESULT;
   DBUG_RETURN(0);
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (mayank.prasad:3717 to 3718) Bug#13738989Mayank Prasad10 Apr