List:Commits« Previous MessageNext Message »
From:marko.makela Date:April 19 2012 9:10am
Subject:bzr push into mysql-trunk-wl5545 branch (marko.makela:3897 to 3900)
View as plain text  
 3900 Marko Mäkelä	2012-04-19 [merge]
      Merge mysql-trunk to mysql-trunk-wl5545.

    added:
      mysql-test/r/myisam_row_rpl.result
      mysql-test/t/myisam_row_rpl-master.opt
      mysql-test/t/myisam_row_rpl-slave.opt
      mysql-test/t/myisam_row_rpl.test
    modified:
      CMakeLists.txt
      README
      client/mysql.cc
      client/mysql_upgrade.c
      client/mysqladmin.cc
      client/mysqlbinlog.cc
      client/mysqlcheck.c
      client/mysqldump.c
      client/mysqlimport.c
      client/mysqlshow.c
      client/mysqlslap.c
      client/mysqltest.cc
      cmake/os/Windows.cmake
      config.h.cmake
      extra/innochecksum.cc
      extra/perror.c
      include/mysql_com.h
      include/welcome_copyright_notice.h
      mysql-test/include/assert_command_output.inc
      mysql-test/r/derived.result
      mysql-test/r/log_tables.result
      mysql-test/r/rewrite_general_log.result
      mysql-test/r/tablespace.result
      mysql-test/suite/binlog/r/binlog_grant.result
      mysql-test/suite/binlog/t/binlog_grant.test
      mysql-test/suite/innodb/r/innodb-index-online.result
      mysql-test/suite/innodb/t/innodb-alter-discard.test
      mysql-test/suite/innodb/t/innodb-index-online.test
      mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
      mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
      mysql-test/suite/perfschema/r/digest_table_full.result
      mysql-test/suite/perfschema/r/statement_digest.result
      mysql-test/suite/perfschema/r/statement_digest_consumers.result
      mysql-test/suite/perfschema/r/statement_digest_long_query.result
      mysql-test/suite/rpl/r/rpl_corruption.result
      mysql-test/suite/rpl/r/rpl_gtid_mode.result
      mysql-test/suite/rpl/t/rpl_corruption.test
      mysql-test/suite/rpl/t/rpl_gtid_mode.test
      mysql-test/t/derived.test
      mysql-test/t/rewrite_general_log.test
      mysql-test/t/tablespace.test
      packaging/WiX/custom_ui.wxs
      sql/field.h
      sql/gen_lex_hash.cc
      sql/handler.h
      sql/item.h
      sql/item_func.cc
      sql/item_func.h
      sql/lex.h
      sql/log_event.cc
      sql/log_event.h
      sql/mysqld.cc
      sql/rpl_info_file.cc
      sql/rpl_mi.cc
      sql/set_var.cc
      sql/sql_derived.cc
      sql/sql_executor.cc
      sql/sql_optimizer.cc
      sql/sql_optimizer.h
      sql/sql_parse.cc
      sql/sql_select.cc
      sql/sql_show.cc
      sql/sql_string.h
      sql/sql_table.cc
      sql/sql_yacc.yy
      sql/table.cc
      sql/unireg.cc
      storage/innobase/pars/lexyy.cc
      storage/innobase/pars/pars0lex.l
      storage/myisam/ha_myisam.cc
      storage/perfschema/gen_pfs_lex_token.cc
 3899 Marko Mäkelä	2012-04-19
      WL#5545: Test the maximum column length of 64 characters.
      Test renaming columns to 3-byte and 4-byte UTF-8.

    modified:
      mysql-test/suite/innodb/r/innodb-alter.result
      mysql-test/suite/innodb/t/innodb-alter.test
      storage/innobase/dict/dict0mem.cc
 3898 Marko Mäkelä	2012-04-19
      WL#5545 review changes.
      
      dict_mem_table_col_rename_low(): Remove the parameter "from".
      When renaming in foreign->referenced_col_names[], overwrite the
      old name unless it is shorter than the new name.

    modified:
      storage/innobase/dict/dict0mem.cc
 3897 Marko Mäkelä	2012-04-18
      Fix a bogus compiler warning of uninitialized variable.

    modified:
      storage/innobase/handler/handler0alter.cc
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	revid:marko.makela@stripped5855-2lhif0zro1il2imn
+++ b/CMakeLists.txt	revid:marko.makela@stripped
@@ -103,6 +103,10 @@ IF(BUILD_CONFIG)
   ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
 ENDIF()
 
+#cmake on 64 bit windows doesn't set CMAKE_SYSTEM_PROCESSOR correctly
+SET(MYSQL_MACHINE_TYPE ${CMAKE_SYSTEM_PROCESSOR})
+
+
 # Include the platform-specific file. To allow exceptions, this code
 # looks for files in order of how specific they are. If there is, for
 # example, a generic Linux.cmake and a version-specific

=== modified file 'README'
--- a/README	revid:marko.makela@stripped418085855-2lhif0zro1il2imn
+++ b/README	revid:marko.makela@stripped
@@ -5,7 +5,7 @@ For the avoidance of doubt, this particu
 is released under the version 2 of the GNU General Public License. 
 MySQL is brought to you by Oracle.
 
-Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
 
 License information can be found in the COPYING file.
 

=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/client/mysql.cc	revid:marko.makela@strippedfgm8lwfk6
@@ -1297,7 +1297,7 @@ int main(int argc,char *argv[])
 	  mysql_thread_id(&mysql), server_version_string(&mysql));
   put_info((char*) glob_buffer.ptr(),INFO_INFO);
 
-  put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"), INFO_INFO);
+  put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"), INFO_INFO);
 
 #ifdef HAVE_READLINE
   initialize_readline((char*) my_progname);
@@ -1727,7 +1727,7 @@ static void usage(int version)
 
   if (version)
     return;
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("Usage: %s [OPTIONS] [database]\n", my_progname);
   my_print_help(my_long_options);
   print_defaults("my", load_default_groups);

=== modified file 'client/mysql_upgrade.c'
--- a/client/mysql_upgrade.c	revid:marko.makela@stripped2imn
+++ b/client/mysql_upgrade.c	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -246,7 +246,7 @@ get_one_option(int optid, const struct m
   case '?':
     printf("%s  Ver %s Distrib %s, for %s (%s)\n",
            my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
-    puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
+    puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
     puts("MySQL utility for upgrading databases to new MySQL versions.\n");
     my_print_help(my_long_options);
     exit(0);

=== modified file 'client/mysqladmin.cc'
--- a/client/mysqladmin.cc	revid:marko.makela@stripped
+++ b/client/mysqladmin.cc	revid:marko.makela@stripped9090901-f20rhn6fgm8lwfk6
@@ -703,7 +703,7 @@ static int execute_commands(MYSQL *mysql
     case ADMIN_VER:
       new_line=1;
       print_version();
-      puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+      puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
       printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
       printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
       printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
@@ -1101,7 +1101,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("Administration program for the mysqld daemon.");
   printf("Usage: %s [OPTIONS] command command....\n", my_progname);
   my_print_help(my_long_options);

=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc	revid:marko.makela@strippedhif0zro1il2imn
+++ b/client/mysqlbinlog.cc	revid:marko.makela@stripped
@@ -1475,7 +1475,7 @@ static void print_version()
 static void usage()
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("\
 Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
 the mysql command line client.\n\n");

=== modified file 'client/mysqlcheck.c'
--- a/client/mysqlcheck.c	revid:marko.makela@stripped
+++ b/client/mysqlcheck.c	revid:marko.makela@stripped120419090901-f20rhn6fgm8lwfk6
@@ -228,7 +228,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
   puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
   puts("used at the same time. Not all options are supported by all storage engines.");

=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c	revid:marko.makela@stripped
+++ b/client/mysqldump.c	revid:marko.makela@stripped0419090901-f20rhn6fgm8lwfk6
@@ -612,7 +612,7 @@ static void short_usage_sub(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("Dumping structure and contents of MySQL databases and tables.");
   short_usage_sub();
   print_defaults("my",load_default_groups);

=== modified file 'client/mysqlimport.c'
--- a/client/mysqlimport.c	revid:marko.makela@stripped
+++ b/client/mysqlimport.c	revid:marko.makela@stripped-20120419090901-f20rhn6fgm8lwfk6
@@ -203,7 +203,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("\
 Loads tables from text files in various formats.  The base name of the\n\
 text file must be the name of the table that should be used.\n\

=== modified file 'client/mysqlshow.c'
--- a/client/mysqlshow.c	revid:marko.makela@stripped0zro1il2imn
+++ b/client/mysqlshow.c	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -277,7 +277,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011)"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012)"));
   puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
   printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
   puts("\n\

=== modified file 'client/mysqlslap.c'
--- a/client/mysqlslap.c	revid:marko.makela@stripped
+++ b/client/mysqlslap.c	revid:marko.makela@stripped01-f20rhn6fgm8lwfk6
@@ -708,7 +708,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2010"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2012"));
   puts("Run a query multiple times against the server.\n");
   printf("Usage: %s [OPTIONS]\n",my_progname);
   print_defaults("my",load_default_groups);

=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	revid:marko.makela@strippedn
+++ b/client/mysqltest.cc	revid:marko.makela@stripped-20120419090901-f20rhn6fgm8lwfk6
@@ -6564,7 +6564,7 @@ void print_version(void)
 void usage()
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("Runs a test against the mysql server and compares output with a results file.\n\n");
   printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
   my_print_help(my_long_options);

=== modified file 'cmake/os/Windows.cmake'
--- a/cmake/os/Windows.cmake	revid:marko.makela@stripped
+++ b/cmake/os/Windows.cmake	revid:marko.makela@stripped0120419090901-f20rhn6fgm8lwfk6
@@ -40,6 +40,7 @@ INCLUDE(${_SCRIPT_DIR}/WindowsCache.cmak
 # Used by the test suite to ignore bugs on some platforms, 
 IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
   SET(SYSTEM_TYPE "Win64")
+  SET(MYSQL_MACHINE_TYPE "x86_64")
 ELSE()
   SET(SYSTEM_TYPE "Win32")
 ENDIF()

=== modified file 'config.h.cmake'
--- a/config.h.cmake	revid:marko.makela@strippedhif0zro1il2imn
+++ b/config.h.cmake	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -489,7 +489,7 @@
 #cmakedefine STACK_DIRECTION @STACK_DIRECTION@
 
 #define SYSTEM_TYPE "@SYSTEM_TYPE@"
-#define MACHINE_TYPE "@CMAKE_SYSTEM_PROCESSOR@"
+#define MACHINE_TYPE "@MYSQL_MACHINE_TYPE@"
 #cmakedefine HAVE_DTRACE 1
 
 #cmakedefine SIGNAL_WITH_VIO_CLOSE 1

=== modified file 'extra/innochecksum.cc'
--- a/extra/innochecksum.cc	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/extra/innochecksum.cc	revid:marko.makela@stripped01-f20rhn6fgm8lwfk6
@@ -152,7 +152,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("InnoDB offline file checksum utility.\n");
   printf("Usage: %s [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-d] <filename>\n", my_progname);
   my_print_help(innochecksum_options);

=== modified file 'extra/perror.c'
--- a/extra/perror.c	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/extra/perror.c	revid:marko.makela@strippedn6fgm8lwfk6
@@ -84,7 +84,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("Print a description for a system error code or a MySQL error code.\n");
   printf("If you want to get the error for a negative error code, you should use\n-- before the first error code to tell perror that there was no more options.\n\n");
   printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);

=== modified file 'include/mysql_com.h'
--- a/include/mysql_com.h	revid:marko.makela@stripped
+++ b/include/mysql_com.h	revid:marko.makela@stripped090901-f20rhn6fgm8lwfk6
@@ -119,10 +119,10 @@ enum enum_server_command
   Was part of old online ALTER API, flag is now unused.
 */
 #define FIELD_IS_RENAMED (1<< 21)       /* Intern: Field is being renamed */
-#define FIELD_FLAGS_STORAGE_MEDIA 22    /* Field storage media, bit 22-23,
-                                           reserved by MySQL Cluster */
-#define FIELD_FLAGS_COLUMN_FORMAT 24    /* Field column format, bit 24-25,
-                                           reserved by MySQL Cluster */
+#define FIELD_FLAGS_STORAGE_MEDIA 22    /* Field storage media, bit 22-23 */
+#define FIELD_FLAGS_STORAGE_MEDIA_MASK (3 << FIELD_FLAGS_STORAGE_MEDIA)
+#define FIELD_FLAGS_COLUMN_FORMAT 24    /* Field column format, bit 24-25 */
+#define FIELD_FLAGS_COLUMN_FORMAT_MASK (3 << FIELD_FLAGS_COLUMN_FORMAT)
 
 #define REFRESH_GRANT		1	/* Refresh grant tables */
 #define REFRESH_LOG		2	/* Start on new log file */

=== modified file 'include/welcome_copyright_notice.h'
--- a/include/welcome_copyright_notice.h	revid:marko.makela@stripped
+++ b/include/welcome_copyright_notice.h	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/include/assert_command_output.inc'
--- a/mysql-test/include/assert_command_output.inc	revid:marko.makela@stripped0120418085855-2lhif0zro1il2imn
+++ b/mysql-test/include/assert_command_output.inc	revid:marko.makela@stripped120419090901-f20rhn6fgm8lwfk6
@@ -20,6 +20,7 @@ if ($rpl_debug)
 --let _ASSERT_STATUS= $assert_status
 --let $_assert_suffix= `SELECT UUID()`
 --let _ASSERT_ERROR_FILE= $MYSQLTEST_VARDIR/tmp/_assert_$_assert_suffix.inc
+--let _ASSERT_DEBUG= $rpl_debug
 
 if ($rpl_debug)
 {
@@ -31,6 +32,7 @@ perl;
   my $positive= $ENV{'_ASSERT_NEGATED'} ? 0 : 1;
   my $regex= $ENV{'_ASSERT_REGEX'};
   my $status= $ENV{'_ASSERT_STATUS'};
+  my $debug= $ENV{'_ASSERT_DEBUG'};
   my $output= `$cmd`;
   my $error= 0;
   $status= 0 if $status eq '';
@@ -46,8 +48,6 @@ perl;
     print "ERROR: Command: '$cmd'\n";
     print "ERROR: Output expected to " . ($positive?'':'not '). "match " .
       "perl regex: '$regex'\n";
-    print "======== BEGIN output ========\n$output\n" .
-      "======== END OUTPUT ========\n";
     $error= 1;
   }
   if (!$error)
@@ -57,6 +57,11 @@ perl;
     print FILE "X" or die "Error writing to $file: $!";
     close FILE or die "Error closing $file: $!";
   }
+  if ($error || $debug)
+  {
+    print "======== BEGIN output ========\n$output\n" .
+      "======== END OUTPUT ========\n";
+  }
 EOF
 
 --file_exists $_ASSERT_ERROR_FILE

=== modified file 'mysql-test/r/derived.result'
--- a/mysql-test/r/derived.result	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/mysql-test/r/derived.result	revid:marko.makela@stripped9090901-f20rhn6fgm8lwfk6
@@ -1962,3 +1962,14 @@ id	select_type	table	type	possible_keys
 1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
 2	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	1	NULL
 DROP TABLE t1,t2;
+#
+# Bug #13801019 ASSERTION `0' FAILED IN CREATE_MYISAM_TMP_TABLE
+#
+CREATE TABLE t1 (a INT, b BLOB) ENGINE=InnoDB;
+CREATE TABLE t2 (c INT);
+CREATE TABLE t3 (d INT);
+INSERT INTO t3 VALUES (0);
+SELECT * FROM (SELECT * FROM t1) AS a1 RIGHT JOIN t3 LEFT JOIN t2 ON d=c ON a=c;
+a	b	d	c
+NULL	NULL	0	NULL
+DROP TABLE t1, t2, t3;

=== modified file 'mysql-test/r/log_tables.result'
--- a/mysql-test/r/log_tables.result	revid:marko.makela@stripped
+++ b/mysql-test/r/log_tables.result	revid:marko.makela@strippedm-20120419090901-f20rhn6fgm8lwfk6
@@ -675,7 +675,7 @@ set global general_log = off;
 select command_type, argument from mysql.general_log where thread_id = @thread_id;
 command_type	argument
 Query	SET GLOBAL general_log='ON'
-Query	SET (@lparam:='000 001 002 003 004 005 006 007 008 009010 011 012 013 014 015 016 017 018 019020 021 022 023 024 025 026 027 028 029030 031 032 033 034 035 036 037 038 039040 041 042 043 044 045 046 047 048 049050 051 052 053 054 055 056 057 058 059060 061 062 063 064 065 066 067 068 069070 071 072 073 074 075 076 077 078 079080 081 082 083 084 085 086 087 088 089090 091 092 093 094 095 096 097 098 099100 101 102 103 104 105 106 107 108 109110 111 112 113 114 115 116 117 118 119120 121 122 123 124 125 126 127 128 129130 131 132 133 134 135 136 137 138 139140 141 142 143 144 145 146 147 148 149150 151 152 153 154 155 156 157 158 159160 161 162 163 164 165 166 167 168 169170 171 172 173 174 175 176 177 178 179180 181 182 183 184 185 186 187 188 189190 191 192 193 194 195 196 197 198 199200 201 202 203 204 205 206 207 208 209210 211 212 213 214 215 216 217 218 219220 221 222 223 224 225 226 227 228 229230 231 232 233 234 235 236 237 238 239240 241 242 243 244 245 246 247 248 249250 251 252 253 254 255 256 257 258 259260 261 262 263 264 265 266 267 268 269270 271 272 273 274 275 276 277 278 279280 281 282 283 284 285 286 287 288 289290 291 292 293 294 295 296 297 298 299300 301 302 303 304 305 306 307 308 309310 311 312 313 314 315 316 317 318 319320 321 322 323 324 325 326 327 328 329330 331 332 333 334 335 336 337 338 339340 341 342 343 344 345 346 347 348 349350 351 352 353 354 355 356 357 358 359360 361 362 363 364 365 366 367 368 369370 371 372 373 374 375 376 377 378 379380 381 382 383 384 385 386 387 388 389390 391 392 393 394 395 396 397 398 399400 401 402 403 404 405 406 407 408 409410 411 412 413 414 415 416 417 418 419420 421 422 423 424 425 426 427 428 429430 431 432 433 434 435 436 437 438 439440 441 442 443 444 445 446 447 448 449450 451 452 453 454 455 456 457 458 459460 461 462 463 464 465 466 467 468 469470 471 472 473 474 475 476 477 478 479480 481 482 483 484 485 486 487 488 489490 491 492 493 494 495 496 497 498 499500 501 502 503 504 505 506 507 508 509510 511 512 513 514 515 516 517 518 519520 521 522 523 524 525 526 527 528 529530 531 532 533 534 535 536 537 538 539540 541 542 543 544 545 546 547 548 549550 551 552 553 554 555 556 557 558 559560 561 562 563 564 565 566 567 568 569570 571 572 573 574 575 576 577 578 579580 581 582 583 584 585 586 587 588 589590 591 592 593 594 595 596 597 598 599600 601 602 603 604 605 606 607 608 609610 611 612 613 614 615 616 617 618 619620 621 622 623 624 625 626 627 628 629630 631 632 633 634 635 636 637 638 639640 641 642 643 644 645 646 647 648 649650 651 652 653 654 655 656 657 658 659660 661 662 663 664 665 666 667 668 669670 671 672 673 674 675 676 677 678 679680 681 682 683 684 685 686 687 688 689690 691 692 693 694 695 696 697 698 699700 701 702 703 704 705 706 707 708 709710 711 712 713 714 715 716 717 718 719720 721 722 723 724 725 726 727 728 729730 731 732 733 734 735 736 737 738 739740 741 742 743 744 745 746 747 748 749750 751 752 753 754 755 756 757 758 759760 761 762 763 764 765 766 767 768 769770 771 772 773 774 775 776 777 778 779780 781 782 783 784 785 786 787 788 789790 791 792 793 794 795 796 797 798 799800 801 802 803 804 805 806 807 808 809810 811 812 813 814 815 816 817 818 819820 821 822 823 824 825 826 827 828 829830 831 832 833 834 835 836 837 838 839840 841 842 843 844 845 846 847 848 849850 851 852 853 854 855 856 857 858 859860 861 862 863 864 865 866 867 868 869870 871 872 873 874 875 876 877 878 879880 881 882 883 884 885 886 887 888 889890 891 892 893 894 895 896 897 898 899900 901 902 903 904 905 906 907 908 909910 911 912 913 914 915 916 917 918 919920 921 922 923 924 925 926 927 928 929930 931 932 933 934 935 936 937 938 939940 941 942 943 944 945 946 947 948 949950 951 952 953 954 955 956 957 958 959960 961 962 963 964 965 966 967 968 969970 971 972 973 974 975 976 977 978 979980 981 982 983 984 985 986 987 988 989990 991 992 993 994 995 996 997 998 999')
+Query	SET @lparam:='000 001 002 003 004 005 006 007 008 009010 011 012 013 014 015 016 017 018 019020 021 022 023 024 025 026 027 028 029030 031 032 033 034 035 036 037 038 039040 041 042 043 044 045 046 047 048 049050 051 052 053 054 055 056 057 058 059060 061 062 063 064 065 066 067 068 069070 071 072 073 074 075 076 077 078 079080 081 082 083 084 085 086 087 088 089090 091 092 093 094 095 096 097 098 099100 101 102 103 104 105 106 107 108 109110 111 112 113 114 115 116 117 118 119120 121 122 123 124 125 126 127 128 129130 131 132 133 134 135 136 137 138 139140 141 142 143 144 145 146 147 148 149150 151 152 153 154 155 156 157 158 159160 161 162 163 164 165 166 167 168 169170 171 172 173 174 175 176 177 178 179180 181 182 183 184 185 186 187 188 189190 191 192 193 194 195 196 197 198 199200 201 202 203 204 205 206 207 208 209210 211 212 213 214 215 216 217 218 219220 221 222 223 224 225 226 227 228 229230 231 232 233 234 235 236 237 238 239240 241 242 243 244 245 246 247 248 249250 251 252 253 254 255 256 257 258 259260 261 262 263 264 265 266 267 268 269270 271 272 273 274 275 276 277 278 279280 281 282 283 284 285 286 287 288 289290 291 292 293 294 295 296 297 298 299300 301 302 303 304 305 306 307 308 309310 311 312 313 314 315 316 317 318 319320 321 322 323 324 325 326 327 328 329330 331 332 333 334 335 336 337 338 339340 341 342 343 344 345 346 347 348 349350 351 352 353 354 355 356 357 358 359360 361 362 363 364 365 366 367 368 369370 371 372 373 374 375 376 377 378 379380 381 382 383 384 385 386 387 388 389390 391 392 393 394 395 396 397 398 399400 401 402 403 404 405 406 407 408 409410 411 412 413 414 415 416 417 418 419420 421 422 423 424 425 426 427 428 429430 431 432 433 434 435 436 437 438 439440 441 442 443 444 445 446 447 448 449450 451 452 453 454 455 456 457 458 459460 461 462 463 464 465 466 467 468 469470 471 472 473 474 475 476 477 478 479480 481 482 483 484 485 486 487 488 489490 491 492 493 494 495 496 497 498 499500 501 502 503 504 505 506 507 508 509510 511 512 513 514 515 516 517 518 519520 521 522 523 524 525 526 527 528 529530 531 532 533 534 535 536 537 538 539540 541 542 543 544 545 546 547 548 549550 551 552 553 554 555 556 557 558 559560 561 562 563 564 565 566 567 568 569570 571 572 573 574 575 576 577 578 579580 581 582 583 584 585 586 587 588 589590 591 592 593 594 595 596 597 598 599600 601 602 603 604 605 606 607 608 609610 611 612 613 614 615 616 617 618 619620 621 622 623 624 625 626 627 628 629630 631 632 633 634 635 636 637 638 639640 641 642 643 644 645 646 647 648 649650 651 652 653 654 655 656 657 658 659660 661 662 663 664 665 666 667 668 669670 671 672 673 674 675 676 677 678 679680 681 682 683 684 685 686 687 688 689690 691 692 693 694 695 696 697 698 699700 701 702 703 704 705 706 707 708 709710 711 712 713 714 715 716 717 718 719720 721 722 723 724 725 726 727 728 729730 731 732 733 734 735 736 737 738 739740 741 742 743 744 745 746 747 748 749750 751 752 753 754 755 756 757 758 759760 761 762 763 764 765 766 767 768 769770 771 772 773 774 775 776 777 778 779780 781 782 783 784 785 786 787 788 789790 791 792 793 794 795 796 797 798 799800 801 802 803 804 805 806 807 808 809810 811 812 813 814 815 816 817 818 819820 821 822 823 824 825 826 827 828 829830 831 832 833 834 835 836 837 838 839840 841 842 843 844 845 846 847 848 849850 851 852 853 854 855 856 857 858 859860 861 862 863 864 865 866 867 868 869870 871 872 873 874 875 876 877 878 879880 881 882 883 884 885 886 887 888 889890 891 892 893 894 895 896 897 898 899900 901 902 903 904 905 906 907 908 909910 911 912 913 914 915 916 917 918 919920 921 922 923 924 925 926 927 928 929930 931 932 933 934 935 936 937 938 939940 941 942 943 944 945 946 947 948 949950 951 952 953 954 955 956 957 958 959960 961 962 963 964 965 966 967 968 969970 971 972 973 974 975 976 977 978 979980 981 982 983 984 985 986 987 988 989990 991 992 993 994 995 996 997 998 999'
 Query	prepare long_query from "select ? as long_query"
 Prepare	select ? as long_query
 Query	execute long_query using @lparam

=== added file 'mysql-test/r/myisam_row_rpl.result'
--- a/mysql-test/r/myisam_row_rpl.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/myisam_row_rpl.result	revid:marko.makela@stripped
@@ -0,0 +1,60 @@
+include/master-slave.inc
+Warnings:
+Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note	####	Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
+[connection master]
+#
+# Bug#11940249: RBR: MYISAM TABLE CORRUPTION AFTER FIRST LARGE INSERT
+#               ON SLAVE
+#
+# Must have > 100 rows in the first rpl event (to trigger bulk_insert
+# optimization for insert into an empty table, by disable all non-unique
+# indexes and recreate them afterwards.)
+# and then it must be a second rpl event for the same insert (i.e.
+# during the same lock).
+# Note that --binlog-row-event-max-size=1024 is set in the .opt files
+# to enforce the default size.
+CREATE TABLE tmp (a VARCHAR(10), b INT) ENGINE=Memory;
+INSERT INTO tmp VALUES ('aZa', 1), ('zAz', 2), ('M', 3);
+INSERT INTO tmp SELECT * FROM tmp;
+INSERT INTO tmp SELECT * FROM tmp;
+INSERT INTO tmp SELECT * FROM tmp;
+INSERT INTO tmp SELECT * FROM tmp;
+INSERT INTO tmp SELECT * FROM tmp;
+INSERT INTO tmp SELECT * FROM tmp;
+CREATE TABLE t
+(a VARCHAR(10),
+b INT,
+KEY a (a))
+ENGINE = MyISAM;
+INSERT INTO t SELECT * FROM tmp;
+# on slave:
+SELECT COUNT(*) FROM t WHERE b > -1;
+COUNT(*)
+192
+# on master:
+include/show_binlog_events.inc
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	BEGIN
+master-bin.000001	#	Table_map	#	#	table_id: # (test.t)
+master-bin.000001	#	Write_rows	#	#	table_id: #
+master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	COMMIT
+RENAME TABLE t to t_2;
+RENAME TABLE t_2 to t;
+# on slave:
+SELECT COUNT(*) FROM t WHERE b > -1;
+COUNT(*)
+192
+CHECK TABLE t;
+Table	Op	Msg_type	Msg_text
+test.t	check	status	OK
+REPAIR TABLE t;
+Table	Op	Msg_type	Msg_text
+test.t	repair	status	OK
+SELECT COUNT(*) FROM t WHERE b > -1;
+COUNT(*)
+192
+include/diff_tables.inc [master:t, slave:t]
+DROP TABLE t, tmp;
+include/rpl_end.inc

=== modified file 'mysql-test/r/rewrite_general_log.result'
--- a/mysql-test/r/rewrite_general_log.result	revid:marko.makela@stripped20120418085855-2lhif0zro1il2imn
+++ b/mysql-test/r/rewrite_general_log.result	revid:marko.makela@stripped19090901-f20rhn6fgm8lwfk6
@@ -48,13 +48,19 @@ SET PASSWORD FOR `test_user4`@`localhost
 SELECT argument FROM mysql.general_log WHERE argument LIKE 'SET CHARACTER SET %';
 argument
 SET CHARACTER SET 'hebrew'
-SET CHARACTER SET DEFAULT,(@dummy:='A')
+SET CHARACTER SET DEFAULT,@dummy:='A'
 SELECT argument FROM mysql.general_log WHERE argument LIKE 'SET NAMES %';
 argument
-SET NAMES 'latin1',(@dummy:='B')
+SET NAMES 'latin1',@dummy:='B'
 SET NAMES 'latin1' COLLATE 'latin1_german2_ci'
-SET NAMES DEFAULT,(@dummy:='c')
+SET NAMES DEFAULT,@dummy:='c'
 ------ done ------ see log_tables.test for more proof! :)
+Bug#13958454 -- show we print SET @a:=5, but SELECT (@a:=5)
+EXPLAIN EXTENDED SELECT @a=5,@b:=10,@c:=20,@d:=40+5,(@e:=80)+5;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
+Warnings:
+Note	1003	/* select#1 */ select ((@a) = 5) AS `@a=5`,(@b:=10) AS `@b:=10`,(@c:=20) AS `@c:=20`,(@d:=(40 + 5)) AS `@d:=40+5`,((@e:=80) + 5) AS `(@e:=80)+5`
 DROP TABLE test_log;
 SET GLOBAL general_log_file=  @old_general_log_file;
 SET GLOBAL general_log=       @old_general_log;

=== modified file 'mysql-test/r/tablespace.result'
--- a/mysql-test/r/tablespace.result	revid:marko.makela@strippedro1il2imn
+++ b/mysql-test/r/tablespace.result	revid:marko.makela@stripped
@@ -98,15 +98,144 @@ Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   `b` int(11) DEFAULT NULL,
-  `c` int(11) DEFAULT NULL,
-  `d` int(11) NOT NULL,
-  `e` int(11) DEFAULT NULL,
-  `f` int(11) DEFAULT NULL,
+  `c` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `d` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `e` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `f` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
   `g` int(11) DEFAULT NULL,
-  `h` int(11) NOT NULL,
-  `i` int(11) DEFAULT NULL,
-  `j` int(11) DEFAULT NULL,
-  `k` int(11) DEFAULT NULL,
+  `h` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `i` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `j` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `k` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
   PRIMARY KEY (`a`)
 ) /*!50100 TABLESPACE the_tablespacename STORAGE DISK */ ENGINE=MyISAM DEFAULT CHARSET=latin1
 DROP TABLE t1;
+#
+# WL#3627 Add COLUMN_FORMAT and STORAGE for fields
+#
+CREATE TABLE t1 (
+a int STORAGE DISK,
+b int STORAGE MEMORY NOT NULL,
+c int COLUMN_FORMAT DYNAMIC,
+d int COLUMN_FORMAT FIXED,
+e int COLUMN_FORMAT DEFAULT,
+f int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+g int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+h int STORAGE DISK COLUMN_FORMAT FIXED,
+i int STORAGE MEMORY COLUMN_FORMAT FIXED
+);
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `b` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `c` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `d` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `e` int(11) DEFAULT NULL,
+  `f` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `g` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `h` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `i` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE t1
+ADD COLUMN j int STORAGE DISK,
+ADD COLUMN k int STORAGE MEMORY NOT NULL,
+ADD COLUMN l int COLUMN_FORMAT DYNAMIC,
+ADD COLUMN m int COLUMN_FORMAT FIXED,
+ADD COLUMN n int COLUMN_FORMAT DEFAULT,
+ADD COLUMN o int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+ADD COLUMN p int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+ADD COLUMN q int STORAGE DISK COLUMN_FORMAT FIXED,
+ADD COLUMN r int STORAGE MEMORY COLUMN_FORMAT FIXED;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `b` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `c` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `d` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `e` int(11) DEFAULT NULL,
+  `f` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `g` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `h` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `i` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `j` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `k` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `l` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `m` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `n` int(11) DEFAULT NULL,
+  `o` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `p` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `q` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `r` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE t1
+MODIFY COLUMN j int STORAGE MEMORY NOT NULL,
+MODIFY COLUMN k int COLUMN_FORMAT DYNAMIC,
+MODIFY COLUMN l int COLUMN_FORMAT FIXED,
+MODIFY COLUMN m int COLUMN_FORMAT DEFAULT,
+MODIFY COLUMN n int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+MODIFY COLUMN o int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+MODIFY COLUMN p int STORAGE DISK COLUMN_FORMAT FIXED,
+MODIFY COLUMN q int STORAGE MEMORY COLUMN_FORMAT FIXED,
+MODIFY COLUMN r int STORAGE DISK;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `b` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `c` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `d` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `e` int(11) DEFAULT NULL,
+  `f` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `g` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `h` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `i` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `j` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `k` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `l` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `m` int(11) DEFAULT NULL,
+  `n` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `o` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `p` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `q` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `r` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE t1
+MODIFY COLUMN h int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT FIXED,
+MODIFY COLUMN i int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
+MODIFY COLUMN j int COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
+MODIFY COLUMN k int COLUMN_FORMAT FIXED COLUMN_FORMAT DEFAULT,
+MODIFY COLUMN l int STORAGE DISK STORAGE MEMORY,
+MODIFY COLUMN m int STORAGE DISK STORAGE DEFAULT,
+MODIFY COLUMN n int STORAGE MEMORY STORAGE DISK,
+MODIFY COLUMN o int STORAGE MEMORY STORAGE DEFAULT,
+MODIFY COLUMN p int STORAGE DISK STORAGE MEMORY
+COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
+MODIFY COLUMN q int STORAGE DISK STORAGE MEMORY STORAGE DEFAULT
+COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
+MODIFY COLUMN r int STORAGE DEFAULT STORAGE DEFAULT STORAGE MEMORY
+STORAGE DISK STORAGE MEMORY STORAGE DISK STORAGE DISK;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `b` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `c` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `d` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `e` int(11) DEFAULT NULL,
+  `f` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `g` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `h` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `i` int(11) DEFAULT NULL,
+  `j` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `k` int(11) DEFAULT NULL,
+  `l` int(11) /*!50606 STORAGE MEMORY */ DEFAULT NULL,
+  `m` int(11) DEFAULT NULL,
+  `n` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `o` int(11) DEFAULT NULL,
+  `p` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `q` int(11) DEFAULT NULL,
+  `r` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;

=== modified file 'mysql-test/suite/binlog/r/binlog_grant.result'
--- a/mysql-test/suite/binlog/r/binlog_grant.result	revid:marko.makela@stripped1il2imn
+++ b/mysql-test/suite/binlog/r/binlog_grant.result	revid:marko.makela@strippedm8lwfk6
@@ -22,3 +22,7 @@ ERROR 42000: Access denied; you need (at
 **** Clean up ****
 set global binlog_format = @saved_binlog_format;
 drop user mysqltest_1@localhost;
+GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
+SHOW MASTER LOGS;
+SHOW BINARY LOGS;
+DROP USER 'mysqltest_1'@'localhost';

=== modified file 'mysql-test/suite/binlog/t/binlog_grant.test'
--- a/mysql-test/suite/binlog/t/binlog_grant.test	revid:marko.makela@stripped0120418085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/binlog/t/binlog_grant.test	revid:marko.makela@stripped20419090901-f20rhn6fgm8lwfk6
@@ -54,3 +54,22 @@ disconnect root;
 connection default;
 set global binlog_format = @saved_binlog_format;
 drop user mysqltest_1@localhost;
+
+
+# Testing if REPLICATION CLIENT privilege is enough to execute
+# SHOW MASTER LOGS and SHOW BINARY.
+GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
+--connect(rpl,localhost,mysqltest_1,,)
+
+--connection rpl
+# We are only interested if the following commands succeed and not on
+# their output.
+--disable_result_log
+SHOW MASTER LOGS;
+SHOW BINARY LOGS;
+--enable_result_log
+
+# clean up
+--disconnect rpl
+connection default;
+DROP USER 'mysqltest_1'@'localhost';

=== modified file 'mysql-test/suite/innodb/r/innodb-alter.result'
--- a/mysql-test/suite/innodb/r/innodb-alter.result	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/innodb/r/innodb-alter.result	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -181,6 +181,38 @@ t1c	CREATE TABLE `t1c` (
   CONSTRAINT `t1c2` FOREIGN KEY (`c2`) REFERENCES `t3` (`c3`),
   CONSTRAINT `t1c3` FOREIGN KEY (`c3`) REFERENCES `t1p` (`c2`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ALTER TABLE t3 CHANGE c3
+`12345678901234567890123456789012345678901234567890123456789012345` INT;
+ERROR 42000: Identifier name '12345678901234567890123456789012345678901234567890123456789012345' is too long
+ALTER TABLE t3 CHANGE c3
+`1234567890123456789012345678901234567890123456789012345678901234` INT;
+SHOW CREATE TABLE t3;
+Table	Create Table
+t3	CREATE TABLE `t3` (
+  `c1` int(11) NOT NULL DEFAULT '0',
+  `1234567890123456789012345678901234567890123456789012345678901234` int(11) DEFAULT NULL,
+  `ct` text,
+  PRIMARY KEY (`c1`),
+  KEY `c2` (`1234567890123456789012345678901234567890123456789012345678901234`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ALTER TABLE t3 CHANGE
+`1234567890123456789012345678901234567890123456789012345678901234`
+`倀倁倂倃倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠' is too long
+ALTER TABLE t3 CHANGE
+`1234567890123456789012345678901234567890123456789012345678901234`
+`倀倁倂倃倄倅倆倇倈倉ERROR 42000: Identifier name '倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠' is too long
+ALTER TABLE t3 CHANGE
+`1234567890123456789012345678901234567890123456789012345678901234`
+`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏
+`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾Ä`
+c3 INT;
+ALTER TABLE t3 CHANGE c3 𐌀𐌁𐌂𐌃𐌄𐌅𐌆𐌇𐌈𐌉𐌊𐌋𐌌\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\x83'
+ALTER TABLE t3 CHANGE c3 😲 INT;
+ERROR HY000: Invalid utf8 character string: '\xF0\x9F\x98\xB2'
 ALTER TABLE t3 RENAME TO t2;
 SELECT st.NAME, i.NAME
 FROM sys_tables st INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES i

=== modified file 'mysql-test/suite/innodb/r/innodb-index-online.result'
--- a/mysql-test/suite/innodb/r/innodb-index-online.result	revid:marko.makela@stripped20418085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/innodb/r/innodb-index-online.result	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -4,8 +4,8 @@ SET DEBUG='d,query,debug_sync_exec:i:t:A
 call mtr.add_suppression("InnoDB: Warning: Small buffer pool size");
 call mtr.add_suppression("Cannot find index .*c2 in InnoDB index translation table");
 call mtr.add_suppression("Find index .*c2 in InnoDB index list but not its MySQL index number");
-call mtr.add_suppression("InnoDB: Error: table 'test/t1'$");
-call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for$");
+call mtr.add_suppression("InnoDB: Error: table 'test/t1'");
+call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for");
 SET GLOBAL innodb_file_per_table=on;
 CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT, c3 INT) ENGINE=InnoDB;
 INSERT INTO t1 VALUES (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0);
@@ -270,10 +270,6 @@ ALTER TABLE t1 DROP INDEX c2f, ADD INDEX
 SET DEBUG_SYNC='now WAIT_FOR c2g_created';
 SET lock_wait_timeout=10;
 ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT state FROM information_schema.processlist
-WHERE info='ALTER TABLE t1 DISCARD TABLESPACE';
-state
-Waiting for table level lock
 SET DEBUG_SYNC='now SIGNAL dml4_done';
 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 SHOW CREATE TABLE t1;

=== modified file 'mysql-test/suite/innodb/t/innodb-alter-discard.test'
--- a/mysql-test/suite/innodb/t/innodb-alter-discard.test	revid:marko.makela@stripped120418085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/innodb/t/innodb-alter-discard.test	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -1,5 +1,6 @@
 #Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING OR DISCARDED TABLESPACES
 
+--source include/not_embedded.inc
 --source include/have_innodb.inc
 
 let $MYSQLD_DATADIR=`select @@datadir`;

=== modified file 'mysql-test/suite/innodb/t/innodb-alter.test'
--- a/mysql-test/suite/innodb/t/innodb-alter.test	revid:marko.makela@stripped8085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/innodb/t/innodb-alter.test	revid:marko.makela@stripped90901-f20rhn6fgm8lwfk6
@@ -69,6 +69,38 @@ ON i.TABLE_ID=st.TABLE_ID;
 SHOW CREATE TABLE t3;
 SHOW CREATE TABLE t1c;
 
+# The maximum column name length should be 64 characters.
+--error ER_TOO_LONG_IDENT
+ALTER TABLE t3 CHANGE c3
+`12345678901234567890123456789012345678901234567890123456789012345` INT;
+ALTER TABLE t3 CHANGE c3
+`1234567890123456789012345678901234567890123456789012345678901234` INT;
+SHOW CREATE TABLE t3;
+
+# Test the length limit with non-ASCII utf-8 characters.
+--error ER_TOO_LONG_IDENT
+ALTER TABLE t3 CHANGE
+`1234567890123456789012345678901234567890123456789012345678901234`
+`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾倿偀` INT;
+--error ER_TOO_LONG_IDENT
+ALTER TABLE t3 CHANGE
+`1234567890123456789012345678901234567890123456789012345678901234`
+`倀倁倂倃倄倅倆倇倈倉倊個倌E t3 CHANGE
+`1234567890123456789012345678901234567890123456789012345678901234`
+`倀倁倂倃倄倅倆倇倈倉check that the rename is case-insensitive (note the upper-case ä at end)
+ALTER TABLE t3 CHANGE
+`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾Ä`
+c3 INT;
+
+# test with 4-byte UTF-8 (should be disallowed)
+--error ER_INVALID_CHARACTER_STRING
+ALTER TABLE t3 CHANGE c3 𐌀𐌁𐌂𐌃𐌄𐌅𐌆𐌇𐌈𐌉ING
+ALTER TABLE t3 CHANGE c3 😲 INT;
+
 ALTER TABLE t3 RENAME TO t2;
 
 SELECT st.NAME, i.NAME

=== modified file 'mysql-test/suite/innodb/t/innodb-index-online.test'
--- a/mysql-test/suite/innodb/t/innodb-index-online.test	revid:marko.makela@strippedimn
+++ b/mysql-test/suite/innodb/t/innodb-index-online.test	revid:marko.makela@strippedgm8lwfk6
@@ -10,8 +10,8 @@ call mtr.add_suppression("InnoDB: Warnin
 call mtr.add_suppression("Cannot find index .*c2 in InnoDB index translation table");
 call mtr.add_suppression("Find index .*c2 in InnoDB index list but not its MySQL index number");
 # these will be triggered by DISCARD TABLESPACE
-call mtr.add_suppression("InnoDB: Error: table 'test/t1'$");
-call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for$");
+call mtr.add_suppression("InnoDB: Error: table 'test/t1'");
+call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for");
 
 # DISCARD TABLESPACE needs file-per-table
 let $per_table=`select @@innodb_file_per_table`;
@@ -289,18 +289,20 @@ SET lock_wait_timeout=10;
 ALTER TABLE t1 DISCARD TABLESPACE;
 
 connection con1;
-SELECT state FROM information_schema.processlist
-WHERE info='ALTER TABLE t1 DISCARD TABLESPACE';
+let $wait_condition=
+  SELECT COUNT(*) = 1 FROM information_schema.processlist
+  WHERE state = 'Waiting for table level lock' and
+        info = 'ALTER TABLE t1 DISCARD TABLESPACE';
+--source include/wait_condition.inc
 
 SET DEBUG_SYNC='now SIGNAL dml4_done';
 disconnect con1;
-connection default;
---error ER_LOCK_WAIT_TIMEOUT
-reap;
 connection con2;
 reap;
 disconnect con2;
 connection default;
+--error ER_LOCK_WAIT_TIMEOUT
+reap;
 
 SHOW CREATE TABLE t1;
 # The ER_NO_SUCH_TABLE is being thrown by ha_innobase::open().

=== modified file 'mysql-test/suite/innodb_fts/r/innodb_fts_misc.result'
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -890,3 +890,66 @@ FTS_DOC_ID	title	body
 select * from t1 where match(title,body) against('%%%%');
 FTS_DOC_ID	title	body
 drop table t1;
+CREATE DATABASE `benu database`;
+USE `benu database`;
+CREATE TABLE t1 (
+id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
+a VARCHAR(200),
+b TEXT
+) ENGINE = InnoDB;
+INSERT INTO t1 (a,b) VALUES
+('MySQL Tutorial','DBMS stands for DataBase ...')  ,
+('How To Use MySQL Well','After you went through a ...'),
+('Optimizing MySQL','In this tutorial we will show ...');
+ALTER TABLE t1 ADD FULLTEXT INDEX idx (a,b);
+Warnings:
+Warning	124	InnoDB rebuilding table to add column FTS_DOC_ID
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `a` varchar(200) DEFAULT NULL,
+  `b` text,
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `idx` (`a`,`b`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
+INSERT INTO t1 (a,b) VALUES
+('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
+('MySQL vs. YourSQL','In the following database comparison ...'),
+('MySQL Security','When configured properly, MySQL ...');
+SELECT id FROM t1 WHERE MATCH (a,b)
+AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
+id
+1
+3
+select id from t1 where MATCH(a,b) AGAINST("+support +collections" IN BOOLEAN MODE);
+id
+select id from t1 where MATCH(a,b) AGAINST("+search" IN BOOLEAN MODE);
+id
+select id from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN MODE);
+id
+select id from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE);
+id
+select id, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1;
+id	x
+1	0
+2	0
+3	0
+4	0
+5	0
+6	0
+select id, MATCH(a,b) AGAINST("collections support" IN BOOLEAN MODE) as x from t1;
+id	x
+1	0
+2	0
+3	0
+4	0
+5	0
+6	0
+select id from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE);
+id
+select id from t1 where MATCH a,b AGAINST ('"support now"' IN BOOLEAN MODE);
+id
+select id from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE);
+id
+DROP DATABASE `benu database`;

=== modified file 'mysql-test/suite/innodb_fts/t/innodb_fts_misc.test'
--- a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test	revid:marko.makela@stripped
+++ b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test	revid:marko.makela@stripped
@@ -813,7 +813,7 @@ SELECT * FROM articles
 
 DROP TABLE articles;
 
-# Test for bug Bug 13940669 - 64901: INNODB: ASSERTION FAILURE IN
+# Test for Bug 13940669 - 64901: INNODB: ASSERTION FAILURE IN
 # THREAD 34387022112 IN FILE REM0CMP.CC LINE 5
 
 drop table if exists t1;
@@ -830,3 +830,49 @@ select * from t1 where match(title,body)
 select * from t1 where match(title,body) against('%%%%');
 
 drop table t1;
+
+# Test for Bug 13881758 - 64745: CREATE FULLTEXT INDEX CAUSES CRASH
+# Create a database with empty space in its name
+CREATE DATABASE `benu database`;
+
+USE `benu database`;
+
+# Create FTS table
+CREATE TABLE t1 (
+        id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
+        a VARCHAR(200),
+        b TEXT
+        ) ENGINE = InnoDB;
+
+# Insert rows
+INSERT INTO t1 (a,b) VALUES
+        ('MySQL Tutorial','DBMS stands for DataBase ...')  ,
+        ('How To Use MySQL Well','After you went through a ...'),
+        ('Optimizing MySQL','In this tutorial we will show ...');
+
+# Create the FTS index Using Alter Table
+ALTER TABLE t1 ADD FULLTEXT INDEX idx (a,b);
+EVAL SHOW CREATE TABLE t1;
+
+# Insert rows
+INSERT INTO t1 (a,b) VALUES
+        ('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
+        ('MySQL vs. YourSQL','In the following database comparison ...'),
+        ('MySQL Security','When configured properly, MySQL ...');
+
+# Select word "tutorial" in the table
+SELECT id FROM t1 WHERE MATCH (a,b)
+        AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
+
+# boolean mode
+select id from t1 where MATCH(a,b) AGAINST("+support +collections" IN BOOLEAN MODE);
+select id from t1 where MATCH(a,b) AGAINST("+search" IN BOOLEAN MODE);
+select id from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN MODE);
+select id from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE);
+select id, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1;
+select id, MATCH(a,b) AGAINST("collections support" IN BOOLEAN MODE) as x from t1;
+select id from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE);
+select id from t1 where MATCH a,b AGAINST ('"support now"' IN BOOLEAN MODE);
+select id from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE);
+
+DROP DATABASE `benu database`;

=== modified file 'mysql-test/suite/perfschema/r/digest_table_full.result'
--- a/mysql-test/suite/perfschema/r/digest_table_full.result	revid:marko.makela@stripped
+++ b/mysql-test/suite/perfschema/r/digest_table_full.result	revid:marko.makela@strippedlwfk6
@@ -86,7 +86,7 @@ SELECT DIGEST, DIGEST_TEXT, COUNT_STAR,
 SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
 DIGEST	DIGEST_TEXT	COUNT_STAR	SUM_ROWS_AFFECTED	SUM_WARNINGS	SUM_ERRORS
 NULL	NULL	38	30	1	2
-a938a1f31256fd2ec1bc3cda9b7a8519	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1	0	0	0
+70ecd9c9e447fe343322f29d53fe454f	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1	0	0	0
 SHOW VARIABLES LIKE "performance_schema_digests_size";
 Variable_name	Value
 performance_schema_digests_size	2

=== modified file 'mysql-test/suite/perfschema/r/statement_digest.result'
--- a/mysql-test/suite/perfschema/r/statement_digest.result	revid:marko.makela@stripped0120418085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/perfschema/r/statement_digest.result	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -85,30 +85,30 @@ Warning	1265	Data truncated for column '
 SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
 SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
 DIGEST	DIGEST_TEXT	COUNT_STAR	SUM_ROWS_AFFECTED	SUM_WARNINGS	SUM_ERRORS
-a938a1f31256fd2ec1bc3cda9b7a8519	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1	0	0	0
-e7f8dc15f1156f57978116e457cc7488	SELECT ? FROM t1  	1	0	0	0
-29c3f8abab7962fe1f664a51fca9effc	SELECT ? FROM `t1`  	1	0	0	0
-ca50ee9fccc00a2c95e44ef3feea866a	SELECT ?, ... FROM t1  	2	0	0	0
-3b8d5477aa795a19c9e9183e4ad04e6b	SELECT ? FROM t2  	1	0	0	0
-8067bb511c3620aac5388c5674b328a0	SELECT ?, ... FROM t2  	2	0	0	0
-a58cc957ffdd32c2cffeffa65b6c9324	INSERT INTO t1 VALUES (?)  	1	1	0	0
-439869529508fe62007c6f97890a43ae	INSERT INTO t2 VALUES (?)  	1	1	0	0
-a9f32e4c511753d7317a014630050274	INSERT INTO t3 VALUES (...)  	4	4	0	0
-55351862b4cc299bfd9958920936dc34	INSERT INTO t4 VALUES (...)  	1	1	0	0
-976ba1912e3bf2d29fb0eefed75c9f89	INSERT INTO t5 VALUES (...)  	1	1	0	0
-de71aea3aaab6826e52c690197c28a42	INSERT INTO t1 VALUES (?) /* , ... */  	2	7	0	0
-51a351f92e6fd34cef43add51eef65fe	INSERT INTO t3 VALUES (...) /* , ... */  	1	3	0	0
-85ec05195fd87103b8e751c559abe9d4	INSERT INTO t5 VALUES (...) /* , ... */  	1	3	0	0
-c72a99dab537b00f123fcb1c87c74115	INSERT INTO t1 VALUES ( NULL )  	1	1	0	0
-799c87eedbd26b27146c7f01cf275a9a	INSERT INTO t6 VALUES (...)  	5	5	0	0
-e50a377fe96a344be8496148bcd60407	SELECT ? + ?  	3	0	0	0
-08bcb063d9c3c6ac9e150ec7c727eea7	SELECT ?  	1	0	0	0
-30046d97cfdc44c95bdaa7f3987d0a20	CREATE SCHEMA statements_digest_temp  	2	2	0	0
-8e40e6461f3ab4454ddb8f21b5cda3ba	DROP SCHEMA statements_digest_temp  	2	0	0	0
-2fb7a70cbcfbc2e1900375406b9e4fca	SELECT ? FROM t11  	1	0	0	1
-1cfadd74d3e5f992ae8ae694c86fc9ec	CREATE TABLE t11 ( c CHARACTER (?) )  	2	0	0	1
-367c6d0eb00c1a6e553deddc195a6061	INSERT INTO t11 VALUES (?)  	1	1	1	0
-756f25d54bb3daf92c54903b6584586c	SHOW WARNINGS  	1	0	0	0
+70ecd9c9e447fe343322f29d53fe454f	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1	0	0	0
+5d495852490f30472a5e451973f373c1	SELECT ? FROM t1  	1	0	0	0
+cb0826a38cf1d9e8c77eba5d7d6fb875	SELECT ? FROM `t1`  	1	0	0	0
+e4473381b53762af1eb5c12614374f7c	SELECT ?, ... FROM t1  	2	0	0	0
+ceee8936a87a0f5175734f5f10e7057c	SELECT ? FROM t2  	1	0	0	0
+a7830790d49ef281f87e24d71515aab4	SELECT ?, ... FROM t2  	2	0	0	0
+80aecfb2707101fc47d6e7fb2de6832f	INSERT INTO t1 VALUES (?)  	1	1	0	0
+3dd3e7bef876fec44fb2a896978ecde9	INSERT INTO t2 VALUES (?)  	1	1	0	0
+9fed5893f1e2c272b47f1790acf6d3a1	INSERT INTO t3 VALUES (...)  	4	4	0	0
+3d4ff83706c001cbc58741e4583d7b0f	INSERT INTO t4 VALUES (...)  	1	1	0	0
+d5c4d8be8f940d3eba1c0c5ae1dc512d	INSERT INTO t5 VALUES (...)  	1	1	0	0
+672215bee7346eba333bf643cfd85563	INSERT INTO t1 VALUES (?) /* , ... */  	2	7	0	0
+af4f2ef1970475437400e5742e5ec4ed	INSERT INTO t3 VALUES (...) /* , ... */  	1	3	0	0
+c8c6cea379a59bd54868aa6a02988de5	INSERT INTO t5 VALUES (...) /* , ... */  	1	3	0	0
+ae280d97097bae4d293c1a986ed28418	INSERT INTO t1 VALUES ( NULL )  	1	1	0	0
+ebbe3cb851969592e6fc25921fa7b53b	INSERT INTO t6 VALUES (...)  	5	5	0	0
+7f07c2f5d5254f45a3365d0a98015862	SELECT ? + ?  	3	0	0	0
+70d3e4d0f131fc5324edc990fbed3bd8	SELECT ?  	1	0	0	0
+fb40aece1f68b5c3fbaf220bc21ad353	CREATE SCHEMA statements_digest_temp  	2	2	0	0
+622ef9323ed99ee165d79477219a693b	DROP SCHEMA statements_digest_temp  	2	0	0	0
+cc0ef8eb2f92a6ddf2e93fef99044c92	SELECT ? FROM t11  	1	0	0	1
+48730227c5e53dfb6ee765c251930bc6	CREATE TABLE t11 ( c CHARACTER (?) )  	2	0	0	1
+5426115bb326553db15da35d0c520b2b	INSERT INTO t11 VALUES (?)  	1	1	1	0
+9e23973ea6beef1737da28d6372eebdc	SHOW WARNINGS  	1	0	0	0
 ####################################
 # CLEANUP
 ####################################

=== modified file 'mysql-test/suite/perfschema/r/statement_digest_consumers.result'
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result	revid:marko.makela@stripped-20120418085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result	revid:marko.makela@stripped
@@ -98,30 +98,30 @@ Warning	1265	Data truncated for column '
 ####################################
 SELECT digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
 digest	digest_text	count_star
-a938a1f31256fd2ec1bc3cda9b7a8519	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1
-e7f8dc15f1156f57978116e457cc7488	SELECT ? FROM t1  	1
-29c3f8abab7962fe1f664a51fca9effc	SELECT ? FROM `t1`  	1
-ca50ee9fccc00a2c95e44ef3feea866a	SELECT ?, ... FROM t1  	2
-3b8d5477aa795a19c9e9183e4ad04e6b	SELECT ? FROM t2  	1
-8067bb511c3620aac5388c5674b328a0	SELECT ?, ... FROM t2  	2
-a58cc957ffdd32c2cffeffa65b6c9324	INSERT INTO t1 VALUES (?)  	1
-439869529508fe62007c6f97890a43ae	INSERT INTO t2 VALUES (?)  	1
-a9f32e4c511753d7317a014630050274	INSERT INTO t3 VALUES (...)  	4
-55351862b4cc299bfd9958920936dc34	INSERT INTO t4 VALUES (...)  	1
-976ba1912e3bf2d29fb0eefed75c9f89	INSERT INTO t5 VALUES (...)  	1
-de71aea3aaab6826e52c690197c28a42	INSERT INTO t1 VALUES (?) /* , ... */  	2
-51a351f92e6fd34cef43add51eef65fe	INSERT INTO t3 VALUES (...) /* , ... */  	1
-85ec05195fd87103b8e751c559abe9d4	INSERT INTO t5 VALUES (...) /* , ... */  	1
-c72a99dab537b00f123fcb1c87c74115	INSERT INTO t1 VALUES ( NULL )  	1
-799c87eedbd26b27146c7f01cf275a9a	INSERT INTO t6 VALUES (...)  	5
-e50a377fe96a344be8496148bcd60407	SELECT ? + ?  	3
-08bcb063d9c3c6ac9e150ec7c727eea7	SELECT ?  	1
-30046d97cfdc44c95bdaa7f3987d0a20	CREATE SCHEMA statements_digest_temp  	2
-8e40e6461f3ab4454ddb8f21b5cda3ba	DROP SCHEMA statements_digest_temp  	2
-2fb7a70cbcfbc2e1900375406b9e4fca	SELECT ? FROM t11  	1
-1cfadd74d3e5f992ae8ae694c86fc9ec	CREATE TABLE t11 ( c CHARACTER (?) )  	2
-367c6d0eb00c1a6e553deddc195a6061	INSERT INTO t11 VALUES (?)  	1
-756f25d54bb3daf92c54903b6584586c	SHOW WARNINGS  	1
+70ecd9c9e447fe343322f29d53fe454f	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1
+5d495852490f30472a5e451973f373c1	SELECT ? FROM t1  	1
+cb0826a38cf1d9e8c77eba5d7d6fb875	SELECT ? FROM `t1`  	1
+e4473381b53762af1eb5c12614374f7c	SELECT ?, ... FROM t1  	2
+ceee8936a87a0f5175734f5f10e7057c	SELECT ? FROM t2  	1
+a7830790d49ef281f87e24d71515aab4	SELECT ?, ... FROM t2  	2
+80aecfb2707101fc47d6e7fb2de6832f	INSERT INTO t1 VALUES (?)  	1
+3dd3e7bef876fec44fb2a896978ecde9	INSERT INTO t2 VALUES (?)  	1
+9fed5893f1e2c272b47f1790acf6d3a1	INSERT INTO t3 VALUES (...)  	4
+3d4ff83706c001cbc58741e4583d7b0f	INSERT INTO t4 VALUES (...)  	1
+d5c4d8be8f940d3eba1c0c5ae1dc512d	INSERT INTO t5 VALUES (...)  	1
+672215bee7346eba333bf643cfd85563	INSERT INTO t1 VALUES (?) /* , ... */  	2
+af4f2ef1970475437400e5742e5ec4ed	INSERT INTO t3 VALUES (...) /* , ... */  	1
+c8c6cea379a59bd54868aa6a02988de5	INSERT INTO t5 VALUES (...) /* , ... */  	1
+ae280d97097bae4d293c1a986ed28418	INSERT INTO t1 VALUES ( NULL )  	1
+ebbe3cb851969592e6fc25921fa7b53b	INSERT INTO t6 VALUES (...)  	5
+7f07c2f5d5254f45a3365d0a98015862	SELECT ? + ?  	3
+70d3e4d0f131fc5324edc990fbed3bd8	SELECT ?  	1
+fb40aece1f68b5c3fbaf220bc21ad353	CREATE SCHEMA statements_digest_temp  	2
+622ef9323ed99ee165d79477219a693b	DROP SCHEMA statements_digest_temp  	2
+cc0ef8eb2f92a6ddf2e93fef99044c92	SELECT ? FROM t11  	1
+48730227c5e53dfb6ee765c251930bc6	CREATE TABLE t11 ( c CHARACTER (?) )  	2
+5426115bb326553db15da35d0c520b2b	INSERT INTO t11 VALUES (?)  	1
+9e23973ea6beef1737da28d6372eebdc	SHOW WARNINGS  	1
 SELECT digest, digest_text FROM performance_schema.events_statements_current;
 digest	digest_text
 ####################################

=== modified file 'mysql-test/suite/perfschema/r/statement_digest_long_query.result'
--- a/mysql-test/suite/perfschema/r/statement_digest_long_query.result	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result	revid:marko.makela@strippedlwfk6
@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
 ####################################
 SELECT digest, digest_text, count_star FROM events_statements_summary_by_digest;
 digest	digest_text	count_star
-04926b9f44daeaf022a8c35932cb6e77	TRUNCATE TABLE events_statements_summary_by_digest  	1
-431eaac14d752b504e8f6c0bb5ad3afe	SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ...	1
+68753a29989b66b65ff59b8c601dc6a7	TRUNCATE TABLE events_statements_summary_by_digest  	1
+e7705259dae33df48399104e0222ad91	SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ...	1

=== modified file 'mysql-test/suite/rpl/r/rpl_corruption.result'
--- a/mysql-test/suite/rpl/r/rpl_corruption.result	revid:marko.makela@strippedro1il2imn
+++ b/mysql-test/suite/rpl/r/rpl_corruption.result	revid:marko.makela@strippedgm8lwfk6
@@ -26,13 +26,13 @@ include/wait_for_slave_io_error.inc [err
 SET GLOBAL master_verify_checksum=0;
 SET GLOBAL debug="d,corrupt_read_log_event";
 START SLAVE IO_THREAD;
-include/wait_for_slave_io_error.inc [errno=1595,1741]
+include/wait_for_slave_io_error.inc [errno=1595,1742]
 SET GLOBAL debug="";
 SET GLOBAL master_verify_checksum=1;
 # 5. Slave. Corruption in network
 SET GLOBAL debug="d,corrupt_queue_event";
 START SLAVE IO_THREAD;
-include/wait_for_slave_io_error.inc [errno=1595,1741]
+include/wait_for_slave_io_error.inc [errno=1595,1742]
 # 6. Slave. Corruption in relay log
 SET GLOBAL debug="d,corrupt_read_log_event_char";
 START SLAVE SQL_THREAD;

=== modified file 'mysql-test/suite/rpl/r/rpl_gtid_mode.result'
--- a/mysql-test/suite/rpl/r/rpl_gtid_mode.result	revid:marko.makela@stripped
+++ b/mysql-test/suite/rpl/r/rpl_gtid_mode.result	revid:marko.makela@stripped
@@ -3,6 +3,9 @@ include/master-slave.inc
 call mtr.add_suppression("Slave I/O: The slave IO thread stops because the master has GTID_MODE");
 call mtr.add_suppression("Error reading packet from server: Lost connection to MySQL");
 call mtr.add_suppression("Aborting");
+call mtr.add_suppression(".* CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when GTID_MODE = ON.");
+call mtr.add_suppression(".* Found a Gtid_log_event or Previous_gtids_log_event when GTID_MODE = OFF.");
+call mtr.add_suppression(".* Failed to initialize the master info structure");
 include/stop_slave.inc
 ==== Master and slave have GTID_MODE = OFF ====
 ---- Default value for GTID_MODE ----
@@ -93,9 +96,11 @@ INSERT INTO t1 VALUES (3);
 include/stop_slave.inc
 ==== Checks performed at server start when GTID_MODE = OFF ====
 include/rpl_stop_server.inc [server_number=2]
----- Fail to start with GTID_MODE = OFF and GTIDs in binlog/relay log ----
-include/assert_command_output.inc
-include/rpl_start_server.inc [server_number=2 gtids=on]
+---- Fail to start replication with GTID_MODE = OFF and GTIDs in binlog/relay log ----
+include/rpl_start_server.inc [server_number=2]
+START SLAVE;
+ERROR HY000: CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when GTID_MODE = ON.
+include/rpl_restart_server.inc [server_number=2 gtids=on]
 RESET SLAVE;
 RESET MASTER;
 ==== Master has GTID_MODE = ON, slave has GTID_MODE = OFF ====

=== modified file 'mysql-test/suite/rpl/t/rpl_corruption.test'
--- a/mysql-test/suite/rpl/t/rpl_corruption.test	revid:marko.makela@strippedl2imn
+++ b/mysql-test/suite/rpl/t/rpl_corruption.test	revid:marko.makela@strippedk6
@@ -91,7 +91,7 @@ SET GLOBAL master_verify_checksum=0;
 SET GLOBAL debug="d,corrupt_read_log_event";
 --connection slave
 START SLAVE IO_THREAD;
-let $slave_io_errno= 1595,1741; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE
+let $slave_io_errno= 1595,1742; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE
 --source include/wait_for_slave_io_error.inc
 --connection master
 SET GLOBAL debug="";
@@ -102,7 +102,7 @@ SET GLOBAL master_verify_checksum=1;
 --connection slave
 SET GLOBAL debug="d,corrupt_queue_event";
 START SLAVE IO_THREAD;
-let $slave_io_errno= 1595,1741; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE
+let $slave_io_errno= 1595,1742; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE
 --source include/wait_for_slave_io_error.inc
 
 # Emulate corruption in relay log

=== modified file 'mysql-test/suite/rpl/t/rpl_gtid_mode.test'
--- a/mysql-test/suite/rpl/t/rpl_gtid_mode.test	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/mysql-test/suite/rpl/t/rpl_gtid_mode.test	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -55,6 +55,9 @@
 call mtr.add_suppression("Slave I/O: The slave IO thread stops because the master has GTID_MODE");
 call mtr.add_suppression("Error reading packet from server: Lost connection to MySQL");
 call mtr.add_suppression("Aborting");
+call mtr.add_suppression(".* CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when GTID_MODE = ON.");
+call mtr.add_suppression(".* Found a Gtid_log_event or Previous_gtids_log_event when GTID_MODE = OFF.");
+call mtr.add_suppression(".* Failed to initialize the master info structure");
 
 --sync_slave_with_master
 --source include/stop_slave.inc
@@ -268,23 +271,18 @@ INSERT INTO t1 VALUES (3);
 
 --echo ==== Checks performed at server start when GTID_MODE = OFF ====
 
---connection master
 --let $rpl_server_number= 2
 --source include/rpl_stop_server.inc
-
---echo ---- Fail to start with GTID_MODE = OFF and GTIDs in binlog/relay log ----
-
---let $assert_regex= Found a Gtid_log_event or Previous_gtids_log_event when GTID_MODE = OFF.
---let $assert_command= $server2_cmd 2>&1
---source include/assert_command_output.inc
---error 0,1
---remove_file $datadir/master.info
---error 0,1
---remove_file $datadir/relay.info
-
+--echo ---- Fail to start replication with GTID_MODE = OFF and GTIDs in binlog/relay log ----
 --let $rpl_server_number= 2
---let $rpl_skip_start_slave= 1
+--let $rpl_start_with_gtids= 0
 --source include/rpl_start_server.inc
+--error ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON
+START SLAVE;
+--let $rpl_server_number= 2
+--let $rpl_skip_start_slave= 1
+--let $rpl_start_with_gtids= 1
+--source include/rpl_restart_server.inc
 --connection slave
 RESET SLAVE;
 RESET MASTER;

=== modified file 'mysql-test/t/derived.test'
--- a/mysql-test/t/derived.test	revid:marko.makela@stripped-2lhif0zro1il2imn
+++ b/mysql-test/t/derived.test	revid:marko.makela@stripped
@@ -1317,4 +1317,15 @@ SELECT pk FROM ( SELECT col_blob, pk FRO
 EXPLAIN SELECT pk FROM ( SELECT col_blob, pk FROM t2 ) AS A NATURAL JOIN t1;
 DROP TABLE t1,t2;
 
+--echo #
+--echo # Bug #13801019 ASSERTION `0' FAILED IN CREATE_MYISAM_TMP_TABLE
+--echo #
 
+CREATE TABLE t1 (a INT, b BLOB) ENGINE=InnoDB;
+CREATE TABLE t2 (c INT);
+CREATE TABLE t3 (d INT);
+INSERT INTO t3 VALUES (0);
+
+SELECT * FROM (SELECT * FROM t1) AS a1 RIGHT JOIN t3 LEFT JOIN t2 ON d=c ON a=c;
+
+DROP TABLE t1, t2, t3;

=== added file 'mysql-test/t/myisam_row_rpl-master.opt'
--- a/mysql-test/t/myisam_row_rpl-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/myisam_row_rpl-master.opt	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -0,0 +1 @@
+--binlog-format=row --binlog-row-event-max-size=1024

=== added file 'mysql-test/t/myisam_row_rpl-slave.opt'
--- a/mysql-test/t/myisam_row_rpl-slave.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/myisam_row_rpl-slave.opt	revid:marko.makela@strippedk6
@@ -0,0 +1 @@
+--binlog-format=row --binlog-row-event-max-size=1024

=== added file 'mysql-test/t/myisam_row_rpl.test'
--- a/mysql-test/t/myisam_row_rpl.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/myisam_row_rpl.test	revid:marko.makela@strippedfk6
@@ -0,0 +1,67 @@
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+--echo #
+--echo # Bug#11940249: RBR: MYISAM TABLE CORRUPTION AFTER FIRST LARGE INSERT
+--echo #               ON SLAVE
+--echo #
+
+--echo # Must have > 100 rows in the first rpl event (to trigger bulk_insert
+--echo # optimization for insert into an empty table, by disable all non-unique
+--echo # indexes and recreate them afterwards.)
+--echo # and then it must be a second rpl event for the same insert (i.e.
+--echo # during the same lock).
+--echo # Note that --binlog-row-event-max-size=1024 is set in the .opt files
+--echo # to enforce the default size.
+
+CREATE TABLE tmp (a VARCHAR(10), b INT) ENGINE=Memory;
+INSERT INTO tmp VALUES ('aZa', 1), ('zAz', 2), ('M', 3);
+# 6 rows
+INSERT INTO tmp SELECT * FROM tmp;
+# 12 rows
+INSERT INTO tmp SELECT * FROM tmp;
+# 24
+INSERT INTO tmp SELECT * FROM tmp;
+# 48
+INSERT INTO tmp SELECT * FROM tmp;
+# 96
+INSERT INTO tmp SELECT * FROM tmp;
+# 192 rows
+INSERT INTO tmp SELECT * FROM tmp;
+
+CREATE TABLE t
+(a VARCHAR(10),
+ b INT,
+ KEY a (a))
+ENGINE = MyISAM;
+
+--let $binlog_file=query_get_value(SHOW MASTER STATUS, File, 1)
+--let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1)
+INSERT INTO t SELECT * FROM tmp;
+
+--sync_slave_with_master
+--connection slave
+--echo # on slave:
+SELECT COUNT(*) FROM t WHERE b > -1;
+--connection master
+--echo # on master:
+--source include/show_binlog_events.inc
+
+RENAME TABLE t to t_2;
+RENAME TABLE t_2 to t;
+
+--sync_slave_with_master
+--connection slave
+--echo # on slave:
+SELECT COUNT(*) FROM t WHERE b > -1;
+CHECK TABLE t;
+REPAIR TABLE t;
+SELECT COUNT(*) FROM t WHERE b > -1;
+--let $diff_tables= master:t, slave:t
+--source include/diff_tables.inc
+
+--connection master
+DROP TABLE t, tmp;
+--sync_slave_with_master
+
+--source include/rpl_end.inc

=== modified file 'mysql-test/t/rewrite_general_log.test'
--- a/mysql-test/t/rewrite_general_log.test	revid:marko.makela@strippedzro1il2imn
+++ b/mysql-test/t/rewrite_general_log.test	revid:marko.makela@strippedk6
@@ -74,6 +74,12 @@ SELECT argument FROM mysql.general_log W
 SELECT argument FROM mysql.general_log WHERE argument LIKE 'SET NAMES %';
 --echo ------ done ------ see log_tables.test for more proof! :)
 
+--echo Bug#13958454 -- show we print SET @a:=5, but SELECT (@a:=5)
+# We need the () in EXPLAIN extended, for (@e:=80)+5.
+# In SET however, they'd break syntax.
+# VIEWs do not accepted variables at this time.
+EXPLAIN EXTENDED SELECT @a=5,@b:=10,@c:=20,@d:=40+5,(@e:=80)+5;
+
 DROP TABLE test_log;
 
 --remove_file $MYSQLTEST_VARDIR/log/rewrite_general.log

=== modified file 'mysql-test/t/tablespace.test'
--- a/mysql-test/t/tablespace.test	revid:marko.makela@stripped20418085855-2lhif0zro1il2imn
+++ b/mysql-test/t/tablespace.test	revid:marko.makela@strippedn6fgm8lwfk6
@@ -107,10 +107,6 @@ DROP TABLE t1;
 #   k int STORAGE MEMORY COLUMN_FORMAT FIXED
 # ) STORAGE DISK TABLESPACE the_tablespacename ENGINE=MyISAM;
 #
-# NOTE! The column level properties will not yet show up
-# in SHOW CREATE TABLE of MySQL Server(although they are
-# visible in .trace file)
-#
 
 let $MYSQLD_DATADIR= `SELECT @@datadir`;
 copy_file std_data/cluster_7022_table.frm $MYSQLD_DATADIR/test/t1.frm;
@@ -121,3 +117,69 @@ SHOW CREATE TABLE t1;
 
 DROP TABLE t1;
 
+--echo #
+--echo # WL#3627 Add COLUMN_FORMAT and STORAGE for fields
+--echo #
+
+CREATE TABLE t1 (
+ a int STORAGE DISK,
+ b int STORAGE MEMORY NOT NULL,
+ c int COLUMN_FORMAT DYNAMIC,
+ d int COLUMN_FORMAT FIXED,
+ e int COLUMN_FORMAT DEFAULT,
+ f int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+ g int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+ h int STORAGE DISK COLUMN_FORMAT FIXED,
+ i int STORAGE MEMORY COLUMN_FORMAT FIXED
+);
+SHOW CREATE TABLE t1;
+
+# Add new columns with all variations of the new column
+# level attributes
+ALTER TABLE t1
+  ADD COLUMN j int STORAGE DISK,
+  ADD COLUMN k int STORAGE MEMORY NOT NULL,
+  ADD COLUMN l int COLUMN_FORMAT DYNAMIC,
+  ADD COLUMN m int COLUMN_FORMAT FIXED,
+  ADD COLUMN n int COLUMN_FORMAT DEFAULT,
+  ADD COLUMN o int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+  ADD COLUMN p int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+  ADD COLUMN q int STORAGE DISK COLUMN_FORMAT FIXED,
+  ADD COLUMN r int STORAGE MEMORY COLUMN_FORMAT FIXED;
+SHOW CREATE TABLE t1;
+
+# Use MODIFY COLUMN to "shift" all new attributes to the next column
+ALTER TABLE t1
+  MODIFY COLUMN j int STORAGE MEMORY NOT NULL,
+  MODIFY COLUMN k int COLUMN_FORMAT DYNAMIC,
+  MODIFY COLUMN l int COLUMN_FORMAT FIXED,
+  MODIFY COLUMN m int COLUMN_FORMAT DEFAULT,
+  MODIFY COLUMN n int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+  MODIFY COLUMN o int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+  MODIFY COLUMN p int STORAGE DISK COLUMN_FORMAT FIXED,
+  MODIFY COLUMN q int STORAGE MEMORY COLUMN_FORMAT FIXED,
+  MODIFY COLUMN r int STORAGE DISK;
+SHOW CREATE TABLE t1;
+
+# Check behaviour of multiple COLUMN_FORMAT and/or STORAGE definitions
+ALTER TABLE t1
+  MODIFY COLUMN h int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT FIXED,
+  MODIFY COLUMN i int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
+  MODIFY COLUMN j int COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
+  MODIFY COLUMN k int COLUMN_FORMAT FIXED COLUMN_FORMAT DEFAULT,
+  MODIFY COLUMN l int STORAGE DISK STORAGE MEMORY,
+  MODIFY COLUMN m int STORAGE DISK STORAGE DEFAULT,
+  MODIFY COLUMN n int STORAGE MEMORY STORAGE DISK,
+  MODIFY COLUMN o int STORAGE MEMORY STORAGE DEFAULT,
+  MODIFY COLUMN p int STORAGE DISK STORAGE MEMORY
+                      COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
+  MODIFY COLUMN q int STORAGE DISK STORAGE MEMORY STORAGE DEFAULT
+                      COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
+  MODIFY COLUMN r int STORAGE DEFAULT STORAGE DEFAULT STORAGE MEMORY
+                      STORAGE DISK STORAGE MEMORY STORAGE DISK STORAGE DISK;
+SHOW CREATE TABLE t1;
+
+
+
+DROP TABLE t1;
+

=== modified file 'packaging/WiX/custom_ui.wxs'
--- a/packaging/WiX/custom_ui.wxs	revid:marko.makela@strippedil2imn
+++ b/packaging/WiX/custom_ui.wxs	revid:marko.makela@stripped
@@ -2,7 +2,7 @@
          xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
 
 <!--
-   Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
       <Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" Disabled="yes" />
       <Control Id="Description" Type="Text" X="135" Y="80" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgDescription)" />
       <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgTitle)" />
-      <Control Id="CopyrightText" Type="Text" X="135" Y="200" Width="220" Height="40" Transparent="yes" Text="Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved." />
+      <Control Id="CopyrightText" Type="Text" X="135" Y="200" Width="220" Height="40" Transparent="yes" Text="Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved." />
       <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
       <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
     </Dialog>

=== modified file 'sql/field.h'
--- a/sql/field.h	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/sql/field.h	revid:marko.makela@strippedwfk6
@@ -1018,6 +1018,30 @@ public:
   }
 #endif
 
+  ha_storage_media field_storage_type() const
+  {
+    return (ha_storage_media)
+      ((flags >> FIELD_FLAGS_STORAGE_MEDIA) & 3);
+  }
+
+  void set_storage_type(ha_storage_media storage_type_arg)
+  {
+    DBUG_ASSERT(field_storage_type() == HA_SM_DEFAULT);
+    flags |= (storage_type_arg << FIELD_FLAGS_STORAGE_MEDIA);
+  }
+
+  column_format_type column_format() const
+  {
+    return (column_format_type)
+      ((flags >> FIELD_FLAGS_COLUMN_FORMAT) & 3);
+  }
+
+  void set_column_format(column_format_type column_format_arg)
+  {
+    DBUG_ASSERT(column_format() == COLUMN_FORMAT_TYPE_DEFAULT);
+    flags |= (column_format_arg << FIELD_FLAGS_COLUMN_FORMAT);
+  }
+
   /* Hash value */
   virtual void hash(ulong *nr, ulong *nr2);
   friend int cre_myisam(char * name, register TABLE *form, uint options,
@@ -3485,6 +3509,18 @@ public:
   {
     return (flags & (BINCMP_FLAG | BINARY_FLAG)) != 0;
   }
+
+  ha_storage_media field_storage_type() const
+  {
+    return (ha_storage_media)
+      ((flags >> FIELD_FLAGS_STORAGE_MEDIA) & 3);
+  }
+
+  column_format_type column_format() const
+  {
+    return (column_format_type)
+      ((flags >> FIELD_FLAGS_COLUMN_FORMAT) & 3);
+  }
 };
 
 

=== modified file 'sql/gen_lex_hash.cc'
--- a/sql/gen_lex_hash.cc	revid:marko.makela@strippedhif0zro1il2imn
+++ b/sql/gen_lex_hash.cc	revid:marko.makela@stripped
@@ -377,7 +377,7 @@ int main(int argc,char **argv)
   printf("/*\n\n  Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
 
   puts("/*");
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("*/");
 
   /* Broken up to indicate that it's not advice to you, gentle reader. */

=== modified file 'sql/handler.h'
--- a/sql/handler.h	revid:marko.makela@stripped
+++ b/sql/handler.h	revid:marko.makela@stripped090901-f20rhn6fgm8lwfk6
@@ -347,6 +347,13 @@ enum row_type { ROW_TYPE_NOT_USED=-1, RO
                 /** Unused. Reserved for future versions. */
                 ROW_TYPE_PAGE };
 
+/* Specifies data storage format for individual columns */
+enum column_format_type {
+  COLUMN_FORMAT_TYPE_DEFAULT=   0, /* Not specified (use engine default) */
+  COLUMN_FORMAT_TYPE_FIXED=     1, /* FIXED format */
+  COLUMN_FORMAT_TYPE_DYNAMIC=   2  /* DYNAMIC format */
+};
+
 enum enum_binlog_func {
   BFN_RESET_LOGS=        1,
   BFN_RESET_SLAVE=       2,
@@ -1069,6 +1076,12 @@ public:
   // Table is renamed
   static const HA_ALTER_FLAGS ALTER_RENAME               = 1L << 18;
 
+  // Change the storage type of column 
+  static const HA_ALTER_FLAGS ALTER_COLUMN_STORAGE_TYPE = 1L << 19;
+
+  // Change the column format of column
+  static const HA_ALTER_FLAGS ALTER_COLUMN_COLUMN_FORMAT = 1L << 20;
+
   /**
     Create options (like MAX_ROWS) for the new version of table.
 

=== modified file 'sql/item.h'
--- a/sql/item.h	revid:marko.makela@strippedmn
+++ b/sql/item.h	revid:marko.makela@stripped9090901-f20rhn6fgm8lwfk6
@@ -181,7 +181,7 @@ public:
   NameString(const LEX_STRING str, bool is_null_terminated):
     SimpleCString()
   {
-    set_or_copy(str.str, str.length, is_null_terminated);
+    set_or_copy(str.str, (uint) str.length, is_null_terminated);
   }
   /**
     Allocate space using sql_strmake() or sql_strmake_with_convert().
@@ -200,11 +200,11 @@ public:
   }
   void copy(const LEX_STRING lex)
   {
-    copy(lex.str, lex.length);
+    copy(lex.str, (uint) lex.length);
   }
   void copy(const LEX_STRING *lex)
   {
-    copy(lex->str, lex->length);
+    copy(lex->str, (uint) lex->length);
   }
   void copy(const NameString str)
   {
@@ -2899,7 +2899,7 @@ class Item_return_date_time :public Item
   enum_field_types date_time_field_type;
 public:
   Item_return_date_time(const char *name_arg, enum_field_types field_type_arg)
-    :Item_partition_func_safe_string(NameString((char *) name_arg, strlen(name_arg)),
+    :Item_partition_func_safe_string(NameString((char *) name_arg, (uint) strlen(name_arg)),
                                      0, &my_charset_bin),
      date_time_field_type(field_type_arg)
   { decimals= 0; }
@@ -2911,7 +2911,7 @@ class Item_blob :public Item_partition_f
 {
 public:
   Item_blob(const char *name, uint length) :
-    Item_partition_func_safe_string(NameString((char *) name, strlen(name)),
+    Item_partition_func_safe_string(NameString((char *) name, (uint) strlen(name)),
                                     length, &my_charset_bin)
   { }
   enum Type type() const { return TYPE_HOLDER; }
@@ -2930,7 +2930,7 @@ class Item_empty_string :public Item_par
 public:
   Item_empty_string(const char *header, uint length,
                     const CHARSET_INFO *cs= NULL) :
-    Item_partition_func_safe_string(NameString((char *)header, strlen(header)),
+    Item_partition_func_safe_string(NameString((char *)header, (uint) strlen(header)),
                                     0, cs ? cs : &my_charset_utf8_general_ci)
     {
       max_length= length * collation.collation->mbmaxlen;
@@ -2945,7 +2945,7 @@ class Item_return_int :public Item_int
 public:
   Item_return_int(const char *name_arg, uint length,
 		  enum_field_types field_type_arg, longlong value= 0)
-    :Item_int(NameString(name_arg, name_arg ? strlen(name_arg) : 0),
+    :Item_int(NameString(name_arg, name_arg ? (uint) strlen(name_arg) : 0),
               value, length), int_field_type(field_type_arg)
   {
     unsigned_flag=1;

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	revid:marko.makela@stripped20418085855-2lhif0zro1il2imn
+++ b/sql/item_func.cc	revid:marko.makela@stripped
@@ -5158,25 +5158,22 @@ bool Item_func_set_user_var::is_null_res
   return is_null();
 }
 
-
-void Item_func_set_user_var::print(String *str, enum_query_type query_type)
+// just the assignment, for use in "SET @a:=5" type self-prints
+void Item_func_set_user_var::print_assignment(String *str,
+                                              enum_query_type query_type)
 {
-  str->append(STRING_WITH_LEN("(@"));
+  str->append(STRING_WITH_LEN("@"));
   str->append(name);
   str->append(STRING_WITH_LEN(":="));
   args[0]->print(str, query_type);
-  str->append(')');
 }
 
-
-void Item_func_set_user_var::print_as_stmt(String *str,
-                                           enum_query_type query_type)
+// parenthesize assignment for use in "EXPLAIN EXTENDED SELECT (@e:=80)+5"
+void Item_func_set_user_var::print(String *str, enum_query_type query_type)
 {
-  str->append(STRING_WITH_LEN("set @"));
-  str->append(name);
-  str->append(STRING_WITH_LEN(":="));
-  args[0]->print(str, query_type);
-  str->append(')');
+  str->append(STRING_WITH_LEN("("));
+  print_assignment(str, query_type);
+  str->append(STRING_WITH_LEN(")"));
 }
 
 bool Item_func_set_user_var::send(Protocol *protocol, String *str_arg)

=== modified file 'sql/item_func.h'
--- a/sql/item_func.h	revid:marko.makela@stripped855-2lhif0zro1il2imn
+++ b/sql/item_func.h	revid:marko.makela@stripped
@@ -1667,7 +1667,7 @@ public:
   bool fix_fields(THD *thd, Item **ref);
   void fix_length_and_dec();
   virtual void print(String *str, enum_query_type query_type);
-  void print_as_stmt(String *str, enum_query_type query_type);
+  void print_assignment(String *str, enum_query_type query_type);
   const char *func_name() const { return "set_user_var"; }
   int save_in_field(Field *field, bool no_conversions,
                     bool can_use_result_field);

=== modified file 'sql/lex.h'
--- a/sql/lex.h	revid:marko.makela@stripped
+++ b/sql/lex.h	revid:marko.makela@strippedhn6fgm8lwfk6
@@ -117,6 +117,7 @@ static SYMBOL symbols[] = {
   { "COLLATE",		SYM(COLLATE_SYM)},
   { "COLLATION",	SYM(COLLATION_SYM)},
   { "COLUMN",		SYM(COLUMN_SYM)},
+  { "COLUMN_FORMAT",	SYM(COLUMN_FORMAT_SYM)},
   { "COLUMN_NAME",      SYM(COLUMN_NAME_SYM)},
   { "COLUMNS",		SYM(COLUMNS)},
   { "COMMENT",		SYM(COMMENT_SYM)},

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	revid:marko.makela@stripped
+++ b/sql/log_event.cc	revid:marko.makela@stripped0419090901-f20rhn6fgm8lwfk6
@@ -5067,6 +5067,9 @@ Format_description_log_event(uint8 binlo
       post_header_len[HEARTBEAT_LOG_EVENT-1]= 0;
       post_header_len[IGNORABLE_LOG_EVENT-1]= IGNORABLE_HEADER_LEN;
       post_header_len[ROWS_QUERY_LOG_EVENT-1]= IGNORABLE_HEADER_LEN;
+      post_header_len[RESERVED_EVENT_NUM_1-1]= RESERVED_HEADER_LEN;
+      post_header_len[RESERVED_EVENT_NUM_2-1]= RESERVED_HEADER_LEN;
+      post_header_len[RESERVED_EVENT_NUM_3-1]= RESERVED_HEADER_LEN;
       post_header_len[GTID_LOG_EVENT-1]=
         post_header_len[ANONYMOUS_GTID_LOG_EVENT-1]=
         Gtid_log_event::POST_HEADER_LENGTH;

=== modified file 'sql/log_event.h'
--- a/sql/log_event.h	revid:marko.makela@stripped1il2imn
+++ b/sql/log_event.h	revid:marko.makela@strippedom-20120419090901-f20rhn6fgm8lwfk6
@@ -269,6 +269,7 @@ struct sql_ex_info
 #define INCIDENT_HEADER_LEN    2
 #define HEARTBEAT_HEADER_LEN   0
 #define IGNORABLE_HEADER_LEN   0
+#define RESERVED_HEADER_LEN    0
 
 /*
    The maximum number of updated databases that a status of
@@ -691,10 +692,15 @@ enum Log_event_type
   IGNORABLE_LOG_EVENT= 28,
   ROWS_QUERY_LOG_EVENT= 29,
 
-  GTID_LOG_EVENT= 30,
-  ANONYMOUS_GTID_LOG_EVENT= 31,
+  /* Following event numbers reserved for WL#5917 */
+  RESERVED_EVENT_NUM_1 = 30,
+  RESERVED_EVENT_NUM_2 = 31,
+  RESERVED_EVENT_NUM_3 = 32,
 
-  PREVIOUS_GTIDS_LOG_EVENT= 32,
+  GTID_LOG_EVENT= 33,
+  ANONYMOUS_GTID_LOG_EVENT= 34,
+
+  PREVIOUS_GTIDS_LOG_EVENT= 35,
   /*
     Add new events here - right above this comment!
     Existing events (except ENUM_END_EVENT) should never change their numbers

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	revid:marko.makela@stripped
+++ b/sql/mysqld.cc	revid:marko.makela@stripped0rhn6fgm8lwfk6
@@ -5210,9 +5210,7 @@ int mysqld_main(int argc, char **argv)
     init_slave() must be called after the thread keys are created.
   */
   if (server_id != 0 && init_slave() && active_mi == NULL)
-  {
     unireg_abort(1);
-  }
 
 #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
   initialize_performance_schema_acl(opt_bootstrap);
@@ -7524,7 +7522,7 @@ static void usage(void)
   if (!default_collation_name)
     default_collation_name= (char*) default_charset_info->name;
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("Starts the MySQL database server.\n");
   printf("Usage: %s [OPTIONS]\n", my_progname);
   if (!opt_verbose)

=== modified file 'sql/rpl_info_file.cc'
--- a/sql/rpl_info_file.cc	revid:marko.makela@stripped2imn
+++ b/sql/rpl_info_file.cc	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -197,38 +197,29 @@ int Rpl_info_file::do_reset_info(const i
   uint i= 0;
   struct st_my_dir *dir_info= NULL;
   struct fileinfo *file_info= NULL;
-  char dir_name[FN_REFLEN];
-  size_t dir_size= 0;
-  char* file_name= NULL;
-  size_t file_size= 0;
+  const char* file_name= NULL;
+  size_t file_len= 0;
   int error= FALSE;
-  Rpl_info_file* info= NULL;
 
   DBUG_ENTER("Rpl_info_file::do_reset_info");
 
-  if (!(info= new Rpl_info_file(nparam, param_info_fname)))
+  file_name= param_info_fname;
+  file_len= strlen(file_name);
+  if (!(dir_info= my_dir(mysql_data_home, MYF(MY_DONT_SORT))))
     DBUG_RETURN(TRUE);
 
-  file_name= info->info_fname + dirname_part(dir_name, info->info_fname, &dir_size);
-  file_size= strlen(file_name);
-
-  if (!(dir_info= my_dir(dir_name, MYF(MY_DONT_SORT))))
-  {
-    delete info;
-    DBUG_RETURN(TRUE);
-  }
-
   file_info= dir_info->dir_entry;
   for (i= dir_info->number_off_files ; i-- ; file_info++)
   {
-    if (!strncmp(file_info->name, file_name, file_size) &&
-        strlen(file_info->name) == file_size &&
-        my_delete(file_info->name, MYF(MY_WME)))
-      error= TRUE;
+    if (!strncmp(file_info->name, file_name, file_len))
+    {
+      DBUG_PRINT("info", ("Deleting %s\n", file_info->name));
+      if (my_delete(file_info->name, MYF(MY_WME)))
+        error= TRUE;
+    }
   }
   my_dirend(dir_info);
  
-  delete info;
   DBUG_RETURN(error);
 }
 

=== modified file 'sql/rpl_mi.cc'
--- a/sql/rpl_mi.cc	revid:marko.makela@strippedm-20120418085855-2lhif0zro1il2imn
+++ b/sql/rpl_mi.cc	revid:marko.makela@stripped6
@@ -478,7 +478,7 @@ bool Master_info::read_info(Rpl_info_han
 
   if (auto_position != 0 && gtid_mode != 3)
   {
-    sql_print_error("%s", ER(ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON));
+    my_error(ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON, MYF(0));
     DBUG_RETURN(true);
   }
 

=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	revid:marko.makela@stripped
+++ b/sql/set_var.cc	revid:marko.makela@stripped419090901-f20rhn6fgm8lwfk6
@@ -747,7 +747,7 @@ int set_var_user::update(THD *thd)
 
 void set_var_user::print(THD *thd, String *str)
 {
-  user_var_item->print(str, QT_ORDINARY);
+  user_var_item->print_assignment(str, QT_ORDINARY);
 }
 
 

=== modified file 'sql/sql_derived.cc'
--- a/sql/sql_derived.cc	revid:marko.makela@stripped8085855-2lhif0zro1il2imn
+++ b/sql/sql_derived.cc	revid:marko.makela@stripped
@@ -338,9 +338,21 @@ bool mysql_derived_create(THD *thd, LEX
    *) Some commands, like show table status, doesn't prepare views/derived
       tables => no need to create result table also.
    *) Table is already created.
+   *) Table is a constant one with all NULL values.
   */
-  if (!derived->uses_materialization() || !table || table->created)
+  if (!derived->uses_materialization() || !table || table->created ||
+      (derived->select_lex->join != NULL &&
+       (derived->select_lex->join->const_table_map & table->map)))
+  {
+    /*
+      At this point, JT_CONST derived tables should be null rows. Otherwise they
+      would have been materialized already.
+    */
+    DBUG_ASSERT(table == NULL || table->reginfo.join_tab == NULL ||
+                table->reginfo.join_tab->type != JT_CONST ||
+                table->null_row == 1);
     DBUG_RETURN(FALSE);
+  }
   /* create tmp table */
   select_union *result= (select_union*)unit->get_result();
 

=== modified file 'sql/sql_executor.cc'
--- a/sql/sql_executor.cc	revid:marko.makela@stripped2lhif0zro1il2imn
+++ b/sql/sql_executor.cc	revid:marko.makela@stripped
@@ -3145,6 +3145,18 @@ int join_init_read_record(JOIN_TAB *tab)
   if (init_read_record(&tab->read_record, tab->join->thd, tab->table,
                        tab->select, 1, 1, FALSE))
     return 1;
+  /*
+    set keyread to TRUE if quick index is covering.
+    @todo: Call set_keyread only from access functions. Currently this is
+    also done in make_join_readinfo.
+  */
+  if (tab->select && tab->select->quick)
+  {
+    TABLE *table= tab->table;
+    if(!table->no_keyread && tab->select->quick->index != MAX_KEY //not index merge
+       && table->covering_keys.is_set(tab->select->quick->index))
+      table->set_keyread(true);
+  }
   return (*tab->read_record.read_record)(&tab->read_record);
 }
 

=== modified file 'sql/sql_optimizer.cc'
--- a/sql/sql_optimizer.cc	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/sql/sql_optimizer.cc	revid:marko.makela@strippedhn6fgm8lwfk6
@@ -6801,7 +6801,7 @@ bool JOIN::generate_derived_keys()
 
 void JOIN::drop_unused_derived_keys()
 {
-  for (uint i= const_tables ; i < tables ; i++)
+  for (uint i= 0 ; i < tables ; i++)
   {
     JOIN_TAB *tab= join_tab + i;
     TABLE *table= tab->table;

=== modified file 'sql/sql_optimizer.h'
--- a/sql/sql_optimizer.h	revid:marko.makela@stripped
+++ b/sql/sql_optimizer.h	revid:marko.makela@stripped20120419090901-f20rhn6fgm8lwfk6
@@ -409,6 +409,7 @@ public:
     all_tables= 0;
     tables= 0;
     const_tables= 0;
+    const_table_map= 0;
     join_list= 0;
     implicit_grouping= FALSE;
     sort_and_group= 0;

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	revid:marko.makela@stripped
+++ b/sql/sql_parse.cc	revid:marko.makela@stripped19090901-f20rhn6fgm8lwfk6
@@ -3042,7 +3042,7 @@ end_with_restore_list:
     goto error;
 #else
     {
-      if (check_global_access(thd, SUPER_ACL))
+      if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL))
 	goto error;
       res = show_binlogs(thd);
       break;

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	revid:marko.makela@strippedn
+++ b/sql/sql_select.cc	revid:marko.makela@stripped0120419090901-f20rhn6fgm8lwfk6
@@ -3974,17 +3974,12 @@ check_reverse_order:
       bool quick_created= 
         (select && select->quick && select->quick!=save_quick);
 
-      /* 
-         If 'best_key' has changed from  prev. 'ref_key':
-         Update strategy for using index tree reading only
-         ('Using index' in EXPLAIN)
+      /*
+        If ref_key used index tree reading only ('Using index' in EXPLAIN),
+        and best_key doesn't, then revert the decision.
       */
-      if (best_key != ref_key)
-      {
-        const bool using_index= 
-          (table->covering_keys.is_set(best_key) && !table->no_keyread);
-        table->set_keyread(using_index);
-      }
+      if(!table->covering_keys.is_set(best_key))
+        table->set_keyread(false);
       if (!quick_created)
       {
         if (select)                  // Throw any existing quick select

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	revid:marko.makela@oracle.com-20120418085855-2lhif0zro1il2imn
+++ b/sql/sql_show.cc	revid:marko.makela@strippedgm8lwfk6
@@ -1543,6 +1543,34 @@ int store_create_info(THD *thd, TABLE_LI
       packet->append(STRING_WITH_LEN(" NULL"));
     }
 
+    switch(field->field_storage_type()){
+    case HA_SM_DEFAULT:
+      break;
+    case HA_SM_DISK:
+      packet->append(STRING_WITH_LEN(" /*!50606 STORAGE DISK */"));
+      break;
+    case HA_SM_MEMORY:
+      packet->append(STRING_WITH_LEN(" /*!50606 STORAGE MEMORY */"));
+      break;
+    default:
+      DBUG_ASSERT(0);
+      break;
+    }
+
+    switch(field->column_format()){
+    case COLUMN_FORMAT_TYPE_DEFAULT:
+      break;
+    case COLUMN_FORMAT_TYPE_FIXED:
+      packet->append(STRING_WITH_LEN(" /*!50606 COLUMN_FORMAT FIXED */"));
+      break;
+    case COLUMN_FORMAT_TYPE_DYNAMIC:
+      packet->append(STRING_WITH_LEN(" /*!50606 COLUMN_FORMAT DYNAMIC */"));
+      break;
+    default:
+      DBUG_ASSERT(0);
+      break;
+    }
+
     if (print_default_clause(thd, field, &def_value, true))
     {
       packet->append(STRING_WITH_LEN(" DEFAULT "));
@@ -6697,7 +6725,7 @@ TABLE *create_schema_table(THD *thd, TAB
     case MYSQL_TYPE_DOUBLE:
     {
       const NameString field_name(fields_info->field_name,
-                                  strlen(fields_info->field_name));
+                                  (uint) strlen(fields_info->field_name));
       if ((item= new Item_float(field_name, 0.0, NOT_FIXED_DEC, 
                                 fields_info->field_length)) == NULL)
         DBUG_RETURN(NULL);

=== modified file 'sql/sql_string.h'
--- a/sql/sql_string.h	revid:marko.makela@strippedil2imn
+++ b/sql/sql_string.h	revid:marko.makela@strippedom-20120419090901-f20rhn6fgm8lwfk6
@@ -63,7 +63,7 @@ public:
   }
   SimpleCString(const LEX_STRING arg)
   {
-    set(arg.str, arg.length);
+    set(arg.str, (uint) arg.length);
   }
   void reset()
   {
@@ -74,7 +74,7 @@ public:
   */
   void set(const char *str)
   {
-    set(str, str ? strlen(str) : 0);
+    set(str, str ? (uint) strlen(str) : 0);
   }
   /**
     Return string buffer.
@@ -373,7 +373,7 @@ public:
   bool append(const char *s);
   bool append(LEX_STRING *ls)
   {
-    return append(ls->str, ls->length);
+    return append(ls->str, (uint32) ls->length);
   }
   bool append(SimpleCString str)
   {

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	revid:marko.makela@stripped2imn
+++ b/sql/sql_table.cc	revid:marko.makela@stripped-20120419090901-f20rhn6fgm8lwfk6
@@ -5362,6 +5362,16 @@ static bool fill_alter_inplace_info(THD
       */
       if (field->field_index != new_field_index)
         ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_ORDER;
+
+      /* Detect changes in storage type of column */
+      if (new_field->field_storage_type() != field->field_storage_type())
+        ha_alter_info->handler_flags|=
+          Alter_inplace_info::ALTER_COLUMN_STORAGE_TYPE;
+
+      /* Detect changes in column format of column */
+      if (new_field->column_format() != field->column_format())
+        ha_alter_info->handler_flags|=
+          Alter_inplace_info::ALTER_COLUMN_COLUMN_FORMAT;
     }
     else
     {

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	revid:marko.makela@stripped-20120418085855-2lhif0zro1il2imn
+++ b/sql/sql_yacc.yy	revid:marko.makela@strippedk6
@@ -1085,6 +1085,7 @@ bool my_yyoverflow(short **a, YYSTYPE **
 %token  COLLATION_SYM                 /* SQL-2003-N */
 %token  COLUMNS
 %token  COLUMN_SYM                    /* SQL-2003-R */
+%token  COLUMN_FORMAT_SYM
 %token  COLUMN_NAME_SYM               /* SQL-2003-N */
 %token  COMMENT_SYM
 %token  COMMITTED_SYM                 /* SQL-2003-N */
@@ -6293,6 +6294,39 @@ attribute:
               Lex->charset=$2;
             }
           }
+        | COLUMN_FORMAT_SYM DEFAULT
+          {
+            Lex->type&= ~(FIELD_FLAGS_COLUMN_FORMAT_MASK);
+            Lex->type|=
+              (COLUMN_FORMAT_TYPE_DEFAULT << FIELD_FLAGS_COLUMN_FORMAT);
+          }
+        | COLUMN_FORMAT_SYM FIXED_SYM
+          {
+            Lex->type&= ~(FIELD_FLAGS_COLUMN_FORMAT_MASK);
+            Lex->type|=
+              (COLUMN_FORMAT_TYPE_FIXED << FIELD_FLAGS_COLUMN_FORMAT);
+          }
+        | COLUMN_FORMAT_SYM DYNAMIC_SYM
+          {
+            Lex->type&= ~(FIELD_FLAGS_COLUMN_FORMAT_MASK);
+            Lex->type|=
+              (COLUMN_FORMAT_TYPE_DYNAMIC << FIELD_FLAGS_COLUMN_FORMAT);
+          }
+        | STORAGE_SYM DEFAULT
+          {
+            Lex->type&= ~(FIELD_FLAGS_STORAGE_MEDIA_MASK);
+            Lex->type|= (HA_SM_DEFAULT << FIELD_FLAGS_STORAGE_MEDIA);
+          }
+        | STORAGE_SYM DISK_SYM
+          {
+            Lex->type&= ~(FIELD_FLAGS_STORAGE_MEDIA_MASK);
+            Lex->type|= (HA_SM_DISK << FIELD_FLAGS_STORAGE_MEDIA);
+          }
+        | STORAGE_SYM MEMORY_SYM
+          {
+            Lex->type&= ~(FIELD_FLAGS_STORAGE_MEDIA_MASK);
+            Lex->type|= (HA_SM_MEMORY << FIELD_FLAGS_STORAGE_MEDIA);
+          }
         ;
 
 
@@ -13488,6 +13522,7 @@ keyword_sp:
         | CODE_SYM                 {}
         | COLLATION_SYM            {}
         | COLUMN_NAME_SYM          {}
+        | COLUMN_FORMAT_SYM        {}
         | COLUMNS                  {}
         | COMMITTED_SYM            {}
         | COMPACT_SYM              {}

=== modified file 'sql/table.cc'
--- a/sql/table.cc	revid:marko.makela@strippedf0zro1il2imn
+++ b/sql/table.cc	revid:marko.makela@oracle.com-20120419090901-f20rhn6fgm8lwfk6
@@ -1582,8 +1582,8 @@ static int open_binary_frm(THD *thd, TAB
         ((field_flags >> COLUMN_FORMAT_SHIFT)& COLUMN_FORMAT_MASK);
       DBUG_PRINT("debug", ("field flags: %u, storage: %u, column_format: %u",
                            field_flags, field_storage, field_column_format));
-      (void)field_storage; /* Reserved by and used in MySQL Cluster */
-      (void)field_column_format; /* Reserved by and used in MySQL Cluster */
+      reg_field->set_storage_type((ha_storage_media)field_storage);
+      reg_field->set_column_format((column_format_type)field_column_format);
     }
   }
   *field_ptr=0;					// End marker

=== modified file 'sql/unireg.cc'
--- a/sql/unireg.cc	revid:marko.makela@stripped
+++ b/sql/unireg.cc	revid:marko.makela@stripped0rhn6fgm8lwfk6
@@ -390,8 +390,8 @@ bool mysql_create_frm(THD *thd, const ch
     List_iterator<Create_field> it(create_fields);
     while ((field=it++))
     {
-      const uchar field_storage= 0; /* Used in MySQL Cluster */
-      const uchar field_column_format= 0; /* Used in MySQL Cluster */
+      const uchar field_storage= field->field_storage_type();
+      const uchar field_column_format= field->column_format();
       const uchar field_flags=
         field_storage + (field_column_format << COLUMN_FORMAT_SHIFT);
       *ptr= field_flags;

=== modified file 'storage/innobase/dict/dict0mem.cc'
--- a/storage/innobase/dict/dict0mem.cc	revid:marko.makela@stripped18085855-2lhif0zro1il2imn
+++ b/storage/innobase/dict/dict0mem.cc	revid:marko.makela@strippedrhn6fgm8lwfk6
@@ -35,8 +35,9 @@ Created 1/8/1996 Heikki Tuuri
 #include "dict0dict.h"
 #include "fts0priv.h"
 #ifndef UNIV_HOTBACKUP
-#include "ha_prototypes.h"	/* innobase_casedn_str(),
+# include "ha_prototypes.h"	/* innobase_casedn_str(),
 				innobase_get_lower_case_table_names */
+# include "mysql_com.h"		/* NAME_LEN */
 # include "lock0lock.h"
 #endif /* !UNIV_HOTBACKUP */
 #ifdef UNIV_BLOB_DEBUG
@@ -251,14 +252,14 @@ dict_mem_table_col_rename_low(
 /*==========================*/
 	dict_table_t*	table,	/*!< in/out: table */
 	unsigned	i,	/*!< in: column offset corresponding to s */
-	const char*	from,	/*!< in: old column name */
 	const char*	to,	/*!< in: new column name */
 	const char*	s)	/*!< in: pointer to table->col_names */
 {
-	size_t from_len = strlen(from), to_len = strlen(to);
+	size_t from_len = strlen(s), to_len = strlen(to);
 
-	ut_ad(!strcmp(from, s));
 	ut_ad(i < table->n_def);
+	ut_ad(from_len <= NAME_LEN);
+	ut_ad(to_len <= NAME_LEN);
 
 	if (from_len == to_len) {
 		/* The easy case: simply replace the column name in
@@ -348,9 +349,19 @@ dict_mem_table_col_rename_low(
 
 			if (strcmp(foreign->referenced_col_names[f],
 				   col_name)) {
-				foreign->referenced_col_names[f]
-					= mem_heap_strdup(
-						foreign->heap, col_name);
+				char**	rc = const_cast<char**>(
+					foreign->referenced_col_names + f);
+				size_t	col_name_len_1 = strlen(col_name) + 1;
+
+				if (col_name_len_1 <= strlen(*rc) + 1) {
+					memcpy(*rc, col_name, col_name_len_1);
+				} else {
+					*rc = static_cast<char*>(
+						mem_heap_dup(
+							foreign->heap,
+							col_name,
+							col_name_len_1));
+				}
 			}
 		}
 	}
@@ -381,7 +392,7 @@ dict_mem_table_col_rename(
 	Proceed with the renaming anyway. */
 	ut_ad(!strcmp(from, s));
 
-	dict_mem_table_col_rename_low(table, nth_col, from, to, s);
+	dict_mem_table_col_rename_low(table, nth_col, to, s);
 }
 
 /**********************************************************************//**

=== modified file 'storage/innobase/pars/lexyy.cc'
--- a/storage/innobase/pars/lexyy.cc	revid:marko.makela@strippedf0zro1il2imn
+++ b/storage/innobase/pars/lexyy.cc	revid:marko.makela@stripped
@@ -35,7 +35,7 @@
 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types. 
  */
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS 1
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t;
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#endif /* ! C99 */
+
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -142,7 +143,15 @@ typedef unsigned int flex_uint32_t;
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
 #define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -276,7 +285,7 @@ static yy_size_t yy_n_chars;		/* number
 yy_size_t yyleng;
 
 /* Points to current character in buffer. */
-static char *yy_c_buf_p = (char*) 0;
+static char *yy_c_buf_p = (char *) 0;
 static int yy_init = 0;		/* whether we need to initialize */
 static int yy_start = 0;	/* start state number */
 
@@ -338,7 +347,7 @@ void yyfree (void *  );
 
 typedef unsigned char YY_CHAR;
 
-FILE *yyin = (FILE*) 0, *yyout = (FILE*) 0;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
 
 typedef int yy_state_type;
 
@@ -373,7 +382,7 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[424] =
+static yyconst flex_int16_t yy_accept[425] =
     {   0,
         0,    0,  119,  119,    0,    0,    0,    0,  125,  123,
       122,  122,    8,  123,  114,    5,  103,  109,  112,  110,
@@ -382,46 +391,46 @@ static yyconst flex_int16_t yy_accept[42
        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
       115,  116,  119,  120,    6,    7,    9,   10,  122,    4,
        98,  118,    2,    1,    3,   99,  100,  102,  101,    0,
-       96,   96,   96,   96,   96,   96,   44,   96,   96,   96,
+       96,    0,   96,   96,   96,   96,   96,   44,   96,   96,
        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   28,   17,   25,   96,   96,   96,   96,
+       96,   96,   96,   96,   28,   17,   25,   96,   96,   96,
 
-       96,   96,   54,   63,   96,   14,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,  119,  120,  120,  121,    6,    7,
-        9,   10,    2,    0,   97,   13,   45,   96,   96,   96,
+       96,   96,   96,   54,   63,   96,   14,   96,   96,   96,
        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   27,   96,   96,   96,
-       41,   96,   96,   96,   96,   21,   96,   96,   96,   96,
-       96,   15,   96,   96,   96,   18,   96,   96,   96,   96,
-       96,   82,   96,   96,   96,   51,   96,   12,   96,   36,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-
-       96,    0,   97,   96,   96,   96,   96,   20,   96,   24,
+       96,   96,   96,   96,   96,  119,  120,  120,  121,    6,
+        7,    9,   10,    2,    0,   97,   13,   45,   96,   96,
        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   46,   96,   96,   30,   96,   89,   96,   96,   39,
-       96,   96,   96,   96,   96,   48,   96,   94,   91,   32,
-       93,   96,   11,   66,   96,   96,   96,   42,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   29,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   87,    0,
-       96,   26,   96,   96,   96,   68,   96,   96,   96,   96,
-       37,   96,   96,   96,   96,   96,   96,   96,   31,   67,
-       23,   96,   59,   96,   77,   96,   96,   96,   43,   96,
-
-       96,   96,   96,   96,   96,   96,   96,   92,   96,   96,
-       56,   96,   96,   96,   96,   96,   96,   96,   40,   33,
-        0,   81,   95,   19,   96,   96,   85,   96,   76,   55,
-       96,   65,   96,   52,   96,   96,   96,   47,   96,   78,
-       96,   80,   96,   96,   34,   96,   96,   96,   35,   74,
-       96,   96,   96,   96,   60,   96,   50,   49,   96,   96,
-       96,   57,   53,   64,   96,   96,   96,   22,   96,   96,
-       75,   83,   96,   96,   79,   96,   70,   96,   96,   96,
-       96,   96,   38,   96,   90,   69,   96,   86,   96,   96,
-       96,   88,   96,   96,   61,   96,   16,   96,   72,   71,
-
-       96,   58,   96,   84,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   73,   96,   96,   96,   96,   96,
-       96,   62,    0
+       96,   96,   96,   96,   96,   96,   96,   27,   96,   96,
+       96,   41,   96,   96,   96,   96,   21,   96,   96,   96,
+       96,   96,   15,   96,   96,   96,   18,   96,   96,   96,
+       96,   96,   82,   96,   96,   96,   51,   96,   12,   96,
+       36,   96,   96,   96,   96,   96,   96,   96,   96,   96,
+
+       96,   96,    0,   97,   96,   96,   96,   96,   20,   96,
+       24,   96,   96,   96,   96,   96,   96,   96,   96,   96,
+       96,   96,   46,   96,   96,   30,   96,   89,   96,   96,
+       39,   96,   96,   96,   96,   96,   48,   96,   94,   91,
+       32,   93,   96,   11,   66,   96,   96,   96,   42,   96,
+       96,   96,   96,   96,   96,   96,   96,   96,   96,   29,
+       96,   96,   96,   96,   96,   96,   96,   96,   96,   87,
+        0,   96,   26,   96,   96,   96,   68,   96,   96,   96,
+       96,   37,   96,   96,   96,   96,   96,   96,   96,   31,
+       67,   23,   96,   59,   96,   77,   96,   96,   96,   43,
+
+       96,   96,   96,   96,   96,   96,   96,   96,   92,   96,
+       96,   56,   96,   96,   96,   96,   96,   96,   96,   40,
+       33,    0,   81,   95,   19,   96,   96,   85,   96,   76,
+       55,   96,   65,   96,   52,   96,   96,   96,   47,   96,
+       78,   96,   80,   96,   96,   34,   96,   96,   96,   35,
+       74,   96,   96,   96,   96,   60,   96,   50,   49,   96,
+       96,   96,   57,   53,   64,   96,   96,   96,   22,   96,
+       96,   75,   83,   96,   96,   79,   96,   70,   96,   96,
+       96,   96,   96,   38,   96,   90,   69,   96,   86,   96,
+       96,   96,   88,   96,   96,   61,   96,   16,   96,   72,
+
+       71,   96,   58,   96,   84,   96,   96,   96,   96,   96,
+       96,   96,   96,   96,   96,   73,   96,   96,   96,   96,
+       96,   96,   62,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -432,14 +441,14 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    2,    1,    4,    5,    6,    7,    1,    8,    9,
        10,   11,   12,   13,   14,   15,   16,   17,   17,   17,
        17,   17,   17,   17,   17,   17,   17,   18,   19,   20,
-       21,   22,   23,    1,   24,   25,   26,   27,   28,   29,
-       30,   31,   32,   33,   34,   35,   36,   37,   38,   39,
-       40,   41,   42,   43,   44,   45,   46,   47,   48,   49,
-        1,    1,    1,    1,   50,    1,   33,   33,   33,   33,
-
-       33,   33,   33,   33,   33,   33,   33,   51,   33,   33,
-       33,   33,   52,   33,   53,   33,   33,   33,   33,   33,
-       33,   33,   54,    1,   55,    1,    1,    1,    1,    1,
+       21,   22,   23,   24,   25,   26,   27,   28,   29,   30,
+       31,   32,   33,   34,   35,   36,   37,   38,   39,   40,
+       41,   42,   43,   44,   45,   46,   47,   48,   49,   50,
+        1,    1,    1,    1,   51,    1,   34,   34,   34,   34,
+
+       34,   34,   34,   34,   34,   34,   34,   52,   34,   34,
+       34,   34,   53,   34,   54,   34,   34,   34,   34,   34,
+       34,   34,   55,    1,   56,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -456,328 +465,438 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[56] =
+static yyconst flex_int32_t yy_meta[57] =
     {   0,
         1,    1,    1,    2,    3,    1,    1,    4,    1,    1,
         5,    1,    1,    1,    1,    6,    7,    1,    1,    1,
-        8,    1,    1,    9,    9,    9,    9,    9,    9,    9,
+        8,    1,    1,    6,    9,    9,    9,    9,    9,    9,
         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
-        9,    9,    9,    1,    1
+        9,    9,    9,    9,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[436] =
+static yyconst flex_int16_t yy_base[438] =
     {   0,
-        0,    0,  849,  848,  850,  849,  852,  851,  854,  861,
-       54,   56,  861,    0,  861,  861,  861,  861,  861,  861,
-      861,  861,  838,  841,   45,  830,  861,   42,  861,  829,
-      861,   45,   49,   54,   58,   56,   72,  833,   83,   86,
-       63,   67,   90,   53,  105,  107,  106,  120,   51,  101,
-      861,  861,    0,   55,    0,  840,    0,  843,  106,    0,
-      861,  861,  829,   61,  824,  861,  861,  861,  861,  839,
-      827,   88,  124,  130,  132,  125,  826,  129,  133,  136,
-       52,  138,  148,  140,  142,  145,  149,  152,  151,  159,
-      162,  169,  165,  825,  172,  824,  173,  170,  175,  179,
-
-      176,  177,  823,  822,  180,  182,  184,  200,  201,  195,
-      189,  202,  204,  207,  205,  210,  218,  220,  213,  215,
-      223,  230,  238,  217,    0,  240,  244,  861,    0,  829,
-        0,  832,  818,  781,    0,  817,  816,  233,  237,  243,
-      248,  251,  246,  252,  255,  257,  258,  262,  264,  263,
-      265,  267,  266,  269,  273,  270,  815,  274,  275,  287,
-      814,  290,  292,  291,  293,  294,  297,  300,  304,  298,
-      307,  313,  308,  309,  317,  813,  314,  315,  323,  318,
-      324,  328,  331,  332,  333,  812,  336,  811,  338,  810,
-      340,  339,  342,  344,  343,  341,  347,  346,  348,  349,
-
-      359,  773,    0,  356,  369,  370,  360,  808,  371,  807,
-      372,  375,  376,  378,  379,  380,  382,  383,  388,  393,
-      394,  806,  396,  397,  805,  398,  804,  399,  400,  803,
-      403,  404,  408,  413,  405,  802,  415,  801,  800,  799,
-      798,  406,  797,  796,  416,  417,  420,  795,  422,  418,
-      423,  425,  424,  426,  439,  429,  437,  440,  794,  446,
-      450,  453,  454,  455,  457,  458,  459,  460,  793,  757,
-      461,  791,  463,  464,  466,  790,  467,  468,  473,  474,
-      789,  475,  476,  477,  478,  480,  485,  486,  788,  787,
-      786,  489,  785,  491,  784,  498,  493,  494,  783,  499,
-
-      504,  509,  511,  513,  516,  514,  517,  782,  520,  519,
-      781,  521,  523,  527,  525,  528,  526,  529,  780,  779,
-      780,  776,  773,  530,  533,  535,  772,  534,  771,  770,
-      541,  769,  550,  760,  543,  548,  551,  753,  552,  736,
-      554,  730,  556,  557,  723,  558,  566,  563,  693,  692,
-      569,  572,  565,  578,  691,  574,  690,  689,  567,  585,
-      588,  688,  687,  685,  571,  589,  591,  683,  592,  593,
-      681,  680,  595,  596,  679,  597,  678,  599,  604,  602,
-      605,  608,  676,  606,  675,  674,  609,  673,  607,  610,
-      614,  670,  620,  623,  668,  628,  667,  630,  665,  664,
-
-      625,  663,  629,  112,  627,  626,  631,  632,  647,  633,
-      636,  637,  644,  650,  110,  652,  659,  657,  660,  661,
-      662,   57,  861,  710,  719,  728,  731,  734,  738,  747,
-      756,  765,  774,  781,  784
+        0,    0,  293,  287,  284,  281,  272,  256,  254, 1357,
+       55,   57, 1357,    0, 1357, 1357, 1357, 1357, 1357, 1357,
+     1357, 1357,  238,  227,   46,  205, 1357,   43, 1357,  203,
+     1357,   46,   50,   56,   52,   66,   64,   51,   81,   92,
+       91,   94,   96,  111,  113,  116,  130,  134,   53,  143,
+     1357, 1357,    0,  106,    0,  212,    0,  210,  141,    0,
+     1357, 1357,  192,   56,  173, 1357, 1357, 1357, 1357,  168,
+      140,  150,  152,  154,  155,  161,  167,  171,  177,  172,
+      184,  174,  188,  189,  191,  194,  203,  212,  215,  217,
+      219,  221,  226,  228,  231,  240,  233,  235,  246,  251,
+
+      258,  253,  255,  256,  269,  271,  278,  272,  285,  283,
+      287,  289,  296,  305,  298,  315,  319,  321,  322,  326,
+      332,  333,  342,  339,  343,    0,  112,  173, 1357,    0,
+      155,    0,  156,  132,   93,    0,  355,  357,  358,  360,
+      364,  367,  374,  370,  379,  380,  389,  383,  390,  392,
+      395,  408,  411,  409,  415,  418,  425,  427,  429,  436,
+      431,  441,  446,  448,  450,  452,  453,  462,  471,  464,
+      473,  474,  478,  485,  488,  490,  491,  494,  500,  501,
+      504,  506,  507,  517,  518,  519,  520,  521,  522,  523,
+      533,  536,  538,  543,  549,  554,  555,  561,  556,  566,
+
+      567,  576,   60,    0,  573,  578,  580,  582,  583,  593,
+      589,  596,  598,  603,  605,  607,  610,  617,  619,  621,
+      622,  628,  633,  634,  635,  639,  640,  649,  650,  652,
+      653,  655,  659,  664,  668,  669,  665,  671,  674,  678,
+      681,  685,  687,  688,  692,  697,  698,  701,  703,  704,
+      707,  708,  717,  713,  728,  730,  724,  740,  734,  745,
+      746,  750,  751,  756,  757,  760,  761,  762,  771,  773,
+       42,  778,  782,  783,  787,  789,  792,  794,  793,  804,
+      805,  808,  809,  810,  819,  823,  826,  828,  829,  830,
+      835,  840,  844,  846,  847,  856,  857,  858,  859,  860,
+
+      863,  872,  873,  878,  879,  882,  885,  889,  894,  895,
+      896,  898,  905,  910,  908,  912,  914,  915,  926,  930,
+      931,   73,  932,  933,  935,  937,  942,  944,  946,  947,
+      948,  949,  951,  958,  961,  965,  967,  972,  978,  979,
+      981,  984,  983,  985,  994,  988,  999, 1000, 1001, 1004,
+     1013, 1015, 1022, 1016, 1019, 1026, 1032, 1033, 1035, 1036,
+     1038, 1039, 1048, 1049, 1050, 1051, 1053, 1054, 1060, 1063,
+     1065, 1066, 1069, 1070, 1072, 1082, 1084, 1085, 1087, 1096,
+     1097, 1098, 1099, 1101, 1113, 1114, 1115, 1116, 1117, 1118,
+     1119, 1128, 1130, 1131, 1134, 1133, 1135, 1137, 1150, 1151,
+
+     1153, 1155, 1157, 1162, 1160, 1167, 1172, 1173, 1174, 1176,
+     1185, 1190, 1183, 1187, 1189, 1199, 1204, 1206, 1208, 1210,
+     1215, 1220, 1222, 1357, 1269, 1278, 1287, 1290, 1293, 1297,
+     1306, 1315, 1324, 1333, 1340, 1344, 1347
     } ;
 
-static yyconst flex_int16_t yy_def[436] =
+static yyconst flex_int16_t yy_def[438] =
     {   0,
-      423,    1,  424,  424,  425,  425,  426,  426,  423,  423,
-      423,  423,  423,  427,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423,  428,  423,  423,  423,  423,
-      423,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      423,  423,  430,  431,  432,  423,  433,  423,  423,  427,
-      423,  423,  423,  423,  428,  423,  423,  423,  423,  434,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  430,  431,  431,  423,  432,  423,
-      433,  423,  423,  423,  435,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-
-      429,  423,  435,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  423,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      423,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,
-      429,  429,    0,  423,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423
+      424,    1,  425,  425,  426,  426,  427,  427,  424,  424,
+      424,  424,  424,  428,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  429,  424,  424,  424,  424,
+      424,  430,  430,  430,  430,  430,   34,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      424,  424,  431,  432,  433,  424,  434,  424,  424,  428,
+      424,  424,  424,  424,  429,  424,  424,  424,  424,  435,
+      430,  436,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  431,  432,  432,  424,  433,
+      424,  434,  424,  424,  424,  437,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+
+      430,  430,  424,  437,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      424,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  424,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,    0,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424
     } ;
 
-static yyconst flex_int16_t yy_nxt[917] =
+static yyconst flex_int16_t yy_nxt[1414] =
     {   0,
        10,   11,   12,   13,   10,   14,   15,   16,   17,   18,
        19,   20,   21,   22,   23,   24,   25,   26,   27,   28,
-       29,   30,   31,   32,   33,   34,   35,   36,   37,   38,
-       38,   39,   38,   38,   40,   41,   42,   43,   44,   38,
-       45,   46,   47,   48,   49,   50,   38,   38,   38,   38,
-       38,   38,   38,   51,   52,   59,   59,   59,   59,   63,
-       70,   64,   67,   68,   70,  127,   70,   70,   70,   70,
-      128,   70,   70,   70,  122,   63,   74,   64,   70,  149,
-       75,   72,   70,   76,   78,   83,   73,   70,   79,   84,
-       86,   80,   87,  108,   81,   85,   77,   82,   70,   89,
-
-      100,   70,   88,   70,  101,   70,   90,   59,   59,   91,
-      102,   94,   92,   97,  136,   93,   70,   98,  103,   95,
-       70,   70,   70,   99,   96,   70,  104,   70,  105,  117,
-      106,  123,  109,  107,  112,   70,  118,  113,  124,   70,
-       70,  110,  111,  119,   70,   70,  114,   70,   70,  137,
-      115,   70,  143,   70,  116,   70,  120,   70,  121,  139,
-       70,  140,  142,   70,   70,  138,   70,   70,  141,  155,
-      144,  146,  147,  151,   70,  157,  145,   70,  150,  148,
-       70,  154,  152,  158,   70,   70,  156,   70,   70,  153,
-       70,   70,   70,  159,   70,   70,  160,   70,  164,   70,
-
-      169,  163,  161,  168,   70,  171,  162,  174,  175,  167,
-       70,  173,  170,  165,  166,   70,   70,   70,  172,   70,
-       70,  182,   70,  183,  179,   70,  176,  187,   70,  189,
-       70,  177,   70,   70,  184,   70,  185,  178,   70,  180,
-      190,  188,  192,  181,  186,   70,  195,  193,   70,  197,
-      423,  191,   70,   70,  127,  423,  196,  201,   70,  128,
-      204,   70,  194,   70,  198,  199,   70,   70,  205,  200,
-       70,  207,   70,   70,  206,  208,  209,   70,   70,   70,
-       70,   70,   70,  215,   70,   70,  210,  217,   70,   70,
-       70,  222,  213,  211,  221,  214,  212,  225,  216,  220,
-
-      228,  226,   70,  218,  219,   70,   70,   70,   70,   70,
-      229,  223,   70,   70,  224,   70,  227,  231,  232,   70,
-      233,  235,   70,   70,   70,  230,  237,  238,   70,   70,
-       70,  236,   70,   70,  241,  234,  240,  239,   70,   70,
-      247,  242,  243,   70,  245,  244,   70,   70,   70,  248,
-      246,   70,  249,   70,   70,   70,   70,   70,   70,   70,
-      254,   70,   70,   70,   70,  252,  257,  250,  260,  261,
-      265,   70,  264,  258,   70,   70,  255,  251,  259,  256,
-      262,  253,  263,  268,   70,   70,   70,   70,  267,  266,
-       70,   70,  269,   70,   70,   70,  271,   70,   70,  276,
-
-      274,  279,  280,   70,  275,  272,  273,  278,   70,   70,
-      283,   70,   70,   70,   70,   70,  285,  277,   70,   70,
-       70,   70,  281,   70,  282,  284,  289,  287,   70,  290,
-       70,   70,   70,   70,  296,   70,  286,   70,   70,   70,
-       70,   70,  291,  298,   70,  292,  288,  301,  294,  305,
-      293,  307,   70,  295,   70,   70,  299,  297,  303,  300,
-      310,   70,  306,  302,  304,   70,  308,  311,   70,   70,
-       70,  309,   70,   70,   70,   70,   70,  312,   70,   70,
-      313,   70,   70,   70,  316,  318,  319,  320,   70,   70,
-       70,   70,   70,   70,  326,   70,  314,  315,  328,  317,
-
-       70,   70,  330,  322,   70,  323,   70,  334,   70,   70,
-      327,  324,  331,   70,   70,  325,  329,  332,  333,   70,
-      337,  335,  336,  340,   70,  339,   70,  342,   70,   70,
-      343,   70,   70,  338,   70,   70,   70,  341,   70,  347,
-       70,   70,   70,   70,   70,   70,  353,  345,   70,   70,
-       70,  344,  355,  357,  348,  346,   70,  352,   70,  349,
-      350,  351,  354,   70,  356,   70,   70,   70,  365,   70,
-      358,   70,   70,   70,  360,  361,  362,  364,   70,  359,
-       70,   70,   70,  363,   70,  366,   70,   70,  367,   70,
-      369,  373,  368,   70,  374,  376,  375,  371,  372,  370,
-
-       70,  379,  378,   70,   70,  377,   70,   70,   70,  380,
-       70,   70,   70,  383,   70,  382,  381,   70,  386,   70,
-       70,   70,   70,   70,   70,   70,  391,  385,  388,   70,
-      392,  384,  389,  387,  395,   70,  397,  390,   70,  393,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,  398,
-      402,   70,   70,  394,  400,  396,  403,  399,  404,   70,
-      406,  405,   70,  413,  412,   70,  409,   70,  408,  401,
-      407,  411,   70,  414,   70,   70,   70,   70,   70,   70,
-       70,  410,   70,   70,  415,   70,  418,  417,   70,   70,
-       70,   70,  419,   70,   70,   70,   70,  420,   70,  416,
-
-       70,  421,   70,   70,   70,   70,   70,   70,   70,  422,
-       53,   53,   53,   53,   53,   53,   53,   53,   53,   55,
-       55,   55,   55,   55,   55,   55,   55,   55,   57,   57,
-       57,   57,   57,   57,   57,   57,   57,   60,   70,   60,
-       65,   65,   65,   71,   71,   70,   71,  125,  125,  125,
-      125,   70,  125,  125,  125,  125,  126,  126,  126,  126,
-      126,  126,  126,  126,  126,  129,  129,  129,   70,  129,
-      129,  129,  129,  129,  131,   70,  131,  131,  131,  131,
-      131,  131,  131,  135,   70,   70,   70,   70,   70,  135,
-      203,   70,  203,  135,   70,   70,   70,   70,   70,   70,
-
-       70,   70,   70,   70,   70,   70,   70,  321,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,  270,   70,   70,   70,   70,   70,
-       70,   70,   70,  202,  133,  132,  130,   70,   70,   70,
-       70,   70,   70,  134,  423,  133,  132,  130,   70,   69,
-       66,   62,   61,  423,   58,   58,   56,   56,   54,   54,
-        9,  423,  423,  423,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+       29,   30,   31,   10,   32,   33,   34,   35,   36,   37,
+       38,   38,   39,   38,   38,   40,   41,   42,   43,   44,
+       38,   45,   46,   47,   48,   49,   50,   38,   38,   38,
+       38,   38,   38,   38,   51,   52,   59,   59,   59,   59,
+       63,   70,   64,   67,   68,   70,   70,   70,   70,   72,
+       63,   70,   64,   72,   72,   72,   72,  123,   75,   72,
+       84,   70,   76,   73,   85,   77,  136,   79,   74,   72,
+       86,   80,   90,  322,   81,   71,   70,   82,   78,   91,
+
+       83,   87,   92,   88,   72,   93,   70,   70,   94,   70,
+       95,   70,  271,   89,   72,   72,  128,   72,   96,   72,
+       98,  129,  424,   97,   99,  104,   70,  424,   70,  101,
+      100,   70,  102,  105,   72,  106,   72,  107,  103,   72,
+      108,  110,   59,   59,  113,   70,  203,  114,  134,   70,
+      111,  112,  109,   72,  118,   70,  115,   72,   70,  133,
+      116,  119,  131,   72,  117,   70,   72,   70,  120,   70,
+       70,  121,  135,  122,  124,   72,   70,   72,   72,  137,
+      138,  125,   70,  128,   72,  140,   70,   70,  129,   70,
+       72,  141,   70,  424,   72,   72,  139,   72,  142,   70,
+
+       72,  144,  150,   70,   70,  143,   70,   72,  134,   70,
+      145,   72,   72,  133,   72,  152,  146,   72,   70,  131,
+      147,  148,  156,   69,  153,   66,   72,   70,  149,  151,
+       70,  154,   70,  155,   70,   72,   70,   62,   72,  158,
+       72,   70,   72,   70,   72,  157,   70,  159,   70,   72,
+       70,   72,   61,  424,   72,   70,   72,  161,   72,   58,
+      160,   70,  162,   72,  163,  164,   70,  165,   70,   72,
+       70,   70,  168,   70,   72,   58,   72,  170,   72,   72,
+      169,   72,  166,  167,   70,  172,   70,   70,   56,  171,
+      174,   56,   72,   70,   72,   72,  173,   54,   70,  175,
+
+       70,   72,   70,   54,   70,  176,   72,  180,   72,  424,
+       72,   70,   72,   70,  183,  177,  424,  178,  424,   72,
+       70,   72,  181,  179,  184,  424,  182,  424,   72,  188,
+       70,  186,  424,  189,   70,  185,   70,   70,   72,  187,
+      190,   70,   72,  424,   72,   72,  193,   70,   70,   72,
+      194,  191,  424,  424,   70,   72,   72,   70,   70,  424,
+      198,  192,   72,  424,  196,   72,   72,  200,  424,  424,
+       70,  201,   70,   70,  197,   70,  195,  199,   72,   70,
+       72,   72,   70,   72,  202,   70,  205,   72,  424,   70,
+       72,  208,  206,   72,   70,   70,  207,   72,   70,  209,
+
+      210,  424,   72,   72,   70,   70,   72,   70,  424,  216,
+       70,  211,   72,   72,  424,   72,  218,  424,   72,  424,
+      424,  212,  213,   70,   70,  214,   70,  217,  215,  424,
+       70,   72,   72,   70,   72,  223,  219,  220,   72,  222,
+       70,   72,   70,  221,   70,  424,   70,  424,   72,  424,
+       72,   70,   72,  226,   72,  230,   70,  227,  224,   72,
+      225,   70,  229,   70,   72,   70,  424,   70,   70,   72,
+      424,   72,  228,   72,  232,   72,   72,   70,  233,   70,
+      234,  236,  231,  424,  424,   72,   70,   72,   70,   70,
+      424,  237,  238,   70,   72,  235,   72,   72,  240,  239,
+
+       70,   72,  242,   70,  424,   70,   70,  243,   72,   70,
+      424,   72,  241,   72,   72,   70,   70,   72,  246,   70,
+      244,   70,   70,   72,   72,  245,  248,   72,  249,   72,
+       72,  247,   70,   70,   70,   70,   70,   70,   70,  250,
+       72,   72,   72,   72,   72,   72,   72,  255,   70,  424,
+      251,   70,  253,   70,  424,  424,   72,  252,   70,   72,
+      424,   72,  256,  258,   70,  257,   72,  424,  254,   70,
+       70,   70,   72,  259,  261,  262,   70,   72,   72,   72,
+      260,   70,   70,  424,   72,  266,  263,  265,   70,   72,
+       72,   70,  424,   70,  264,   70,   72,   70,   70,   72,
+
+      267,   72,  269,   72,   70,   72,   72,  268,   70,  424,
+      270,   70,   72,   70,  272,  273,   72,  274,   70,   72,
+       70,   72,   70,  275,  277,   70,   72,  276,   72,  280,
+       72,  281,   70,   72,   70,  279,   70,   70,  424,  424,
+       72,  278,   72,   70,   72,   72,  286,  284,   70,   70,
+       70,   72,  424,  282,   70,   70,   72,   72,   72,  285,
+      283,  424,   72,   72,   70,   70,  288,   70,   70,  290,
+       70,  287,   72,   72,   70,   72,   72,  424,   72,   70,
+       70,  291,   72,   70,   70,  289,   70,   72,   72,   70,
+      424,   72,   72,   70,   72,  292,   70,   72,  293,  297,
+
+       70,   72,   70,   70,   72,  295,  294,   70,   72,  296,
+       72,   72,   70,   70,  298,   72,   70,  424,   70,   70,
+       72,   72,   70,   70,   72,  299,   72,   72,   70,  302,
+       72,   72,   70,  424,  424,  424,   72,  424,  300,   70,
+       72,  301,  306,   70,  424,   70,  303,   72,  304,   70,
+      305,   72,  307,   72,  308,   70,  424,   72,  309,  424,
+       70,   70,  312,   72,  311,   70,   70,  310,   72,   72,
+      424,   70,   70,   72,   72,   70,   70,   70,  313,   72,
+       72,  314,  424,   72,   72,   72,   70,  317,   70,  319,
+      320,  424,  424,   70,   72,  315,   72,   70,   70,  321,
+
+      316,   72,   70,  318,   70,   72,   72,   70,   70,   70,
+       72,  424,   72,  424,  424,   72,   72,   72,  424,   70,
+       70,  323,  327,   70,   70,   70,  324,   72,   72,  424,
+      329,   72,   72,   72,   70,  325,  328,  331,   70,  326,
+      424,   70,   72,   70,   70,   70,   72,  332,  330,   72,
+       70,   72,   72,   72,  335,   70,  424,  424,   72,   70,
+      333,   70,   70,   72,  334,  336,  337,   72,  424,   72,
+       72,   70,   70,   70,   70,   70,  338,  424,   70,   72,
+       72,   72,   72,   72,  424,  340,   72,   70,   70,  341,
+      339,  424,  343,   70,   70,   72,   72,   70,  424,  344,
+
+       70,   72,   72,  342,   70,   72,  348,  424,   72,   70,
+       70,   70,   72,   70,  424,  346,  345,   72,   72,   72,
+       70,   72,  347,   70,  424,   70,  349,   70,   72,   70,
+       70,   72,  350,   72,  354,   72,  351,   72,   72,  352,
+      356,   70,  353,  358,  355,   70,   70,   70,   70,   72,
+       70,  357,   70,   72,   72,   72,   72,   70,   72,   70,
+       72,   70,   70,   70,   70,   72,   70,   72,  359,   72,
+       72,   72,   72,   70,   72,  424,   70,  424,  424,  361,
+       70,   72,   70,  362,   72,  360,  365,   70,   72,  363,
+       72,  366,  364,   70,   70,   72,   70,  424,   70,   70,
+
+       70,   72,   72,   70,   72,  367,   72,   72,   72,   70,
+      368,   72,  424,  424,   70,   70,   70,   72,  424,   70,
+      369,  370,   72,   72,   72,  424,  374,   72,   70,  371,
+       70,   70,  424,  375,   70,  372,   72,   70,   72,   72,
+      373,   70,   72,  376,  379,   72,  377,   70,   70,   72,
+       70,   70,  424,   70,   70,   72,   72,  378,   72,   72,
+      380,   72,   72,   70,   70,   70,   70,  383,   70,   70,
+      382,   72,   72,   72,   72,   70,   72,   72,   70,  381,
+       70,   70,  424,   72,   70,   70,   72,   70,   72,   72,
+      387,  386,   72,   72,  384,   72,  385,   70,  424,   70,
+
+       70,  424,   70,  424,  389,   72,  388,   72,   72,  390,
+       72,   70,   70,   70,   70,  392,   70,  424,  424,   72,
+       72,   72,   72,  393,   72,  391,  396,  424,   70,   70,
+       70,   70,   70,   70,   70,  394,   72,   72,   72,   72,
+       72,   72,   72,   70,  398,   70,   70,  395,   70,   70,
+       70,   72,   70,   72,   72,  424,   72,   72,   72,  424,
+       72,  399,  403,  397,  404,   70,   70,  400,   70,  401,
+       70,  424,   70,   72,   72,   70,   72,   70,   72,  405,
+       72,  402,   70,   72,  424,   72,  424,   70,   70,   70,
+       72,   70,  406,  424,  407,   72,   72,   72,   70,   72,
+
+       70,  412,   70,  424,   70,   70,   72,  424,   72,  410,
+       72,  408,   72,   72,   70,  409,  424,  413,  414,   70,
+      415,   70,   72,   70,  411,   70,  424,   72,  416,   72,
+       70,   72,  424,   72,  419,   70,  424,   70,   72,  417,
+      418,  424,  424,   72,  420,   72,  424,  424,  421,  424,
+      424,  424,  424,  424,  424,  424,  422,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  423,   53,
+       53,   53,   53,   53,   53,   53,   53,   53,   55,   55,
+       55,   55,   55,   55,   55,   55,   55,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   60,  424,   60,   65,
+
+       65,   65,   71,   71,  424,   71,  126,  126,  126,  126,
+      424,  126,  126,  126,  126,  127,  127,  127,  127,  127,
+      127,  127,  127,  127,  130,  130,  130,  424,  130,  130,
+      130,  130,  130,  132,  424,  132,  132,  132,  132,  132,
+      132,  132,  136,  424,  424,  424,  424,  424,  136,   72,
+       72,  424,   72,  204,  424,  204,    9,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
 
-      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423,  423
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424
     } ;
 
-static yyconst flex_int16_t yy_chk[917] =
+static yyconst flex_int16_t yy_chk[1414] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,   11,   11,   12,   12,   25,
-       32,   25,   28,   28,   33,   54,   49,   81,   44,   34,
-       54,   36,  422,   35,   49,   64,   33,   64,   41,   81,
-       33,   32,   42,   33,   34,   35,   32,   37,   34,   35,
-       36,   34,   36,   44,   34,   35,   33,   34,   39,   37,
-
-       41,   40,   36,   72,   42,   43,   37,   59,   59,   37,
-       42,   39,   37,   40,   72,   37,   50,   40,   43,   39,
-       45,   47,   46,   40,   39,  415,   43,  404,   43,   47,
-       43,   50,   45,   43,   46,   48,   47,   46,   50,   73,
-       76,   45,   45,   47,   78,   74,   46,   75,   79,   73,
-       46,   80,   78,   82,   46,   84,   48,   85,   48,   74,
-       86,   75,   76,   83,   87,   73,   89,   88,   75,   85,
-       79,   80,   80,   83,   90,   87,   79,   91,   82,   80,
-       93,   84,   83,   88,   92,   98,   86,   95,   97,   83,
-       99,  101,  102,   89,  100,  105,   90,  106,   95,  107,
-
-       99,   93,   91,   98,  111,  100,   92,  105,  106,   97,
-      110,  102,   99,   95,   95,  108,  109,  112,  101,  113,
-      115,  110,  114,  111,  109,  116,  107,  113,  119,  115,
-      120,  108,  124,  117,  111,  118,  112,  108,  121,  109,
-      115,  114,  117,  109,  112,  122,  120,  118,  138,  121,
-      126,  116,  139,  123,  127,  126,  120,  124,  140,  127,
-      138,  143,  119,  141,  122,  123,  142,  144,  139,  123,
-      145,  141,  146,  147,  140,  142,  142,  148,  150,  149,
-      151,  153,  152,  147,  154,  156,  143,  149,  155,  158,
-      159,  153,  146,  144,  152,  146,  145,  156,  148,  151,
-
-      159,  156,  160,  150,  150,  162,  164,  163,  165,  166,
-      160,  154,  167,  170,  155,  168,  158,  163,  164,  169,
-      165,  166,  171,  173,  174,  162,  167,  168,  172,  177,
-      178,  166,  175,  180,  171,  165,  170,  169,  179,  181,
-      178,  172,  173,  182,  175,  174,  183,  184,  185,  179,
-      177,  187,  180,  189,  192,  191,  196,  193,  195,  194,
-      185,  198,  197,  199,  200,  183,  191,  181,  194,  194,
-      197,  204,  196,  192,  201,  207,  187,  182,  193,  189,
-      194,  184,  195,  200,  205,  206,  209,  211,  199,  198,
-      212,  213,  201,  214,  215,  216,  204,  217,  218,  211,
-
-      207,  214,  215,  219,  209,  205,  206,  213,  220,  221,
-      218,  223,  224,  226,  228,  229,  220,  212,  231,  232,
-      235,  242,  216,  233,  217,  219,  226,  223,  234,  228,
-      237,  245,  246,  250,  235,  247,  221,  249,  251,  253,
-      252,  254,  229,  242,  256,  231,  224,  247,  233,  252,
-      232,  254,  257,  234,  255,  258,  245,  237,  250,  246,
-      257,  260,  253,  249,  251,  261,  255,  258,  262,  263,
-      264,  256,  265,  266,  267,  268,  271,  260,  273,  274,
-      261,  275,  277,  278,  264,  266,  267,  268,  279,  280,
-      282,  283,  284,  285,  277,  286,  262,  263,  279,  265,
-
-      287,  288,  282,  271,  292,  273,  294,  286,  297,  298,
-      278,  274,  283,  296,  300,  275,  280,  284,  285,  301,
-      292,  287,  288,  297,  302,  296,  303,  300,  304,  306,
-      301,  305,  307,  294,  310,  309,  312,  298,  313,  305,
-      315,  317,  314,  316,  318,  324,  313,  303,  325,  328,
-      326,  302,  315,  317,  306,  304,  331,  312,  335,  307,
-      309,  310,  314,  336,  316,  333,  337,  339,  335,  341,
-      318,  343,  344,  346,  325,  326,  328,  333,  348,  324,
-      353,  347,  359,  331,  351,  336,  365,  352,  337,  356,
-      341,  347,  339,  354,  348,  352,  351,  344,  346,  343,
-
-      360,  356,  354,  361,  366,  353,  367,  369,  370,  359,
-      373,  374,  376,  365,  378,  361,  360,  380,  369,  379,
-      381,  384,  389,  382,  387,  390,  378,  367,  373,  391,
-      379,  366,  374,  370,  382,  393,  387,  376,  394,  380,
-      401,  406,  405,  396,  403,  398,  407,  408,  410,  389,
-      394,  411,  412,  381,  391,  384,  396,  390,  398,  413,
-      403,  401,  409,  411,  410,  414,  407,  416,  406,  393,
-      405,  409,  418,  412,  417,  419,  420,  421,  402,  400,
-      399,  408,  397,  395,  413,  392,  417,  416,  388,  386,
-      385,  383,  418,  377,  375,  372,  371,  419,  368,  414,
-
-      364,  420,  363,  362,  358,  357,  355,  350,  349,  421,
-      424,  424,  424,  424,  424,  424,  424,  424,  424,  425,
+        1,    1,    1,    1,    1,    1,   11,   11,   12,   12,
+       25,   32,   25,   28,   28,   33,   38,   35,   49,   32,
+       64,   34,   64,   33,   38,   35,   49,   49,   33,   34,
+       35,   36,   33,   32,   35,   33,  322,   34,   32,   36,
+       35,   34,   37,  271,   34,   37,   39,   34,   33,   37,
+
+       34,   36,   37,   36,   39,   37,   41,   40,   37,   42,
+       39,   43,  203,   36,   41,   40,   54,   42,   39,   43,
+       40,   54,  127,   39,   40,   43,   44,  127,   45,   41,
+       40,   46,   42,   43,   44,   43,   45,   43,   42,   46,
+       43,   45,   59,   59,   46,   47,  135,   46,  134,   48,
+       45,   45,   44,   47,   47,   71,   46,   48,   50,  133,
+       46,   47,  131,   71,   46,   72,   50,   73,   47,   74,
+       75,   48,   70,   48,   50,   73,   76,   74,   75,   73,
+       74,   50,   77,  128,   76,   75,   78,   80,  128,   82,
+       77,   76,   79,   65,   78,   80,   74,   82,   76,   81,
+
+       79,   79,   82,   83,   84,   77,   85,   81,   63,   86,
+       80,   83,   84,   58,   85,   84,   80,   86,   87,   56,
+       81,   81,   86,   30,   84,   26,   87,   88,   81,   83,
+       89,   84,   90,   85,   91,   88,   92,   24,   89,   88,
+       90,   93,   91,   94,   92,   87,   95,   89,   97,   93,
+       98,   94,   23,    9,   95,   96,   97,   91,   98,    8,
+       90,   99,   92,   96,   93,   94,  100,   96,  102,   99,
+      103,  104,   98,  101,  100,    7,  102,  100,  103,  104,
+       99,  101,   96,   96,  105,  101,  106,  108,    6,  100,
+      103,    5,  105,  107,  106,  108,  102,    4,  110,  106,
+
+      109,  107,  111,    3,  112,  107,  110,  110,  109,    0,
+      111,  113,  112,  115,  111,  108,    0,  109,    0,  113,
+      114,  115,  110,  109,  112,    0,  110,    0,  114,  114,
+      116,  113,    0,  115,  117,  112,  118,  119,  116,  113,
+      116,  120,  117,    0,  118,  119,  118,  121,  122,  120,
+      119,  116,    0,    0,  124,  121,  122,  123,  125,    0,
+      122,  117,  124,    0,  121,  123,  125,  124,    0,    0,
+      137,  124,  138,  139,  121,  140,  120,  123,  137,  141,
+      138,  139,  142,  140,  125,  144,  139,  141,    0,  143,
+      142,  142,  140,  144,  145,  146,  141,  143,  148,  143,
+
+      143,    0,  145,  146,  147,  149,  148,  150,    0,  148,
+      151,  144,  147,  149,    0,  150,  150,    0,  151,    0,
+        0,  145,  146,  152,  154,  147,  153,  149,  147,    0,
+      155,  152,  154,  156,  153,  154,  151,  151,  155,  153,
+      157,  156,  158,  152,  159,    0,  161,    0,  157,    0,
+      158,  160,  159,  157,  161,  161,  162,  157,  155,  160,
+      156,  163,  160,  164,  162,  165,    0,  166,  167,  163,
+        0,  164,  159,  165,  164,  166,  167,  168,  165,  170,
+      166,  167,  163,    0,    0,  168,  169,  170,  171,  172,
+        0,  167,  168,  173,  169,  166,  171,  172,  170,  169,
+
+      174,  173,  172,  175,    0,  176,  177,  173,  174,  178,
+        0,  175,  171,  176,  177,  179,  180,  178,  176,  181,
+      174,  182,  183,  179,  180,  175,  179,  181,  180,  182,
+      183,  178,  184,  185,  186,  187,  188,  189,  190,  181,
+      184,  185,  186,  187,  188,  189,  190,  186,  191,    0,
+      182,  192,  184,  193,    0,    0,  191,  183,  194,  192,
+        0,  193,  188,  192,  195,  190,  194,    0,  185,  196,
+      197,  199,  195,  193,  195,  195,  198,  196,  197,  199,
+      194,  200,  201,    0,  198,  198,  195,  197,  205,  200,
+      201,  202,    0,  206,  196,  207,  205,  208,  209,  202,
+
+      199,  206,  201,  207,  211,  208,  209,  200,  210,    0,
+      202,  212,  211,  213,  205,  206,  210,  207,  214,  212,
+      215,  213,  216,  208,  212,  217,  214,  210,  215,  215,
+      216,  216,  218,  217,  219,  214,  220,  221,    0,    0,
+      218,  213,  219,  222,  220,  221,  221,  219,  223,  224,
+      225,  222,    0,  217,  226,  227,  223,  224,  225,  220,
+      218,    0,  226,  227,  228,  229,  224,  230,  231,  227,
+      232,  222,  228,  229,  233,  230,  231,    0,  232,  234,
+      237,  229,  233,  235,  236,  225,  238,  234,  237,  239,
+        0,  235,  236,  240,  238,  230,  241,  239,  232,  236,
+
+      242,  240,  243,  244,  241,  234,  233,  245,  242,  235,
+      243,  244,  246,  247,  238,  245,  248,    0,  249,  250,
+      246,  247,  251,  252,  248,  243,  249,  250,  254,  248,
+      251,  252,  253,    0,    0,    0,  254,    0,  246,  257,
+      253,  247,  253,  255,    0,  256,  250,  257,  251,  259,
+      252,  255,  254,  256,  255,  258,    0,  259,  256,    0,
+      260,  261,  259,  258,  258,  262,  263,  257,  260,  261,
+        0,  264,  265,  262,  263,  266,  267,  268,  261,  264,
+      265,  262,    0,  266,  267,  268,  269,  265,  270,  267,
+      268,    0,    0,  272,  269,  263,  270,  273,  274,  269,
+
+      264,  272,  275,  266,  276,  273,  274,  277,  279,  278,
+      275,    0,  276,    0,    0,  277,  279,  278,    0,  280,
+      281,  272,  278,  282,  283,  284,  274,  280,  281,    0,
+      280,  282,  283,  284,  285,  275,  279,  283,  286,  276,
+        0,  287,  285,  288,  289,  290,  286,  284,  281,  287,
+      291,  288,  289,  290,  287,  292,    0,    0,  291,  293,
+      285,  294,  295,  292,  286,  288,  289,  293,    0,  294,
+      295,  296,  297,  298,  299,  300,  293,    0,  301,  296,
+      297,  298,  299,  300,    0,  297,  301,  302,  303,  298,
+      295,    0,  301,  304,  305,  302,  303,  306,    0,  302,
+
+      307,  304,  305,  299,  308,  306,  306,    0,  307,  309,
+      310,  311,  308,  312,    0,  304,  303,  309,  310,  311,
+      313,  312,  305,  315,    0,  314,  307,  316,  313,  317,
+      318,  315,  308,  314,  314,  316,  310,  317,  318,  311,
+      316,  319,  313,  318,  315,  320,  321,  323,  324,  319,
+      325,  317,  326,  320,  321,  323,  324,  327,  325,  328,
+      326,  329,  330,  331,  332,  327,  333,  328,  319,  329,
+      330,  331,  332,  334,  333,    0,  335,    0,    0,  326,
+      336,  334,  337,  327,  335,  325,  334,  338,  336,  329,
+      337,  336,  332,  339,  340,  338,  341,    0,  343,  342,
+
+      344,  339,  340,  346,  341,  337,  343,  342,  344,  345,
+      338,  346,    0,    0,  347,  348,  349,  345,    0,  350,
+      340,  342,  347,  348,  349,    0,  348,  350,  351,  344,
+      352,  354,    0,  349,  355,  345,  351,  353,  352,  354,
+      347,  356,  355,  352,  355,  353,  353,  357,  358,  356,
+      359,  360,    0,  361,  362,  357,  358,  354,  359,  360,
+      357,  361,  362,  363,  364,  365,  366,  362,  367,  368,
+      361,  363,  364,  365,  366,  369,  367,  368,  370,  360,
+      371,  372,    0,  369,  373,  374,  370,  375,  371,  372,
+      370,  368,  373,  374,  366,  375,  367,  376,    0,  377,
+
+      378,    0,  379,    0,  374,  376,  371,  377,  378,  375,
+      379,  380,  381,  382,  383,  379,  384,    0,    0,  380,
+      381,  382,  383,  380,  384,  377,  383,    0,  385,  386,
+      387,  388,  389,  390,  391,  381,  385,  386,  387,  388,
+      389,  390,  391,  392,  388,  393,  394,  382,  396,  395,
+      397,  392,  398,  393,  394,    0,  396,  395,  397,    0,
+      398,  390,  395,  385,  397,  399,  400,  391,  401,  392,
+      402,    0,  403,  399,  400,  405,  401,  404,  402,  399,
+      403,  394,  406,  405,    0,  404,    0,  407,  408,  409,
+      406,  410,  402,    0,  404,  407,  408,  409,  413,  410,
+
+      411,  410,  414,    0,  415,  412,  413,    0,  411,  408,
+      414,  406,  415,  412,  416,  407,    0,  411,  412,  417,
+      413,  418,  416,  419,  409,  420,    0,  417,  414,  418,
+      421,  419,    0,  420,  418,  422,    0,  423,  421,  415,
+      417,    0,    0,  422,  419,  423,    0,    0,  420,    0,
+        0,    0,    0,    0,    0,    0,  421,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,  422,  425,
       425,  425,  425,  425,  425,  425,  425,  425,  426,  426,
-      426,  426,  426,  426,  426,  426,  426,  427,  345,  427,
-      428,  428,  428,  429,  429,  342,  429,  430,  430,  430,
-      430,  340,  430,  430,  430,  430,  431,  431,  431,  431,
-      431,  431,  431,  431,  431,  432,  432,  432,  338,  432,
-      432,  432,  432,  432,  433,  334,  433,  433,  433,  433,
-      433,  433,  433,  434,  332,  330,  329,  327,  323,  434,
-      435,  322,  435,  321,  320,  319,  311,  308,  299,  295,
-
-      293,  291,  290,  289,  281,  276,  272,  270,  269,  259,
-      248,  244,  243,  241,  240,  239,  238,  236,  230,  227,
-      225,  222,  210,  208,  202,  190,  188,  186,  176,  161,
-      157,  137,  136,  134,  133,  132,  130,  104,  103,   96,
-       94,   77,   71,   70,   65,   63,   58,   56,   38,   30,
-       26,   24,   23,    9,    8,    7,    6,    5,    4,    3,
-      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      426,  426,  426,  426,  426,  426,  426,  427,  427,  427,
+      427,  427,  427,  427,  427,  427,  428,    0,  428,  429,
+
+      429,  429,  430,  430,    0,  430,  431,  431,  431,  431,
+        0,  431,  431,  431,  431,  432,  432,  432,  432,  432,
+      432,  432,  432,  432,  433,  433,  433,    0,  433,  433,
+      433,  433,  433,  434,    0,  434,  434,  434,  434,  434,
+      434,  434,  435,    0,    0,    0,    0,    0,  435,  436,
+      436,    0,  436,  437,    0,  437,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
 
-      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
-      423,  423,  423,  423,  423,  423
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -847,6 +966,7 @@ Created 12/14/1997 Heikki Tuuri
 #define realloc(P, A)	ut_realloc(P, A)
 #define exit(A) 	ut_error
 
+/* Note: We cast &result to int* from yysize_t* */
 #define YY_INPUT(buf, result, max_size) \
 	(result = pars_get_lex_chars(buf, max_size))
 
@@ -883,7 +1003,7 @@ string_append(
 
 
 
-#line 887 "lexyy.cc"
+#line 1006 "lexyy.cc"
 
 #define INITIAL 0
 #define comment 1
@@ -965,7 +1085,12 @@ static int input (void );
 
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
 #define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -973,7 +1098,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -984,7 +1109,7 @@ static int input (void );
 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 		{ \
 		int c = '*'; \
-		yy_size_t n; \
+		size_t n; \
 		for ( n = 0; n < max_size && \
 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
@@ -1069,7 +1194,7 @@ YY_DECL
 #line 112 "pars0lex.l"
 
 
-#line 1073 "lexyy.cc"
+#line 1197 "lexyy.cc"
 
 	if ( !(yy_init) )
 		{
@@ -1122,13 +1247,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 424 )
+				if ( yy_current_state >= 425 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_current_state != 423 );
+		while ( yy_current_state != 424 );
 		yy_cp = (yy_last_accepting_cpos);
 		yy_current_state = (yy_last_accepting_state);
 
@@ -2109,7 +2234,7 @@ YY_RULE_SETUP
 #line 691 "pars0lex.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
 	YY_BREAK
-#line 2113 "lexyy.cc"
+#line 2237 "lexyy.cc"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(comment):
 case YY_STATE_EOF(quoted):
@@ -2299,7 +2424,7 @@ static int yy_get_next_buffer (void)
 
 	else
 		{
-			yy_size_t num_to_read =
+			int num_to_read =
 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 
 		while ( num_to_read <= 0 )
@@ -2313,16 +2438,16 @@ static int yy_get_next_buffer (void)
 
 			if ( b->yy_is_our_buffer )
 				{
-				yy_size_t new_size = b->yy_buf_size * 2;
+				int new_size = b->yy_buf_size * 2;
 
 				if ( new_size <= 0 )
 					b->yy_buf_size += b->yy_buf_size / 8;
 				else
 					b->yy_buf_size *= 2;
 
-				b->yy_ch_buf = (char*)
+				b->yy_ch_buf = (char *)
 					/* Include room in for 2 EOB chars. */
-					yyrealloc((void*) b->yy_ch_buf,b->yy_buf_size + 2  );
+					yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
 				}
 			else
 				/* Can't grow it, we don't own it. */
@@ -2344,7 +2469,7 @@ static int yy_get_next_buffer (void)
 
 		/* Read in more data. */
 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-			(yy_n_chars), num_to_read );
+			(yy_n_chars), (size_t) num_to_read );
 
 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 		}
@@ -2371,7 +2496,7 @@ static int yy_get_next_buffer (void)
 	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
 		/* Extend the array by 50%, plus the number we really need. */
 		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char*) yyrealloc((void*) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
+		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
 	}
@@ -2387,7 +2512,7 @@ static int yy_get_next_buffer (void)
 
 /* yy_get_previous_state - get the state just before the EOB char was reached */
 
-    static yy_state_type yy_get_previous_state (void)
+     yy_state_type yy_get_previous_state (void)
 {
 	register yy_state_type yy_current_state;
 	register char *yy_cp;
@@ -2405,7 +2530,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 424 )
+			if ( yy_current_state >= 425 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2419,7 +2544,7 @@ static int yy_get_next_buffer (void)
  * synopsis
  *	next_state = yy_try_NUL_trans( current_state );
  */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
+     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
 {
 	register int yy_is_jam;
     	register char *yy_cp = (yy_c_buf_p);
@@ -2433,11 +2558,11 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 424 )
+		if ( yy_current_state >= 425 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 423);
+	yy_is_jam = (yy_current_state == 424);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2466,7 +2591,7 @@ static int yy_get_next_buffer (void)
 
 		else
 			{ /* need more input */
-			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+			int offset = (int)((yy_c_buf_p) - (yytext_ptr));
 			++(yy_c_buf_p);
 
 			switch ( yy_get_next_buffer(  ) )
@@ -2490,7 +2615,7 @@ static int yy_get_next_buffer (void)
 				case EOB_ACT_END_OF_FILE:
 					{
 					if ( yywrap( ) )
-						return 0;
+						return EOF;
 
 					if ( ! (yy_did_buffer_switch_on_eof) )
 						YY_NEW_FILE;
@@ -2508,7 +2633,7 @@ static int yy_get_next_buffer (void)
 			}
 		}
 
-	c = *(unsigned char*) (yy_c_buf_p);	/* cast for 8-bit char's */
+	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
 	*(yy_c_buf_p) = '\0';	/* preserve yytext */
 	(yy_hold_char) = *++(yy_c_buf_p);
 
@@ -2518,7 +2643,7 @@ static int yy_get_next_buffer (void)
 
 /** Immediately switch to a different input stream.
  * @param input_file A readable stream.
- *
+ * 
  * @note This function does not reset the start condition to @c INITIAL .
  */
     void yyrestart  (FILE * input_file )
@@ -2536,7 +2661,7 @@ static int yy_get_next_buffer (void)
 
 /** Switch to a different input buffer.
  * @param new_buffer The new input buffer.
- *
+ * 
  */
     __attribute__((unused)) static void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 {
@@ -2580,7 +2705,7 @@ static void yy_load_buffer_state  (void)
 /** Allocate and initialize an input buffer state.
  * @param file A readable stream.
  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
+ * 
  * @return the allocated buffer state.
  */
     static YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
@@ -2596,7 +2721,7 @@ static void yy_load_buffer_state  (void)
 	/* yy_ch_buf has to be 2 characters longer than the size given because
 	 * we need to put in 2 end-of-buffer characters.
 	 */
-	b->yy_ch_buf = (char*) yyalloc(b->yy_buf_size + 2  );
+	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
 	if ( ! b->yy_ch_buf )
 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
@@ -2609,9 +2734,9 @@ static void yy_load_buffer_state  (void)
 
 /** Destroy the buffer.
  * @param b a buffer created with yy_create_buffer()
- *
+ * 
  */
-    void yy_delete_buffer (YY_BUFFER_STATE  b )
+     void yy_delete_buffer (YY_BUFFER_STATE  b )
 {
 
 	if ( ! b )
@@ -2621,20 +2746,20 @@ static void yy_load_buffer_state  (void)
 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
 
 	if ( b->yy_is_our_buffer )
-		yyfree((void*) b->yy_ch_buf  );
+		yyfree((void *) b->yy_ch_buf  );
 
-	yyfree((void*) b  );
+	yyfree((void *) b  );
 }
 
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
  * such as during a yyrestart() or at EOF.
  */
-    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 
 {
 	int oerrno = errno;
-
+ 
 	yy_flush_buffer(b );
 
 	b->yy_input_file = file;
@@ -2650,13 +2775,13 @@ static void yy_load_buffer_state  (void)
     }
 
         b->yy_is_interactive = 0;
-
+    
 	errno = oerrno;
 }
 
 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
+ * 
  */
     void yy_flush_buffer (YY_BUFFER_STATE  b )
 {
@@ -2685,7 +2810,7 @@ static void yy_load_buffer_state  (void)
  *  the current state. This function will allocate the stack
  *  if necessary.
  *  @param new_buffer The new state.
- *
+ *  
  */
 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
 {
@@ -2715,7 +2840,7 @@ void yypush_buffer_state (YY_BUFFER_STAT
 
 /** Removes and deletes the top of the stack, if present.
  *  The next element becomes the new top.
- *
+ *  
  */
 void yypop_buffer_state (void)
 {
@@ -2738,8 +2863,8 @@ void yypop_buffer_state (void)
  */
 static void yyensure_buffer_stack (void)
 {
-	yy_size_t num_to_alloc;
-
+	int num_to_alloc;
+    
 	if (!(yy_buffer_stack)) {
 
 		/* First allocation is just for 2 elements, since we don't know if this
@@ -2747,7 +2872,7 @@ static void yyensure_buffer_stack (void)
 		 * immediate realloc on the next call.
          */
 		num_to_alloc = 1;
-		(yy_buffer_stack) = (struct yy_buffer_state**) yyalloc
+		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
 								(num_to_alloc * sizeof(struct yy_buffer_state*)
 								);
 		if ( ! (yy_buffer_stack) )
@@ -2766,7 +2891,7 @@ static void yyensure_buffer_stack (void)
 		int grow_size = 8 /* arbitrary grow size */;
 
 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
-		(yy_buffer_stack) = (struct yy_buffer_state**) yyrealloc
+		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
 								((yy_buffer_stack),
 								num_to_alloc * sizeof(struct yy_buffer_state*)
 								);
@@ -2809,7 +2934,7 @@ static void yy_fatal_error (yyconst char
 /* Accessor  methods (get/set functions) to struct members. */
 
 /** Get the current line number.
- *
+ * 
  */
 int yyget_lineno  (void)
 {
@@ -2818,7 +2943,7 @@ int yyget_lineno  (void)
 }
 
 /** Get the input stream.
- *
+ * 
  */
 FILE *yyget_in  (void)
 {
@@ -2826,7 +2951,7 @@ FILE *yyget_in  (void)
 }
 
 /** Get the output stream.
- *
+ * 
  */
 FILE *yyget_out  (void)
 {
@@ -2834,7 +2959,7 @@ FILE *yyget_out  (void)
 }
 
 /** Get the length of the current token.
- *
+ * 
  */
 yy_size_t yyget_leng  (void)
 {
@@ -2842,7 +2967,7 @@ yy_size_t yyget_leng  (void)
 }
 
 /** Get the current token.
- *
+ * 
  */
 
 char *yyget_text  (void)
@@ -2852,18 +2977,18 @@ char *yyget_text  (void)
 
 /** Set the current line number.
  * @param line_number
- *
+ * 
  */
 void yyset_lineno (int  line_number )
 {
-
+ 
     yylineno = line_number;
 }
 
 /** Set the input stream. This does not discard the current
  * input buffer.
  * @param in_str A readable stream.
- *
+ * 
  * @see yy_switch_to_buffer
  */
 void yyset_in (FILE *  in_str )
@@ -2895,7 +3020,7 @@ static int yy_init_globals (void)
     (yy_buffer_stack) = 0;
     (yy_buffer_stack_top) = 0;
     (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = (char*) 0;
+    (yy_c_buf_p) = (char *) 0;
     (yy_init) = 0;
     (yy_start) = 0;
 
@@ -2904,8 +3029,8 @@ static int yy_init_globals (void)
     yyin = stdin;
     yyout = stdout;
 #else
-    yyin = (FILE*) 0;
-    yyout = (FILE*) 0;
+    yyin = (FILE *) 0;
+    yyout = (FILE *) 0;
 #endif
 
     /* For future reference: Set errno on error, since we are called by
@@ -2917,7 +3042,7 @@ static int yy_init_globals (void)
 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
 __attribute__((unused)) static int yylex_destroy  (void)
 {
-
+ 
     /* Pop the buffer stack, destroying each element. */
 	while(YY_CURRENT_BUFFER){
 		yy_delete_buffer(YY_CURRENT_BUFFER  );
@@ -2962,24 +3087,24 @@ static int yy_flex_strlen (yyconst char
 
 void *yyalloc (yy_size_t  size )
 {
-	return (void*) malloc( size );
+	return (void *) malloc( size );
 }
 
 void *yyrealloc  (void * ptr, yy_size_t  size )
 {
-	/* The cast to (char*) in the following accommodates both
+	/* The cast to (char *) in the following accommodates both
 	 * implementations that use char* generic pointers, and those
 	 * that use void* generic pointers.  It works with the latter
 	 * because both ANSI C and C++ allow castless assignment from
 	 * any pointer type to void*, and deal with argument conversions
 	 * as though doing an assignment.
 	 */
-	return (void*) realloc( (char*) ptr, size );
+	return (void *) realloc( (char *) ptr, size );
 }
 
 void yyfree (void * ptr )
 {
-	free( (char*) ptr );	/* see yyrealloc() for (char*) cast */
+	free( (char*) ptr );	/* see yyrealloc() for (char *) cast */
 }
 
 #define YYTABLES_NAME "yytables"

=== modified file 'storage/innobase/pars/pars0lex.l'
--- a/storage/innobase/pars/pars0lex.l	revid:marko.makela@stripped0zro1il2imn
+++ b/storage/innobase/pars/pars0lex.l	revid:marko.makela@stripped
@@ -102,7 +102,7 @@ string_append(
 
 DIGIT		[0-9]
 ID		[a-z_A-Z][a-z_A-Z0-9]*
-TABLE_NAME	[a-z_A-Z][a-z_A-Z0-9]*\/(#sql-|[a-z_A-Z])[a-z_A-Z0-9]*
+TABLE_NAME	[a-z_A-Z][@a-z_A-Z0-9]*\/(#sql-|[a-z_A-Z])[a-z_A-Z0-9]*
 BOUND_LIT	\:[a-z_A-Z0-9]+
 BOUND_ID	\$[a-z_A-Z0-9]+
 

=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc	revid:marko.makela@strippedif0zro1il2imn
+++ b/storage/myisam/ha_myisam.cc	revid:marko.makela@stripped
@@ -1029,6 +1029,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK
   int error=0;
   uint local_testflag=param.testflag;
   bool optimize_done= !do_optimize, statistics_done=0;
+  bool has_old_locks= thd->locked_tables_mode || file->lock_type != F_UNLCK;
   const char *old_proc_info=thd->proc_info;
   char fixed_name[FN_REFLEN];
   MYISAM_SHARE* share = file->s;
@@ -1047,8 +1048,8 @@ int ha_myisam::repair(THD *thd, MI_CHECK
   // Release latches since this can take a long time
   ha_release_temporary_latches(thd);
 
-  // Don't lock tables if we have used LOCK TABLE
-  if (! thd->locked_tables_mode &&
+  // Don't lock tables if we have used LOCK TABLE or already locked.
+  if (!has_old_locks &&
       mi_lock_database(file, table->s->tmp_table ? F_EXTRA_LCK : F_WRLCK))
   {
     char errbuf[MYSYS_STRERROR_SIZE];
@@ -1176,7 +1177,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK
     update_state_info(&param, file, 0);
   }
   thd_proc_info(thd, old_proc_info);
-  if (! thd->locked_tables_mode)
+  if (!has_old_locks)
     mi_lock_database(file,F_UNLCK);
   DBUG_RETURN(error ? HA_ADMIN_FAILED :
 	      !optimize_done ? HA_ADMIN_ALREADY_DONE : HA_ADMIN_OK);

=== modified file 'storage/perfschema/gen_pfs_lex_token.cc'
--- a/storage/perfschema/gen_pfs_lex_token.cc	revid:marko.makela@stripped55-2lhif0zro1il2imn
+++ b/storage/perfschema/gen_pfs_lex_token.cc	revid:marko.makela@strippedrhn6fgm8lwfk6
@@ -243,7 +243,7 @@ void print_tokens()
 int main(int argc,char **argv)
 {
   puts("/*");
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2011, 2012"));
   puts("*/");
 
   printf("/*\n");

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5545 branch (marko.makela:3897 to 3900) marko.makela20 Apr