List:Commits« Previous MessageNext Message »
From:reggie Date:August 17 2006 3:19pm
Subject:bk commit into 5.1 tree (rburnett:1.2282)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of rburnett. When rburnett 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-08-17 17:19:41+02:00, rburnett@stripped +27 -0
  Merge bk-internal.mysql.com:/data0/bk/tmp_reg
  into  bk-internal.mysql.com:/data0/bk/mysql-5.1
  MERGE: 1.1810.1697.115

  client/mysql.cc@stripped, 2006-08-17 17:16:15+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.199.1.14

  mysql-test/r/ctype_utf8.result@stripped, 2006-08-17 17:16:16+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.85.1.9

  mysql-test/r/gis.result@stripped, 2006-08-17 17:16:16+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.32.1.3

  mysql-test/r/grant.result@stripped, 2006-08-17 17:16:16+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.37.1.17

  mysql-test/r/im_life_cycle.result@stripped, 2006-08-17 17:16:16+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.3.1.5

  mysql-test/r/information_schema_db.result@stripped, 2006-08-17 17:16:16+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.1.1.8

  mysql-test/r/type_newdecimal.result@stripped, 2006-08-17 17:16:16+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.36.1.5

  mysql-test/r/type_ranges.result@stripped, 2006-08-17 17:16:17+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.38.1.5

  mysql-test/r/type_timestamp.result@stripped, 2006-08-17 17:16:17+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.28.2.2

  mysql-test/t/ctype_utf8.test@stripped, 2006-08-17 17:16:17+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.84.1.3

  mysql-test/t/gis.test@stripped, 2006-08-17 17:16:17+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.27.1.2

  mysql-test/t/im_life_cycle.imtest@stripped, 2006-08-17 17:16:18+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.3.1.4

  mysql-test/t/type_newdecimal.test@stripped, 2006-08-17 17:16:18+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.33.1.5

  mysql-test/t/type_timestamp.test@stripped, 2006-08-17 17:16:18+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.26.1.2

  server-tools/instance-manager/instance.cc@stripped, 2006-08-17 17:18:55+02:00, rburnett@stripped +8 -1
    MERGE: 1.32.1.1

  server-tools/instance-manager/messages.cc@stripped, 2006-08-17 17:16:19+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.5.1.1

  sql/item_create.cc@stripped, 2006-08-17 17:19:35+02:00, rburnett@stripped +1 -0
    MERGE: 1.58.1.3

  sql/item_geofunc.h@stripped, 2006-08-17 17:16:20+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.11.1.2

  sql/mysqld.cc@stripped, 2006-08-17 17:16:20+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.439.1.127

  sql/share/errmsg.txt@stripped, 2006-08-17 17:16:25+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.42.1.26

  sql/sql_acl.cc@stripped, 2006-08-17 17:16:20+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.128.1.72

  sql/sql_lex.cc@stripped, 2006-08-17 17:16:21+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.142.1.53

  sql/sql_show.cc@stripped, 2006-08-17 17:16:22+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.253.1.75

  sql/sql_view.cc@stripped, 2006-08-17 17:16:23+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.78.1.14

  sql/sql_yacc.yy@stripped, 2006-08-17 17:16:24+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.371.1.109

  sql/table.h@stripped, 2006-08-17 17:16:24+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.102.1.32

  tests/mysql_client_test.c@stripped, 2006-08-17 17:16:25+02:00, rburnett@stripped +0 -0
    Auto merged
    MERGE: 1.167.1.32

# 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:	rburnett
# Host:	bk-internal.mysql.com
# Root:	/data0/bk/mysql-5.1/RESYNC

--- 1.221/client/mysql.cc	2006-08-17 17:19:50 +02:00
+++ 1.222/client/mysql.cc	2006-08-17 17:19:50 +02:00
@@ -3665,12 +3665,14 @@
       case 'U':
 	if (!full_username)
 	  init_username();
-	processed_prompt.append(full_username);
+        processed_prompt.append(full_username ? full_username :
+                                (current_user ?  current_user : "(unknown)"));
 	break;
       case 'u':
 	if (!full_username)
 	  init_username();
-	processed_prompt.append(part_username);
+        processed_prompt.append(part_username ? part_username :
+                                (current_user ?  current_user : "(unknown)"));
 	break;
       case PROMPT_CHAR:
 	processed_prompt.append(PROMPT_CHAR);

--- 1.64/sql/item_create.cc	2006-08-17 17:19:50 +02:00
+++ 1.65/sql/item_create.cc	2006-08-17 17:19:50 +02:00
@@ -454,6 +454,8 @@
 		       CHARSET_INFO *cs)
 {
   Item *res;
+  int tmp_len;
+  LINT_INIT(res);
 
   switch (cast_type) {
   case ITEM_CAST_BINARY: 	res= new Item_func_binary(a); break;
@@ -463,7 +465,13 @@
   case ITEM_CAST_TIME:		res= new Item_time_typecast(a); break;
   case ITEM_CAST_DATETIME:	res= new Item_datetime_typecast(a); break;
   case ITEM_CAST_DECIMAL:
-    res= new Item_decimal_typecast(a, (len>0) ? len : 10, dec ? dec : 2);
+    tmp_len= (len>0) ? len : 10;
+    if (tmp_len < dec)
+    {
+      my_error(ER_M_BIGGER_THAN_D, MYF(0), "");
+      return 0;
+    }
+    res= new Item_decimal_typecast(a, tmp_len, dec ? dec : 2);
     break;
   case ITEM_CAST_CHAR:
     res= new Item_char_typecast(a, len, cs ? cs : 

--- 1.575/sql/mysqld.cc	2006-08-17 17:19:50 +02:00
+++ 1.576/sql/mysqld.cc	2006-08-17 17:19:50 +02:00
@@ -2785,9 +2785,8 @@
     get corrupted if accesses with names of different case.
   */
   DBUG_PRINT("info", ("lower_case_table_names: %d", lower_case_table_names));
-  if (!lower_case_table_names &&
-      (lower_case_file_system=
-       (test_if_case_insensitive(mysql_real_data_home) == 1)))
+  lower_case_file_system= test_if_case_insensitive(mysql_real_data_home);
+  if (!lower_case_table_names && lower_case_file_system == 1)
   {
     if (lower_case_table_names_used)
     {

--- 1.203/sql/sql_acl.cc	2006-08-17 17:19:50 +02:00
+++ 1.204/sql/sql_acl.cc	2006-08-17 17:19:50 +02:00
@@ -3932,9 +3932,24 @@
   if (table_ref->view || table_ref->field_translation)
   {
     /* View or derived information schema table. */
+    ulong view_privs;
     grant= &(table_ref->grant);
     db_name= table_ref->view_db.str;
     table_name= table_ref->view_name.str;
+    if (table_ref->belong_to_view && 
+        (thd->lex->sql_command == SQLCOM_SHOW_FIELDS ||
+         thd->lex->sql_command == SQLCOM_SHOW_CREATE))
+    {
+      view_privs= get_column_grant(thd, grant, db_name, table_name, name);
+      if (view_privs & VIEW_ANY_ACL)
+      {
+        table_ref->belong_to_view->allowed_show= TRUE;
+        return FALSE;
+      }
+      table_ref->belong_to_view->allowed_show= FALSE;
+      my_message(ER_VIEW_NO_EXPLAIN, ER(ER_VIEW_NO_EXPLAIN), MYF(0));
+      return TRUE;
+    }
   }
   else
   {

--- 1.196/sql/sql_lex.cc	2006-08-17 17:19:50 +02:00
+++ 1.197/sql/sql_lex.cc	2006-08-17 17:19:50 +02:00
@@ -567,23 +567,20 @@
 
     case MY_LEX_IDENT_OR_NCHAR:
       if (yyPeek() != '\'')
-      {					// Found x'hex-number'
+      {					
 	state= MY_LEX_IDENT;
 	break;
       }
-      yyGet();				// Skip '
-      while ((c = yyGet()) && (c !='\'')) ;
-      length=(lex->ptr - lex->tok_start);	// Length of hexnum+3
-      if (c != '\'')
+      /* Found N'string' */
+      lex->tok_start++;                 // Skip N
+      yySkip();                         // Skip '
+      if (!(yylval->lex_str.str = get_text(lex)))
       {
-	return(ABORT_SYM);		// Illegal hex constant
+	state= MY_LEX_CHAR;             // Read char by char
+	break;
       }
-      yyGet();				// get_token makes an unget
-      yylval->lex_str=get_token(lex,length);
-      yylval->lex_str.str+=2;		// Skip x'
-      yylval->lex_str.length-=3;	// Don't count x' and last '
-      lex->yytoklen-=3;
-      return (NCHAR_STRING);
+      yylval->lex_str.length= lex->yytoklen;
+      return(NCHAR_STRING);
 
     case MY_LEX_IDENT_OR_HEX:
       if (yyPeek() == '\'')

--- 1.361/sql/sql_show.cc	2006-08-17 17:19:50 +02:00
+++ 1.362/sql/sql_show.cc	2006-08-17 17:19:50 +02:00
@@ -3070,9 +3070,7 @@
       table->field[5]->store("",0, cs);
       table->field[5]->set_notnull();
     }
-    pos=(byte*) ((flags & NOT_NULL_FLAG) &&
-                 field->type() != FIELD_TYPE_TIMESTAMP ?
-                 "NO" : "YES");
+    pos=(byte*) ((flags & NOT_NULL_FLAG) ?  "NO" : "YES");
     table->field[6]->store((const char*) pos,
                            strlen((const char*) pos), cs);
     is_blob= (field->type() == FIELD_TYPE_BLOB);
@@ -3549,31 +3547,18 @@
   if (tables->view)
   {
     Security_context *sctx= thd->security_ctx;
-    ulong grant= SHOW_VIEW_ACL;
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
-    char *save_table_name= tables->table_name;
-    if (!my_strcasecmp(system_charset_info, tables->definer.user.str,
-                       sctx->priv_user) &&
-        !my_strcasecmp(system_charset_info, tables->definer.host.str,
-                       sctx->priv_host))
-      grant= SHOW_VIEW_ACL;
-    else
-    {
-      tables->table_name= tables->view_name.str;
-      if (check_access(thd, SHOW_VIEW_ACL , base_name,
-                       &tables->grant.privilege, 0, 1,
-                       test(tables->schema_table)))
-        grant= get_table_grant(thd, tables);
-      else
-        grant= tables->grant.privilege;
+    if (!tables->allowed_show)
+    {
+      if (!my_strcasecmp(system_charset_info, tables->definer.user.str,
+                         sctx->priv_user) &&
+          !my_strcasecmp(system_charset_info, tables->definer.host.str,
+                         sctx->priv_host))
+        tables->allowed_show= TRUE;
     }
-    tables->table_name= save_table_name;
-#endif
-
     restore_record(table, s->default_values);
     table->field[1]->store(tables->view_db.str, tables->view_db.length, cs);
     table->field[2]->store(tables->view_name.str, tables->view_name.length, cs);
-    if (grant & SHOW_VIEW_ACL)
+    if (tables->allowed_show)
     {
       char buff[2048];
       String qwe_str(buff, sizeof(buff), cs);

--- 1.493/sql/sql_yacc.yy	2006-08-17 17:19:50 +02:00
+++ 1.494/sql/sql_yacc.yy	2006-08-17 17:19:50 +02:00
@@ -6075,6 +6075,8 @@
                                  lex->length ? atoi(lex->length) : -1,
                                  lex->dec ? atoi(lex->dec) : 0,
                                  lex->charset);
+            if (!$$)
+              YYABORT;
 	  }
 	| CASE_SYM opt_expr WHEN_SYM when_list opt_else END
 	  { $$= new Item_func_case(* $4, $2, $5 ); }
@@ -6084,6 +6086,8 @@
 				 Lex->length ? atoi(Lex->length) : -1,
                                  Lex->dec ? atoi(Lex->dec) : 0,
 				 Lex->charset);
+            if (!$$)
+              YYABORT;
 	  }
 	| CONVERT_SYM '(' expr USING charset_name ')'
 	  { $$= new Item_func_conv_charset($3,$5); }

--- 1.148/sql/table.h	2006-08-17 17:19:50 +02:00
+++ 1.149/sql/table.h	2006-08-17 17:19:50 +02:00
@@ -686,6 +686,7 @@
     tables. Unlike 'next_local', this in this list views are *not*
     leaves. Created in setup_tables() -> make_leaves_list().
   */
+  bool allowed_show;
   st_table_list	*next_leaf;
   Item          *where;                 /* VIEW WHERE clause condition */
   Item          *check_option;          /* WITH CHECK OPTION condition */

--- 1.12/mysql-test/r/im_life_cycle.result	2006-08-17 17:19:50 +02:00
+++ 1.13/mysql-test/r/im_life_cycle.result	2006-08-17 17:19:50 +02:00
@@ -69,3 +69,6 @@
 ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
 STOP INSTANCE mysqld1,mysqld2,mysqld3;
 ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
+STOP INSTANCE mysqld2;
+ERROR HY000: Cannot stop instance. Perhaps the instance is not started, or was started manually, so IM cannot find the pidfile.
+End of 5.0 tests

--- 1.8/mysql-test/t/im_life_cycle.imtest	2006-08-17 17:19:50 +02:00
+++ 1.9/mysql-test/t/im_life_cycle.imtest	2006-08-17 17:19:50 +02:00
@@ -194,3 +194,11 @@
 
 --error ER_SYNTAX_ERROR
 STOP INSTANCE mysqld1,mysqld2,mysqld3;
+
+#
+# Bug #12673: Instance Manager: allows to stop the instance many times
+#
+--error 3001
+STOP INSTANCE mysqld2;
+
+--echo End of 5.0 tests

--- 1.97/mysql-test/r/ctype_utf8.result	2006-08-17 17:19:50 +02:00
+++ 1.98/mysql-test/r/ctype_utf8.result	2006-08-17 17:19:50 +02:00
@@ -1066,6 +1066,18 @@
 100
 DROP TABLE t2;
 DROP TABLE t1;
+CREATE TABLE t1 (item varchar(255)) default character set utf8;
+INSERT INTO t1 VALUES (N'\\');
+INSERT INTO t1 VALUES (_utf8'\\');
+INSERT INTO t1 VALUES (N'Cote d\'Ivoire');
+INSERT INTO t1 VALUES (_utf8'Cote d\'Ivoire');
+SELECT item FROM t1 ORDER BY item;
+item
+Cote d'Ivoire
+Cote d'Ivoire
+\
+\
+DROP TABLE t1;
 SET NAMES utf8;
 DROP TABLE IF EXISTS t1;
 Warnings:

--- 1.88/mysql-test/t/ctype_utf8.test	2006-08-17 17:19:50 +02:00
+++ 1.89/mysql-test/t/ctype_utf8.test	2006-08-17 17:19:50 +02:00
@@ -879,6 +879,17 @@
 DROP TABLE t1;
 
 #
+# Bug#17313: N'xxx' and _utf8'xxx' are not equivalent
+#
+CREATE TABLE t1 (item varchar(255)) default character set utf8;
+INSERT INTO t1 VALUES (N'\\');
+INSERT INTO t1 VALUES (_utf8'\\');
+INSERT INTO t1 VALUES (N'Cote d\'Ivoire');
+INSERT INTO t1 VALUES (_utf8'Cote d\'Ivoire');
+SELECT item FROM t1 ORDER BY item;
+DROP TABLE t1;
+
+#
 # Bug#17705: Corruption of compressed index when index length changes between
 # 254 and 256
 #

--- 1.101/sql/sql_view.cc	2006-08-17 17:19:50 +02:00
+++ 1.102/sql/sql_view.cc	2006-08-17 17:19:50 +02:00
@@ -1001,7 +1001,8 @@
       }
     }
     else if (!table->prelocking_placeholder &&
-             old_lex->sql_command == SQLCOM_SHOW_CREATE)
+             old_lex->sql_command == SQLCOM_SHOW_CREATE &&
+             !table->belong_to_view)
     {
       if (check_table_access(thd, SHOW_VIEW_ACL, table, 0))
         goto err;

--- 1.16/mysql-test/r/information_schema_db.result	2006-08-17 17:19:50 +02:00
+++ 1.17/mysql-test/r/information_schema_db.result	2006-08-17 17:19:50 +02:00
@@ -104,3 +104,50 @@
 drop function f1;
 drop function f2;
 drop view v1, v2;
+create database testdb_1;
+create user testdb_1@localhost;
+grant all on testdb_1.* to testdb_1@localhost with grant option;
+create user testdb_2@localhost;
+grant all on test.* to testdb_2@localhost with grant option;
+use testdb_1;
+create table t1 (f1 char(4));
+create view v1 as select f1 from t1;
+grant insert on v1 to testdb_2@localhost;
+create table t3 (f1 char(4), f2 char(4));
+create view v3 as select f1,f2 from t3;
+grant insert(f1), insert(f2) on v3 to testdb_2@localhost;
+create view v2 as select f1 from testdb_1.v1;
+create view v4 as select f1,f2 from testdb_1.v3;
+revoke insert(f1) on v3 from testdb_2@localhost;
+show create view v4;
+ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
+show fields from v4;
+ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
+show fields from v2;
+Field	Type	Null	Key	Default	Extra
+f1	char(4)	YES		NULL	
+show fields from testdb_1.v1;
+Field	Type	Null	Key	Default	Extra
+f1	char(4)	YES		NULL	
+show create view v2;
+View	Create View
+v2	CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `test`.`v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1`
+show create view testdb_1.v1;
+ERROR 42000: SHOW VIEW command denied to user 'testdb_2'@'localhost' for table 'v1'
+select table_name from information_schema.columns a 
+where a.table_name = 'v2';
+table_name
+v2
+select view_definition from information_schema.views a 
+where a.table_name = 'v2';
+view_definition
+/* ALGORITHM=UNDEFINED */ select `v1`.`f1` AS `f1` from `testdb_1`.`v1`
+select view_definition from information_schema.views a 
+where a.table_name = 'testdb_1.v1';
+view_definition
+select * from v2;
+ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+drop view testdb_1.v1,v2, testdb_1.v3, v4;
+drop database testdb_1;
+drop user testdb_1@localhost;
+drop user testdb_2@localhost;

--- 1.47/mysql-test/r/type_newdecimal.result	2006-08-17 17:19:50 +02:00
+++ 1.48/mysql-test/r/type_newdecimal.result	2006-08-17 17:19:50 +02:00
@@ -915,9 +915,13 @@
 select cast('1.00000001335143196001808973960578441619873046875E-10' as decimal(30,15));
 cast('1.00000001335143196001808973960578441619873046875E-10' as decimal(30,15))
 0.000000000100000
-select ln(14000) c1, convert(ln(14000),decimal(2,3)) c2, cast(ln(14000) as decimal(2,3)) c3;
+select ln(14000) c1, convert(ln(14000),decimal(5,3)) c2, cast(ln(14000) as decimal(5,3)) c3;
 c1	c2	c3
 9.5468126085974	9.547	9.547
+select convert(ln(14000),decimal(2,3)) c1;
+ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '').
+select cast(ln(14000) as decimal(2,3)) c1;
+ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '').
 create table t1 (sl decimal(70,30));
 ERROR 42000: Too big precision 70 specified for column 'sl'. Maximum is 65.
 create table t1 (sl decimal(32,31));

--- 1.40/mysql-test/t/type_newdecimal.test	2006-08-17 17:19:50 +02:00
+++ 1.41/mysql-test/t/type_newdecimal.test	2006-08-17 17:19:50 +02:00
@@ -947,8 +947,12 @@
 #
 # Bug #11708 (conversion to decimal fails in decimal part)
 #
-select ln(14000) c1, convert(ln(14000),decimal(2,3)) c2, cast(ln(14000) as decimal(2,3)) c3;
-
+select ln(14000) c1, convert(ln(14000),decimal(5,3)) c2, cast(ln(14000) as decimal(5,3)) c3;
+--error 1427
+select convert(ln(14000),decimal(2,3)) c1;
+--error 1427
+select cast(ln(14000) as decimal(2,3)) c1;
+ 
 #
 # Bug #8449 (Silent column changes)
 #

--- 1.43/mysql-test/r/type_ranges.result	2006-08-17 17:19:50 +02:00
+++ 1.44/mysql-test/r/type_ranges.result	2006-08-17 17:19:50 +02:00
@@ -57,7 +57,7 @@
 umedium	mediumint(8) unsigned	NULL	NO	MUL	0		#	
 ulong	int(11) unsigned	NULL	NO	MUL	0		#	
 ulonglong	bigint(13) unsigned	NULL	NO	MUL	0		#	
-time_stamp	timestamp	NULL	YES		CURRENT_TIMESTAMP		#	
+time_stamp	timestamp	NULL	NO		CURRENT_TIMESTAMP		#	
 date_field	date	NULL	YES		NULL		#	
 time_field	time	NULL	YES		NULL		#	
 date_time	datetime	NULL	YES		NULL		#	
@@ -229,7 +229,7 @@
 umedium	mediumint(8) unsigned	NULL	NO	MUL	0		#	
 ulong	int(11) unsigned	NULL	NO	MUL	0		#	
 ulonglong	bigint(13) unsigned	NULL	NO	MUL	0		#	
-time_stamp	timestamp	NULL	YES		CURRENT_TIMESTAMP		#	
+time_stamp	timestamp	NULL	NO		CURRENT_TIMESTAMP		#	
 date_field	char(10)	latin1_swedish_ci	YES		NULL		#	
 time_field	time	NULL	YES		NULL		#	
 date_time	datetime	NULL	YES		NULL		#	
@@ -255,7 +255,7 @@
 umedium	mediumint(8) unsigned	NULL	NO		0		#	
 ulong	int(11) unsigned	NULL	NO		0		#	
 ulonglong	bigint(13) unsigned	NULL	NO		0		#	
-time_stamp	timestamp	NULL	YES		0000-00-00 00:00:00		#	
+time_stamp	timestamp	NULL	NO		0000-00-00 00:00:00		#	
 date_field	char(10)	latin1_swedish_ci	YES		NULL		#	
 time_field	time	NULL	YES		NULL		#	
 date_time	datetime	NULL	YES		NULL		#	

--- 1.34/mysql-test/r/type_timestamp.result	2006-08-17 17:19:50 +02:00
+++ 1.35/mysql-test/r/type_timestamp.result	2006-08-17 17:19:50 +02:00
@@ -201,9 +201,9 @@
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 show columns from t1;
 Field	Type	Null	Key	Default	Extra
-t1	timestamp	YES		2003-01-01 00:00:00	
+t1	timestamp	NO		2003-01-01 00:00:00	
 t2	datetime	YES		NULL	
-t3	timestamp	YES		0000-00-00 00:00:00	
+t3	timestamp	NO		0000-00-00 00:00:00	
 drop table t1;
 create table t1 (t1 timestamp default now(), t2 datetime, t3 timestamp);
 SET TIMESTAMP=1000000002;
@@ -225,9 +225,9 @@
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 show columns from t1;
 Field	Type	Null	Key	Default	Extra
-t1	timestamp	YES		CURRENT_TIMESTAMP	
+t1	timestamp	NO		CURRENT_TIMESTAMP	
 t2	datetime	YES		NULL	
-t3	timestamp	YES		0000-00-00 00:00:00	
+t3	timestamp	NO		0000-00-00 00:00:00	
 drop table t1;
 create table t1 (t1 timestamp default '2003-01-01 00:00:00' on update now(), t2 datetime);
 SET TIMESTAMP=1000000004;
@@ -251,7 +251,7 @@
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 show columns from t1;
 Field	Type	Null	Key	Default	Extra
-t1	timestamp	YES		2003-01-01 00:00:00	
+t1	timestamp	NO		2003-01-01 00:00:00	
 t2	datetime	YES		NULL	
 drop table t1;
 create table t1 (t1 timestamp default now() on update now(), t2 datetime);
@@ -276,7 +276,7 @@
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 show columns from t1;
 Field	Type	Null	Key	Default	Extra
-t1	timestamp	YES		CURRENT_TIMESTAMP	
+t1	timestamp	NO		CURRENT_TIMESTAMP	
 t2	datetime	YES		NULL	
 drop table t1;
 create table t1 (t1 timestamp, t2 datetime, t3 timestamp);
@@ -302,9 +302,9 @@
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 show columns from t1;
 Field	Type	Null	Key	Default	Extra
-t1	timestamp	YES		CURRENT_TIMESTAMP	
+t1	timestamp	NO		CURRENT_TIMESTAMP	
 t2	datetime	YES		NULL	
-t3	timestamp	YES		0000-00-00 00:00:00	
+t3	timestamp	NO		0000-00-00 00:00:00	
 drop table t1;
 create table t1 (t1 timestamp default current_timestamp on update current_timestamp, t2 datetime);
 SET TIMESTAMP=1000000009;
@@ -328,7 +328,7 @@
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 show columns from t1;
 Field	Type	Null	Key	Default	Extra
-t1	timestamp	YES		CURRENT_TIMESTAMP	
+t1	timestamp	NO		CURRENT_TIMESTAMP	
 t2	datetime	YES		NULL	
 truncate table t1;
 insert into t1 values ('2004-04-01 00:00:00', '2004-04-01 00:00:00');
@@ -493,3 +493,18 @@
 6	NULL	2006-06-06 06:06:06
 drop table t1;
 set time_zone= @@global.time_zone;
+CREATE TABLE t1 (
+`id` int(11) NOT NULL auto_increment,
+`username` varchar(80) NOT NULL default '',
+`posted_on` timestamp NOT NULL default '0000-00-00 00:00:00',
+PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
+show fields from t1;
+Field	Type	Null	Key	Default	Extra
+id	int(11)	NO	PRI	NULL	auto_increment
+username	varchar(80)	NO			
+posted_on	timestamp	NO		0000-00-00 00:00:00	
+select is_nullable from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='t1' and COLUMN_NAME='posted_on';
+is_nullable
+NO
+drop table t1;

--- 1.28/mysql-test/t/type_timestamp.test	2006-08-17 17:19:50 +02:00
+++ 1.29/mysql-test/t/type_timestamp.test	2006-08-17 17:19:50 +02:00
@@ -328,3 +328,14 @@
 
 # Restore timezone to default
 set time_zone= @@global.time_zone;
+
+CREATE TABLE t1 (
+`id` int(11) NOT NULL auto_increment,
+`username` varchar(80) NOT NULL default '',
+`posted_on` timestamp NOT NULL default '0000-00-00 00:00:00',
+PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
+
+show fields from t1;
+select is_nullable from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='t1' and COLUMN_NAME='posted_on';
+drop table t1;

--- 1.55/mysql-test/r/grant.result	2006-08-17 17:19:50 +02:00
+++ 1.56/mysql-test/r/grant.result	2006-08-17 17:19:50 +02:00
@@ -528,7 +528,7 @@
 User	char(16)	NO	PRI		
 Table_name	char(64)	NO	PRI		
 Grantor	char(77)	NO	MUL		
-Timestamp	timestamp	YES		CURRENT_TIMESTAMP	
+Timestamp	timestamp	NO		CURRENT_TIMESTAMP	
 Table_priv	set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger')	NO			
 Column_priv	set('Select','Insert','Update','References')	NO			
 use test;

--- 1.34/server-tools/instance-manager/instance.cc	2006-08-17 17:19:50 +02:00
+++ 1.35/server-tools/instance-manager/instance.cc	2006-08-17 17:19:50 +02:00
@@ -501,44 +501,46 @@
   struct timespec timeout;
   uint waitchild= (uint)  DEFAULT_SHUTDOWN_DELAY;
 
-  if (options.shutdown_delay)
+  if (is_running())
   {
-    /*
-      NOTE: it is important to check shutdown_delay here, but use
-      shutdown_delay_val. The idea is that if the option is unset,
-      shutdown_delay will be NULL, but shutdown_delay_val will not be reset.
-    */
-    waitchild= options.shutdown_delay_val;
+    if (options.shutdown_delay)
+    {
+      /*
+        NOTE: it is important to check shutdown_delay here, but use
+        shutdown_delay_val. The idea is that if the option is unset,
+        shutdown_delay will be NULL, but shutdown_delay_val will not be reset.
+      */
+      waitchild= options.shutdown_delay_val;
+    }
   }
 
-  kill_instance(SIGTERM);
-  /* sleep on condition to wait for SIGCHLD */
+    kill_instance(SIGTERM);
+    /* sleep on condition to wait for SIGCHLD */
 
-  timeout.tv_sec= time(NULL) + waitchild;
-  timeout.tv_nsec= 0;
-  if (pthread_mutex_lock(&LOCK_instance))
-    goto err;
+    timeout.tv_sec= time(NULL) + waitchild;
+    timeout.tv_nsec= 0;
+    if (pthread_mutex_lock(&LOCK_instance))
+      return ER_STOP_INSTANCE;
+
+    while (options.get_pid() != 0)              /* while server isn't stopped */
+    {
+      int status;
+
+      status= pthread_cond_timedwait(&COND_instance_stopped,
+                                     &LOCK_instance,
+                                     &timeout);
+      if (status == ETIMEDOUT || status == ETIME)
+        break;
+    }
 
-  while (options.get_pid() != 0)              /* while server isn't stopped */
-  {
-    int status;
-
-    status= pthread_cond_timedwait(&COND_instance_stopped,
-                                   &LOCK_instance,
-                                   &timeout);
-    if (status == ETIMEDOUT || status == ETIME)
-      break;
-  }
+    pthread_mutex_unlock(&LOCK_instance);
 
-  pthread_mutex_unlock(&LOCK_instance);
+    kill_instance(SIGKILL);
 
-  kill_instance(SIGKILL);
-
-  return 0;
+    return 0;
+  }
 
   return ER_INSTANCE_IS_NOT_STARTED;
-err:
-  return ER_STOP_INSTANCE;
 }
 
 #ifdef __WIN__

--- 1.6/server-tools/instance-manager/messages.cc	2006-08-17 17:19:50 +02:00
+++ 1.7/server-tools/instance-manager/messages.cc	2006-08-17 17:19:50 +02:00
@@ -47,8 +47,8 @@
   case ER_BAD_INSTANCE_NAME:
     return "Bad instance name. Check that the instance with such a name exists";
   case ER_INSTANCE_IS_NOT_STARTED:
-    return "Cannot stop instance. Perhaps the instance is not started, or was started"
-            "manually, so IM cannot find the pidfile.";
+    return "Cannot stop instance. Perhaps the instance is not started, or was"
+           " started manually, so IM cannot find the pidfile.";
   case ER_INSTANCE_ALREADY_STARTED:
     return "The instance is already started";
   case ER_CANNOT_START_INSTANCE:
@@ -66,7 +66,7 @@
     return "Cannot open log file";
   case ER_GUESS_LOGFILE:
     return "Cannot guess the log filename. Try specifying full log name"
-           "in the instance options";
+           " in the instance options";
   case ER_ACCESS_OPTION_FILE:
     return "Cannot open the option file to edit. Check permissions";
   case ER_DROP_ACTIVE_INSTANCE:

--- 1.35/mysql-test/r/gis.result	2006-08-17 17:19:50 +02:00
+++ 1.36/mysql-test/r/gis.result	2006-08-17 17:19:50 +02:00
@@ -225,8 +225,8 @@
 120	POLYGON((0 0,10 0,10 10,0 10,0 0))
 121	POLYGON((3 6,44 6,44 9,3 9,3 6))
 explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	gis_geometry	ALL	NULL	NULL	NULL	NULL	21	
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	gis_geometry	ALL	NULL	NULL	NULL	NULL	21	100.00	
 Warnings:
 Note	1003	select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry`
 SELECT fid, X(g) FROM gis_point;
@@ -242,8 +242,8 @@
 103	20
 104	20
 explain extended select X(g),Y(g) FROM gis_point;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	gis_point	ALL	NULL	NULL	NULL	NULL	4	
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	gis_point	ALL	NULL	NULL	NULL	NULL	4	100.00	
 Warnings:
 Note	1003	select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point`
 SELECT fid, AsText(StartPoint(g)) FROM gis_line;
@@ -277,8 +277,8 @@
 106	1
 107	0
 explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	gis_line	ALL	NULL	NULL	NULL	NULL	3	
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	gis_line	ALL	NULL	NULL	NULL	NULL	3	100.00	
 Warnings:
 Note	1003	select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line`
 SELECT fid, AsText(Centroid(g)) FROM gis_polygon;
@@ -307,8 +307,8 @@
 109	LINESTRING(10 10,20 10,20 20,10 20,10 10)
 110	NULL
 explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	gis_polygon	ALL	NULL	NULL	NULL	NULL	3	
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	gis_polygon	ALL	NULL	NULL	NULL	NULL	3	100.00	
 Warnings:
 Note	1003	select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon`
 SELECT fid, IsClosed(g) FROM gis_multi_line;
@@ -346,8 +346,8 @@
 120	2
 121	2
 explain extended SELECT fid, NumGeometries(g) from gis_multi_point;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	gis_multi_point	ALL	NULL	NULL	NULL	NULL	3	
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	gis_multi_point	ALL	NULL	NULL	NULL	NULL	3	100.00	
 Warnings:
 Note	1003	select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point`
 SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point;
@@ -374,8 +374,8 @@
 120	POINT(0 0)
 121	POINT(44 6)
 explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	gis_multi_point	ALL	NULL	NULL	NULL	NULL	3	
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	gis_multi_point	ALL	NULL	NULL	NULL	NULL	3	100.00	
 Warnings:
 Note	1003	select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point`
 SELECT g1.fid as first, g2.fid as second,
@@ -393,9 +393,9 @@
 Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
 Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
 FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	g1	ALL	NULL	NULL	NULL	NULL	2	Using temporary; Using filesort
-1	SIMPLE	g2	ALL	NULL	NULL	NULL	NULL	2	
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	g1	ALL	NULL	NULL	NULL	NULL	2	100.00	Using temporary; Using filesort
+1	SIMPLE	g2	ALL	NULL	NULL	NULL	NULL	2	100.00	
 Warnings:
 Note	1003	select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
 DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
@@ -436,26 +436,26 @@
 AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)'))))
 POINT(1 4)
 explain extended SELECT AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)'))));
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
 Warnings:
 Note	1003	select astext(geometryfromwkb(aswkb(geometryfromtext(_latin1'POINT(1 4)')))) AS `AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)'))))`
 explain extended SELECT AsText(GeometryFromWKB(AsWKB(PointFromText('POINT(1 4)'))));
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
 Warnings:
 Note	1003	select astext(geometryfromwkb(aswkb(geometryfromtext(_latin1'POINT(1 4)')))) AS `AsText(GeometryFromWKB(AsWKB(PointFromText('POINT(1 4)'))))`
 SELECT SRID(GeomFromText('LineString(1 1,2 2)',101));
 SRID(GeomFromText('LineString(1 1,2 2)',101))
 101
 explain extended SELECT SRID(GeomFromText('LineString(1 1,2 2)',101));
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
 Warnings:
 Note	1003	select srid(geometryfromtext(_latin1'LineString(1 1,2 2)',101)) AS `SRID(GeomFromText('LineString(1 1,2 2)',101))`
 explain extended select issimple(MultiPoint(Point(3, 6), Point(4, 10))), issimple(Point(3, 6));
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
 Warnings:
 Note	1003	select issimple(multipoint(point(3,6),point(4,10))) AS `issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,issimple(point(3,6)) AS `issimple(Point(3, 6))`
 create table t1 (a geometry not null);

--- 1.203/tests/mysql_client_test.c	2006-08-17 17:19:50 +02:00
+++ 1.204/tests/mysql_client_test.c	2006-08-17 17:19:50 +02:00
@@ -3976,6 +3976,7 @@
                                                         c7 timestamp(6))");
   myquery(rc);
 
+  rc= mysql_query(mysql, "SET SQL_MODE=''");
   rc= mysql_query(mysql, "INSERT INTO test_bind_result VALUES('2002-01-02', \
                                                               '12:49:00', \
                                                               '2002-01-02 17:46:59', \
@@ -8350,6 +8351,7 @@
   int rc;
   myheader("test_bug19671");
 
+  mysql_query(mysql, "set sql_mode=''");
   rc= mysql_query(mysql, "drop table if exists t1");
   myquery(rc);
 
@@ -8920,7 +8922,7 @@
   rc= mysql_query(mysql, "DROP TABLE test_bg1500");
   myquery(rc);
 
-  rc= mysql_query(mysql, "CREATE TABLE test_bg1500 (s VARCHAR(25), FULLTEXT(s))");
+  rc= mysql_query(mysql, "CREATE TABLE test_bg1500 (s VARCHAR(25), FULLTEXT(s)) engine=MyISAM");
   myquery(rc);
 
   rc= mysql_query(mysql,
@@ -10996,7 +10998,8 @@
   {
     rc= mysql_stmt_execute(stmt);
     check_execute(stmt, rc);
-    assert(1 == my_process_stmt_result(stmt));
+    rc= my_process_stmt_result(stmt);
+    assert(1 == rc);
   }
   mysql_stmt_close(stmt);
 
@@ -11038,7 +11041,8 @@
   {
     rc= mysql_stmt_execute(stmt);
     check_execute(stmt, rc);
-    assert(4 == my_process_stmt_result(stmt));
+    rc= my_process_stmt_result(stmt);
+    assert(4 == rc);
   }
   mysql_stmt_close(stmt);
 
@@ -11120,7 +11124,8 @@
 
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
-  assert(0 == my_process_stmt_result(stmt));
+  rc= my_process_stmt_result(stmt);
+  assert(0 == rc);
 
   mysql_stmt_close(stmt);
 
@@ -11172,7 +11177,8 @@
   {
     rc= mysql_stmt_execute(stmt);
     check_execute(stmt, rc);
-    assert(0 == my_process_stmt_result(stmt));
+    rc= my_process_stmt_result(stmt);
+    assert(0 == rc);
   }
 
   mysql_stmt_close(stmt);
@@ -11226,6 +11232,7 @@
 
   for (i= 0; i < 3; i++)
   {
+    int rowcount= 0;
     my_val= i;
 
     rc= mysql_stmt_execute(insert_stmt);
@@ -11233,7 +11240,8 @@
 
     rc= mysql_stmt_execute(select_stmt);
     check_execute(select_stmt, rc);
-    assert(i + 1 == (int) my_process_stmt_result(select_stmt));
+    rowcount= (int)my_process_stmt_result(select_stmt);
+    assert((i+1) == rowcount);
   }
   mysql_stmt_close(insert_stmt);
   mysql_stmt_close(select_stmt);
@@ -11273,7 +11281,8 @@
   {
     rc= mysql_stmt_execute(stmt);
     check_execute(stmt, rc);
-    assert(3 == my_process_stmt_result(stmt));
+    rc= my_process_stmt_result(stmt);
+    assert(3 == rc);
   }
   mysql_stmt_close(stmt);
 
@@ -11348,7 +11357,8 @@
   check_execute(stmt, rc);
   rc= mysql_stmt_execute(stmt);
   check_execute(stmt, rc);
-  assert(1 == my_process_stmt_result(stmt));
+  rc= my_process_stmt_result(stmt);
+  assert(1 == rc);
 
   mysql_stmt_close(stmt);
   rc= mysql_query(mysql, "DROP VIEW v1");
@@ -12012,6 +12022,7 @@
   rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
   myquery(rc);
 
+  mysql_query(mysql, "set sql_mode=''");
   stmt_text= "create table t1 (c_tinyint tinyint, c_smallint smallint, "
                              " c_mediumint mediumint, c_int int, "
                              " c_bigint bigint, c_float float, "
@@ -12897,6 +12908,7 @@
   DIE_UNLESS(memcmp(out, TEST_BUG8378_OUT, len) == 0);
 
   sprintf(buf, "SELECT '%s'", out);
+  
   rc=mysql_real_query(mysql, buf, strlen(buf));
   myquery(rc);
 
Thread
bk commit into 5.1 tree (rburnett:1.2282)reggie17 Aug