List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:July 22 2008 12:42pm
Subject:bzr push into mysql-6.0-backup branch (serg:2682 to 2683)
View as plain text  
 2683 Sergei Golubchik	2008-07-22 [merge]
      6.0 -> 6.0-maria merge
removed:
  mysql-test/extra/binlog_tests/implicit.test
  mysql-test/r/parser.result
  mysql-test/suite/binlog/r/binlog_implicit_commit.result
  mysql-test/suite/binlog/t/binlog_implicit_commit.test
  mysql-test/suite/falcon/r/rpl_falcon_bug_37221.result
  mysql-test/suite/falcon/t/rpl_falcon_bug_37221.test
  mysql-test/t/parser.test
added:
  mysql-test/extra/binlog_tests/implicit.test
  mysql-test/r/parser.result
  mysql-test/suite/binlog/r/binlog_implicit_commit.result
  mysql-test/suite/binlog/t/binlog_implicit_commit.test
  mysql-test/suite/falcon/r/rpl_falcon_bug_37221.result
  mysql-test/suite/falcon/t/rpl_falcon_bug_37221.test
  mysql-test/t/parser.test
modified:
  client/mysql.cc
  include/my_sys.h
  mysql-test/mysql-test-run.pl*
  mysql-test/r/mysql.result
  mysql-test/suite/funcs_1/triggers/triggers_03.inc
  mysql-test/suite/funcs_1/triggers/triggers_08.inc
  mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc
  mysql-test/t/mysql_delimiter.sql
  mysql-test/t/system_mysql_db_fix50030.test
  mysql-test/t/system_mysql_db_fix50117.test
  mysys/default.c
  mysys/mf_pack.c
  scripts/make_binary_distribution.sh
  sql/backup/api_types.h
  sql/backup/backup_engine.h
  sql/backup/backup_test.cc
  sql/backup/be_nodata.h
  sql/backup/data_backup.cc
  sql/backup/kernel.cc
  sql/backup/stream_v1.c
  sql/backup/stream_v1_transport.c
  sql/hostname.cc
  sql/mysql_priv.h
  sql/mysqld.cc
  storage/archive/azio.h
  storage/falcon/ha_falcon.cpp
  storage/innobase/include/univ.i
  storage/myisam/myisam_backup_engine.cc
  support-files/my-huge.cnf.sh
  support-files/my-large.cnf.sh
  support-files/my-medium.cnf.sh

 2682 Sergei Golubchik	2008-07-21 [merge]
      6.0 -> 6.0-maria merge
removed:
  mysql-test/r/merge-big.result
  mysql-test/t/merge-big.test
  sql/backup/debug.h
added:
  mysql-test/include/ctype_ascii_order.inc
  mysql-test/include/have_debug_sync.inc
  mysql-test/r/backup_charsets.result
  mysql-test/r/backup_commit_restore.result
  mysql-test/r/backup_compression.result
  mysql-test/r/backup_lock_myisam.result
  mysql-test/r/backup_many_dbs.result
  mysql-test/r/backup_multi_blocks.result
  mysql-test/r/backup_myisam1.result
  mysql-test/r/backup_myisam2.result
  mysql-test/r/backup_no_be.result
  mysql-test/r/backup_nodata_driver.result
  mysql-test/r/backup_procedures.result
  mysql-test/r/backup_triggers_and_events.result
  mysql-test/r/backup_view_on_view.result
  mysql-test/r/backup_views.result
  mysql-test/r/ctype_cp866.result
  mysql-test/r/debug_sync.result
  mysql-test/r/have_debug_sync.require
  mysql-test/r/merge-sync.result
  mysql-test/r/myisamlog.result
  mysql-test/suite/backup/
  mysql-test/suite/backup/r/
  mysql-test/suite/backup/r/backup_online_testing.result
  mysql-test/suite/backup/t/
  mysql-test/suite/backup/t/backup_online_testing.test
  mysql-test/suite/falcon/r/falcon_bug_37343.result
  mysql-test/suite/falcon/r/falcon_bug_37344_A.result
  mysql-test/suite/falcon/t/falcon_bug_37343.test
  mysql-test/suite/falcon/t/falcon_bug_37344_A.test
  mysql-test/t/backup_charsets.test
  mysql-test/t/backup_commit_restore.test
  mysql-test/t/backup_compression.test
  mysql-test/t/backup_lock_myisam.test
  mysql-test/t/backup_many_dbs.test
  mysql-test/t/backup_multi_blocks.test
  mysql-test/t/backup_myisam1-master.opt
  mysql-test/t/backup_myisam1.test
  mysql-test/t/backup_myisam2.test
  mysql-test/t/backup_no_be.test
  mysql-test/t/backup_nodata_driver.test
  mysql-test/t/backup_procedures.test
  mysql-test/t/backup_triggers_and_events.test
  mysql-test/t/backup_view_on_view.test
  mysql-test/t/backup_views.test
  mysql-test/t/ctype_cp866.test
  mysql-test/t/debug_sync.test
  mysql-test/t/merge-sync.test
  mysql-test/t/myisamlog-master.opt
  mysql-test/t/myisamlog.test
  sql/backup/backup_info.cc
  sql/backup/backup_info.h
  sql/backup/be_logical.h
  sql/backup/be_nodata.cc
  sql/backup/be_nodata.h
  sql/backup/restore_info.h
  sql/debug_sync.cc
  storage/falcon/CompareAndSwapSparc.il
  storage/myisam/mi_examine_log.c
  storage/myisam/myisam_backup_engine.cc
renamed:
  mysql-test/suite/falcon/r/falcon_bug_28048.result => mysql-test/suite/falcon_team/r/falcon_bug_28048.result
  mysql-test/suite/falcon/r/falcon_bug_37080.result => mysql-test/suite/falcon_team/r/falcon_bug_37080.result
  mysql-test/suite/falcon/t/falcon_bug_28048.test => mysql-test/suite/falcon_team/t/falcon_bug_28048.test
  mysql-test/suite/falcon/t/falcon_bug_37080.test => mysql-test/suite/falcon_team/t/falcon_bug_37080.test
  mysql-test/suite/falcon_team/r/falcon_read-committed.result => mysql-test/suite/falcon/r/falcon_read-committed.result
  mysql-test/suite/falcon_team/t/falcon_read-committed.test => mysql-test/suite/falcon/t/falcon_read-committed.test
  sql/backup/catalog.cc => sql/backup/image_info.cc
  sql/backup/catalog.h => sql/backup/image_info.h
modified:
  .bzr-mysql/default.conf
  .bzrignore
  CMakeLists.txt*
  client/mysqltest.c
  configure.in
  dbug/CMakeLists.txt*
  include/atomic/generic-msvc.h
  include/atomic/nolock.h
  include/config-win.h
  include/keycache.h
  include/my_global.h
  include/my_sys.h
  include/myisam.h
  libmysqld/CMakeLists.txt
  libmysqld/Makefile.am
  mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
  mysql-test/lib/mtr_report.pl
  mysql-test/mysql-test-run.pl
  mysql-test/r/backup.result
  mysql-test/r/backup_commit_blocker.result
  mysql-test/r/backup_ddl_blocker.result
  mysql-test/r/backup_errors.result
  mysql-test/r/backup_objects.result
  mysql-test/r/backup_progress.result
  mysql-test/r/backup_snapshot.result
  mysql-test/r/character_set_server_func.result
  mysql-test/r/ctype_big5.result
  mysql-test/r/ctype_gb2312.result
  mysql-test/r/ctype_gbk.result
  mysql-test/r/ctype_tis620.result
  mysql-test/r/ctype_utf32.result
  mysql-test/r/ctype_utf8.result
  mysql-test/r/fulltext2.result
  mysql-test/r/merge.result
  mysql-test/r/xml.result
  mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
  mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
  mysql-test/suite/falcon/r/falcon_bug_22150.result
  mysql-test/suite/falcon/r/falcon_bug_32833.result
  mysql-test/suite/falcon/r/falcon_options.result
  mysql-test/suite/falcon/r/falcon_options2.result
  mysql-test/suite/falcon/t/falcon_bug_22150.test
  mysql-test/suite/falcon/t/falcon_options.test
  mysql-test/suite/falcon/t/falcon_options2.test
  mysql-test/suite/funcs_1/r/is_columns_mysql.result
  mysql-test/suite/rpl/t/disabled.def
  mysql-test/t/backup.test
  mysql-test/t/backup_commit_blocker.test
  mysql-test/t/backup_ddl_blocker.test
  mysql-test/t/backup_errors.test
  mysql-test/t/backup_objects.test
  mysql-test/t/backup_progress.test
  mysql-test/t/backup_security.test
  mysql-test/t/backup_snapshot.test
  mysql-test/t/character_set_server_func.test
  mysql-test/t/ctype_big5.test
  mysql-test/t/ctype_gb2312.test
  mysql-test/t/ctype_gbk.test
  mysql-test/t/ctype_tis620.test
  mysql-test/t/ctype_utf32.test
  mysql-test/t/ctype_utf8.test
  mysql-test/t/disabled.def
  mysql-test/t/fulltext2.test
  mysql-test/t/innodb-autoinc.test
  mysql-test/t/key_cache.test
  mysql-test/t/merge.test
  mysql-test/t/xml.test
  mysql-test/valgrind.supp
  mysys/CMakeLists.txt
  mysys/mf_iocache.c
  mysys/mf_keycache.c
  mysys/my_thr_init.c
  mysys/thr_lock.c
  scripts/mysql_system_tables.sql
  sql/CMakeLists.txt
  sql/Makefile.am
  sql/backup/CMakeLists.txt
  sql/backup/Makefile.am
  sql/backup/api_types.h
  sql/backup/backup_aux.h
  sql/backup/backup_engine.h
  sql/backup/backup_kernel.h
  sql/backup/backup_progress.cc
  sql/backup/backup_progress.h
  sql/backup/backup_stream.h
  sql/backup/backup_test.cc
  sql/backup/be_default.cc
  sql/backup/be_default.h
  sql/backup/be_native.h
  sql/backup/be_snapshot.cc
  sql/backup/be_snapshot.h
  sql/backup/be_thread.cc
  sql/backup/be_thread.h
  sql/backup/buffer_iterator.cc
  sql/backup/buffer_iterator.h
  sql/backup/data_backup.cc
  sql/backup/kernel.cc
  sql/backup/logger.cc
  sql/backup/logger.h
  sql/backup/stream.cc
  sql/backup/stream.h
  sql/backup/stream_services.h
  sql/backup/stream_v1.c
  sql/backup/stream_v1.h
  sql/backup/stream_v1_transport.c
  sql/ddl_blocker.cc
  sql/ddl_blocker.h
  sql/handler.cc
  sql/item.cc
  sql/item_func.cc
  sql/item_xmlfunc.cc
  sql/lex.h
  sql/lock.cc
  sql/mysql_priv.h
  sql/mysqld.cc
  sql/set_var.cc
  sql/set_var.h
  sql/share/charsets/cp866.xml
  sql/share/errmsg.txt
  sql/si_objects.cc
  sql/si_objects.h
  sql/sql_array.h
  sql/sql_base.cc
  sql/sql_bitmap.h
  sql/sql_cache.cc
  sql/sql_class.cc
  sql/sql_class.h
  sql/sql_delete.cc
  sql/sql_insert.cc
  sql/sql_lex.h
  sql/sql_load.cc
  sql/sql_parse.cc
  sql/sql_repl.cc
  sql/sql_repl.h
  sql/sql_string.cc
  sql/sql_table.cc
  sql/sql_yacc.yy
  storage/falcon/Cache.cpp
  storage/falcon/Configuration.cpp
  storage/falcon/Connection.cpp
  storage/falcon/Gopher.cpp
  storage/falcon/Gopher.h
  storage/falcon/IO.cpp
  storage/falcon/IOx.h
  storage/falcon/IndexPage.cpp
  storage/falcon/IndexWalker.cpp
  storage/falcon/IndexWalker.h
  storage/falcon/Interlock.h
  storage/falcon/Makefile.am
  storage/falcon/Page.h
  storage/falcon/SectorBuffer.cpp
  storage/falcon/SerialLog.cpp
  storage/falcon/SerialLog.h
  storage/falcon/SerialLogFile.cpp
  storage/falcon/Statement.cpp
  storage/falcon/StorageDatabase.cpp
  storage/falcon/StorageDatabase.h
  storage/falcon/StorageHandler.cpp
  storage/falcon/StorageParameters.h
  storage/falcon/StorageTableShare.cpp
  storage/falcon/StorageTableShare.h
  storage/falcon/TableSpaceManager.cpp
  storage/falcon/Transaction.cpp
  storage/falcon/WalkDeferred.cpp
  storage/falcon/WalkIndex.cpp
  storage/falcon/ha_falcon.cpp
  storage/falcon/ha_falcon.h
  storage/falcon/plug.in
  storage/myisam/CMakeLists.txt
  storage/myisam/Makefile.am
  storage/myisam/ft_parser.c
  storage/myisam/ft_update.c
  storage/myisam/ftdefs.h
  storage/myisam/ha_myisam.cc
  storage/myisam/ha_myisam.h
  storage/myisam/mi_check.c
  storage/myisam/mi_close.c
  storage/myisam/mi_create.c
  storage/myisam/mi_delete.c
  storage/myisam/mi_delete_all.c
  storage/myisam/mi_dynrec.c
  storage/myisam/mi_extra.c
  storage/myisam/mi_locking.c
  storage/myisam/mi_log.c
  storage/myisam/mi_open.c
  storage/myisam/mi_page.c
  storage/myisam/mi_panic.c
  storage/myisam/mi_rrnd.c
  storage/myisam/mi_static.c
  storage/myisam/mi_test2.c
  storage/myisam/mi_test3.c
  storage/myisam/mi_test_all.sh
  storage/myisam/mi_update.c
  storage/myisam/mi_write.c
  storage/myisam/myisam_ftdump.c
  storage/myisam/myisamchk.c
  storage/myisam/myisamdef.h
  storage/myisam/myisamlog.c
  storage/myisam/myisampack.c
  storage/myisammrg/ha_myisammrg.cc
  storage/myisammrg/myrg_info.c
  storage/myisammrg/myrg_open.c
  storage/myisammrg/myrg_queue.c
  storage/myisammrg/myrg_rrnd.c
  strings/ctype-big5.c
  strings/ctype-extra.c
  strings/ctype-gb2312.c
  strings/ctype-gbk.c
  strings/ctype-ucs2.c
  strings/ctype-utf8.c
  win/configure.js
  mysql-test/suite/falcon_team/r/falcon_bug_28048.result
  mysql-test/suite/falcon_team/t/falcon_bug_28048.test
  mysql-test/suite/falcon_team/t/falcon_bug_37080.test
  mysql-test/suite/falcon/r/falcon_read-committed.result
  mysql-test/suite/falcon/t/falcon_read-committed.test
  sql/backup/image_info.cc
  sql/backup/image_info.h

=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2008-07-09 21:25:29 +0000
+++ b/client/mysql.cc	2008-07-22 12:11:06 +0000
@@ -2135,6 +2135,37 @@ static bool add_line(String &buffer,char
 	continue;
       }
     }
+    else if (!*ml_comment && !*in_string &&
+             (end_of_line - pos) >= 10 &&
+             !my_strnncoll(charset_info, (uchar*) pos, 10,
+                           (const uchar*) "delimiter ", 10))
+    {
+      // Flush previously accepted characters
+      if (out != line)
+      {
+        buffer.append(line, (uint32) (out - line));
+        out= line;
+      }
+
+      // Flush possible comments in the buffer
+      if (!buffer.is_empty())
+      {
+        if (com_go(&buffer, 0) > 0) // < 0 is not fatal
+          DBUG_RETURN(1);
+        buffer.length(0);
+      }
+
+      /*
+        Delimiter wants the get rest of the given line as argument to
+        allow one to change ';' to ';;' and back
+      */
+      buffer.append(pos);
+      if (com_delimiter(&buffer, pos) > 0)
+        DBUG_RETURN(1);
+
+      buffer.length(0);
+      break;
+    }
     else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter))
     {
       // Found a statement. Continue parsing after the delimiter

=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2008-07-09 07:12:43 +0000
+++ b/include/my_sys.h	2008-07-21 09:17:03 +0000
@@ -722,6 +722,7 @@ extern char * fn_format(char * to,const 
 			   const char *form, uint flag);
 extern size_t strlength(const char *str);
 extern void pack_dirname(char * to,const char *from);
+extern size_t normalize_dirname(char * to, const char *from);
 extern size_t unpack_dirname(char * to,const char *from);
 extern size_t cleanup_dirname(char * to,const char *from);
 extern size_t system_filename(char * to,const char *from);

=== added file 'mysql-test/extra/binlog_tests/implicit.test'
--- a/mysql-test/extra/binlog_tests/implicit.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/extra/binlog_tests/implicit.test	2008-06-12 11:36:39 +0000
@@ -0,0 +1,28 @@
+# First part: outside a transaction
+RESET MASTER;
+eval $prepare;
+
+INSERT INTO t1 VALUES (1);
+source include/show_binlog_events.inc;
+eval $statement;
+source include/show_binlog_events.inc;
+if (`select '$cleanup' != ''`) {
+  eval $cleanup;
+}
+
+# Second part: inside a transaction
+RESET MASTER;
+eval $prepare;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+source include/show_binlog_events.inc;
+eval $statement;
+source include/show_binlog_events.inc;
+INSERT INTO t1 VALUES (3);
+source include/show_binlog_events.inc;
+COMMIT;
+source include/show_binlog_events.inc;
+if (`select '$cleanup' != ''`) {
+  eval $cleanup;
+}
+

=== removed file 'mysql-test/extra/binlog_tests/implicit.test'
--- a/mysql-test/extra/binlog_tests/implicit.test	2008-06-09 19:32:42 +0000
+++ b/mysql-test/extra/binlog_tests/implicit.test	1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-# First part: outside a transaction
-RESET MASTER;
-eval $prepare;
-
-INSERT INTO t1 VALUES (1);
-source include/show_binlog_events.inc;
-eval $statement;
-source include/show_binlog_events.inc;
-if (`select '$cleanup' != ''`) {
-  eval $cleanup;
-}
-
-# Second part: inside a transaction
-RESET MASTER;
-eval $prepare;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-source include/show_binlog_events.inc;
-eval $statement;
-source include/show_binlog_events.inc;
-INSERT INTO t1 VALUES (3);
-source include/show_binlog_events.inc;
-COMMIT;
-source include/show_binlog_events.inc;
-if (`select '$cleanup' != ''`) {
-  eval $cleanup;
-}
-

=== modified file 'mysql-test/mysql-test-run.pl' (properties changed: +x to -x)
--- a/mysql-test/mysql-test-run.pl	2008-07-20 22:39:29 +0000
+++ b/mysql-test/mysql-test-run.pl	2008-07-22 12:11:06 +0000
@@ -111,7 +111,6 @@ our $glob_basedir;
 
 our $path_charsetsdir;
 our $path_client_bindir;
-our $path_client_libdir;
 our $path_share;
 our $path_language;
 our $path_timefile;
@@ -658,8 +657,6 @@ sub command_line_setup () {
              'vardir=s'                 => \$opt_vardir,
              'benchdir=s'               => \$glob_mysql_bench_dir,
              'mem'                      => \$opt_mem,
-             'client-bindir=s'          => \$path_client_bindir,
-             'client-libdir=s'          => \$path_client_libdir,
 
              # Misc
              'report-features'          => \$opt_report_features,
@@ -786,20 +783,12 @@ sub command_line_setup () {
   #
 
   # Look for the client binaries directory
-  if ($path_client_bindir)
-  {
-    # --client-bindir=path set on command line, check that the path exists
-    $path_client_bindir= mtr_path_exists($path_client_bindir);
-  }
-  else
-  {
-    $path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
-					 "$glob_basedir/client_debug",
-					 vs_config_dirs('client', ''),
-					 "$glob_basedir/client",
-					 "$glob_basedir/bin");
-  }
-  
+  $path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
+				       "$glob_basedir/client_debug",
+				       vs_config_dirs('client', ''),
+				       "$glob_basedir/client",
+				       "$glob_basedir/bin");
+
   # Look for language files and charsetsdir, use same share
   $path_share=      mtr_path_exists("$glob_basedir/share/mysql",
                                     "$glob_basedir/sql/share",
@@ -1747,25 +1736,19 @@ sub environment_setup () {
 
   my @ld_library_paths;
 
-  if ($path_client_libdir)
+  # --------------------------------------------------------------------------
+  # Setup LD_LIBRARY_PATH so the libraries from this distro/clone
+  # are used in favor of the system installed ones
+  # --------------------------------------------------------------------------
+  if ( $source_dist )
   {
-    # Use the --client-libdir passed on commandline
-    push(@ld_library_paths, "$path_client_libdir");
+    push(@ld_library_paths, "$glob_basedir/libmysql/.libs/",
+                            "$glob_basedir/libmysql_r/.libs/",
+                            "$glob_basedir/zlib.libs/");
   }
   else
   {
-    # Setup LD_LIBRARY_PATH so the libraries from this distro/clone
-    # are used in favor of the system installed ones
-    if ( $source_dist )
-    {
-      push(@ld_library_paths, "$glob_basedir/libmysql/.libs/",
-	   "$glob_basedir/libmysql_r/.libs/",
-	   "$glob_basedir/zlib.libs/");
-    }
-    else
-    {
-      push(@ld_library_paths, "$glob_basedir/lib");
-    }
+    push(@ld_library_paths, "$glob_basedir/lib");
   }
 
  # --------------------------------------------------------------------------
@@ -1977,9 +1960,6 @@ sub environment_setup () {
   {
     $cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
   }
-  # Always use the given tmpdir for the LOAD files created
-  # by mysqlbinlog
-  $cmdline_mysqlbinlog .=" --local-load=$opt_tmpdir";
 
   if ( $opt_debug )
   {
@@ -5177,8 +5157,6 @@ Misc options
   warnings | log-warnings Pass --log-warnings to mysqld
 
   sleep=SECONDS         Passed to mysqltest, will be used as fixed sleep time
-  client-bindir=PATH    Path to the directory where client binaries are located
-  client-libdir=PATH    Path to the directory where client libraries are located
 
 Deprecated options
   with-openssl          Deprecated option for ssl

=== modified file 'mysql-test/r/mysql.result'
--- a/mysql-test/r/mysql.result	2008-06-25 11:13:03 +0000
+++ b/mysql-test/r/mysql.result	2008-07-21 09:17:03 +0000
@@ -38,8 +38,6 @@ t2
 t3
 Tables_in_test
 t1
-delimiter
-1
 _
 Test delimiter : from command line
 a

=== added file 'mysql-test/r/parser.result'
--- a/mysql-test/r/parser.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/parser.result	2008-07-21 03:01:19 +0000
@@ -0,0 +1,629 @@
+SET @save_sql_mode=@@sql_mode;
+set SQL_MODE='';
+create table ADDDATE(a int);
+drop table ADDDATE;
+create table ADDDATE (a int);
+drop table ADDDATE;
+create table BIT_AND(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND(a int)' at line 1
+create table BIT_AND (a int);
+drop table BIT_AND;
+create table BIT_OR(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR(a int)' at line 1
+create table BIT_OR (a int);
+drop table BIT_OR;
+create table BIT_XOR(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR(a int)' at line 1
+create table BIT_XOR (a int);
+drop table BIT_XOR;
+create table CAST(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST(a int)' at line 1
+create table CAST (a int);
+drop table CAST;
+create table COUNT(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT(a int)' at line 1
+create table COUNT (a int);
+drop table COUNT;
+create table CURDATE(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE(a int)' at line 1
+create table CURDATE (a int);
+drop table CURDATE;
+create table CURTIME(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME(a int)' at line 1
+create table CURTIME (a int);
+drop table CURTIME;
+create table DATE_ADD(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD(a int)' at line 1
+create table DATE_ADD (a int);
+drop table DATE_ADD;
+create table DATE_SUB(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB(a int)' at line 1
+create table DATE_SUB (a int);
+drop table DATE_SUB;
+create table EXTRACT(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT(a int)' at line 1
+create table EXTRACT (a int);
+drop table EXTRACT;
+create table GROUP_CONCAT(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1
+create table GROUP_CONCAT (a int);
+drop table GROUP_CONCAT;
+create table GROUP_UNIQUE_USERS(a int);
+drop table GROUP_UNIQUE_USERS;
+create table GROUP_UNIQUE_USERS (a int);
+drop table GROUP_UNIQUE_USERS;
+create table MAX(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX(a int)' at line 1
+create table MAX (a int);
+drop table MAX;
+create table MID(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID(a int)' at line 1
+create table MID (a int);
+drop table MID;
+create table MIN(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN(a int)' at line 1
+create table MIN (a int);
+drop table MIN;
+create table NOW(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW(a int)' at line 1
+create table NOW (a int);
+drop table NOW;
+create table POSITION(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION(a int)' at line 1
+create table POSITION (a int);
+drop table POSITION;
+create table SESSION_USER(a int);
+drop table SESSION_USER;
+create table SESSION_USER (a int);
+drop table SESSION_USER;
+create table STD(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD(a int)' at line 1
+create table STD (a int);
+drop table STD;
+create table STDDEV(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV(a int)' at line 1
+create table STDDEV (a int);
+drop table STDDEV;
+create table STDDEV_POP(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1
+create table STDDEV_POP (a int);
+drop table STDDEV_POP;
+create table STDDEV_SAMP(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1
+create table STDDEV_SAMP (a int);
+drop table STDDEV_SAMP;
+create table SUBDATE(a int);
+drop table SUBDATE;
+create table SUBDATE (a int);
+drop table SUBDATE;
+create table SUBSTR(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR(a int)' at line 1
+create table SUBSTR (a int);
+drop table SUBSTR;
+create table SUBSTRING(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(a int)' at line 1
+create table SUBSTRING (a int);
+drop table SUBSTRING;
+create table SUM(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM(a int)' at line 1
+create table SUM (a int);
+drop table SUM;
+create table SYSDATE(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE(a int)' at line 1
+create table SYSDATE (a int);
+drop table SYSDATE;
+create table SYSTEM_USER(a int);
+drop table SYSTEM_USER;
+create table SYSTEM_USER (a int);
+drop table SYSTEM_USER;
+create table TRIM(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM(a int)' at line 1
+create table TRIM (a int);
+drop table TRIM;
+create table UNIQUE_USERS(a int);
+drop table UNIQUE_USERS;
+create table UNIQUE_USERS (a int);
+drop table UNIQUE_USERS;
+create table VARIANCE(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE(a int)' at line 1
+create table VARIANCE (a int);
+drop table VARIANCE;
+create table VAR_POP(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP(a int)' at line 1
+create table VAR_POP (a int);
+drop table VAR_POP;
+create table VAR_SAMP(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1
+create table VAR_SAMP (a int);
+drop table VAR_SAMP;
+set SQL_MODE='IGNORE_SPACE';
+create table ADDDATE(a int);
+drop table ADDDATE;
+create table ADDDATE (a int);
+drop table ADDDATE;
+create table BIT_AND(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND(a int)' at line 1
+create table BIT_AND (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND (a int)' at line 1
+create table BIT_OR(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR(a int)' at line 1
+create table BIT_OR (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR (a int)' at line 1
+create table BIT_XOR(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR(a int)' at line 1
+create table BIT_XOR (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR (a int)' at line 1
+create table CAST(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST(a int)' at line 1
+create table CAST (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST (a int)' at line 1
+create table COUNT(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT(a int)' at line 1
+create table COUNT (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT (a int)' at line 1
+create table CURDATE(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE(a int)' at line 1
+create table CURDATE (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE (a int)' at line 1
+create table CURTIME(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME(a int)' at line 1
+create table CURTIME (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME (a int)' at line 1
+create table DATE_ADD(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD(a int)' at line 1
+create table DATE_ADD (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD (a int)' at line 1
+create table DATE_SUB(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB(a int)' at line 1
+create table DATE_SUB (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB (a int)' at line 1
+create table EXTRACT(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT(a int)' at line 1
+create table EXTRACT (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT (a int)' at line 1
+create table GROUP_CONCAT(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1
+create table GROUP_CONCAT (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT (a int)' at line 1
+create table GROUP_UNIQUE_USERS(a int);
+drop table GROUP_UNIQUE_USERS;
+create table GROUP_UNIQUE_USERS (a int);
+drop table GROUP_UNIQUE_USERS;
+create table MAX(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX(a int)' at line 1
+create table MAX (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX (a int)' at line 1
+create table MID(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID(a int)' at line 1
+create table MID (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID (a int)' at line 1
+create table MIN(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN(a int)' at line 1
+create table MIN (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN (a int)' at line 1
+create table NOW(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW(a int)' at line 1
+create table NOW (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW (a int)' at line 1
+create table POSITION(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION(a int)' at line 1
+create table POSITION (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION (a int)' at line 1
+create table SESSION_USER(a int);
+drop table SESSION_USER;
+create table SESSION_USER (a int);
+drop table SESSION_USER;
+create table STD(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD(a int)' at line 1
+create table STD (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD (a int)' at line 1
+create table STDDEV(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV(a int)' at line 1
+create table STDDEV (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV (a int)' at line 1
+create table STDDEV_POP(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1
+create table STDDEV_POP (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP (a int)' at line 1
+create table STDDEV_SAMP(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1
+create table STDDEV_SAMP (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP (a int)' at line 1
+create table SUBDATE(a int);
+drop table SUBDATE;
+create table SUBDATE (a int);
+drop table SUBDATE;
+create table SUBSTR(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR(a int)' at line 1
+create table SUBSTR (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR (a int)' at line 1
+create table SUBSTRING(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(a int)' at line 1
+create table SUBSTRING (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING (a int)' at line 1
+create table SUM(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM(a int)' at line 1
+create table SUM (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM (a int)' at line 1
+create table SYSDATE(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE(a int)' at line 1
+create table SYSDATE (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE (a int)' at line 1
+create table SYSTEM_USER(a int);
+drop table SYSTEM_USER;
+create table SYSTEM_USER (a int);
+drop table SYSTEM_USER;
+create table TRIM(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM(a int)' at line 1
+create table TRIM (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM (a int)' at line 1
+create table UNIQUE_USERS(a int);
+drop table UNIQUE_USERS;
+create table UNIQUE_USERS (a int);
+drop table UNIQUE_USERS;
+create table VARIANCE(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE(a int)' at line 1
+create table VARIANCE (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE (a int)' at line 1
+create table VAR_POP(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP(a int)' at line 1
+create table VAR_POP (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP (a int)' at line 1
+create table VAR_SAMP(a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1
+create table VAR_SAMP (a int);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP (a int)' at line 1
+DROP TABLE IF EXISTS table_25930_a;
+DROP TABLE IF EXISTS table_25930_b;
+SET SQL_MODE = 'ANSI_QUOTES';
+CREATE TABLE table_25930_a ( "blah" INT );
+CREATE TABLE table_25930_b SELECT "blah" - 1 FROM table_25930_a;
+desc table_25930_b;
+Field	Type	Null	Key	Default	Extra
+"blah" - 1	bigint(12)	YES		NULL	
+DROP TABLE table_25930_a;
+DROP TABLE table_25930_b;
+SET @@sql_mode=@save_sql_mode;
+DROP PROCEDURE IF EXISTS p26030;
+select "non terminated"$$
+non terminated
+non terminated
+select "terminated";$$
+terminated
+terminated
+select "non terminated, space"      $$
+non terminated, space
+non terminated, space
+select "terminated, space";      $$
+terminated, space
+terminated, space
+select "non terminated, comment" /* comment */$$
+non terminated, comment
+non terminated, comment
+select "terminated, comment"; /* comment */$$
+terminated, comment
+terminated, comment
+select "stmt 1";select "stmt 2 non terminated"$$
+stmt 1
+stmt 1
+stmt 2 non terminated
+stmt 2 non terminated
+select "stmt 1";select "stmt 2 terminated";$$
+stmt 1
+stmt 1
+stmt 2 terminated
+stmt 2 terminated
+select "stmt 1";select "stmt 2 non terminated, space"      $$
+stmt 1
+stmt 1
+stmt 2 non terminated, space
+stmt 2 non terminated, space
+select "stmt 1";select "stmt 2 terminated, space";      $$
+stmt 1
+stmt 1
+stmt 2 terminated, space
+stmt 2 terminated, space
+select "stmt 1";select "stmt 2 non terminated, comment" /* comment */$$
+stmt 1
+stmt 1
+stmt 2 non terminated, comment
+stmt 2 non terminated, comment
+select "stmt 1";select "stmt 2 terminated, comment"; /* comment */$$
+stmt 1
+stmt 1
+stmt 2 terminated, comment
+stmt 2 terminated, comment
+select "stmt 1";             select "space, stmt 2"$$
+stmt 1
+stmt 1
+space, stmt 2
+space, stmt 2
+select "stmt 1";/* comment */select "comment, stmt 2"$$
+stmt 1
+stmt 1
+comment, stmt 2
+comment, stmt 2
+DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() BEGIN SELECT 1; END; CALL p26030()
+$$
+1
+1
+DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() SELECT 1; CALL p26030()
+$$
+1
+1
+DROP PROCEDURE p26030;
+SHOW NEW MASTER FOR SLAVE WITH;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
+SHOW NEW MASTER FOR SLAVE WITH foo bar baz;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'foo bar baz' at line 1
+SHOW NEW MASTER FOR SLAVE WITH$$
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
+SHOW NEW MASTER FOR SLAVE WITH;$$
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
+select pi(3.14);
+ERROR 42000: Incorrect parameter count in the call to native function 'pi'
+select tan();
+ERROR 42000: Incorrect parameter count in the call to native function 'tan'
+select tan(1, 2);
+ERROR 42000: Incorrect parameter count in the call to native function 'tan'
+select makedate(1);
+ERROR 42000: Incorrect parameter count in the call to native function 'makedate'
+select makedate(1, 2, 3);
+ERROR 42000: Incorrect parameter count in the call to native function 'makedate'
+select maketime();
+ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
+select maketime(1);
+ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
+select maketime(1, 2);
+ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
+select maketime(1, 2, 3, 4);
+ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
+select atan();
+ERROR 42000: Incorrect parameter count in the call to native function 'atan'
+select atan2(1, 2, 3);
+ERROR 42000: Incorrect parameter count in the call to native function 'atan2'
+select concat();
+ERROR 42000: Incorrect parameter count in the call to native function 'concat'
+select concat("foo");
+concat("foo")
+foo
+select concat_ws();
+ERROR 42000: Incorrect parameter count in the call to native function 'concat_ws'
+select concat_ws("foo");
+ERROR 42000: Incorrect parameter count in the call to native function 'concat_ws'
+select encrypt();
+ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
+select encrypt(1, 2, 3);
+ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
+select des_encrypt("p1", "p2", "not expected");
+ERROR 42000: Incorrect parameter count in the call to native function 'des_encrypt'
+select des_decrypt("p1", "p2", "not expected");
+ERROR 42000: Incorrect parameter count in the call to native function 'des_decrypt'
+select elt();
+ERROR 42000: Incorrect parameter count in the call to native function 'elt'
+select elt(1);
+ERROR 42000: Incorrect parameter count in the call to native function 'elt'
+select export_set();
+ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
+select export_set("p1");
+ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
+select export_set("p1", "p2");
+ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
+select export_set("p1", "p2", "p3", "p4", "p5", "p6");
+ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
+select field();
+ERROR 42000: Incorrect parameter count in the call to native function 'field'
+select field("p1");
+ERROR 42000: Incorrect parameter count in the call to native function 'field'
+select from_unixtime();
+ERROR 42000: Incorrect parameter count in the call to native function 'from_unixtime'
+select from_unixtime(1, 2, 3);
+ERROR 42000: Incorrect parameter count in the call to native function 'from_unixtime'
+select unix_timestamp(1, 2);
+ERROR 42000: Incorrect parameter count in the call to native function 'unix_timestamp'
+select greatest();
+ERROR 42000: Incorrect parameter count in the call to native function 'greatest'
+select greatest(12);
+ERROR 42000: Incorrect parameter count in the call to native function 'greatest'
+select last_insert_id(1, 2);
+ERROR 42000: Incorrect parameter count in the call to native function 'last_insert_id'
+select least();
+ERROR 42000: Incorrect parameter count in the call to native function 'least'
+select least(12);
+ERROR 42000: Incorrect parameter count in the call to native function 'least'
+select locate();
+ERROR 42000: Incorrect parameter count in the call to native function 'locate'
+select locate(1);
+ERROR 42000: Incorrect parameter count in the call to native function 'locate'
+select locate(1, 2, 3, 4);
+ERROR 42000: Incorrect parameter count in the call to native function 'locate'
+select log();
+ERROR 42000: Incorrect parameter count in the call to native function 'log'
+select log(1, 2, 3);
+ERROR 42000: Incorrect parameter count in the call to native function 'log'
+select make_set();
+ERROR 42000: Incorrect parameter count in the call to native function 'make_set'
+select make_set(1);
+ERROR 42000: Incorrect parameter count in the call to native function 'make_set'
+select master_pos_wait();
+ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait'
+select master_pos_wait(1);
+ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait'
+select master_pos_wait(1, 2, 3, 4);
+ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait'
+select rand(1, 2, 3);
+ERROR 42000: Incorrect parameter count in the call to native function 'rand'
+select round(1, 2, 3);
+ERROR 42000: Incorrect parameter count in the call to native function 'round'
+select yearweek();
+ERROR 42000: Incorrect parameter count in the call to native function 'yearweek'
+select yearweek(1, 2, 3);
+ERROR 42000: Incorrect parameter count in the call to native function 'yearweek'
+select abs(3);
+abs(3)
+3
+select abs(3 AS three);
+ERROR 42000: Incorrect parameters in the call to native function 'abs'
+select abs(3 three);
+ERROR 42000: Incorrect parameters in the call to native function 'abs'
+select abs(3 AS "three");
+ERROR 42000: Incorrect parameters in the call to native function 'abs'
+select abs(3 "three");
+ERROR 42000: Incorrect parameters in the call to native function 'abs'
+set @bar="bar";
+set @foobar="foobar";
+select instr("foobar", "bar");
+instr("foobar", "bar")
+4
+select instr("foobar" AS p1, "bar");
+ERROR 42000: Incorrect parameters in the call to native function 'instr'
+select instr("foobar" p1, "bar");
+ERROR 42000: Incorrect parameters in the call to native function 'instr'
+select instr("foobar" AS "p1", "bar");
+ERROR 42000: Incorrect parameters in the call to native function 'instr'
+select instr("foobar" "p1", "bar");
+instr("foobar" "p1", "bar")
+4
+select instr(@foobar "p1", "bar");
+ERROR 42000: Incorrect parameters in the call to native function 'instr'
+select instr("foobar", "bar" AS p2);
+ERROR 42000: Incorrect parameters in the call to native function 'instr'
+select instr("foobar", "bar" p2);
+ERROR 42000: Incorrect parameters in the call to native function 'instr'
+select instr("foobar", "bar" AS "p2");
+ERROR 42000: Incorrect parameters in the call to native function 'instr'
+select instr("foobar", "bar" "p2");
+instr("foobar", "bar" "p2")
+0
+select instr("foobar", @bar "p2");
+ERROR 42000: Incorrect parameters in the call to native function 'instr'
+select instr("foobar" AS p1, "bar" AS p2);
+ERROR 42000: Incorrect parameters in the call to native function 'instr'
+select conv(255, 10, 16);
+conv(255, 10, 16)
+FF
+select conv(255 AS p1, 10, 16);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255 p1, 10, 16);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255 AS "p1", 10, 16);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255 "p1", 10, 16);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255, 10 AS p2, 16);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255, 10 p2, 16);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255, 10 AS "p2", 16);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255, 10 "p2", 16);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255, 10, 16 AS p3);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255, 10, 16 p3);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255, 10, 16 AS "p3");
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255, 10, 16 "p3");
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select conv(255 AS p1, 10 AS p2, 16 AS p3);
+ERROR 42000: Incorrect parameters in the call to native function 'conv'
+select atan(10);
+atan(10)
+1.4711276743037347
+select atan(10 AS p1);
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10 p1);
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10 AS "p1");
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10 "p1");
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10, 20);
+atan(10, 20)
+0.4636476090008061
+select atan(10 AS p1, 20);
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10 p1, 20);
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10 AS "p1", 20);
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10 "p1", 20);
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10, 20 AS p2);
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10, 20 p2);
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10, 20 AS "p2");
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10, 20 "p2");
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+select atan(10 AS p1, 20 AS p2);
+ERROR 42000: Incorrect parameters in the call to native function 'atan'
+DROP TABLE IF EXISTS t1;
+SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
+STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
+NULL
+SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
+STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE
+NULL
+SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
+"1997-12-31 23:59:59" + INTERVAL 1 SECOND
+1998-01-01 00:00:00
+SELECT 1 + INTERVAL(1,0,1,2) + 1;
+1 + INTERVAL(1,0,1,2) + 1
+4
+SELECT INTERVAL(1^1,0,1,2) + 1;
+INTERVAL(1^1,0,1,2) + 1
+2
+SELECT INTERVAL(1,0+1,2,3) * 5.5;
+INTERVAL(1,0+1,2,3) * 5.5
+5.5
+SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
+INTERVAL(3,3,1+3,4+4) / 0.5
+2.0000
+SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
+(INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2
+50.0000
+SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
+INTERVAL(1,0,1,2) + 1	5 * INTERVAL(1,0,1,2)
+3	10
+SELECT INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3);
+INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3)
+2
+SELECT 1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND;
+1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND
+NULL
+SELECT 1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND;
+1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND
+NULL
+CREATE TABLE t1 (a INT, b DATETIME);
+INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
+SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;
+a	b
+3	1998-01-01 00:00:00
+DROP TABLE t1;
+DROP TABLE IF EXISTS t1,t2,t3;
+CREATE TABLE t1 (a1 INT, a2 INT, a3 INT, a4 DATETIME);
+CREATE TABLE t2 LIKE t1;
+CREATE TABLE t3 LIKE t1;
+SELECT t1.* FROM t1 AS t0, { OJ t2 INNER JOIN t1 ON (t1.a1=t2.a1) } WHERE t0.a3=2;
+a1	a2	a3	a4
+SELECT t1.*,t2.* FROM { OJ ((t1 INNER JOIN t2 ON (t1.a1=t2.a2)) LEFT OUTER JOIN t3 ON t3.a3=t2.a1)};
+a1	a2	a3	a4	a1	a2	a3	a4
+SELECT t1.*,t2.* FROM { OJ ((t1 LEFT OUTER JOIN t2 ON t1.a3=t2.a2) INNER JOIN t3 ON (t3.a1=t2.a2))};
+a1	a2	a3	a4	a1	a2	a3	a4
+SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) CROSS JOIN t3 ON (t3.a2=t2.a3)};
+a1	a2	a3	a4	a1	a2	a3	a4
+SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a3} WHERE t1.a2 > 10;
+a1	a2	a3	a4	a1	a2	a3	a4
+SELECT {fn CONCAT(a1,a2)} FROM t1;
+{fn CONCAT(a1,a2)}
+UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0;
+SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')};
+a1	a4
+DROP TABLE t1, t2, t3;
+BACKUP DATABASE *, test to 'broken.bak';
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' test to 'broken.bak'' at line 1
+BACKUP DATABASE *, db1, db2, db3 to 'broken.bak';
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' db1, db2, db3 to 'broken.bak'' at line 1

=== removed file 'mysql-test/r/parser.result'
--- a/mysql-test/r/parser.result	2008-07-08 18:40:32 +0000
+++ b/mysql-test/r/parser.result	1970-01-01 00:00:00 +0000
@@ -1,629 +0,0 @@
-SET @save_sql_mode=@@sql_mode;
-set SQL_MODE='';
-create table ADDDATE(a int);
-drop table ADDDATE;
-create table ADDDATE (a int);
-drop table ADDDATE;
-create table BIT_AND(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND(a int)' at line 1
-create table BIT_AND (a int);
-drop table BIT_AND;
-create table BIT_OR(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR(a int)' at line 1
-create table BIT_OR (a int);
-drop table BIT_OR;
-create table BIT_XOR(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR(a int)' at line 1
-create table BIT_XOR (a int);
-drop table BIT_XOR;
-create table CAST(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST(a int)' at line 1
-create table CAST (a int);
-drop table CAST;
-create table COUNT(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT(a int)' at line 1
-create table COUNT (a int);
-drop table COUNT;
-create table CURDATE(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE(a int)' at line 1
-create table CURDATE (a int);
-drop table CURDATE;
-create table CURTIME(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME(a int)' at line 1
-create table CURTIME (a int);
-drop table CURTIME;
-create table DATE_ADD(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD(a int)' at line 1
-create table DATE_ADD (a int);
-drop table DATE_ADD;
-create table DATE_SUB(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB(a int)' at line 1
-create table DATE_SUB (a int);
-drop table DATE_SUB;
-create table EXTRACT(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT(a int)' at line 1
-create table EXTRACT (a int);
-drop table EXTRACT;
-create table GROUP_CONCAT(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1
-create table GROUP_CONCAT (a int);
-drop table GROUP_CONCAT;
-create table GROUP_UNIQUE_USERS(a int);
-drop table GROUP_UNIQUE_USERS;
-create table GROUP_UNIQUE_USERS (a int);
-drop table GROUP_UNIQUE_USERS;
-create table MAX(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX(a int)' at line 1
-create table MAX (a int);
-drop table MAX;
-create table MID(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID(a int)' at line 1
-create table MID (a int);
-drop table MID;
-create table MIN(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN(a int)' at line 1
-create table MIN (a int);
-drop table MIN;
-create table NOW(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW(a int)' at line 1
-create table NOW (a int);
-drop table NOW;
-create table POSITION(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION(a int)' at line 1
-create table POSITION (a int);
-drop table POSITION;
-create table SESSION_USER(a int);
-drop table SESSION_USER;
-create table SESSION_USER (a int);
-drop table SESSION_USER;
-create table STD(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD(a int)' at line 1
-create table STD (a int);
-drop table STD;
-create table STDDEV(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV(a int)' at line 1
-create table STDDEV (a int);
-drop table STDDEV;
-create table STDDEV_POP(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1
-create table STDDEV_POP (a int);
-drop table STDDEV_POP;
-create table STDDEV_SAMP(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1
-create table STDDEV_SAMP (a int);
-drop table STDDEV_SAMP;
-create table SUBDATE(a int);
-drop table SUBDATE;
-create table SUBDATE (a int);
-drop table SUBDATE;
-create table SUBSTR(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR(a int)' at line 1
-create table SUBSTR (a int);
-drop table SUBSTR;
-create table SUBSTRING(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(a int)' at line 1
-create table SUBSTRING (a int);
-drop table SUBSTRING;
-create table SUM(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM(a int)' at line 1
-create table SUM (a int);
-drop table SUM;
-create table SYSDATE(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE(a int)' at line 1
-create table SYSDATE (a int);
-drop table SYSDATE;
-create table SYSTEM_USER(a int);
-drop table SYSTEM_USER;
-create table SYSTEM_USER (a int);
-drop table SYSTEM_USER;
-create table TRIM(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM(a int)' at line 1
-create table TRIM (a int);
-drop table TRIM;
-create table UNIQUE_USERS(a int);
-drop table UNIQUE_USERS;
-create table UNIQUE_USERS (a int);
-drop table UNIQUE_USERS;
-create table VARIANCE(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE(a int)' at line 1
-create table VARIANCE (a int);
-drop table VARIANCE;
-create table VAR_POP(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP(a int)' at line 1
-create table VAR_POP (a int);
-drop table VAR_POP;
-create table VAR_SAMP(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1
-create table VAR_SAMP (a int);
-drop table VAR_SAMP;
-set SQL_MODE='IGNORE_SPACE';
-create table ADDDATE(a int);
-drop table ADDDATE;
-create table ADDDATE (a int);
-drop table ADDDATE;
-create table BIT_AND(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND(a int)' at line 1
-create table BIT_AND (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND (a int)' at line 1
-create table BIT_OR(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR(a int)' at line 1
-create table BIT_OR (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR (a int)' at line 1
-create table BIT_XOR(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR(a int)' at line 1
-create table BIT_XOR (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR (a int)' at line 1
-create table CAST(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST(a int)' at line 1
-create table CAST (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST (a int)' at line 1
-create table COUNT(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT(a int)' at line 1
-create table COUNT (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT (a int)' at line 1
-create table CURDATE(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE(a int)' at line 1
-create table CURDATE (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE (a int)' at line 1
-create table CURTIME(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME(a int)' at line 1
-create table CURTIME (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME (a int)' at line 1
-create table DATE_ADD(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD(a int)' at line 1
-create table DATE_ADD (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD (a int)' at line 1
-create table DATE_SUB(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB(a int)' at line 1
-create table DATE_SUB (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB (a int)' at line 1
-create table EXTRACT(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT(a int)' at line 1
-create table EXTRACT (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT (a int)' at line 1
-create table GROUP_CONCAT(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1
-create table GROUP_CONCAT (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT (a int)' at line 1
-create table GROUP_UNIQUE_USERS(a int);
-drop table GROUP_UNIQUE_USERS;
-create table GROUP_UNIQUE_USERS (a int);
-drop table GROUP_UNIQUE_USERS;
-create table MAX(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX(a int)' at line 1
-create table MAX (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX (a int)' at line 1
-create table MID(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID(a int)' at line 1
-create table MID (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID (a int)' at line 1
-create table MIN(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN(a int)' at line 1
-create table MIN (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN (a int)' at line 1
-create table NOW(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW(a int)' at line 1
-create table NOW (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW (a int)' at line 1
-create table POSITION(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION(a int)' at line 1
-create table POSITION (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION (a int)' at line 1
-create table SESSION_USER(a int);
-drop table SESSION_USER;
-create table SESSION_USER (a int);
-drop table SESSION_USER;
-create table STD(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD(a int)' at line 1
-create table STD (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD (a int)' at line 1
-create table STDDEV(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV(a int)' at line 1
-create table STDDEV (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV (a int)' at line 1
-create table STDDEV_POP(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1
-create table STDDEV_POP (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP (a int)' at line 1
-create table STDDEV_SAMP(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1
-create table STDDEV_SAMP (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP (a int)' at line 1
-create table SUBDATE(a int);
-drop table SUBDATE;
-create table SUBDATE (a int);
-drop table SUBDATE;
-create table SUBSTR(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR(a int)' at line 1
-create table SUBSTR (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR (a int)' at line 1
-create table SUBSTRING(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(a int)' at line 1
-create table SUBSTRING (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING (a int)' at line 1
-create table SUM(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM(a int)' at line 1
-create table SUM (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM (a int)' at line 1
-create table SYSDATE(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE(a int)' at line 1
-create table SYSDATE (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE (a int)' at line 1
-create table SYSTEM_USER(a int);
-drop table SYSTEM_USER;
-create table SYSTEM_USER (a int);
-drop table SYSTEM_USER;
-create table TRIM(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM(a int)' at line 1
-create table TRIM (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM (a int)' at line 1
-create table UNIQUE_USERS(a int);
-drop table UNIQUE_USERS;
-create table UNIQUE_USERS (a int);
-drop table UNIQUE_USERS;
-create table VARIANCE(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE(a int)' at line 1
-create table VARIANCE (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE (a int)' at line 1
-create table VAR_POP(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP(a int)' at line 1
-create table VAR_POP (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP (a int)' at line 1
-create table VAR_SAMP(a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1
-create table VAR_SAMP (a int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP (a int)' at line 1
-DROP TABLE IF EXISTS table_25930_a;
-DROP TABLE IF EXISTS table_25930_b;
-SET SQL_MODE = 'ANSI_QUOTES';
-CREATE TABLE table_25930_a ( "blah" INT );
-CREATE TABLE table_25930_b SELECT "blah" - 1 FROM table_25930_a;
-desc table_25930_b;
-Field	Type	Null	Key	Default	Extra
-"blah" - 1	bigint(12)	YES		NULL	
-DROP TABLE table_25930_a;
-DROP TABLE table_25930_b;
-SET @@sql_mode=@save_sql_mode;
-DROP PROCEDURE IF EXISTS p26030;
-select "non terminated"$$
-non terminated
-non terminated
-select "terminated";$$
-terminated
-terminated
-select "non terminated, space"      $$
-non terminated, space
-non terminated, space
-select "terminated, space";      $$
-terminated, space
-terminated, space
-select "non terminated, comment" /* comment */$$
-non terminated, comment
-non terminated, comment
-select "terminated, comment"; /* comment */$$
-terminated, comment
-terminated, comment
-select "stmt 1";select "stmt 2 non terminated"$$
-stmt 1
-stmt 1
-stmt 2 non terminated
-stmt 2 non terminated
-select "stmt 1";select "stmt 2 terminated";$$
-stmt 1
-stmt 1
-stmt 2 terminated
-stmt 2 terminated
-select "stmt 1";select "stmt 2 non terminated, space"      $$
-stmt 1
-stmt 1
-stmt 2 non terminated, space
-stmt 2 non terminated, space
-select "stmt 1";select "stmt 2 terminated, space";      $$
-stmt 1
-stmt 1
-stmt 2 terminated, space
-stmt 2 terminated, space
-select "stmt 1";select "stmt 2 non terminated, comment" /* comment */$$
-stmt 1
-stmt 1
-stmt 2 non terminated, comment
-stmt 2 non terminated, comment
-select "stmt 1";select "stmt 2 terminated, comment"; /* comment */$$
-stmt 1
-stmt 1
-stmt 2 terminated, comment
-stmt 2 terminated, comment
-select "stmt 1";             select "space, stmt 2"$$
-stmt 1
-stmt 1
-space, stmt 2
-space, stmt 2
-select "stmt 1";/* comment */select "comment, stmt 2"$$
-stmt 1
-stmt 1
-comment, stmt 2
-comment, stmt 2
-DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() BEGIN SELECT 1; END; CALL p26030()
-$$
-1
-1
-DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() SELECT 1; CALL p26030()
-$$
-1
-1
-DROP PROCEDURE p26030;
-SHOW NEW MASTER FOR SLAVE WITH;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
-SHOW NEW MASTER FOR SLAVE WITH foo bar baz;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'foo bar baz' at line 1
-SHOW NEW MASTER FOR SLAVE WITH$$
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
-SHOW NEW MASTER FOR SLAVE WITH;$$
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
-select pi(3.14);
-ERROR 42000: Incorrect parameter count in the call to native function 'pi'
-select tan();
-ERROR 42000: Incorrect parameter count in the call to native function 'tan'
-select tan(1, 2);
-ERROR 42000: Incorrect parameter count in the call to native function 'tan'
-select makedate(1);
-ERROR 42000: Incorrect parameter count in the call to native function 'makedate'
-select makedate(1, 2, 3);
-ERROR 42000: Incorrect parameter count in the call to native function 'makedate'
-select maketime();
-ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
-select maketime(1);
-ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
-select maketime(1, 2);
-ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
-select maketime(1, 2, 3, 4);
-ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
-select atan();
-ERROR 42000: Incorrect parameter count in the call to native function 'atan'
-select atan2(1, 2, 3);
-ERROR 42000: Incorrect parameter count in the call to native function 'atan2'
-select concat();
-ERROR 42000: Incorrect parameter count in the call to native function 'concat'
-select concat("foo");
-concat("foo")
-foo
-select concat_ws();
-ERROR 42000: Incorrect parameter count in the call to native function 'concat_ws'
-select concat_ws("foo");
-ERROR 42000: Incorrect parameter count in the call to native function 'concat_ws'
-select encrypt();
-ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
-select encrypt(1, 2, 3);
-ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
-select des_encrypt("p1", "p2", "not expected");
-ERROR 42000: Incorrect parameter count in the call to native function 'des_encrypt'
-select des_decrypt("p1", "p2", "not expected");
-ERROR 42000: Incorrect parameter count in the call to native function 'des_decrypt'
-select elt();
-ERROR 42000: Incorrect parameter count in the call to native function 'elt'
-select elt(1);
-ERROR 42000: Incorrect parameter count in the call to native function 'elt'
-select export_set();
-ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
-select export_set("p1");
-ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
-select export_set("p1", "p2");
-ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
-select export_set("p1", "p2", "p3", "p4", "p5", "p6");
-ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
-select field();
-ERROR 42000: Incorrect parameter count in the call to native function 'field'
-select field("p1");
-ERROR 42000: Incorrect parameter count in the call to native function 'field'
-select from_unixtime();
-ERROR 42000: Incorrect parameter count in the call to native function 'from_unixtime'
-select from_unixtime(1, 2, 3);
-ERROR 42000: Incorrect parameter count in the call to native function 'from_unixtime'
-select unix_timestamp(1, 2);
-ERROR 42000: Incorrect parameter count in the call to native function 'unix_timestamp'
-select greatest();
-ERROR 42000: Incorrect parameter count in the call to native function 'greatest'
-select greatest(12);
-ERROR 42000: Incorrect parameter count in the call to native function 'greatest'
-select last_insert_id(1, 2);
-ERROR 42000: Incorrect parameter count in the call to native function 'last_insert_id'
-select least();
-ERROR 42000: Incorrect parameter count in the call to native function 'least'
-select least(12);
-ERROR 42000: Incorrect parameter count in the call to native function 'least'
-select locate();
-ERROR 42000: Incorrect parameter count in the call to native function 'locate'
-select locate(1);
-ERROR 42000: Incorrect parameter count in the call to native function 'locate'
-select locate(1, 2, 3, 4);
-ERROR 42000: Incorrect parameter count in the call to native function 'locate'
-select log();
-ERROR 42000: Incorrect parameter count in the call to native function 'log'
-select log(1, 2, 3);
-ERROR 42000: Incorrect parameter count in the call to native function 'log'
-select make_set();
-ERROR 42000: Incorrect parameter count in the call to native function 'make_set'
-select make_set(1);
-ERROR 42000: Incorrect parameter count in the call to native function 'make_set'
-select master_pos_wait();
-ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait'
-select master_pos_wait(1);
-ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait'
-select master_pos_wait(1, 2, 3, 4);
-ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait'
-select rand(1, 2, 3);
-ERROR 42000: Incorrect parameter count in the call to native function 'rand'
-select round(1, 2, 3);
-ERROR 42000: Incorrect parameter count in the call to native function 'round'
-select yearweek();
-ERROR 42000: Incorrect parameter count in the call to native function 'yearweek'
-select yearweek(1, 2, 3);
-ERROR 42000: Incorrect parameter count in the call to native function 'yearweek'
-select abs(3);
-abs(3)
-3
-select abs(3 AS three);
-ERROR 42000: Incorrect parameters in the call to native function 'abs'
-select abs(3 three);
-ERROR 42000: Incorrect parameters in the call to native function 'abs'
-select abs(3 AS "three");
-ERROR 42000: Incorrect parameters in the call to native function 'abs'
-select abs(3 "three");
-ERROR 42000: Incorrect parameters in the call to native function 'abs'
-set @bar="bar";
-set @foobar="foobar";
-select instr("foobar", "bar");
-instr("foobar", "bar")
-4
-select instr("foobar" AS p1, "bar");
-ERROR 42000: Incorrect parameters in the call to native function 'instr'
-select instr("foobar" p1, "bar");
-ERROR 42000: Incorrect parameters in the call to native function 'instr'
-select instr("foobar" AS "p1", "bar");
-ERROR 42000: Incorrect parameters in the call to native function 'instr'
-select instr("foobar" "p1", "bar");
-instr("foobar" "p1", "bar")
-4
-select instr(@foobar "p1", "bar");
-ERROR 42000: Incorrect parameters in the call to native function 'instr'
-select instr("foobar", "bar" AS p2);
-ERROR 42000: Incorrect parameters in the call to native function 'instr'
-select instr("foobar", "bar" p2);
-ERROR 42000: Incorrect parameters in the call to native function 'instr'
-select instr("foobar", "bar" AS "p2");
-ERROR 42000: Incorrect parameters in the call to native function 'instr'
-select instr("foobar", "bar" "p2");
-instr("foobar", "bar" "p2")
-0
-select instr("foobar", @bar "p2");
-ERROR 42000: Incorrect parameters in the call to native function 'instr'
-select instr("foobar" AS p1, "bar" AS p2);
-ERROR 42000: Incorrect parameters in the call to native function 'instr'
-select conv(255, 10, 16);
-conv(255, 10, 16)
-FF
-select conv(255 AS p1, 10, 16);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255 p1, 10, 16);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255 AS "p1", 10, 16);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255 "p1", 10, 16);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255, 10 AS p2, 16);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255, 10 p2, 16);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255, 10 AS "p2", 16);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255, 10 "p2", 16);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255, 10, 16 AS p3);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255, 10, 16 p3);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255, 10, 16 AS "p3");
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255, 10, 16 "p3");
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select conv(255 AS p1, 10 AS p2, 16 AS p3);
-ERROR 42000: Incorrect parameters in the call to native function 'conv'
-select atan(10);
-atan(10)
-1.4711276743037347
-select atan(10 AS p1);
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10 p1);
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10 AS "p1");
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10 "p1");
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10, 20);
-atan(10, 20)
-0.4636476090008061
-select atan(10 AS p1, 20);
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10 p1, 20);
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10 AS "p1", 20);
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10 "p1", 20);
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10, 20 AS p2);
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10, 20 p2);
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10, 20 AS "p2");
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10, 20 "p2");
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-select atan(10 AS p1, 20 AS p2);
-ERROR 42000: Incorrect parameters in the call to native function 'atan'
-DROP TABLE IF EXISTS t1;
-SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
-STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
-NULL
-SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
-STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE
-NULL
-SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
-"1997-12-31 23:59:59" + INTERVAL 1 SECOND
-1998-01-01 00:00:00
-SELECT 1 + INTERVAL(1,0,1,2) + 1;
-1 + INTERVAL(1,0,1,2) + 1
-4
-SELECT INTERVAL(1^1,0,1,2) + 1;
-INTERVAL(1^1,0,1,2) + 1
-2
-SELECT INTERVAL(1,0+1,2,3) * 5.5;
-INTERVAL(1,0+1,2,3) * 5.5
-5.5
-SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
-INTERVAL(3,3,1+3,4+4) / 0.5
-2.0000
-SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
-(INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2
-50.0000
-SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
-INTERVAL(1,0,1,2) + 1	5 * INTERVAL(1,0,1,2)
-3	10
-SELECT INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3);
-INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3)
-2
-SELECT 1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND;
-1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND
-NULL
-SELECT 1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND;
-1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND
-NULL
-CREATE TABLE t1 (a INT, b DATETIME);
-INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
-SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;
-a	b
-3	1998-01-01 00:00:00
-DROP TABLE t1;
-DROP TABLE IF EXISTS t1,t2,t3;
-CREATE TABLE t1 (a1 INT, a2 INT, a3 INT, a4 DATETIME);
-CREATE TABLE t2 LIKE t1;
-CREATE TABLE t3 LIKE t1;
-SELECT t1.* FROM t1 AS t0, { OJ t2 INNER JOIN t1 ON (t1.a1=t2.a1) } WHERE t0.a3=2;
-a1	a2	a3	a4
-SELECT t1.*,t2.* FROM { OJ ((t1 INNER JOIN t2 ON (t1.a1=t2.a2)) LEFT OUTER JOIN t3 ON t3.a3=t2.a1)};
-a1	a2	a3	a4	a1	a2	a3	a4
-SELECT t1.*,t2.* FROM { OJ ((t1 LEFT OUTER JOIN t2 ON t1.a3=t2.a2) INNER JOIN t3 ON (t3.a1=t2.a2))};
-a1	a2	a3	a4	a1	a2	a3	a4
-SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) CROSS JOIN t3 ON (t3.a2=t2.a3)};
-a1	a2	a3	a4	a1	a2	a3	a4
-SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a3} WHERE t1.a2 > 10;
-a1	a2	a3	a4	a1	a2	a3	a4
-SELECT {fn CONCAT(a1,a2)} FROM t1;
-{fn CONCAT(a1,a2)}
-UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0;
-SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')};
-a1	a4
-DROP TABLE t1, t2, t3;
-BACKUP DATABASE *, test to 'broken.bak';
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' test to 'broken.bak'' at line 1
-BACKUP DATABASE *, db1, db2, db3 to 'broken.bak';
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' db1, db2, db3 to 'broken.bak'' at line 1

=== added file 'mysql-test/suite/binlog/r/binlog_implicit_commit.result'
--- a/mysql-test/suite/binlog/r/binlog_implicit_commit.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/r/binlog_implicit_commit.result	2008-06-12 11:36:39 +0000
@@ -0,0 +1,345 @@
+CREATE TABLE t1 (id INT) ENGINE = InnoDB;
+SET BINLOG_FORMAT = STATEMENT;
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (1);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 1;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 1;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+INSERT INTO t1 VALUES (3);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 1;
+INSERT INTO t1 VALUES (1);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+SET AUTOCOMMIT = 1;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 1;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 1;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+INSERT INTO t1 VALUES (3);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (1);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 0;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 0;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+INSERT INTO t1 VALUES (3);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 1;
+INSERT INTO t1 VALUES (1);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+SET AUTOCOMMIT = 0;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 1;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 0;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+INSERT INTO t1 VALUES (3);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+SET BINLOG_FORMAT = ROW;
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (1);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 1;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 1;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+INSERT INTO t1 VALUES (3);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 1;
+INSERT INTO t1 VALUES (1);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+SET AUTOCOMMIT = 1;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 1;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 1;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+INSERT INTO t1 VALUES (3);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (1);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 0;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 0;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+INSERT INTO t1 VALUES (3);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 1;
+INSERT INTO t1 VALUES (1);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+SET AUTOCOMMIT = 0;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 1;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+SET AUTOCOMMIT = 0;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+INSERT INTO t1 VALUES (3);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (1);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+LOCK TABLES t1 WRITE;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+INSERT INTO t1 VALUES (2);
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+UNLOCK TABLES;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+master-bin.000001	#	Query	#	#	use `test`; BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Xid	#	#	COMMIT /* XID */
+DROP TABLE t1;

=== removed file 'mysql-test/suite/binlog/r/binlog_implicit_commit.result'
--- a/mysql-test/suite/binlog/r/binlog_implicit_commit.result	2008-06-09 19:32:42 +0000
+++ b/mysql-test/suite/binlog/r/binlog_implicit_commit.result	1970-01-01 00:00:00 +0000
@@ -1,345 +0,0 @@
-CREATE TABLE t1 (id INT) ENGINE = InnoDB;
-SET BINLOG_FORMAT = STATEMENT;
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-INSERT INTO t1 VALUES (1);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-INSERT INTO t1 VALUES (3);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 1;
-INSERT INTO t1 VALUES (1);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-SET AUTOCOMMIT = 1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 1;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-INSERT INTO t1 VALUES (3);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-COMMIT;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-INSERT INTO t1 VALUES (1);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 0;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 0;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-INSERT INTO t1 VALUES (3);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-COMMIT;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 1;
-INSERT INTO t1 VALUES (1);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-SET AUTOCOMMIT = 0;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 1;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 0;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-INSERT INTO t1 VALUES (3);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-COMMIT;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (2)
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (3)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-SET BINLOG_FORMAT = ROW;
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-INSERT INTO t1 VALUES (1);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-INSERT INTO t1 VALUES (3);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 1;
-INSERT INTO t1 VALUES (1);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-SET AUTOCOMMIT = 1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 1;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-INSERT INTO t1 VALUES (3);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-COMMIT;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-INSERT INTO t1 VALUES (1);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 0;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 0;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-INSERT INTO t1 VALUES (3);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-COMMIT;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 1;
-INSERT INTO t1 VALUES (1);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-SET AUTOCOMMIT = 0;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 1;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-SET AUTOCOMMIT = 0;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-INSERT INTO t1 VALUES (3);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-COMMIT;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-INSERT INTO t1 VALUES (1);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-LOCK TABLES t1 WRITE;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-INSERT INTO t1 VALUES (2);
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-UNLOCK TABLES;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-COMMIT;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-DROP TABLE t1;

=== added file 'mysql-test/suite/binlog/t/binlog_implicit_commit.test'
--- a/mysql-test/suite/binlog/t/binlog_implicit_commit.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/t/binlog_implicit_commit.test	2008-06-12 11:36:39 +0000
@@ -0,0 +1,63 @@
+# The purpose of this test is to test that setting autocommit does a
+# commit of outstanding transactions and nothing is left pending in
+# the transaction cache.
+
+source include/have_log_bin.inc;
+source include/have_innodb.inc;
+
+# We need a transactional engine, so let's use InnoDB
+CREATE TABLE t1 (id INT) ENGINE = InnoDB;
+
+# Testing SET AUTOCOMMIT
+SET BINLOG_FORMAT = STATEMENT;
+
+let $cleanup = COMMIT;
+
+let $prepare = SET AUTOCOMMIT = 0;
+let $statement = SET AUTOCOMMIT = 1;
+source extra/binlog_tests/implicit.test;
+
+let $prepare = SET AUTOCOMMIT = 1;
+let $statement = SET AUTOCOMMIT = 1;
+source extra/binlog_tests/implicit.test;
+
+let $prepare = SET AUTOCOMMIT = 0;
+let $statement = SET AUTOCOMMIT = 0;
+source extra/binlog_tests/implicit.test;
+
+let $prepare = SET AUTOCOMMIT = 1;
+let $statement = SET AUTOCOMMIT = 0;
+source extra/binlog_tests/implicit.test;
+
+SET BINLOG_FORMAT = ROW;
+let $prepare = SET AUTOCOMMIT = 0;
+let $statement = SET AUTOCOMMIT = 1;
+source extra/binlog_tests/implicit.test;
+
+let $prepare = SET AUTOCOMMIT = 1;
+let $statement = SET AUTOCOMMIT = 1;
+source extra/binlog_tests/implicit.test;
+
+let $prepare = SET AUTOCOMMIT = 0;
+let $statement = SET AUTOCOMMIT = 0;
+source extra/binlog_tests/implicit.test;
+
+let $prepare = SET AUTOCOMMIT = 1;
+let $statement = SET AUTOCOMMIT = 0;
+source extra/binlog_tests/implicit.test;
+
+RESET MASTER;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 VALUES (1);
+source include/show_binlog_events.inc;
+LOCK TABLES t1 WRITE;
+source include/show_binlog_events.inc;
+INSERT INTO t1 VALUES (2);
+source include/show_binlog_events.inc;
+UNLOCK TABLES;
+source include/show_binlog_events.inc;
+COMMIT;
+source include/show_binlog_events.inc;
+
+# Cleaning up
+DROP TABLE t1;

=== removed file 'mysql-test/suite/binlog/t/binlog_implicit_commit.test'
--- a/mysql-test/suite/binlog/t/binlog_implicit_commit.test	2008-06-09 19:32:42 +0000
+++ b/mysql-test/suite/binlog/t/binlog_implicit_commit.test	1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-# The purpose of this test is to test that setting autocommit does a
-# commit of outstanding transactions and nothing is left pending in
-# the transaction cache.
-
-source include/have_log_bin.inc;
-source include/have_innodb.inc;
-
-# We need a transactional engine, so let's use InnoDB
-CREATE TABLE t1 (id INT) ENGINE = InnoDB;
-
-# Testing SET AUTOCOMMIT
-SET BINLOG_FORMAT = STATEMENT;
-
-let $cleanup = COMMIT;
-
-let $prepare = SET AUTOCOMMIT = 0;
-let $statement = SET AUTOCOMMIT = 1;
-source extra/binlog_tests/implicit.test;
-
-let $prepare = SET AUTOCOMMIT = 1;
-let $statement = SET AUTOCOMMIT = 1;
-source extra/binlog_tests/implicit.test;
-
-let $prepare = SET AUTOCOMMIT = 0;
-let $statement = SET AUTOCOMMIT = 0;
-source extra/binlog_tests/implicit.test;
-
-let $prepare = SET AUTOCOMMIT = 1;
-let $statement = SET AUTOCOMMIT = 0;
-source extra/binlog_tests/implicit.test;
-
-SET BINLOG_FORMAT = ROW;
-let $prepare = SET AUTOCOMMIT = 0;
-let $statement = SET AUTOCOMMIT = 1;
-source extra/binlog_tests/implicit.test;
-
-let $prepare = SET AUTOCOMMIT = 1;
-let $statement = SET AUTOCOMMIT = 1;
-source extra/binlog_tests/implicit.test;
-
-let $prepare = SET AUTOCOMMIT = 0;
-let $statement = SET AUTOCOMMIT = 0;
-source extra/binlog_tests/implicit.test;
-
-let $prepare = SET AUTOCOMMIT = 1;
-let $statement = SET AUTOCOMMIT = 0;
-source extra/binlog_tests/implicit.test;
-
-RESET MASTER;
-SET AUTOCOMMIT = 0;
-INSERT INTO t1 VALUES (1);
-source include/show_binlog_events.inc;
-LOCK TABLES t1 WRITE;
-source include/show_binlog_events.inc;
-INSERT INTO t1 VALUES (2);
-source include/show_binlog_events.inc;
-UNLOCK TABLES;
-source include/show_binlog_events.inc;
-COMMIT;
-source include/show_binlog_events.inc;
-
-# Cleaning up
-DROP TABLE t1;

=== added file 'mysql-test/suite/falcon/r/rpl_falcon_bug_37221.result'
--- a/mysql-test/suite/falcon/r/rpl_falcon_bug_37221.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/r/rpl_falcon_bug_37221.result	2008-06-12 11:36:39 +0000
@@ -0,0 +1,38 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+[master]
+SET BINLOG_FORMAT = 'ROW';
+CREATE TABLE IF NOT EXISTS t1 (id INT) ENGINE = Falcon;
+SET AUTOCOMMIT=0;
+INSERT INTO t1 VALUES (1);
+SET AUTOCOMMIT=1;
+SELECT * FROM t1;
+id
+1
+[slave]
+SELECT * FROM t1;
+id
+1
+[master]
+BEGIN;
+INSERT INTO t1 VALUES (2);
+SET AUTOCOMMIT=1;
+[slave]
+SELECT * FROM t1 /* Should not contain 2 */;
+id
+1
+[master]
+INSERT INTO t1 VALUES (3);
+COMMIT;
+[slave]
+SELECT * FROM t1 /* Should contain 2 and 3 */;
+id
+1
+2
+3
+[master]
+DROP TABLE t1;

=== removed file 'mysql-test/suite/falcon/r/rpl_falcon_bug_37221.result'
--- a/mysql-test/suite/falcon/r/rpl_falcon_bug_37221.result	2008-06-09 19:32:42 +0000
+++ b/mysql-test/suite/falcon/r/rpl_falcon_bug_37221.result	1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
-[master]
-SET BINLOG_FORMAT = 'ROW';
-CREATE TABLE IF NOT EXISTS t1 (id INT) ENGINE = Falcon;
-SET AUTOCOMMIT=0;
-INSERT INTO t1 VALUES (1);
-SET AUTOCOMMIT=1;
-SELECT * FROM t1;
-id
-1
-[slave]
-SELECT * FROM t1;
-id
-1
-[master]
-BEGIN;
-INSERT INTO t1 VALUES (2);
-SET AUTOCOMMIT=1;
-[slave]
-SELECT * FROM t1 /* Should not contain 2 */;
-id
-1
-[master]
-INSERT INTO t1 VALUES (3);
-COMMIT;
-[slave]
-SELECT * FROM t1 /* Should contain 2 and 3 */;
-id
-1
-2
-3
-[master]
-DROP TABLE t1;

=== added file 'mysql-test/suite/falcon/t/rpl_falcon_bug_37221.test'
--- a/mysql-test/suite/falcon/t/rpl_falcon_bug_37221.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/rpl_falcon_bug_37221.test	2008-07-08 16:01:41 +0000
@@ -0,0 +1,54 @@
+# BUG#37221: SET AUTOCOMMIT=1 does not commit binary log
+
+# Regression test to ensure that the bug does not re-appear. The test
+# is using the Falcon engine, but the problem is a generic case. See
+# binlog_implicit_commit.test for a more elaborate test.
+
+--source include/have_falcon.inc
+--source include/master-slave.inc
+
+--echo [master]
+connection master;
+SET BINLOG_FORMAT = 'ROW';
+
+CREATE TABLE IF NOT EXISTS t1 (id INT) ENGINE = Falcon;
+
+# When switching to AUTOCOMMIT=1, there is an implicit commit if we
+# are outside a real transaction.
+
+SET AUTOCOMMIT=0;
+INSERT INTO t1 VALUES (1);
+SET AUTOCOMMIT=1;
+SELECT * FROM t1;
+--echo [slave]
+sync_slave_with_master;
+SELECT * FROM t1;
+
+# When inside a transaction, AUTOCOMMIT=1 should not commit the
+# transaction. This is hard to test for sure (since delays might cause
+# the transaction to not propagate fast enough), but it will not cause
+# any false negatives (just false positives).
+
+--echo [master]
+connection master;
+BEGIN;
+INSERT INTO t1 VALUES (2);
+SET AUTOCOMMIT=1;
+
+--echo [slave]
+connection slave;
+SELECT * FROM t1 /* Should not contain 2 */;
+
+--echo [master]
+connection master;
+INSERT INTO t1 VALUES (3);
+COMMIT;
+
+--echo [slave]
+sync_slave_with_master;
+SELECT * FROM t1 /* Should contain 2 and 3 */;
+
+--echo [master]
+connection master;
+DROP TABLE t1;
+sync_slave_with_master;

=== removed file 'mysql-test/suite/falcon/t/rpl_falcon_bug_37221.test'
--- a/mysql-test/suite/falcon/t/rpl_falcon_bug_37221.test	2008-06-25 08:59:14 +0000
+++ b/mysql-test/suite/falcon/t/rpl_falcon_bug_37221.test	1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
-# BUG#37221: SET AUTOCOMMIT=1 does not commit binary log
-
-# Regression test to ensure that the bug does not re-appear. The test
-# is using the Falcon engine, but the problem is a generic case. See
-# binlog_implicit_commit.test for a more elaborate test.
-
---source include/have_falcon.inc
---source include/master-slave.inc
-
---echo [master]
-connection master;
-SET BINLOG_FORMAT = 'ROW';
-
-CREATE TABLE IF NOT EXISTS t1 (id INT) ENGINE = Falcon;
-
-# When switching to AUTOCOMMIT=1, there is an implicit commit if we
-# are outside a real transaction.
-
-SET AUTOCOMMIT=0;
-INSERT INTO t1 VALUES (1);
-SET AUTOCOMMIT=1;
-SELECT * FROM t1;
---echo [slave]
-sync_slave_with_master;
-SELECT * FROM t1;
-
-# When inside a transaction, AUTOCOMMIT=1 should not commit the
-# transaction. This is hard to test for sure (since delays might cause
-# the transaction to not propagate fast enough), but it will not cause
-# any false negatives (just false positives).
-
---echo [master]
-connection master;
-BEGIN;
-INSERT INTO t1 VALUES (2);
-SET AUTOCOMMIT=1;
-
---echo [slave]
-connection slave;
-SELECT * FROM t1 /* Should not contain 2 */;
-
---echo [master]
-connection master;
-INSERT INTO t1 VALUES (3);
-COMMIT;
-
---echo [slave]
-sync_slave_with_master;
-SELECT * FROM t1 /* Should contain 2 and 3 */;
-
---echo [master]
-connection master;
-DROP TABLE t1;
-sync_slave_with_master;

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03.inc	2008-06-18 17:23:55 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03.inc	2008-07-19 08:31:33 +0000
@@ -13,6 +13,13 @@
 USE test;
 --source suite/funcs_1/include/tb3.inc
 
+# This test cannot be used for the embedded server because we check here
+# privilgeges.
+--source include/not_embedded.inc
+
+USE test;
+--source suite/funcs_1/include/tb3.inc
+
 --disable_abort_on_error
 
 ###########################################

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_08.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_08.inc	2008-06-03 10:21:48 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_08.inc	2008-07-19 08:31:33 +0000
@@ -8,6 +8,9 @@
 USE test;
 --source suite/funcs_1/include/tb3.inc
 
+USE test;
+--source suite/funcs_1/include/tb3.inc
+
 # General setup for Trigger tests
 let $message= Testcase: 3.5:;
 --source include/show_msg.inc

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc	2008-06-03 10:21:48 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc	2008-07-19 08:31:33 +0000
@@ -13,6 +13,14 @@ eval
 load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb3.txt'
 into table tb3;
 
+USE test;
+--source suite/funcs_1/include/tb3.inc
+
+--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
+eval
+load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb3.txt'
+into table tb3;
+
 --disable_abort_on_error
 
 ##############################################

=== modified file 'mysql-test/t/mysql_delimiter.sql'
--- a/mysql-test/t/mysql_delimiter.sql	2008-06-25 11:13:03 +0000
+++ b/mysql-test/t/mysql_delimiter.sql	2008-07-21 09:17:03 +0000
@@ -61,12 +61,6 @@ show tables//
 delimiter ; # Reset delimiter
 
 #
-# Bug #33812: mysql client incorrectly parsing DELIMITER
-#
-select a as delimiter from t1
-delimiter ; # Reset delimiter
-
-#
 # Bug #36244: MySQL CLI doesn't recognize standalone -- as comment
 #             before DELIMITER statement
 #

=== added file 'mysql-test/t/parser.test'
--- a/mysql-test/t/parser.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/parser.test	2008-07-21 03:01:19 +0000
@@ -0,0 +1,766 @@
+#
+# This file contains tests covering the parser
+#
+
+#=============================================================================
+# LEXICAL PARSER (lex)
+#=============================================================================
+
+#
+# Maintainer: these tests are for the lexical parser, so every character,
+# even whitespace or comments, is significant here.
+#
+
+SET @save_sql_mode=@@sql_mode;
+
+#
+# Documenting the current behavior, to detect incompatible changes.
+# In each cases:
+# - no error is the correct result
+# - an error is the expected result with the current implementation,
+#   and is a limitation.
+
+set SQL_MODE='';
+
+create table ADDDATE(a int);
+drop table ADDDATE;
+create table ADDDATE (a int);
+drop table ADDDATE;
+
+--error ER_PARSE_ERROR
+create table BIT_AND(a int);
+create table BIT_AND (a int);
+drop table BIT_AND;
+
+--error ER_PARSE_ERROR
+create table BIT_OR(a int);
+create table BIT_OR (a int);
+drop table BIT_OR;
+
+--error ER_PARSE_ERROR
+create table BIT_XOR(a int);
+create table BIT_XOR (a int);
+drop table BIT_XOR;
+
+--error ER_PARSE_ERROR
+create table CAST(a int);
+create table CAST (a int);
+drop table CAST;
+
+--error ER_PARSE_ERROR
+create table COUNT(a int);
+create table COUNT (a int);
+drop table COUNT;
+
+--error ER_PARSE_ERROR
+create table CURDATE(a int);
+create table CURDATE (a int);
+drop table CURDATE;
+
+--error ER_PARSE_ERROR
+create table CURTIME(a int);
+create table CURTIME (a int);
+drop table CURTIME;
+
+--error ER_PARSE_ERROR
+create table DATE_ADD(a int);
+create table DATE_ADD (a int);
+drop table DATE_ADD;
+
+--error ER_PARSE_ERROR
+create table DATE_SUB(a int);
+create table DATE_SUB (a int);
+drop table DATE_SUB;
+
+--error ER_PARSE_ERROR
+create table EXTRACT(a int);
+create table EXTRACT (a int);
+drop table EXTRACT;
+
+--error ER_PARSE_ERROR
+create table GROUP_CONCAT(a int);
+create table GROUP_CONCAT (a int);
+drop table GROUP_CONCAT;
+
+# Limitation removed in 5.1
+create table GROUP_UNIQUE_USERS(a int);
+drop table GROUP_UNIQUE_USERS;
+create table GROUP_UNIQUE_USERS (a int);
+drop table GROUP_UNIQUE_USERS;
+
+--error ER_PARSE_ERROR
+create table MAX(a int);
+create table MAX (a int);
+drop table MAX;
+
+--error ER_PARSE_ERROR
+create table MID(a int);
+create table MID (a int);
+drop table MID;
+
+--error ER_PARSE_ERROR
+create table MIN(a int);
+create table MIN (a int);
+drop table MIN;
+
+--error ER_PARSE_ERROR
+create table NOW(a int);
+create table NOW (a int);
+drop table NOW;
+
+--error ER_PARSE_ERROR
+create table POSITION(a int);
+create table POSITION (a int);
+drop table POSITION;
+
+create table SESSION_USER(a int);
+drop table SESSION_USER;
+create table SESSION_USER (a int);
+drop table SESSION_USER;
+
+--error ER_PARSE_ERROR
+create table STD(a int);
+create table STD (a int);
+drop table STD;
+
+--error ER_PARSE_ERROR
+create table STDDEV(a int);
+create table STDDEV (a int);
+drop table STDDEV;
+
+--error ER_PARSE_ERROR
+create table STDDEV_POP(a int);
+create table STDDEV_POP (a int);
+drop table STDDEV_POP;
+
+--error ER_PARSE_ERROR
+create table STDDEV_SAMP(a int);
+create table STDDEV_SAMP (a int);
+drop table STDDEV_SAMP;
+
+create table SUBDATE(a int);
+drop table SUBDATE;
+create table SUBDATE (a int);
+drop table SUBDATE;
+
+--error ER_PARSE_ERROR
+create table SUBSTR(a int);
+create table SUBSTR (a int);
+drop table SUBSTR;
+
+--error ER_PARSE_ERROR
+create table SUBSTRING(a int);
+create table SUBSTRING (a int);
+drop table SUBSTRING;
+
+--error ER_PARSE_ERROR
+create table SUM(a int);
+create table SUM (a int);
+drop table SUM;
+
+--error ER_PARSE_ERROR
+create table SYSDATE(a int);
+create table SYSDATE (a int);
+drop table SYSDATE;
+
+create table SYSTEM_USER(a int);
+drop table SYSTEM_USER;
+create table SYSTEM_USER (a int);
+drop table SYSTEM_USER;
+
+--error ER_PARSE_ERROR
+create table TRIM(a int);
+create table TRIM (a int);
+drop table TRIM;
+
+# Limitation removed in 5.1
+create table UNIQUE_USERS(a int);
+drop table UNIQUE_USERS;
+create table UNIQUE_USERS (a int);
+drop table UNIQUE_USERS;
+
+--error ER_PARSE_ERROR
+create table VARIANCE(a int);
+create table VARIANCE (a int);
+drop table VARIANCE;
+
+--error ER_PARSE_ERROR
+create table VAR_POP(a int);
+create table VAR_POP (a int);
+drop table VAR_POP;
+
+--error ER_PARSE_ERROR
+create table VAR_SAMP(a int);
+create table VAR_SAMP (a int);
+drop table VAR_SAMP;
+
+set SQL_MODE='IGNORE_SPACE';
+
+create table ADDDATE(a int);
+drop table ADDDATE;
+create table ADDDATE (a int);
+drop table ADDDATE;
+
+--error ER_PARSE_ERROR
+create table BIT_AND(a int);
+--error ER_PARSE_ERROR
+create table BIT_AND (a int);
+
+--error ER_PARSE_ERROR
+create table BIT_OR(a int);
+--error ER_PARSE_ERROR
+create table BIT_OR (a int);
+
+--error ER_PARSE_ERROR
+create table BIT_XOR(a int);
+--error ER_PARSE_ERROR
+create table BIT_XOR (a int);
+
+--error ER_PARSE_ERROR
+create table CAST(a int);
+--error ER_PARSE_ERROR
+create table CAST (a int);
+
+--error ER_PARSE_ERROR
+create table COUNT(a int);
+--error ER_PARSE_ERROR
+create table COUNT (a int);
+
+--error ER_PARSE_ERROR
+create table CURDATE(a int);
+--error ER_PARSE_ERROR
+create table CURDATE (a int);
+
+--error ER_PARSE_ERROR
+create table CURTIME(a int);
+--error ER_PARSE_ERROR
+create table CURTIME (a int);
+
+--error ER_PARSE_ERROR
+create table DATE_ADD(a int);
+--error ER_PARSE_ERROR
+create table DATE_ADD (a int);
+
+--error ER_PARSE_ERROR
+create table DATE_SUB(a int);
+--error ER_PARSE_ERROR
+create table DATE_SUB (a int);
+
+--error ER_PARSE_ERROR
+create table EXTRACT(a int);
+--error ER_PARSE_ERROR
+create table EXTRACT (a int);
+
+--error ER_PARSE_ERROR
+create table GROUP_CONCAT(a int);
+--error ER_PARSE_ERROR
+create table GROUP_CONCAT (a int);
+
+# Limitation removed in 5.1
+create table GROUP_UNIQUE_USERS(a int);
+drop table GROUP_UNIQUE_USERS;
+create table GROUP_UNIQUE_USERS (a int);
+drop table GROUP_UNIQUE_USERS;
+
+--error ER_PARSE_ERROR
+create table MAX(a int);
+--error ER_PARSE_ERROR
+create table MAX (a int);
+
+--error ER_PARSE_ERROR
+create table MID(a int);
+--error ER_PARSE_ERROR
+create table MID (a int);
+
+--error ER_PARSE_ERROR
+create table MIN(a int);
+--error ER_PARSE_ERROR
+create table MIN (a int);
+
+--error ER_PARSE_ERROR
+create table NOW(a int);
+--error ER_PARSE_ERROR
+create table NOW (a int);
+
+--error ER_PARSE_ERROR
+create table POSITION(a int);
+--error ER_PARSE_ERROR
+create table POSITION (a int);
+
+create table SESSION_USER(a int);
+drop table SESSION_USER;
+create table SESSION_USER (a int);
+drop table SESSION_USER;
+
+--error ER_PARSE_ERROR
+create table STD(a int);
+--error ER_PARSE_ERROR
+create table STD (a int);
+
+--error ER_PARSE_ERROR
+create table STDDEV(a int);
+--error ER_PARSE_ERROR
+create table STDDEV (a int);
+
+--error ER_PARSE_ERROR
+create table STDDEV_POP(a int);
+--error ER_PARSE_ERROR
+create table STDDEV_POP (a int);
+
+--error ER_PARSE_ERROR
+create table STDDEV_SAMP(a int);
+--error ER_PARSE_ERROR
+create table STDDEV_SAMP (a int);
+
+create table SUBDATE(a int);
+drop table SUBDATE;
+create table SUBDATE (a int);
+drop table SUBDATE;
+
+--error ER_PARSE_ERROR
+create table SUBSTR(a int);
+--error ER_PARSE_ERROR
+create table SUBSTR (a int);
+
+--error ER_PARSE_ERROR
+create table SUBSTRING(a int);
+--error ER_PARSE_ERROR
+create table SUBSTRING (a int);
+
+--error ER_PARSE_ERROR
+create table SUM(a int);
+--error ER_PARSE_ERROR
+create table SUM (a int);
+
+--error ER_PARSE_ERROR
+create table SYSDATE(a int);
+--error ER_PARSE_ERROR
+create table SYSDATE (a int);
+
+create table SYSTEM_USER(a int);
+drop table SYSTEM_USER;
+create table SYSTEM_USER (a int);
+drop table SYSTEM_USER;
+
+--error ER_PARSE_ERROR
+create table TRIM(a int);
+--error ER_PARSE_ERROR
+create table TRIM (a int);
+
+# Limitation removed in 5.1
+create table UNIQUE_USERS(a int);
+drop table UNIQUE_USERS;
+create table UNIQUE_USERS (a int);
+drop table UNIQUE_USERS;
+
+--error ER_PARSE_ERROR
+create table VARIANCE(a int);
+--error ER_PARSE_ERROR
+create table VARIANCE (a int);
+
+--error ER_PARSE_ERROR
+create table VAR_POP(a int);
+--error ER_PARSE_ERROR
+create table VAR_POP (a int);
+
+--error ER_PARSE_ERROR
+create table VAR_SAMP(a int);
+--error ER_PARSE_ERROR
+create table VAR_SAMP (a int);
+
+#
+# Bug#25930 (CREATE TABLE x SELECT ... parses columns wrong when ran with
+#            ANSI_QUOTES mode)
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS table_25930_a;
+DROP TABLE IF EXISTS table_25930_b;
+--enable_warnings
+
+SET SQL_MODE = 'ANSI_QUOTES';
+CREATE TABLE table_25930_a ( "blah" INT );
+CREATE TABLE table_25930_b SELECT "blah" - 1 FROM table_25930_a;
+
+# The lexer used to chop the first <">,
+# not marking the start of the token "blah" correctly.
+desc table_25930_b;
+
+DROP TABLE table_25930_a;
+DROP TABLE table_25930_b;
+
+
+SET @@sql_mode=@save_sql_mode;
+
+#
+# Bug#26030 (Parsing fails for stored routine w/multi-statement execution
+# enabled)
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS p26030;
+--enable_warnings
+
+delimiter $$;
+
+select "non terminated"$$
+select "terminated";$$
+select "non terminated, space"      $$
+select "terminated, space";      $$
+select "non terminated, comment" /* comment */$$
+select "terminated, comment"; /* comment */$$
+
+# Multi queries can not be used in --ps-protocol test mode
+--disable_ps_protocol
+
+select "stmt 1";select "stmt 2 non terminated"$$
+select "stmt 1";select "stmt 2 terminated";$$
+select "stmt 1";select "stmt 2 non terminated, space"      $$
+select "stmt 1";select "stmt 2 terminated, space";      $$
+select "stmt 1";select "stmt 2 non terminated, comment" /* comment */$$
+select "stmt 1";select "stmt 2 terminated, comment"; /* comment */$$
+
+select "stmt 1";             select "space, stmt 2"$$
+select "stmt 1";/* comment */select "comment, stmt 2"$$
+
+DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() BEGIN SELECT 1; END; CALL p26030()
+$$
+
+DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() SELECT 1; CALL p26030()
+$$
+
+--enable_ps_protocol
+
+delimiter ;$$
+DROP PROCEDURE p26030;
+
+#
+# Bug#35936 (Garbage in syntax error message)
+#
+
+# test that
+# - <WITH> <END_OF_INPUT>
+# - <WITH> <YYEOF>
+# are parsed properly during the LALR(2) lookup
+
+--error ER_PARSE_ERROR
+SHOW NEW MASTER FOR SLAVE WITH;
+
+--error ER_PARSE_ERROR
+SHOW NEW MASTER FOR SLAVE WITH foo bar baz;
+
+delimiter $$;
+
+--error ER_PARSE_ERROR
+SHOW NEW MASTER FOR SLAVE WITH$$
+
+--error ER_PARSE_ERROR
+SHOW NEW MASTER FOR SLAVE WITH;$$
+
+delimiter ;$$
+
+#=============================================================================
+# SYNTACTIC PARSER (bison)
+#=============================================================================
+
+#
+#
+# Bug#21114 (Foreign key creation fails to table with name format)
+# 
+
+# Test coverage with edge conditions
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select pi(3.14);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select tan();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select tan(1, 2);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select makedate(1);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select makedate(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select maketime();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select maketime(1);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select maketime(1, 2);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select maketime(1, 2, 3, 4);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select atan();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select atan2(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select concat();
+select concat("foo");
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select concat_ws();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select concat_ws("foo");
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select encrypt();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select encrypt(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select des_encrypt("p1", "p2", "not expected");
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select des_decrypt("p1", "p2", "not expected");
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select elt();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select elt(1);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select export_set();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select export_set("p1");
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select export_set("p1", "p2");
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select export_set("p1", "p2", "p3", "p4", "p5", "p6");
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select field();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select field("p1");
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select from_unixtime();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select from_unixtime(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select unix_timestamp(1, 2);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select greatest();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select greatest(12);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select last_insert_id(1, 2);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select least();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select least(12);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select locate();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select locate(1);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select locate(1, 2, 3, 4);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select log();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select log(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select make_set();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select make_set(1);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select master_pos_wait();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select master_pos_wait(1);
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select master_pos_wait(1, 2, 3, 4);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select rand(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select round(1, 2, 3);
+
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select yearweek();
+-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select yearweek(1, 2, 3);
+
+#
+# Bug#24736: UDF functions parsed as Stored Functions
+#
+
+# Verify that the syntax for calling UDF : foo(expr AS param, ...)
+# can not be used when calling native functions
+
+# Native function with 1 argument
+
+select abs(3);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select abs(3 AS three);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select abs(3 three);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select abs(3 AS "three");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select abs(3 "three");
+
+# Native function with 2 arguments
+
+set @bar="bar";
+set @foobar="foobar";
+
+select instr("foobar", "bar");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select instr("foobar" AS p1, "bar");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select instr("foobar" p1, "bar");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select instr("foobar" AS "p1", "bar");
+## String concatenation, valid syntax
+select instr("foobar" "p1", "bar");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select instr(@foobar "p1", "bar");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select instr("foobar", "bar" AS p2);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select instr("foobar", "bar" p2);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select instr("foobar", "bar" AS "p2");
+## String concatenation, valid syntax
+select instr("foobar", "bar" "p2");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select instr("foobar", @bar "p2");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select instr("foobar" AS p1, "bar" AS p2);
+
+# Native function with 3 arguments
+
+select conv(255, 10, 16);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255 AS p1, 10, 16);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255 p1, 10, 16);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255 AS "p1", 10, 16);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255 "p1", 10, 16);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255, 10 AS p2, 16);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255, 10 p2, 16);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255, 10 AS "p2", 16);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255, 10 "p2", 16);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255, 10, 16 AS p3);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255, 10, 16 p3);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255, 10, 16 AS "p3");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255, 10, 16 "p3");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select conv(255 AS p1, 10 AS p2, 16 AS p3);
+
+# Native function with a variable number of arguments
+
+# Bug in libm.so on Solaris:
+#   atan(10) from 32-bit version returns 1.4711276743037347
+#   atan(10) from 64-bit version returns 1.4711276743037345
+--replace_result 1.4711276743037345 1.4711276743037347
+select atan(10);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10 AS p1);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10 p1);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10 AS "p1");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10 "p1");
+
+select atan(10, 20);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10 AS p1, 20);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10 p1, 20);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10 AS "p1", 20);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10 "p1", 20);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10, 20 AS p2);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10, 20 p2);
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10, 20 AS "p2");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10, 20 "p2");
+-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+select atan(10 AS p1, 20 AS p2);
+
+#
+# Bug#22312 Syntax error in expression with INTERVAL()
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
+SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
+SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
+SELECT 1 + INTERVAL(1,0,1,2) + 1;
+SELECT INTERVAL(1^1,0,1,2) + 1;
+SELECT INTERVAL(1,0+1,2,3) * 5.5;
+SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
+SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
+SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
+SELECT INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3);
+
+--disable_warnings
+SELECT 1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND;
+SELECT 1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND;
+--enable_warnings
+
+CREATE TABLE t1 (a INT, b DATETIME);
+INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
+SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;
+DROP TABLE t1;
+
+#
+# Bug#28317 Left Outer Join with {oj outer-join}
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1,t2,t3;
+--enable_warnings
+CREATE TABLE t1 (a1 INT, a2 INT, a3 INT, a4 DATETIME);
+CREATE TABLE t2 LIKE t1;
+CREATE TABLE t3 LIKE t1;
+SELECT t1.* FROM t1 AS t0, { OJ t2 INNER JOIN t1 ON (t1.a1=t2.a1) } WHERE t0.a3=2;
+SELECT t1.*,t2.* FROM { OJ ((t1 INNER JOIN t2 ON (t1.a1=t2.a2)) LEFT OUTER JOIN t3 ON t3.a3=t2.a1)};
+SELECT t1.*,t2.* FROM { OJ ((t1 LEFT OUTER JOIN t2 ON t1.a3=t2.a2) INNER JOIN t3 ON (t3.a1=t2.a2))};
+SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) CROSS JOIN t3 ON (t3.a2=t2.a3)};
+SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a3} WHERE t1.a2 > 10;
+SELECT {fn CONCAT(a1,a2)} FROM t1;
+UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0;
+SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')};
+DROP TABLE t1, t2, t3;
+
+#
+# Bug#31765 (BACKUP DATABASE broken syntax)
+#
+
+--error ER_PARSE_ERROR
+BACKUP DATABASE *, test to 'broken.bak';
+
+--error ER_PARSE_ERROR
+BACKUP DATABASE *, db1, db2, db3 to 'broken.bak';
+

=== removed file 'mysql-test/t/parser.test'
--- a/mysql-test/t/parser.test	2008-07-08 18:40:32 +0000
+++ b/mysql-test/t/parser.test	1970-01-01 00:00:00 +0000
@@ -1,766 +0,0 @@
-#
-# This file contains tests covering the parser
-#
-
-#=============================================================================
-# LEXICAL PARSER (lex)
-#=============================================================================
-
-#
-# Maintainer: these tests are for the lexical parser, so every character,
-# even whitespace or comments, is significant here.
-#
-
-SET @save_sql_mode=@@sql_mode;
-
-#
-# Documenting the current behavior, to detect incompatible changes.
-# In each cases:
-# - no error is the correct result
-# - an error is the expected result with the current implementation,
-#   and is a limitation.
-
-set SQL_MODE='';
-
-create table ADDDATE(a int);
-drop table ADDDATE;
-create table ADDDATE (a int);
-drop table ADDDATE;
-
---error ER_PARSE_ERROR
-create table BIT_AND(a int);
-create table BIT_AND (a int);
-drop table BIT_AND;
-
---error ER_PARSE_ERROR
-create table BIT_OR(a int);
-create table BIT_OR (a int);
-drop table BIT_OR;
-
---error ER_PARSE_ERROR
-create table BIT_XOR(a int);
-create table BIT_XOR (a int);
-drop table BIT_XOR;
-
---error ER_PARSE_ERROR
-create table CAST(a int);
-create table CAST (a int);
-drop table CAST;
-
---error ER_PARSE_ERROR
-create table COUNT(a int);
-create table COUNT (a int);
-drop table COUNT;
-
---error ER_PARSE_ERROR
-create table CURDATE(a int);
-create table CURDATE (a int);
-drop table CURDATE;
-
---error ER_PARSE_ERROR
-create table CURTIME(a int);
-create table CURTIME (a int);
-drop table CURTIME;
-
---error ER_PARSE_ERROR
-create table DATE_ADD(a int);
-create table DATE_ADD (a int);
-drop table DATE_ADD;
-
---error ER_PARSE_ERROR
-create table DATE_SUB(a int);
-create table DATE_SUB (a int);
-drop table DATE_SUB;
-
---error ER_PARSE_ERROR
-create table EXTRACT(a int);
-create table EXTRACT (a int);
-drop table EXTRACT;
-
---error ER_PARSE_ERROR
-create table GROUP_CONCAT(a int);
-create table GROUP_CONCAT (a int);
-drop table GROUP_CONCAT;
-
-# Limitation removed in 5.1
-create table GROUP_UNIQUE_USERS(a int);
-drop table GROUP_UNIQUE_USERS;
-create table GROUP_UNIQUE_USERS (a int);
-drop table GROUP_UNIQUE_USERS;
-
---error ER_PARSE_ERROR
-create table MAX(a int);
-create table MAX (a int);
-drop table MAX;
-
---error ER_PARSE_ERROR
-create table MID(a int);
-create table MID (a int);
-drop table MID;
-
---error ER_PARSE_ERROR
-create table MIN(a int);
-create table MIN (a int);
-drop table MIN;
-
---error ER_PARSE_ERROR
-create table NOW(a int);
-create table NOW (a int);
-drop table NOW;
-
---error ER_PARSE_ERROR
-create table POSITION(a int);
-create table POSITION (a int);
-drop table POSITION;
-
-create table SESSION_USER(a int);
-drop table SESSION_USER;
-create table SESSION_USER (a int);
-drop table SESSION_USER;
-
---error ER_PARSE_ERROR
-create table STD(a int);
-create table STD (a int);
-drop table STD;
-
---error ER_PARSE_ERROR
-create table STDDEV(a int);
-create table STDDEV (a int);
-drop table STDDEV;
-
---error ER_PARSE_ERROR
-create table STDDEV_POP(a int);
-create table STDDEV_POP (a int);
-drop table STDDEV_POP;
-
---error ER_PARSE_ERROR
-create table STDDEV_SAMP(a int);
-create table STDDEV_SAMP (a int);
-drop table STDDEV_SAMP;
-
-create table SUBDATE(a int);
-drop table SUBDATE;
-create table SUBDATE (a int);
-drop table SUBDATE;
-
---error ER_PARSE_ERROR
-create table SUBSTR(a int);
-create table SUBSTR (a int);
-drop table SUBSTR;
-
---error ER_PARSE_ERROR
-create table SUBSTRING(a int);
-create table SUBSTRING (a int);
-drop table SUBSTRING;
-
---error ER_PARSE_ERROR
-create table SUM(a int);
-create table SUM (a int);
-drop table SUM;
-
---error ER_PARSE_ERROR
-create table SYSDATE(a int);
-create table SYSDATE (a int);
-drop table SYSDATE;
-
-create table SYSTEM_USER(a int);
-drop table SYSTEM_USER;
-create table SYSTEM_USER (a int);
-drop table SYSTEM_USER;
-
---error ER_PARSE_ERROR
-create table TRIM(a int);
-create table TRIM (a int);
-drop table TRIM;
-
-# Limitation removed in 5.1
-create table UNIQUE_USERS(a int);
-drop table UNIQUE_USERS;
-create table UNIQUE_USERS (a int);
-drop table UNIQUE_USERS;
-
---error ER_PARSE_ERROR
-create table VARIANCE(a int);
-create table VARIANCE (a int);
-drop table VARIANCE;
-
---error ER_PARSE_ERROR
-create table VAR_POP(a int);
-create table VAR_POP (a int);
-drop table VAR_POP;
-
---error ER_PARSE_ERROR
-create table VAR_SAMP(a int);
-create table VAR_SAMP (a int);
-drop table VAR_SAMP;
-
-set SQL_MODE='IGNORE_SPACE';
-
-create table ADDDATE(a int);
-drop table ADDDATE;
-create table ADDDATE (a int);
-drop table ADDDATE;
-
---error ER_PARSE_ERROR
-create table BIT_AND(a int);
---error ER_PARSE_ERROR
-create table BIT_AND (a int);
-
---error ER_PARSE_ERROR
-create table BIT_OR(a int);
---error ER_PARSE_ERROR
-create table BIT_OR (a int);
-
---error ER_PARSE_ERROR
-create table BIT_XOR(a int);
---error ER_PARSE_ERROR
-create table BIT_XOR (a int);
-
---error ER_PARSE_ERROR
-create table CAST(a int);
---error ER_PARSE_ERROR
-create table CAST (a int);
-
---error ER_PARSE_ERROR
-create table COUNT(a int);
---error ER_PARSE_ERROR
-create table COUNT (a int);
-
---error ER_PARSE_ERROR
-create table CURDATE(a int);
---error ER_PARSE_ERROR
-create table CURDATE (a int);
-
---error ER_PARSE_ERROR
-create table CURTIME(a int);
---error ER_PARSE_ERROR
-create table CURTIME (a int);
-
---error ER_PARSE_ERROR
-create table DATE_ADD(a int);
---error ER_PARSE_ERROR
-create table DATE_ADD (a int);
-
---error ER_PARSE_ERROR
-create table DATE_SUB(a int);
---error ER_PARSE_ERROR
-create table DATE_SUB (a int);
-
---error ER_PARSE_ERROR
-create table EXTRACT(a int);
---error ER_PARSE_ERROR
-create table EXTRACT (a int);
-
---error ER_PARSE_ERROR
-create table GROUP_CONCAT(a int);
---error ER_PARSE_ERROR
-create table GROUP_CONCAT (a int);
-
-# Limitation removed in 5.1
-create table GROUP_UNIQUE_USERS(a int);
-drop table GROUP_UNIQUE_USERS;
-create table GROUP_UNIQUE_USERS (a int);
-drop table GROUP_UNIQUE_USERS;
-
---error ER_PARSE_ERROR
-create table MAX(a int);
---error ER_PARSE_ERROR
-create table MAX (a int);
-
---error ER_PARSE_ERROR
-create table MID(a int);
---error ER_PARSE_ERROR
-create table MID (a int);
-
---error ER_PARSE_ERROR
-create table MIN(a int);
---error ER_PARSE_ERROR
-create table MIN (a int);
-
---error ER_PARSE_ERROR
-create table NOW(a int);
---error ER_PARSE_ERROR
-create table NOW (a int);
-
---error ER_PARSE_ERROR
-create table POSITION(a int);
---error ER_PARSE_ERROR
-create table POSITION (a int);
-
-create table SESSION_USER(a int);
-drop table SESSION_USER;
-create table SESSION_USER (a int);
-drop table SESSION_USER;
-
---error ER_PARSE_ERROR
-create table STD(a int);
---error ER_PARSE_ERROR
-create table STD (a int);
-
---error ER_PARSE_ERROR
-create table STDDEV(a int);
---error ER_PARSE_ERROR
-create table STDDEV (a int);
-
---error ER_PARSE_ERROR
-create table STDDEV_POP(a int);
---error ER_PARSE_ERROR
-create table STDDEV_POP (a int);
-
---error ER_PARSE_ERROR
-create table STDDEV_SAMP(a int);
---error ER_PARSE_ERROR
-create table STDDEV_SAMP (a int);
-
-create table SUBDATE(a int);
-drop table SUBDATE;
-create table SUBDATE (a int);
-drop table SUBDATE;
-
---error ER_PARSE_ERROR
-create table SUBSTR(a int);
---error ER_PARSE_ERROR
-create table SUBSTR (a int);
-
---error ER_PARSE_ERROR
-create table SUBSTRING(a int);
---error ER_PARSE_ERROR
-create table SUBSTRING (a int);
-
---error ER_PARSE_ERROR
-create table SUM(a int);
---error ER_PARSE_ERROR
-create table SUM (a int);
-
---error ER_PARSE_ERROR
-create table SYSDATE(a int);
---error ER_PARSE_ERROR
-create table SYSDATE (a int);
-
-create table SYSTEM_USER(a int);
-drop table SYSTEM_USER;
-create table SYSTEM_USER (a int);
-drop table SYSTEM_USER;
-
---error ER_PARSE_ERROR
-create table TRIM(a int);
---error ER_PARSE_ERROR
-create table TRIM (a int);
-
-# Limitation removed in 5.1
-create table UNIQUE_USERS(a int);
-drop table UNIQUE_USERS;
-create table UNIQUE_USERS (a int);
-drop table UNIQUE_USERS;
-
---error ER_PARSE_ERROR
-create table VARIANCE(a int);
---error ER_PARSE_ERROR
-create table VARIANCE (a int);
-
---error ER_PARSE_ERROR
-create table VAR_POP(a int);
---error ER_PARSE_ERROR
-create table VAR_POP (a int);
-
---error ER_PARSE_ERROR
-create table VAR_SAMP(a int);
---error ER_PARSE_ERROR
-create table VAR_SAMP (a int);
-
-#
-# Bug#25930 (CREATE TABLE x SELECT ... parses columns wrong when ran with
-#            ANSI_QUOTES mode)
-#
-
---disable_warnings
-DROP TABLE IF EXISTS table_25930_a;
-DROP TABLE IF EXISTS table_25930_b;
---enable_warnings
-
-SET SQL_MODE = 'ANSI_QUOTES';
-CREATE TABLE table_25930_a ( "blah" INT );
-CREATE TABLE table_25930_b SELECT "blah" - 1 FROM table_25930_a;
-
-# The lexer used to chop the first <">,
-# not marking the start of the token "blah" correctly.
-desc table_25930_b;
-
-DROP TABLE table_25930_a;
-DROP TABLE table_25930_b;
-
-
-SET @@sql_mode=@save_sql_mode;
-
-#
-# Bug#26030 (Parsing fails for stored routine w/multi-statement execution
-# enabled)
-#
-
---disable_warnings
-DROP PROCEDURE IF EXISTS p26030;
---enable_warnings
-
-delimiter $$;
-
-select "non terminated"$$
-select "terminated";$$
-select "non terminated, space"      $$
-select "terminated, space";      $$
-select "non terminated, comment" /* comment */$$
-select "terminated, comment"; /* comment */$$
-
-# Multi queries can not be used in --ps-protocol test mode
---disable_ps_protocol
-
-select "stmt 1";select "stmt 2 non terminated"$$
-select "stmt 1";select "stmt 2 terminated";$$
-select "stmt 1";select "stmt 2 non terminated, space"      $$
-select "stmt 1";select "stmt 2 terminated, space";      $$
-select "stmt 1";select "stmt 2 non terminated, comment" /* comment */$$
-select "stmt 1";select "stmt 2 terminated, comment"; /* comment */$$
-
-select "stmt 1";             select "space, stmt 2"$$
-select "stmt 1";/* comment */select "comment, stmt 2"$$
-
-DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() BEGIN SELECT 1; END; CALL p26030()
-$$
-
-DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() SELECT 1; CALL p26030()
-$$
-
---enable_ps_protocol
-
-delimiter ;$$
-DROP PROCEDURE p26030;
-
-#
-# Bug#35936 (Garbage in syntax error message)
-#
-
-# test that
-# - <WITH> <END_OF_INPUT>
-# - <WITH> <YYEOF>
-# are parsed properly during the LALR(2) lookup
-
---error ER_PARSE_ERROR
-SHOW NEW MASTER FOR SLAVE WITH;
-
---error ER_PARSE_ERROR
-SHOW NEW MASTER FOR SLAVE WITH foo bar baz;
-
-delimiter $$;
-
---error ER_PARSE_ERROR
-SHOW NEW MASTER FOR SLAVE WITH$$
-
---error ER_PARSE_ERROR
-SHOW NEW MASTER FOR SLAVE WITH;$$
-
-delimiter ;$$
-
-#============================================================================r
-# SYNTACTIC PARSER (bison)
-#=============================================================================
-
-#
-#
-# Bug#21114 (Foreign key creation fails to table with name format)
-# 
-
-# Test coverage with edge conditions
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select pi(3.14);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select tan();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select tan(1, 2);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select makedate(1);
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select makedate(1, 2, 3);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select maketime();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select maketime(1);
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select maketime(1, 2);
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select maketime(1, 2, 3, 4);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select atan();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select atan2(1, 2, 3);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select concat();
-select concat("foo");
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select concat_ws();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select concat_ws("foo");
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select encrypt();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select encrypt(1, 2, 3);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select des_encrypt("p1", "p2", "not expected");
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select des_decrypt("p1", "p2", "not expected");
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select elt();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select elt(1);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select export_set();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select export_set("p1");
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select export_set("p1", "p2");
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select export_set("p1", "p2", "p3", "p4", "p5", "p6");
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select field();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select field("p1");
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select from_unixtime();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select from_unixtime(1, 2, 3);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select unix_timestamp(1, 2);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select greatest();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select greatest(12);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select last_insert_id(1, 2);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select least();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select least(12);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select locate();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select locate(1);
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select locate(1, 2, 3, 4);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select log();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select log(1, 2, 3);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select make_set();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select make_set(1);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select master_pos_wait();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select master_pos_wait(1);
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select master_pos_wait(1, 2, 3, 4);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select rand(1, 2, 3);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select round(1, 2, 3);
-
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select yearweek();
--- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
-select yearweek(1, 2, 3);
-
-#
-# Bug#24736: UDF functions parsed as Stored Functions
-#
-
-# Verify that the syntax for calling UDF : foo(expr AS param, ...)
-# can not be used when calling native functions
-
-# Native function with 1 argument
-
-select abs(3);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select abs(3 AS three);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select abs(3 three);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select abs(3 AS "three");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select abs(3 "three");
-
-# Native function with 2 arguments
-
-set @bar="bar";
-set @foobar="foobar";
-
-select instr("foobar", "bar");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select instr("foobar" AS p1, "bar");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select instr("foobar" p1, "bar");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select instr("foobar" AS "p1", "bar");
-## String concatenation, valid syntax
-select instr("foobar" "p1", "bar");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select instr(@foobar "p1", "bar");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select instr("foobar", "bar" AS p2);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select instr("foobar", "bar" p2);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select instr("foobar", "bar" AS "p2");
-## String concatenation, valid syntax
-select instr("foobar", "bar" "p2");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select instr("foobar", @bar "p2");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select instr("foobar" AS p1, "bar" AS p2);
-
-# Native function with 3 arguments
-
-select conv(255, 10, 16);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255 AS p1, 10, 16);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255 p1, 10, 16);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255 AS "p1", 10, 16);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255 "p1", 10, 16);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255, 10 AS p2, 16);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255, 10 p2, 16);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255, 10 AS "p2", 16);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255, 10 "p2", 16);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255, 10, 16 AS p3);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255, 10, 16 p3);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255, 10, 16 AS "p3");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255, 10, 16 "p3");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select conv(255 AS p1, 10 AS p2, 16 AS p3);
-
-# Native function with a variable number of arguments
-
-# Bug in libm.so on Solaris:
-#   atan(10) from 32-bit version returns 1.4711276743037347
-#   atan(10) from 64-bit version returns 1.4711276743037345
---replace_result 1.4711276743037345 1.4711276743037347
-select atan(10);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10 AS p1);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10 p1);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10 AS "p1");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10 "p1");
-
-select atan(10, 20);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10 AS p1, 20);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10 p1, 20);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10 AS "p1", 20);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10 "p1", 20);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10, 20 AS p2);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10, 20 p2);
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10, 20 AS "p2");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10, 20 "p2");
--- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-select atan(10 AS p1, 20 AS p2);
-
-#
-# Bug#22312 Syntax error in expression with INTERVAL()
-#
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
-SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
-SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
-SELECT 1 + INTERVAL(1,0,1,2) + 1;
-SELECT INTERVAL(1^1,0,1,2) + 1;
-SELECT INTERVAL(1,0+1,2,3) * 5.5;
-SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
-SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
-SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
-SELECT INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3);
-
---disable_warnings
-SELECT 1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND;
-SELECT 1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND;
---enable_warnings
-
-CREATE TABLE t1 (a INT, b DATETIME);
-INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
-SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;
-DROP TABLE t1;
-
-#
-# Bug#28317 Left Outer Join with {oj outer-join}
-#
-
---disable_warnings
-DROP TABLE IF EXISTS t1,t2,t3;
---enable_warnings
-CREATE TABLE t1 (a1 INT, a2 INT, a3 INT, a4 DATETIME);
-CREATE TABLE t2 LIKE t1;
-CREATE TABLE t3 LIKE t1;
-SELECT t1.* FROM t1 AS t0, { OJ t2 INNER JOIN t1 ON (t1.a1=t2.a1) } WHERE t0.a3=2;
-SELECT t1.*,t2.* FROM { OJ ((t1 INNER JOIN t2 ON (t1.a1=t2.a2)) LEFT OUTER JOIN t3 ON t3.a3=t2.a1)};
-SELECT t1.*,t2.* FROM { OJ ((t1 LEFT OUTER JOIN t2 ON t1.a3=t2.a2) INNER JOIN t3 ON (t3.a1=t2.a2))};
-SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) CROSS JOIN t3 ON (t3.a2=t2.a3)};
-SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a3} WHERE t1.a2 > 10;
-SELECT {fn CONCAT(a1,a2)} FROM t1;
-UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0;
-SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')};
-DROP TABLE t1, t2, t3;
-
-#
-# Bug#31765 (BACKUP DATABASE broken syntax)
-#
-
---error ER_PARSE_ERROR
-BACKUP DATABASE *, test to 'broken.bak';
-
---error ER_PARSE_ERROR
-BACKUP DATABASE *, db1, db2, db3 to 'broken.bak';
-

=== modified file 'mysql-test/t/system_mysql_db_fix50030.test'
--- a/mysql-test/t/system_mysql_db_fix50030.test	2007-11-30 06:04:31 +0000
+++ b/mysql-test/t/system_mysql_db_fix50030.test	2008-07-21 03:55:09 +0000
@@ -1,6 +1,13 @@
 # Embedded server doesn't support external clients
 --source include/not_embedded.inc
 
+# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
+# to the location of mysql_fix_privilege_tables.sql
+if (`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`)
+{
+  skip Test needs MYSQL_FIX_PRIVILEGE_TABLES;
+}
+
 #
 # This is the test for mysql_fix_privilege_tables
 # It checks that a system tables from mysql 5.0.30

=== modified file 'mysql-test/t/system_mysql_db_fix50117.test'
--- a/mysql-test/t/system_mysql_db_fix50117.test	2008-02-27 10:04:05 +0000
+++ b/mysql-test/t/system_mysql_db_fix50117.test	2008-07-21 03:55:09 +0000
@@ -1,6 +1,13 @@
 # Embedded server doesn't support external clients
 --source include/not_embedded.inc
 
+# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set
+# to the location of mysql_fix_privilege_tables.sql
+if (`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`)
+{
+  skip Test needs MYSQL_FIX_PRIVILEGE_TABLES;
+}
+
 #
 # This is the test for mysql_fix_privilege_tables
 # It checks that a system tables from mysql 5.1.17

=== modified file 'mysys/default.c'
--- a/mysys/default.c	2008-07-02 15:54:54 +0000
+++ b/mysys/default.c	2008-07-21 09:17:03 +0000
@@ -974,8 +974,7 @@ static int add_directory(MEM_ROOT *alloc
   char *p;
   my_bool err __attribute__((unused));
 
-  /* Normalize directory name */
-  len= unpack_dirname(buf, dir);
+  len= normalize_dirname(buf, dir);
   if (!(p= strmake_root(alloc, buf, len)))
     return 1;  /* Failure */
   /* Should never fail if DEFAULT_DIRS_SIZE is correct size */
@@ -1026,7 +1025,7 @@ static const char *my_get_module_parent(
 {
   char *last= NULL;
   char *end;
-  if (!GetModuleFileName(NULL, buf, size))
+  if (!GetModuleFileName(NULL, buf, (DWORD) size))
     return NULL;
   end= strend(buf);
 

=== modified file 'mysys/mf_pack.c'
--- a/mysys/mf_pack.c	2007-12-17 08:16:47 +0000
+++ b/mysys/mf_pack.c	2008-07-21 09:17:03 +0000
@@ -277,44 +277,75 @@ void symdirget(char *dir)
 #endif /* USE_SYMDIR */
 
 
-/*
-  Fixes a directroy name so that can be used by open()
+/**
+  Convert a directory name to a format which can be compared as strings
 
-  SYNOPSIS
-    unpack_dirname()
-    to			result-buffer, FN_REFLEN characters. may be == from
-    from		'Packed' directory name (may contain ~)
-
- IMPLEMENTATION
-  Make that last char of to is '/' if from not empty and
-  from doesn't end in FN_DEVCHAR
-  Uses cleanup_dirname and changes ~/.. to home_dir/..
+  @param to     result buffer, FN_REFLEN chars in length; may be == from
+  @param from   'packed' directory name, in whatever format
+  @returns      size of the normalized name
+
+  @details
+  - Ensures that last char is FN_LIBCHAR, unless it is FN_DEVCHAR
+  - Uses cleanup_dirname
+
+  It does *not* expand ~/ (although, see cleanup_dirname).  Nor does it do
+  any case folding.  All case-insensitive normalization should be done by
+  the caller.
+*/
 
-  Changes a UNIX filename to system filename (replaces / with \ on windows)
+size_t normalize_dirname(char *to, const char *from)
+{
+  size_t length;
+  char buff[FN_REFLEN];
+  DBUG_ENTER("normalize_dirname");
 
-  RETURN
+  /*
+    Despite the name, this actually converts the name to the system's
+    format (TODO: rip out the non-working VMS stuff and name this
+    properly).
+  */
+  (void) intern_filename(buff, from);
+  length= strlen(buff);			/* Fix that '/' is last */
+  if (length &&
+#ifdef FN_DEVCHAR
+      buff[length - 1] != FN_DEVCHAR &&
+#endif
+      buff[length - 1] != FN_LIBCHAR && buff[length - 1] != '/')
+  {
+    buff[length]= FN_LIBCHAR;
+    buff[length + 1]= '\0';
+  }
+
+  length=cleanup_dirname(to, buff);
+
+  DBUG_RETURN(length);
+}
+
+
+/**
+  Fixes a directory name so that can be used by open()
+
+  @param to     Result buffer, FN_REFLEN characters. May be == from
+  @param from   'Packed' directory name (may contain ~)
+
+  @details
+  - Uses normalize_dirname()
+  - Expands ~/... to home_dir/...
+  - Resolves MySQL's fake "foo.sym" symbolic directory names (if USE_SYMDIR)
+  - Changes a UNIX filename to system filename (replaces / with \ on windows)
+
+  @returns
    Length of new directory name (= length of to)
 */
 
-size_t unpack_dirname(char * to, const char *from)
+size_t unpack_dirname(char *to, const char *from)
 {
   size_t length, h_length;
   char buff[FN_REFLEN+1+4],*suffix,*tilde_expansion;
   DBUG_ENTER("unpack_dirname");
 
-  (void) intern_filename(buff,from);	    /* Change to intern name */
-  length= strlen(buff);                     /* Fix that '/' is last */
-  if (length &&
-#ifdef FN_DEVCHAR
-      buff[length-1] != FN_DEVCHAR &&
-#endif
-      buff[length-1] != FN_LIBCHAR && buff[length-1] != '/')
-  {
-    buff[length]=FN_LIBCHAR;
-    buff[length+1]= '\0';
-  }
+  length= normalize_dirname(buff, from);
 
-  length=cleanup_dirname(buff,buff);
   if (buff[0] == FN_HOMELIB)
   {
     suffix=buff+1; tilde_expansion=expand_tilde(&suffix);

=== modified file 'scripts/make_binary_distribution.sh'
--- a/scripts/make_binary_distribution.sh	2008-06-26 18:21:15 +0000
+++ b/scripts/make_binary_distribution.sh	2008-07-21 03:55:09 +0000
@@ -92,6 +92,7 @@ if [ x"$PLATFORM" = x"" ] ; then
   system=`echo $system | sed -e 's/darwin6.*/osx10.2/g'`
   system=`echo $system | sed -e 's/darwin7.*/osx10.3/g'`
   system=`echo $system | sed -e 's/darwin8.*/osx10.4/g'`
+  system=`echo $system | sed -e 's/darwin9.*/osx10.5/g'`
   system=`echo $system | sed -e 's/\(aix4.3\).*/\1/g'`
   system=`echo $system | sed -e 's/\(aix5.1\).*/\1/g'`
   system=`echo $system | sed -e 's/\(aix5.2\).*/\1/g'`

=== modified file 'sql/backup/api_types.h'
--- a/sql/backup/api_types.h	2008-05-05 15:03:24 +0000
+++ b/sql/backup/api_types.h	2008-07-19 03:03:39 +0000
@@ -72,7 +72,7 @@ class Db_ref
   Db_ref() :m_name(NULL)
   {}
 
-  const bool is_valid() const
+  bool is_valid() const
   { return m_name != NULL; }
 
   const String& name() const
@@ -110,7 +110,7 @@ class Table_ref
   Table_ref() :m_name(NULL)
   {}
 
-  const bool is_valid() const
+  bool is_valid() const
   { return m_name != NULL; }
 
   const Db_ref& db() const

=== modified file 'sql/backup/backup_engine.h'
--- a/sql/backup/backup_engine.h	2008-06-27 13:48:33 +0000
+++ b/sql/backup/backup_engine.h	2008-07-19 03:03:39 +0000
@@ -50,7 +50,7 @@ class Engine
   virtual ~Engine() {}
 
   /// Return version of backup images created by this engine.
-  virtual const version_t version() const =0;
+  virtual version_t version() const =0;
 
   /**
    Create a backup driver.
@@ -189,7 +189,7 @@ class Driver
   virtual void  free() {};
 
   /// Unknown size constant used for backup image size estimates.
-  static const size_t UNKNOWN_SIZE= static_cast<size_t>(-1);
+  static const size_t UNKNOWN_SIZE;
 
  protected:
 

=== modified file 'sql/backup/backup_test.cc'
--- a/sql/backup/backup_test.cc	2008-06-25 13:39:04 +0000
+++ b/sql/backup/backup_test.cc	2008-07-19 03:03:39 +0000
@@ -29,7 +29,6 @@ int execute_backup_test_command(THD *thd
   List<Item> field_list;                // list of fields to send
   String     op_str;                    // operations string
   String str;
-  Item *i;
 
   {
     String tmp_db_name("qqq", 3, system_charset_info);
@@ -39,7 +38,7 @@ int execute_backup_test_command(THD *thd
   /*
     Send field list.
   */
-  field_list.push_back(i= new Item_empty_string("db", 2));
+  field_list.push_back(new Item_empty_string("db", 2));
   field_list.push_back(new Item_empty_string("name", 5));
   field_list.push_back(new Item_empty_string("type", 4));
   field_list.push_back(new Item_empty_string("serialization", 13));
@@ -237,7 +236,6 @@ int execute_backup_test_command(THD *thd
   delete it;
 
   my_eof(thd);
-//  delete i;
   DBUG_RETURN(res);
 }
 

=== modified file 'sql/backup/be_nodata.h'
--- a/sql/backup/be_nodata.h	2008-05-14 00:24:06 +0000
+++ b/sql/backup/be_nodata.h	2008-07-19 03:03:39 +0000
@@ -31,7 +31,7 @@ class Engine: public Backup_engine
     /*
       Return version of backup images created by this engine.
     */
-    const version_t version() const { return 0; };
+    version_t version() const { return 0; };
     result_t get_backup(const uint32, const Table_list &tables, 
                         Backup_driver* &drv);
     result_t get_restore(const version_t ver, const uint32, const Table_list &tables,

=== modified file 'sql/backup/data_backup.cc'
--- a/sql/backup/data_backup.cc	2008-07-07 12:51:56 +0000
+++ b/sql/backup/data_backup.cc	2008-07-19 03:03:39 +0000
@@ -202,6 +202,14 @@ class Backup_pump
 
 };
 
+/*
+  The constant is declared here (and memory allocated for it) because
+  IBM's xlc compiler requires that. However, the intention was to make it
+  a pure symbolic constant (no need to allocate memory). If someone knows
+  how to achieve that and keep xlc happy, please let me know. /Rafal
+*/ 
+const uint Backup_pump::get_buf_retries;
+
 /**
  @class Scheduler
 

=== modified file 'sql/backup/kernel.cc'
--- a/sql/backup/kernel.cc	2008-07-09 08:19:03 +0000
+++ b/sql/backup/kernel.cc	2008-07-19 03:03:39 +0000
@@ -1853,4 +1853,13 @@ namespace backup {
  */
 
 
+
+/*
+  The constant is declared here (and memory allocated for it) because
+  IBM's xlc compiler requires that. However, the intention was to make it
+  a pure symbolic constant (no need to allocate memory). If someone knows
+  how to achieve that and keep xlc happy, please let me know. /Rafal
+*/ 
+const size_t Driver::UNKNOWN_SIZE= static_cast<size_t>(-1);
+
 } // backup namespace

=== modified file 'sql/backup/stream_v1.c'
--- a/sql/backup/stream_v1.c	2008-05-14 00:35:24 +0000
+++ b/sql/backup/stream_v1.c	2008-07-19 03:03:39 +0000
@@ -1830,7 +1830,11 @@ int bstream_rd_data_chunk(backup_stream 
 int bstream_wr_byte(backup_stream *s, unsigned short int x)
 {
   byte buf= x & 0xFF;
-  blob b= { &buf, &buf + 1 };
+  blob b;
+
+  b.begin= &buf;
+  b.end= &buf + 1;
+
   return bstream_write_part(s,&b,b);
 }
 
@@ -1845,9 +1849,12 @@ int bstream_wr_byte(backup_stream *s, un
 int bstream_rd_byte(backup_stream *s, unsigned short int *x)
 {
   byte buf;
-  blob b= { &buf, &buf+1 };
+  blob b;
   int ret;
 
+  b.begin= &buf;
+  b.end= &buf + 1;
+
   ret= bstream_read_part(s,&b,b);
 
   if (b.begin == b.end)
@@ -1864,8 +1871,14 @@ int bstream_rd_byte(backup_stream *s, un
 */
 int bstream_wr_int2(backup_stream *s, unsigned int x)
 {
-  byte buf[2]= { x & 0xFF, (x >> 8) & 0xFF };
-  blob b= {buf, buf+2};
+  byte buf[2];
+  blob b;
+
+  buf[0]= x & 0xFF;
+  buf[1]= (x >> 8) & 0xFF;
+
+  b.begin= buf;
+  b.end= buf+2;
 
   return bstream_write_blob(s,b);
 }
@@ -1881,9 +1894,12 @@ int bstream_wr_int2(backup_stream *s, un
 int bstream_rd_int2(backup_stream *s, unsigned int *x)
 {
   byte buf[2];
-  blob b= {buf, buf+2};
+  blob b;
   int ret;
 
+  b.begin= buf;
+  b.end= buf+2;
+
   ret= bstream_read_blob(s,b);
   if (ret == BSTREAM_ERROR)
     return BSTREAM_ERROR;
@@ -1899,9 +1915,12 @@ int bstream_rd_int2(backup_stream *s, un
 int bstream_wr_int4(backup_stream *s, unsigned long int x)
 {
   byte buf[4];
-  blob b= {buf, buf+4};
+  blob b;
   int i;
 
+  b.begin= buf;
+  b.end= buf+4;
+
   for (i= 0; i < 4; i++)
   {
     buf[i]= get_byte_ulong((x & 0xFF));
@@ -1922,9 +1941,12 @@ int bstream_wr_int4(backup_stream *s, un
 int bstream_rd_int4(backup_stream *s, unsigned long int *x)
 {
   byte buf[4];
-  blob b= {buf, buf+4};
+  blob b;
   int ret;
 
+  b.begin= buf;
+  b.end= buf+4;
+
   ret= bstream_read_blob(s,b);
   if (ret == BSTREAM_ERROR)
     return BSTREAM_ERROR;
@@ -2070,7 +2092,10 @@ int bstream_rd_string(backup_stream *s, 
 int bstream_wr_time(backup_stream *s, bstream_time_t *time)
 {
   byte buf[6];
-  blob b= {buf, buf+6};
+  blob b;
+
+  b.begin= buf;
+  b.end= buf+6;
 
   buf[0]= get_byte_uint(((time->year>>4) & 0xFF));
   buf[1]= (get_byte_uint(((time->year<<4) & 0xF0)) |
@@ -2094,9 +2119,12 @@ int bstream_wr_time(backup_stream *s, bs
 int bstream_rd_time(backup_stream *s, bstream_time_t *time)
 {
   byte buf[6];
-  blob b= {buf, buf+6};
+  blob b;
   int ret= BSTREAM_OK;
 
+  b.begin= buf;
+  b.end= buf+6;
+
   ret= bstream_read_blob(s,b);
 
   if (ret != BSTREAM_OK)

=== modified file 'sql/backup/stream_v1_transport.c'
--- a/sql/backup/stream_v1_transport.c	2008-07-01 20:32:27 +0000
+++ b/sql/backup/stream_v1_transport.c	2008-07-19 03:03:39 +0000
@@ -443,7 +443,9 @@ int close_current_fragment(backup_stream
   int ret= BSTREAM_OK;
 
   /* blob describing data in the current fragment */
-  blob current_fragment= {buf->header+1, buf->pos};
+  blob current_fragment;
+  current_fragment.begin= buf->header+1;
+  current_fragment.end= buf->pos;
 
   /* nothing to do if current fragment is empty */
   if (buf->pos == buf->header)

=== modified file 'sql/hostname.cc'
--- a/sql/hostname.cc	2008-04-09 01:30:57 +0000
+++ b/sql/hostname.cc	2008-07-08 16:01:41 +0000
@@ -231,7 +231,11 @@ char *ip_to_hostname(struct sockaddr_sto
       this define is in this place for this reason.
     */
     DBUG_PRINT("error",("getaddrinfo returned %d", gxi_error));
+#ifdef EAI_NODATA
     if (gxi_error == EAI_NODATA )
+#else
+    if (gxi_error == EAI_NONAME )
+#endif
       add_wrong_ip(in);
 
     my_free(name,MYF(0));

=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2008-07-09 07:12:43 +0000
+++ b/sql/mysql_priv.h	2008-07-19 03:03:39 +0000
@@ -2494,7 +2494,7 @@ inline bool is_user_table(TABLE * table)
   This will be slightly slower and perhaps a tiny bit less accurate than
   doing it the IEEE754 way but log2() should be available on C99 systems.
 */
-static inline double log2(double x)
+inline double log2(double x)
 {
   return (log(x) / M_LN2);
 }

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2008-07-09 07:12:43 +0000
+++ b/sql/mysqld.cc	2008-07-19 03:03:39 +0000
@@ -1686,7 +1686,7 @@ static void network_init(void)
 
   if (mysqld_port != 0 && !opt_disable_networking && !opt_bootstrap)
   {
-    struct addrinfo *ai;
+    struct addrinfo *ai, *a;
     struct addrinfo hints;
     int error;
     DBUG_PRINT("general",("IP Socket is %d",mysqld_port));
@@ -1705,9 +1705,12 @@ static void network_init(void)
       unireg_abort(1);				/* purecov: tested */
     }
 
-
-    ip_sock= socket(ai->ai_family, ai->ai_socktype,
-                    ai->ai_protocol);
+    for (a = ai; a != NULL; a = ai->ai_next)
+    {
+      ip_sock= socket(a->ai_family, a->ai_socktype, a->ai_protocol);
+      if (ip_sock != INVALID_SOCKET)
+        break;
+    }
 
     if (ip_sock == INVALID_SOCKET)
     {
@@ -1731,7 +1734,7 @@ static void network_init(void)
        listen on both IPv6 and IPv4 wildcard addresses.
        Turn off IPV6_V6ONLY option.
      */
-    if (ai->ai_family == AF_INET6)
+    if (a->ai_family == AF_INET6)
     {
       arg= 0;      
       (void) setsockopt(ip_sock, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&arg,
@@ -1748,7 +1751,7 @@ static void network_init(void)
     */
     for (waited= 0, retry= 1; ; retry++, waited+= this_wait)
     {
-      if (((ret= bind(ip_sock, ai->ai_addr, ai->ai_addrlen)) >= 0 ) ||
+      if (((ret= bind(ip_sock, a->ai_addr, a->ai_addrlen)) >= 0 ) ||
           (socket_errno != SOCKET_EADDRINUSE) ||
           (waited >= mysqld_port_timeout))
         break;
@@ -5205,7 +5208,7 @@ pthread_handler_t handle_connections_soc
       struct sockaddr_storage dummy;
       dummyLen = sizeof(dummy);
       if (  getsockname(new_sock,(struct sockaddr *)&dummy, 
-                  (socklen_t *)&dummyLen) < 0  )
+                  (SOCKET_SIZE_TYPE *)&dummyLen) < 0  )
       {
 	sql_perror("Error on new connection socket");
 	(void) shutdown(new_sock, SHUT_RDWR);

=== modified file 'storage/archive/azio.h'
--- a/storage/archive/azio.h	2007-12-21 01:24:47 +0000
+++ b/storage/archive/azio.h	2008-04-17 20:54:31 +0000
@@ -225,7 +225,7 @@ typedef enum {
 typedef enum {
   AZ_METHOD_BLOCK,
   AZ_METHOD_AIO,
-  AZ_METHOD_MAX,
+  AZ_METHOD_MAX
 } az_method;
 
 typedef struct azio_container_st azio_container_st;

=== modified file 'storage/falcon/ha_falcon.cpp'
--- a/storage/falcon/ha_falcon.cpp	2008-07-14 05:27:57 +0000
+++ b/storage/falcon/ha_falcon.cpp	2008-07-19 03:03:39 +0000
@@ -1140,9 +1140,6 @@ int StorageInterface::delete_row(const u
 	DBUG_ASSERT (lastRecord >= 0);
 	ha_statistic_increment(&SSV::ha_delete_count);
 
-	if (activeBlobs)
-		freeActiveBlobs();
-
 	int ret = storageTable->deleteRow(lastRecord);
 
 	if (ret < 0)

=== modified file 'storage/innobase/include/univ.i'
--- a/storage/innobase/include/univ.i	2008-06-12 00:08:07 +0000
+++ b/storage/innobase/include/univ.i	2008-07-08 16:01:41 +0000
@@ -58,7 +58,7 @@ of the 32-bit x86 assembler in mutex ope
 /* We only try to do explicit inlining of functions with gcc and
 Microsoft Visual C++ */
 
-# if !defined(__GNUC__)
+# if !defined(__GNUC__) && (!defined(__SUNPRO_C) || (__SUNPRO_C < 0x590))
 #  undef  UNIV_MUST_NOT_INLINE			/* Remove compiler warning */
 #  define UNIV_MUST_NOT_INLINE
 # endif

=== modified file 'storage/myisam/myisam_backup_engine.cc'
--- a/storage/myisam/myisam_backup_engine.cc	2008-07-14 15:33:03 +0000
+++ b/storage/myisam/myisam_backup_engine.cc	2008-07-19 03:03:39 +0000
@@ -177,7 +177,7 @@ class Engine: public Backup_engine
 {
   public:
     Engine() {}
-    virtual const version_t version() const { return MYISAM_BACKUP_VERSION; };
+    virtual version_t version() const { return MYISAM_BACKUP_VERSION; };
     virtual result_t get_backup(const uint32, const Table_list &,
                                 Backup_driver* &);
     virtual result_t get_restore(const version_t, const uint32,

=== modified file 'support-files/my-huge.cnf.sh'
--- a/support-files/my-huge.cnf.sh	2008-07-09 22:13:42 +0000
+++ b/support-files/my-huge.cnf.sh	2008-07-19 08:31:33 +0000
@@ -46,6 +46,9 @@ thread_concurrency = 8
 # 
 #skip-networking
 
+# Disable Federated by default
+skip-federated
+
 # Replication Master Server (default)
 # binary logging is required for replication
 log-bin=mysql-bin

=== modified file 'support-files/my-large.cnf.sh'
--- a/support-files/my-large.cnf.sh	2008-07-09 22:13:42 +0000
+++ b/support-files/my-large.cnf.sh	2008-07-19 08:31:33 +0000
@@ -46,6 +46,9 @@ thread_concurrency = 8
 # 
 #skip-networking
 
+# Disable Federated by default
+skip-federated
+
 # Replication Master Server (default)
 # binary logging is required for replication
 log-bin=mysql-bin

=== modified file 'support-files/my-medium.cnf.sh'
--- a/support-files/my-medium.cnf.sh	2008-07-09 22:13:42 +0000
+++ b/support-files/my-medium.cnf.sh	2008-07-19 08:31:33 +0000
@@ -44,6 +44,9 @@ myisam_sort_buffer_size = 8M
 # 
 #skip-networking
 
+# Disable Federated by default
+skip-federated
+
 # Replication Master Server (default)
 # binary logging is required for replication
 log-bin=mysql-bin

Thread
bzr push into mysql-6.0-backup branch (serg:2682 to 2683) Sergei Golubchik22 Jul