List:Commits« Previous MessageNext Message »
From:msvensson Date:February 15 2006 1:45pm
Subject:bk commit into 5.0 tree (msvensson:1.2049) BUG#16143
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2049 06/02/15 13:45:03 msvensson@stripped +2 -0
  Bug#16143 mysql_stmt_sqlstate returns an empty string instead of '00000'
   - Init sql_state in mysql_stmt_init

  tests/mysql_client_test.c
    1.174 06/02/15 13:44:59 msvensson@stripped +16 -0
    Add test for mysql_stmt_sqlstate after mysql_stmt_init

  libmysql/libmysql.c
    1.234 06/02/15 13:44:59 msvensson@stripped +1 -0
    Init sql_state to not_error_sql_state in mysql_init

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	devsrv-b.mysql.com
# Root:	/space/magnus/bug16143/my50-bug16143

--- 1.233/libmysql/libmysql.c	2006-02-02 16:17:12 +01:00
+++ 1.234/libmysql/libmysql.c	2006-02-15 13:44:59 +01:00
@@ -2008,6 +2008,7 @@
   stmt->mysql= mysql;
   stmt->read_row_func= stmt_read_row_no_result_set;
   stmt->prefetch_rows= DEFAULT_PREFETCH_ROWS;
+  strmov(stmt->sqlstate, not_error_sqlstate);
   /* The rest of statement members was bzeroed inside malloc */
 
   DBUG_RETURN(stmt);

--- 1.173/tests/mysql_client_test.c	2006-02-10 14:42:00 +01:00
+++ 1.174/tests/mysql_client_test.c	2006-02-15 13:44:59 +01:00
@@ -14729,6 +14729,21 @@
   client_connect(0);
 }
 
+/* Bug #16143: mysql_stmt_sqlstate returns an empty string instead of '00000' */
+
+static void test_bug16143()
+{
+  MYSQL_STMT *stmt;
+  myheader("test_bug16143");
+
+  stmt= mysql_stmt_init(mysql);
+  /* Check mysql_stmt_sqlstate return "no error" */
+  DIE_UNLESS(strcmp(mysql_stmt_sqlstate(stmt), "00000") == 0);
+
+  mysql_stmt_close(stmt);
+}
+
+
 /* Bug #16144: mysql_stmt_attr_get type error */
 
 static void test_bug16144()
@@ -15073,6 +15088,7 @@
   { "test_bug15510", test_bug15510 },
   { "test_opt_reconnect", test_opt_reconnect },
   { "test_bug12744", test_bug12744 },
+  { "test_bug16143", test_bug16143 },
   { "test_bug16144", test_bug16144 },
   { "test_bug15613", test_bug15613 },
   { 0, 0 }
Thread
bk commit into 5.0 tree (msvensson:1.2049) BUG#16143msvensson15 Feb