List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:July 27 2009 7:03pm
Subject:bzr commit into mysql-5.1-bugteam branch (davi:3041) Bug#43587
View as plain text  
# At a local mysql-5.1-bugteam repository of davi

 3041 Davi Arnaut	2009-07-27
      Post-merge fix for Bug#43587: Handle failures to execute a statement
      during bootstrap on a embedded server.
     @ libmysqld/lib_sql.cc
        Handle a failure during bootstrap.

    modified:
      libmysqld/lib_sql.cc
=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc	2009-02-24 11:29:49 +0000
+++ b/libmysqld/lib_sql.cc	2009-07-27 19:03:48 +0000
@@ -1078,9 +1078,19 @@ net_send_eof(THD *thd, uint server_statu
 
 void net_send_error_packet(THD *thd, uint sql_errno, const char *err)
 {
-  MYSQL_DATA *data= thd->cur_data ? thd->cur_data : thd->alloc_new_dataset();
-  struct embedded_query_result *ei= data->embedded_info;
+  MYSQL_DATA *data= thd->cur_data;
+  struct embedded_query_result *ei;
+
+  if (!thd->mysql)            // bootstrap file handling
+  {
+    fprintf(stderr, "ERROR: %d  %s\n", sql_errno, err);
+    return;
+  }
+
+  if (!data)
+    data= thd->alloc_new_dataset();
 
+  ei= data->embedded_info;
   ei->last_errno= sql_errno;
   strmake(ei->info, err, sizeof(ei->info)-1);
   strmov(ei->sqlstate, mysql_errno_to_sqlstate(sql_errno));


Attachment: [text/bzr-bundle] bzr/davi.arnaut@sun.com-20090727190348-o6hqfhs62r7ndy7u.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (davi:3041) Bug#43587Davi Arnaut27 Jul