List:Commits« Previous MessageNext Message »
From:monty Date:November 27 2006 12:08pm
Subject:bk commit into 5.1 tree (monty:1.2369)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of monty. When monty 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@stripped, 2006-11-27 14:07:52+02:00, monty@stripped +13 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
  into  mysql.com:/home/my/mysql-5.1
  MERGE: 1.2366.1.8

  BUILD/SETUP.sh@stripped, 2006-11-27 14:00:52+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.62.1.2

  mysql-test/t/create.test@stripped, 2006-11-27 14:00:52+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.84.1.3

  sql/item_timefunc.cc@stripped, 2006-11-27 14:00:52+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.137.1.7

  sql/log_event.cc@stripped, 2006-11-27 14:07:45+02:00, monty@stripped +1 -2
    Manual merge
    MERGE: 1.254.1.2

  sql/mysql_priv.h@stripped, 2006-11-27 14:00:52+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.457.1.1

  sql/mysqld.cc@stripped, 2006-11-27 14:00:53+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.590.1.3

  sql/sql_binlog.cc@stripped, 2006-11-27 14:07:45+02:00, monty@stripped +5 -0
    Manual merge
    MERGE: 1.3.1.1

  sql/sql_class.h@stripped, 2006-11-27 14:00:53+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.326.1.1

  sql/sql_lex.cc@stripped, 2006-11-27 14:00:53+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.207.1.1

  sql/sql_parse.cc@stripped, 2006-11-27 14:00:53+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.595.1.2

  sql/sql_table.cc@stripped, 2006-11-27 14:00:54+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.372.1.1

  sql/table.cc@stripped, 2006-11-27 14:00:54+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.252.1.5

  tests/mysql_client_test.c@stripped, 2006-11-27 14:00:54+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.217.1.11

# 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:	monty
# Host:	nosik.monty.fi
# Root:	/home/my/mysql-5.1/RESYNC

--- 1.139/sql/item_timefunc.cc	2006-11-27 14:08:13 +02:00
+++ 1.140/sql/item_timefunc.cc	2006-11-27 14:08:13 +02:00
@@ -2382,7 +2382,8 @@
     {                                           // Safe even if const arg
       char char_type[40];
       my_snprintf(char_type, sizeof(char_type), "%s(%lu)",
-                  cast_cs == &my_charset_bin ? "BINARY" : "CHAR", (ulong) length);
+                  cast_cs == &my_charset_bin ? "BINARY" : "CHAR",
+                  (ulong) length);
 
       if (!res->alloced_length())
       {                                         // Don't change const str

--- 1.256/sql/log_event.cc	2006-11-27 14:08:13 +02:00
+++ 1.257/sql/log_event.cc	2006-11-27 14:08:13 +02:00
@@ -5468,14 +5468,13 @@
 
 #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
 /*
-  Unpack a row into a record.
+  Unpack a row into table->record[0].
   
   SYNOPSIS
     unpack_row()
     rli     Relay log info
     table   Table to unpack into
     colcnt  Number of columns to read from record
-    record  Record where the data should be unpacked
     row     Packed row data
     cols    Pointer to columns data to fill in
     row_end Pointer to variable that will hold the value of the
@@ -5488,6 +5487,11 @@
 
   DESCRIPTION
 
+      The function will always unpack into the table->record[0]
+      record.  This is because there are too many dependencies on
+      where the various member functions of Field and subclasses
+      expect to write.
+
       The row is assumed to only consist of the fields for which the
       bitset represented by 'arr' and 'bits'; the other parts of the
       record are left alone.
@@ -5506,15 +5510,15 @@
  */
 static int
 unpack_row(RELAY_LOG_INFO *rli,
-           TABLE *table, uint const colcnt, byte *record,
+           TABLE *table, uint const colcnt,
            char const *row, MY_BITMAP const *cols,
            char const **row_end, ulong *master_reclength,
            MY_BITMAP* const rw_set, Log_event_type const event_type)
 {
+  byte *const record= table->record[0];
   DBUG_ENTER("unpack_row");
   DBUG_ASSERT(record && row);
-  DBUG_PRINT("enter", ("row: 0x%lx  record: 0x%lx", (long) row, (long) record));
-  my_ptrdiff_t const offset= record - (byte*) table->record[0];
+  DBUG_PRINT("enter", ("row: 0x%lx  table->record[0]: 0x%lx", (long) row, (long) record));
   my_size_t master_null_bytes= table->s->null_bytes;
 
   if (colcnt != table->s->fields)
@@ -5557,12 +5561,10 @@
       DBUG_ASSERT(table->record[0] <= f->ptr);
       DBUG_ASSERT(f->ptr < (table->record[0] + table->s->reclength +
                             (f->pack_length_in_rec() == 0)));
-      f->move_field_offset(offset);
 
       DBUG_PRINT("info", ("unpacking column '%s' to 0x%lx", f->field_name,
                           (long) f->ptr));
       ptr= f->unpack(f->ptr, ptr);
-      f->move_field_offset(-offset);
       /* Field...::unpack() cannot return 0 */
       DBUG_ASSERT(ptr != NULL);
     }
@@ -5593,9 +5595,10 @@
   for ( ; *field_ptr ; ++field_ptr)
   {
     uint32 const mask= NOT_NULL_FLAG | NO_DEFAULT_VALUE_FLAG;
+    Field *const f= *field_ptr;
 
-    if (event_type == WRITE_ROWS_EVENT &&
-        ((*field_ptr)->flags & mask) == mask)
+    DBUG_PRINT("info", ("processing column '%s' @ 0x%lx", f->field_name, f->ptr));
+    if (event_type == WRITE_ROWS_EVENT && (f->flags & mask) == mask)
     {
       slave_print_msg(ERROR_LEVEL, rli, ER_NO_DEFAULT_FOR_FIELD,
                       "Field `%s` of table `%s`.`%s` "
@@ -5605,7 +5608,7 @@
       error = ER_NO_DEFAULT_FOR_FIELD;
     }
     else
-      (*field_ptr)->set_default();
+      f->set_default();
   }
 
   DBUG_RETURN(error);
@@ -6461,10 +6464,8 @@
   DBUG_ASSERT(row_start && row_end);
 
   int error;
-  error= unpack_row(rli,
-                    table, m_width, table->record[0],
-                    row_start, &m_cols, row_end, &m_master_reclength,
-                    table->write_set, WRITE_ROWS_EVENT);
+  error= unpack_row(rli, table, m_width, row_start, &m_cols, row_end,
+                    &m_master_reclength, table->write_set, WRITE_ROWS_EVENT);
   bitmap_copy(table->read_set, table->write_set);
   return error;
 }
@@ -6685,7 +6686,7 @@
        present on the master from table->record[1], if there are any.
     */
     copy_extra_record_fields(table, master_reclength, master_fields);
-    
+
     /*
        REPLACE is defined as either INSERT or DELETE + INSERT.  If
        possible, we can replace it with an UPDATE, but that will not
@@ -7066,10 +7067,8 @@
   */
   DBUG_ASSERT(table->s->fields >= m_width);
 
-  error= unpack_row(rli,
-                    table, m_width, table->record[0], 
-                    row_start, &m_cols, row_end, &m_master_reclength,
-                    table->read_set, DELETE_ROWS_EVENT);
+  error= unpack_row(rli, table, m_width, row_start, &m_cols, row_end,
+                    &m_master_reclength, table->read_set, DELETE_ROWS_EVENT);
   /*
     If we will access rows using the random access method, m_key will
     be set to NULL, so we do not need to make a key copy in that case.
@@ -7203,25 +7202,30 @@
   */
   DBUG_ASSERT(table->s->fields >= m_width);
 
+  /*
+    We need to perform some juggling below since unpack_row() always
+    unpacks into table->record[0]. For more information, see the
+    comments for unpack_row().
+  */
+
   /* record[0] is the before image for the update */
-  error= unpack_row(rli,
-                    table, m_width, table->record[0],
-                    row_start, &m_cols, row_end, &m_master_reclength,
-                    table->read_set, UPDATE_ROWS_EVENT);
+  error= unpack_row(rli, table, m_width, row_start, &m_cols, row_end,
+                    &m_master_reclength, table->read_set, UPDATE_ROWS_EVENT);
+  store_record(table, record[1]);
   char const *next_start = *row_end;
   /* m_after_image is the after image for the update */
-  error= unpack_row(rli,
-                    table, m_width, m_after_image,
-                    next_start, &m_cols, row_end, &m_master_reclength,
-                    table->write_set, UPDATE_ROWS_EVENT);
+  error= unpack_row(rli, table, m_width, next_start, &m_cols, row_end,
+                    &m_master_reclength, table->write_set, UPDATE_ROWS_EVENT);
+  bmove_align(m_after_image, table->record[0], table->s->reclength);
+  restore_record(table, record[1]);
 
   /*
     Don't print debug messages when running valgrind since they can
     trigger false warnings.
    */
 #ifndef HAVE_purify
-  DBUG_DUMP("record[0]", (const char *)table->record[0], m_master_reclength);
-  DBUG_DUMP("m_after_image", (const char *)m_after_image, m_master_reclength);
+  DBUG_DUMP("record[0]", (const char *)table->record[0], table->s->reclength);
+  DBUG_DUMP("m_after_image", (const char *)m_after_image, table->s->reclength);
 #endif
 
   /*

--- 1.458/sql/mysql_priv.h	2006-11-27 14:08:13 +02:00
+++ 1.459/sql/mysql_priv.h	2006-11-27 14:08:13 +02:00
@@ -1434,7 +1434,8 @@
 #endif
 void mysql_print_status();
 /* key.cc */
-int find_ref_key(KEY *key, uint key_count, Field *field, uint *key_length);
+int find_ref_key(KEY *key, uint key_count, byte *record, Field *field,
+                 uint *key_length);
 void key_copy(byte *to_key, byte *from_record, KEY *key_info, uint key_length);
 void key_restore(byte *to_record, byte *from_key, KEY *key_info,
                  uint key_length);

--- 1.591/sql/mysqld.cc	2006-11-27 14:08:13 +02:00
+++ 1.592/sql/mysqld.cc	2006-11-27 14:08:13 +02:00
@@ -2121,7 +2121,7 @@
 #ifdef HAVE_STACKTRACE
   if (!(test_flags & TEST_NO_STACKTRACE))
   {
-    fprintf(stderr,"thd=%p\n",thd);
+    fprintf(stderr,"thd: 0x%lx\n",(long) thd);
     print_stacktrace(thd ? (gptr) thd->thread_stack : (gptr) 0,
 		     thread_stack);
   }
@@ -3208,7 +3208,7 @@
     using_update_log=1;
   }
 
-  if (plugin_init(0))
+  if (plugin_init(opt_bootstrap))
   {
     sql_print_error("Failed to init plugins.");
     return 1;
@@ -3526,7 +3526,7 @@
     if (stack_size && stack_size < thread_stack)
     {
       if (global_system_variables.log_warnings)
-	sql_print_warning("Asked for %ld thread stack, but got %ld",
+	sql_print_warning("Asked for %lu thread stack, but got %ld",
 			  thread_stack, (long) stack_size);
 #if defined(__ia64__) || defined(__ia64)
       thread_stack= stack_size*2;
@@ -4072,7 +4072,7 @@
       int error;
       thread_created++;
       threads.append(thd);
-      DBUG_PRINT("info",(("creating thread %d"), thd->thread_id));
+      DBUG_PRINT("info",(("creating thread %lu"), thd->thread_id));
       thd->connect_time = time(NULL);
       if ((error=pthread_create(&thd->real_id,&connection_attrib,
 				handle_one_connection,

--- 1.327/sql/sql_class.h	2006-11-27 14:08:13 +02:00
+++ 1.328/sql/sql_class.h	2006-11-27 14:08:13 +02:00
@@ -2070,7 +2070,7 @@
   inline bool unique_add(void *ptr)
   {
     DBUG_ENTER("unique_add");
-    DBUG_PRINT("info", ("tree %u - %u", tree.elements_in_tree, max_elements));
+    DBUG_PRINT("info", ("tree %u - %lu", tree.elements_in_tree, max_elements));
     if (tree.elements_in_tree > max_elements && flush())
       DBUG_RETURN(1);
     DBUG_RETURN(!tree_insert(&tree, ptr, 0, tree.custom_arg));

--- 1.208/sql/sql_lex.cc	2006-11-27 14:08:13 +02:00
+++ 1.209/sql/sql_lex.cc	2006-11-27 14:08:13 +02:00
@@ -1444,7 +1444,7 @@
 bool st_select_lex::add_item_to_list(THD *thd, Item *item)
 {
   DBUG_ENTER("st_select_lex::add_item_to_list");
-  DBUG_PRINT("info", ("Item: %p", item));
+  DBUG_PRINT("info", ("Item: 0x%lx", (long) item));
   DBUG_RETURN(item_list.push_back(item));
 }
 

--- 1.596/sql/sql_parse.cc	2006-11-27 14:08:13 +02:00
+++ 1.597/sql/sql_parse.cc	2006-11-27 14:08:13 +02:00
@@ -394,9 +394,9 @@
           NO_ACCESS)) // authentication is OK
     {
       DBUG_PRINT("info",
-                 ("Capabilities: %lx  packet_length: %ld  Host: '%s'  "
+                 ("Capabilities: %lu  packet_length: %ld  Host: '%s'  "
                   "Login user: '%s' Priv_user: '%s'  Using password: %s "
-                  "Access: %u  db: '%s'",
+                  "Access: %lu  db: '%s'",
                   thd->client_capabilities,
                   thd->max_client_packet_length,
                   thd->main_security_ctx.host_or_ip,
@@ -1002,7 +1002,7 @@
   if (thd->client_capabilities & CLIENT_IGNORE_SPACE)
     thd->variables.sql_mode|= MODE_IGNORE_SPACE;
 #ifdef HAVE_OPENSSL
-  DBUG_PRINT("info", ("client capabilities: %d", thd->client_capabilities));
+  DBUG_PRINT("info", ("client capabilities: %lu", thd->client_capabilities));
   if (thd->client_capabilities & CLIENT_SSL)
   {
     /* Do the SSL layering. */
@@ -1161,7 +1161,7 @@
     of handle_one_connection, which is thd. We need to know the
     start of the stack so that we could check for stack overruns.
   */
-  DBUG_PRINT("info", ("handle_one_connection called by thread %d\n",
+  DBUG_PRINT("info", ("handle_one_connection called by thread %lu\n",
 		      thd->thread_id));
   /* now that we've called my_thread_init(), it is safe to call DBUG_* */
 
@@ -1616,7 +1616,7 @@
       command= COM_END;				// Wrong command
     DBUG_PRINT("info",("Command on %s = %d (%s)",
 		       vio_description(net->vio), command,
-		       command_name[command]));
+		       command_name[command].str));
   }
   net->read_timeout=old_timeout;		// restore it
   /*
@@ -1851,7 +1851,9 @@
     if (alloc_query(thd, packet, packet_length))
       break;					// fatal error is set
     char *packet_end= thd->query + thd->query_length;
-    general_log_print(thd, command, "%.*b", thd->query_length, thd->query);
+    /* 'b' stands for 'buffer' parameter', special for 'my_snprintf' */
+    const char *format= "%.*b";
+    general_log_print(thd, command, format, thd->query_length, thd->query);
     DBUG_PRINT("query",("%-.4096s",thd->query));
 
     if (!(specialflag & SPECIAL_NO_PRIOR))

--- 1.373/sql/sql_table.cc	2006-11-27 14:08:13 +02:00
+++ 1.374/sql/sql_table.cc	2006-11-27 14:08:13 +02:00
@@ -3743,7 +3743,7 @@
 				     enum ha_extra_function function)
 {
   DBUG_ENTER("wait_while_table_is_used");
-  DBUG_PRINT("enter", ("table: '%s'  share: 0x%lx  db_stat: %u  version: %u",
+  DBUG_PRINT("enter", ("table: '%s'  share: 0x%lx  db_stat: %u  version: %lu",
                        table->s->table_name.str, (ulong) table->s,
                        table->db_stat, table->s->version));
 

--- 1.254/sql/table.cc	2006-11-27 14:08:13 +02:00
+++ 1.255/sql/table.cc	2006-11-27 14:08:13 +02:00
@@ -30,7 +30,7 @@
                            uchar *head, File file);
 static void fix_type_pointers(const char ***array, TYPELIB *point_to_type,
 			      uint types, char **names);
-static uint find_field(Field **fields, uint start, uint length);
+static uint find_field(Field **fields, byte *record, uint start, uint length);
 
 
 /* Get column name from column hash */
@@ -1069,6 +1069,7 @@
         Field *field;
 	if (new_field_pack_flag <= 1)
 	  key_part->fieldnr= (uint16) find_field(share->field,
+                                                 share->default_values,
                                                  (uint) key_part->offset,
                                                  (uint) key_part->length);
 	if (!key_part->fieldnr)
@@ -1232,24 +1233,19 @@
 
   if (share->found_next_number_field)
   {
-    /*
-      We must have a table object for find_ref_key to calculate field offset
-    */
-    TABLE tmp_table;
-    tmp_table.record[0]= share->default_values;
-
     reg_field= *share->found_next_number_field;
-    reg_field->table= &tmp_table;
     if ((int) (share->next_number_index= (uint)
-	       find_ref_key(share->key_info, share->keys, reg_field,
+	       find_ref_key(share->key_info, share->keys,
+                            share->default_values, reg_field,
 			    &share->next_number_key_offset)) < 0)
     {
+      /* Wrong field definition */
+      DBUG_ASSERT(0);
       reg_field->unireg_check= Field::NONE;	/* purecov: inspected */
       share->found_next_number_field= 0;
     }
     else
       reg_field->flags |= AUTO_INCREMENT_FLAG;
-    reg_field->table= 0;
   }
 
   if (share->blob_fields)
@@ -1343,7 +1339,7 @@
   Field **field_ptr;
   DBUG_ENTER("open_table_from_share");
   DBUG_PRINT("enter",("name: '%s.%s'  form: 0x%lx", share->db.str,
-                      share->table_name.str, outparam));
+                      share->table_name.str, (long) outparam));
 
   error= 1;
   bzero((char*) outparam, sizeof(*outparam));
@@ -1969,7 +1965,7 @@
    #  field number +1
 */
 
-static uint find_field(Field **fields, uint start, uint length)
+static uint find_field(Field **fields, byte *record, uint start, uint length)
 {
   Field **field;
   uint i, pos;
@@ -1977,7 +1973,7 @@
   pos= 0;
   for (field= fields, i=1 ; *field ; i++,field++)
   {
-    if ((*field)->offset() == start)
+    if ((*field)->offset(record) == start)
     {
       if ((*field)->key_length() == length)
 	return (i);
@@ -2405,8 +2401,8 @@
   my_bool error= FALSE;
   my_bool fields_diff_count;
   DBUG_ENTER("table_check_intact");
-  DBUG_PRINT("info",("table=%s expected_count=%d",table->alias, table_f_count));
-  DBUG_PRINT("info",("last_create_time=%d", *last_create_time));
+  DBUG_PRINT("info",("table: %s  expected_count: %d  last_create_time: %ld",
+                     table->alias, table_f_count, *last_create_time));
   
   if ((fields_diff_count= (table->s->fields != table_f_count)) ||
       (*last_create_time != table->file->stats.create_time))

--- 1.4/sql/sql_binlog.cc	2006-11-27 14:08:13 +02:00
+++ 1.5/sql/sql_binlog.cc	2006-11-27 14:08:13 +02:00
@@ -85,8 +85,9 @@
         since it will read from unassigned memory.
       */
     DBUG_PRINT("info",
-               ("bytes_decoded=%d; strptr=0x%lu; endptr=0x%lu ('%c':%d)",
-                bytes_decoded, strptr, endptr, *endptr, *endptr));
+               ("bytes_decoded: %d  strptr: 0x%lx  endptr: 0x%lx ('%c':%d)",
+                bytes_decoded, (long) strptr, (long) endptr, *endptr,
+                *endptr));
 #endif
 
     if (bytes_decoded < 0)
@@ -151,20 +152,21 @@
       bufptr += event_len;
 
       DBUG_PRINT("info",("ev->get_type_code()=%d", ev->get_type_code()));
-      DBUG_PRINT("info",("bufptr+EVENT_TYPE_OFFSET=0x%lx",
-                         bufptr+EVENT_TYPE_OFFSET));
 #ifndef HAVE_purify
       /*
         This debug printout should not be used for valgrind builds
         since it will read from unassigned memory.
       */
-      DBUG_PRINT("info", ("bytes_decoded=%d; bufptr=0x%lx; buf[EVENT_LEN_OFFSET]=%u",
-                          bytes_decoded, bufptr, uint4korr(bufptr+EVENT_LEN_OFFSET)));
+      DBUG_PRINT("info",("bufptr+EVENT_TYPE_OFFSET: 0x%lx",
+                         (long) (bufptr+EVENT_TYPE_OFFSET)));
+      DBUG_PRINT("info", ("bytes_decoded: %d   bufptr: 0x%lx  buf[EVENT_LEN_OFFSET]: %lu",
+                          bytes_decoded, (long) bufptr,
+                          uint4korr(bufptr+EVENT_LEN_OFFSET)));
 #endif
       ev->thd= thd;
       if (int err= ev->exec_event(thd->rli_fake))
       {
-        DBUG_PRINT("info", ("exec_event() - error=%d", error));
+        DBUG_PRINT("error", ("exec_event() returned: %d", err));
         /*
           TODO: Maybe a better error message since the BINLOG statement
           now contains several events.

--- 1.86/mysql-test/t/create.test	2006-11-27 14:08:14 +02:00
+++ 1.87/mysql-test/t/create.test	2006-11-27 14:08:14 +02:00
@@ -554,7 +554,7 @@
   a varchar(112) charset utf8 collate utf8_bin not null,
   primary key (a)
 ) select 'test' as a ;
---warning 1364
+#--warning 1364
 show create table t1;
 drop table t1;
 
@@ -567,7 +567,7 @@
 );
 insert into t2 values(111);
 
---warning 1364
+#--warning 1364
 create table t1 ( 
   a varchar(12) charset utf8 collate utf8_bin not null, 
   b int not null, primary key (a)
@@ -575,7 +575,7 @@
 show create table t1;
 drop table t1;
 
---warning 1364
+#--warning 1364
 create table t1 ( 
   a varchar(12) charset utf8 collate utf8_bin not null, 
   b int not null, primary key (a)
@@ -583,7 +583,7 @@
 show create table t1;
 drop table t1;
 
---warning 1364
+#--warning 1364
 create table t1 ( 
   a varchar(12) charset utf8 collate utf8_bin not null, 
   b int null, primary key (a)
@@ -591,7 +591,7 @@
 show create table t1;
 drop table t1;
 
---warning 1364
+#--warning 1364
 create table t1 ( 
   a varchar(12) charset utf8 collate utf8_bin not null,
   b int not null, primary key (a)
@@ -599,7 +599,7 @@
 show create table t1;
 drop table t1;
 
---warning 1364
+#--warning 1364
 create table t1 ( 
   a varchar(12) charset utf8 collate utf8_bin,
   b int not null, primary key (a)
@@ -613,7 +613,7 @@
 );
 insert into t1 values (1,1,1, 1,1,1, 1,1,1);
 
---warning 1364
+#--warning 1364
 create table t2 ( 
   a1 varchar(12) charset utf8 collate utf8_bin not null,
   a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
@@ -621,20 +621,20 @@
 ) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
 drop table t2;
 
---warning 1364
+#--warning 1364
 create table t2 ( 
   a1 varchar(12) charset utf8 collate utf8_bin,
   a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
 ) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1;
 
 drop table t1, t2;
---warning 1364
+#--warning 1364
 create table t1 ( 
   a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
 );
 insert into t1 values (1,1,1, 1,1,1, 1,1,1);
 
---warning 1364
+#--warning 1364
 create table t2 ( 
   a1 varchar(12) charset utf8 collate utf8_bin not null,
   a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,

--- 1.219/tests/mysql_client_test.c	2006-11-27 14:08:14 +02:00
+++ 1.220/tests/mysql_client_test.c	2006-11-27 14:08:14 +02:00
@@ -13695,7 +13695,8 @@
                hired.year, hired.month, hired.day);
     }
     DIE_UNLESS(rc == MYSQL_NO_DATA);
-    mysql_stmt_free_result(stmt) || mysql_stmt_reset(stmt);
+    if (!mysql_stmt_free_result(stmt))
+      mysql_stmt_reset(stmt);
   }
   mysql_stmt_close(stmt);
   mysql_rollback(mysql);
@@ -14837,6 +14838,8 @@
 }
 
 
+#ifndef EMBEDDED_LIBRARY
+
 static void test_bug12744()
 {
   MYSQL_STMT *prep_stmt = NULL;
@@ -14867,6 +14870,8 @@
   rc= mysql_stmt_close(prep_stmt);
   client_connect(0);
 }
+
+#endif /* EMBEDDED_LIBRARY */
 
 /* Bug #16143: mysql_stmt_sqlstate returns an empty string instead of '00000' */
 
Thread
bk commit into 5.1 tree (monty:1.2369)monty27 Nov