1. 27 Aug, 2007 16 commits
    • unknown's avatar
      Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22 · ad4ee206
      unknown authored
      into  ramayana.hindu.god:/home/tsmith/m/bk/51-target22-X
      
      
      sql/ha_partition.cc:
        Auto merged
      ad4ee206
    • unknown's avatar
      Bug #30412 and Bug #30413 · 048775df
      unknown authored
      Update some tests in the "parts" suite, so they're skipped if the
      requisite plugins are not present in the mysqld.
      
      
      mysql-test/suite/parts/t/partition_char_innodb.test:
        Skip if mysqld doesn't include InnoDB support
      mysql-test/suite/parts/t/partition_datetime_innodb.test:
        Skip if mysqld doesn't include InnoDB support
      mysql-test/suite/parts/t/partition_decimal_innodb.test:
        Skip if mysqld doesn't include InnoDB support
      mysql-test/suite/parts/t/partition_float_innodb.test:
        Skip if mysqld doesn't include InnoDB support
      mysql-test/suite/parts/t/partition_int_innodb.test:
        Skip if mysqld doesn't include InnoDB support
      mysql-test/suite/parts/t/partition_special_innodb.test:
        Skip if mysqld doesn't include InnoDB support
      mysql-test/suite/parts/t/rpl_partition.test:
        Skip if mysqld doesn't include partition support
      048775df
    • unknown's avatar
      Fixes for the following bugs: · bfed329e
      unknown authored
      Bug #30316: Some "parts" tests fail because the server uses "--secure-file-priv"
      Bug #30341: Test suite "parts" needs to be adapted to the new rules disallowing many functio
      Bug #30408: Suite "parts" needs bug numbers updated
      Bug #30411: Suite "parts" needs bug numbers updated: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
      Bug #30576: part_supported_sql_func_innodb.test tries to LOAD DATA outside of var dir
      Bug #30581: partition_value tests use disallowed CAST() function
      
      Included are some general fixes to allow the "parts" test suite to be run
      successfully.  This includes disabling a few tests or parts of tests,
      cleaning up the test cases and their results, etc.  Basically, these tests
      have not been run for some time, and had suffered some bit rot.
      
      The bugs were fixed as a single changeset, because in some ways they depend
      on each other.  I couldn't be sure I'd updated all the error codes (for
      bugs 30408 and 30411) without also adapting to the new allowed functions
      rules (bug 30341), and vice versa.
      
      
      mysql-test/include/partition_layout.inc:
        Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
      mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc:
        Add ASCII(), ORD() and WEEKOFYEAR() as blocked functions (they depend
        too much on character set, etc.).
        
        Remove DATEDIFF() as a blocked function (it is implemented in terms
        of TO_DAYS() and the minus operator).
      mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc:
        Remove ASCII(), ORD() and WEEKOFYEAR(), which are not allowed functions.
        
        Remove uses of CAST() in partitioning functions - it is not allowed.
        
        Disable testing of FLOOR() and CEILING on non-integer fields, due to
        Bug 30577.
        
        Test MOD() with an integer field instead of floating point (it has a
        hybrid result type, like FLOOR() and CEILING(), but makes sense to use
        with an integer field).
        
        Add DATEDIFF() as an allowed function, because it is implemented in
        terms of TO_DAYS() and the minus operator.
      mysql-test/suite/parts/inc/partition_alter3.inc:
        Remove use of disallowed CAST() function in partitioning
      mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc:
        The blocked functions are actually blocked now, so expect errors.
        
        This is a result of the fix for bug 18198.
      mysql-test/suite/parts/inc/partition_date.inc:
        Remove uses of CAST() in partitioning functions - it is not allowed.
      mysql-test/suite/parts/inc/partition_datetime.inc:
        Remove uses of CAST() in partitioning functions - it is not allowed.
      mysql-test/suite/parts/inc/partition_decimal.inc:
        Remove uses of CAST() in partitioning functions - it is not allowed.
        
        Disable testing of FLOOR() and CEILING(), due to Bug 30577.
      mysql-test/suite/parts/inc/partition_directory.inc:
        Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
      mysql-test/suite/parts/inc/partition_double.inc:
        Remove uses of CAST() in partitioning functions - it is not allowed.
        
        Disable testing of FLOOR() and CEILING(), due to Bug 30577.
      mysql-test/suite/parts/inc/partition_enum.inc:
        Remove use of CAST(), which is disallowed.
        
        Remove test which relies on CAST().
      mysql-test/suite/parts/inc/partition_float.inc:
        Remove uses of CAST() in partitioning functions - it is not allowed.
        
        Disable testing of FLOOR() and CEILING(), due to Bug 30577.
      mysql-test/suite/parts/inc/partition_layout_check1.inc:
        Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
      mysql-test/suite/parts/inc/partition_layout_check2.inc:
        Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
      mysql-test/suite/parts/inc/partition_methods1.inc:
        Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
      mysql-test/suite/parts/inc/partition_set.inc:
        Remove test which relies on CAST(), which is disallowed.
      mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc:
        Fix Bug #30576: part_supported_sql_func_innodb.test tries to LOAD DATA outside of var dir
        
        Move data files into std_data/parts/*, so they can be used with LOAD
        DATA INFILE '../std_data_ln/parts/*' while --secure-file-priv is in
        force.
      mysql-test/suite/parts/inc/partition_syntax.inc:
        Remove use of CAST(), which is disallowed.
      mysql-test/suite/parts/inc/partition_time.inc:
        Remove use of CAST(), which is disallowed.
      mysql-test/suite/parts/inc/partition_timestamp.inc:
        Remove use of CAST(), which is disallowed.
      mysql-test/suite/parts/inc/partition_value.inc:
        Disable this entire test file, because it relies on using CAST() as
        a partitioning function, which is disallowed.  See Bug 30581,
        "partition_value tests use disallowed CAST() function".
      mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result:
        Update test case results
      mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result:
        Update test case results
      mysql-test/suite/parts/r/part_supported_sql_func_innodb.result:
        Update test case results
      mysql-test/suite/parts/r/part_supported_sql_func_myisam.result:
        Update test case results
      mysql-test/suite/parts/r/partition_alter3_innodb.result:
        Update test case results
      mysql-test/suite/parts/r/partition_alter3_myisam.result:
        Update test case results
      mysql-test/suite/parts/r/partition_basic_innodb.result:
        Update test case results
      mysql-test/suite/parts/r/partition_basic_myisam.result:
        Update test case results
      mysql-test/suite/parts/r/partition_datetime_innodb.result:
        Update test case results
      mysql-test/suite/parts/r/partition_datetime_myisam.result:
        Update test case results
      mysql-test/suite/parts/r/partition_decimal_innodb.result:
        Update test case results
      mysql-test/suite/parts/r/partition_decimal_myisam.result:
        Update test case results
      mysql-test/suite/parts/r/partition_float_myisam.result:
        Update test case results
      mysql-test/suite/parts/r/partition_syntax_innodb.result:
        Update test case results
      mysql-test/suite/parts/r/partition_syntax_myisam.result:
        Update test case results
      mysql-test/suite/parts/t/disabled.def:
        Mark several more tests as disabled: partition_value_myisam,
        partition_value_innodb, part_supported_sql_func_ndb,
        rpl_ndb_dd_partitions, and partition_float_innodb
      mysql-test/std_data/parts/part_supported_sql_funcs_int_ch1.inc:
        Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_ch1.inc
      mysql-test/std_data/parts/part_supported_sql_funcs_int_date.inc:
        Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_date.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_date.inc
      mysql-test/std_data/parts/part_supported_sql_funcs_int_float.inc:
        Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_float.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_float.inc
      mysql-test/std_data/parts/part_supported_sql_funcs_int_int.inc:
        Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_int.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_int.inc
      mysql-test/std_data/parts/part_supported_sql_funcs_int_time.inc:
        Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_time.inc
      mysql-test/suite/parts/inc/partition_alter_1.inc:
        Correct expected error codes, which changed due to bug 29245.
      mysql-test/suite/parts/inc/partition_check.inc:
        Correct expected error codes, which changed due to bug 29245.
      mysql-test/suite/parts/inc/partition_syntax_1.inc:
        Correct expected error codes, which changed due to bug 29245.
      bfed329e
    • unknown's avatar
      Bug #30648: Partition handler may not initialize variable used w/ autoincrement · 41c849dd
      unknown authored
      A local variable may be used uninitialized in 
      ha_partition::get_auto_increment().  Initialize it properly.
      
      
      sql/ha_partition.cc:
        Initialize first_value_part in ha_partition::get_auto_increment() with *first_value before
        it's used in the underlying table handler.  Thanks to Antony for digging up this fix.
      41c849dd
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22 · 66262046
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
      
      
      sql/field.cc:
        Auto merged
      66262046
    • unknown's avatar
      Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue · 2bf5b1aa
      unknown authored
      
      sql/field.cc:
        - always pack in little endian, irrespective of starage engine native format
        - always unpack as if it is atored in little endian, and unpack it to storage engine native format
      2bf5b1aa
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.1-target-5.1.22 · 75fe12a1
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/work/mysql-5.1-target-5.1.22-joro
      
      
      75fe12a1
    • unknown's avatar
      portation fixes for bug 29536 and 29325 in · 2ed51552
      unknown authored
      re-pushing for 5.1.22.
      
      
      mysql-test/suite/rpl/t/rpl_timezone.test:
        typo fixed in re-pushing bug 29536
      sql/mysqld.cc:
        portation fixes ->5.1 for bug 29325
      2ed51552
    • unknown's avatar
      Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22 · 0e7c9704
      unknown authored
      into  trift2.:/MySQL/M51/target-5.1.22
      
      
      0e7c9704
    • unknown's avatar
      Merge trift2.:/MySQL/M51/netware3-5.1 · c749a21a
      unknown authored
      into  trift2.:/MySQL/M51/target-5.1.22
      
      
      configure.in:
        Auto merged
      c749a21a
    • unknown's avatar
      More cleanup / fixing for NetWare: · d7774462
      unknown authored
      1) "test_db.sql" is a plaintext file, no binary;
      2) do not try to strip the binaries, it will not work.
      
      
      configure.in:
        For NetWare, we cannot strip the binaries, so there is no use in attempting it.
      scripts/make_binary_distribution.sh:
        Get rid of a typing error, introduced when a following file name was deleted.
      d7774462
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22 · b1e78d13
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
      
      
      b1e78d13
    • unknown's avatar
      repair some rpl_ndb test cases · 3abd50cb
      unknown authored
      
      BitKeeper/deleted/.del-rpl_ndb_myisam2ndb-master.opt:
        Delete: mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt
      mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result:
        BitKeeper file /home/tomas/mysql-5.1-target-5.1.22/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result
      mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result:
        BitKeeper file /home/tomas/mysql-5.1-target-5.1.22/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result
      3abd50cb
    • unknown's avatar
      re-push of Bug 29536 for 5.1.22: timestamp inconsistent in replication around 1970 · af9f7a23
      unknown authored
        
      MySQL replicates the time zone only when operations that involve
      it are performed. This is controlled by a flag. But this flag
      is set only on successful operation.
      The flag must be set also when there is an error that involves
      a timezone (so the master would replicate the error to the slaves).
      
      
      mysql-test/suite/rpl/r/rpl_timezone.result:
        repush of Bug 29536 for 5.1.22 tree: test case
      mysql-test/suite/rpl/t/rpl_timezone.test:
        repush of Bug 29536 for 5.1.22 tree: test case
      sql/field.cc:
        re-push of Bug 29536 for 5.1.22: move setting of the flag before the operation
        (so it apples to errors as well).
      sql/time.cc:
        re-push of Bug 29536 for 5.1.22: move setting of the flag before the operation
        (so it apples to errors as well).
      af9f7a23
    • unknown's avatar
      recommit of Bug 25228 for 5.1.22: rpl_relayspace.test fails on powermacg5, vm-win2003-32-a · 9b49c3cb
      unknown authored
        
        A test case was waiting for a fixed number of seconds for a specific 
        state of the slave IO thread to take place.
        Fixed by waiting in a loop for that specific thread state instead 
        (or timeout).
      
      
      mysql-test/suite/rpl/t/rpl_relayspace.test:
        recommit of Bug 25228 for 5.1.22: fixed test case
      9b49c3cb
    • unknown's avatar
      recommit of Addendum to bug #29325 to 5.1.22 tree · 77808ac9
      unknown authored
      keep_files_on_create made a startup option
      
      
      77808ac9
  2. 25 Aug, 2007 2 commits
    • unknown's avatar
      Apply InnoDB snapshot innodb-5.1-ss1751. · a859c594
      unknown authored
      Bug #16979: AUTO_INC lock in InnoDB works a table level lock
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
      Bug #27950: Duplicate entry error in auto-inc after mysqld restart
        We check whether the AUTOINC sub-system has been initialized (first) by
        holding the AUTOINC mutex and if initialization is required then we
        initialize using our normal procedure.
      
      
      storage/innobase/dict/dict0boot.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/dict/dict0crea.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/dict/dict0load.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/dict/dict0mem.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1749:
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
      storage/innobase/handler/ha_innodb.cc:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1735:
        Add variable "innodb_autoinc_lock_mode"  to control the behavior of the
        AUTOINC locking. There are three modes, 0 for backward compatibility, 1 for the
        new style locking (default, safe for statement-based replication) and
        2 for no AUTOINC locking (unsafe for statement-based replication).
        
        
        Revision r1750:
        We check whether the AUTOINC sub-system has been initialized (first) by
        holding the AUTOINC mutex and if initialization is required then we
        initialize using our normal procedure. This change is related to Bug#27950.
        
        
        Revision r1746:
        Remove some code from ha_innodb.cc that was already enclosed in #if 0.
        The code was related to replication and group commit, and it was
        unreachable already as of MySQL 5.0.
        
        Approved by Heikki
        
        
        Revision r1749:
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
      storage/innobase/include/dict0mem.h:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1749:
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
        
        
        
        Revision r1747:
        Correct an outdated comment about dict_table_t:col_names that should have
        been adjusted in r1719, or r1264 in branches/zip.
      storage/innobase/include/mem0mem.ic:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1744:
        Merge r1739 from branches/zip:
        
        mem_heap_free_heap_top(): Declare the memory freed with UNIV_MEM_FREE().
        Before this change, the memory freed by mem_heap_empty() was not completely
        flagged free in UNIV_DEBUG_VALGRIND builds.  After this change, Valgrind
        will hopefully catch all errors caught by UNIV_MEM_DEBUG.
      storage/innobase/include/sync0rw.ic:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1751:
        rw_lock_s_lock_func(): Correct a typo in a comment.
      storage/innobase/include/trx0trx.h:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1742:
        Remove some unused fields of trx_t: mysql_master_log_file_name,
        mysql_master_log_pos, repl_wait_binlog_name, repl_wait_binlog_pos.
        
        Approved by Heikki.
      storage/innobase/lock/lock0lock.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1749:
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
      storage/innobase/mtr/mtr0log.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/pars/pars0pars.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/srv/srv0srv.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/trx/trx0sys.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1743:
        trx_sys_print_mysql_binlog_offset_from_page(): Enclose the definition
        in #ifdef UNIV_HOTBACKUP, to match the function declaration.
      storage/innobase/trx/trx0trx.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1742:
        Remove some unused fields of trx_t: mysql_master_log_file_name,
        mysql_master_log_pos, repl_wait_binlog_name, repl_wait_binlog_pos.
        
        Approved by Heikki.
      a859c594
    • unknown's avatar
      Apply InnoDB snapshot innodb-5.1-ss1726. · 6d4b3c58
      unknown authored
      Bug #16979: AUTO_INC lock in InnoDB works a table level lock
        - this is a major change in InnoDB auto-inc handling.
      Bug #27950: Duplicate entry error in auto-inc after mysqld restart
        - Init AUTOINC from delete_row().
      Bug #28781: InnoDB increments auto-increment value incorrectly with ON DUPLICATE KEY UPDATE
        - Use value specified by MySQL, in update_row().
      
      
      mysql-test/r/innodb.result:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1655:
        Fix the innodb.test failure mentioned in r1654.
      storage/innobase/dict/dict0dict.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/dict/dict0mem.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/handler/ha_innodb.cc:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1718:
        Replace mysql_byte with uchar and remove the #define mysql_byte from
        ha_innodb.cc.  This cleanup was made possible as of r1550:
        
        
        Revision r1658:
        check_trx_exists(): Remove a redundant function call and assignment that
        was added by someone at MySQL.
        
        
        Revision r1656:
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
        
        
        Revision r1654:
        
        One test case in innodb.test fails because of auto-increment
        changes in r1562:1653:
        
        $diff innodb.result innodb.reject
        504c504
        < 3	test2		this will work
        ---
        > 4	test2		this will work
      storage/innobase/handler/ha_innodb.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1654:
        
        One test case in innodb.test fails because of auto-increment
        changes in r1562:1653:
        
        $diff innodb.result innodb.reject
        504c504
        < 3	test2		this will work
        ---
        > 4	test2		this will work
      storage/innobase/ibuf/ibuf0ibuf.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1715:
        ibuf0ibuf.c: Remove the unused prototype for dict_index_print_low()
        that was inadvertently added in r832.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/include/dict0dict.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/include/dict0mem.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/include/lock0lock.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1664:
        lock_number_of_rows_locked(): Fix a typo in comment, and make the comments
        in lock0lock.c and lock0lock.h identical.  The typo was incorrectly fixed in
        r1623.
      storage/innobase/include/row0mysql.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/include/row0sel.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/include/trx0trx.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/include/ut0mem.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1713:
        Fix typo in comment.
      storage/innobase/log/log0recv.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1657:
        recv_init_crash_recovery(): remove trailing white space
      storage/innobase/row/row0mysql.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/row/row0sel.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/trx/trx0trx.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      6d4b3c58
  3. 24 Aug, 2007 6 commits
  4. 23 Aug, 2007 9 commits
    • unknown's avatar
      Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22 · 7cd836b6
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/target-5.1.22/mysql-5.1-target-5.1.22
      
      
      7cd836b6
    • unknown's avatar
      Fixed bug #30396. · d55f22fe
      unknown authored
      Recommit to 5.1.22.
      The bug caused memory corruption for some queries with top OR level
      in the WHERE condition if they contained equality predicates and 
      other sargable predicates in disjunctive parts of the condition.
      
      The corruption happened because the upper bound of the memory
      allocated for KEY_FIELD and SARGABLE_PARAM internal structures
      containing info about potential lookup keys was calculated incorrectly
      in some cases. In particular it was calculated incorrectly when the
      WHERE condition was an OR formula with disjuncts being AND formulas
      including equalities and other sargable predicates.
      
      
      mysql-test/r/select.result:
        Added a test case for bug #30396.
        Recommit to 5.1.22.
      mysql-test/t/select.test:
        Added a test case for bug #30396.
        Recommit to 5.1.22.
      sql/item_cmpfunc.h:
        Removed max_members from the COND_EQUAL class as not useful anymore. 
        Recommit to 5.1.22.
      sql/sql_base.cc:
        Added the max_equal_elems field to the st_select_lex structure.
        Recommit to 5.1.22.
      sql/sql_lex.cc:
        Added the max_equal_elems field to the st_select_lex structure.
        Recommit to 5.1.22.
      sql/sql_lex.h:
        Added the max_equal_elems field to the st_select_lex structure.
        The field contains the maximal number of elements in multiple equalities
        built for the query conditions.
        Recommit to 5.1.22.
      sql/sql_select.cc:
        Fixed bug #30396.
        Recommit to 5.1.22.
        The bug caused memory corruption for some queries with top OR level
        in the WHERE condition if they contained equality predicates and 
        other sargable predicates in disjunctive parts of the condition.
        
        The corruption happened because the upper bound of the memory
        allocated for KEY_FIELD and SARGABLE_PARAM internal structures
        containing info about potential lookup keys was calculated incorrectly
        in some cases. In particular it was calculated incorrectly when the
        WHERE condition was an OR formula with disjuncts being AND formulas
        including equalities and other sargable predicates.
         
        The max_equal_elems field to the st_select_lex structure is used now
        to calculate the above mentioned upper bound. The field contains the
        maximal number of elements in multiple equalities built for the query
        conditions.
      d55f22fe
    • unknown's avatar
      Fixed bug #30201. · 6d409e8f
      unknown authored
      Recommit to 5.1.22.
      Killing a SELECT query with KILL QUERY or KILL CONNECTION
      causes a server crash if the query cache is enabled.
      
      Normal evaluation of a query may be interrupted by the
      KILL QUERY/CONNECTION statement, in this case the mysql_execute_command
      function returns TRUE, and the thd->killed flag has true value.
      In this case the result of the query may
      be cached incompletely (omitting call to query_cache_insert inside
      the net_real_write function), and next call to query_cache_end_of_result
      may lead to server crash.
      Thus, the query_cache_end_of_result function has been modified to abort
      query cache in the case of killed thread.
      
      
      
      sql/sql_cache.cc:
        Fixed bug #30201.
        Recommit to 5.1.22.
        The  query_cache_end_of_result function has been modified to abort query
        cache in the case of query execution failure. Also this function has been
        modified to remove incomplete query block.
      6d409e8f
    • unknown's avatar
      Fixed bug #30287. · 380cc93c
      unknown authored
      Recommit to 5.1.22.
      The server created temporary tables for filesort in the working directory
      instead of the specified tmpdir directory.
      
      
      sql/item.cc:
        Fixed bug #30287.
        Recommit to 5.1.22.
        The Item_field::set_field method has been modified to reset the any_privileges
        flag to false in case of system temporary table. This modification prevents the
        server from unnecessary checking of user privileges to access system temporary
        tables.
      sql/sql_select.cc:
        Fixed bug #30287.
        Recommit to 5.1.22.
        Bugfix for #29015 has been removed: TABLE_SHARE::table_name of system
        temporary tables contains full path to table file basename again.
      sql/sql_view.cc:
        Fixed bug #30287.
        Recommit to 5.1.22.
        Commentary has been added.
      380cc93c
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22 · 42bd0a4a
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
      
      
      42bd0a4a
    • unknown's avatar
      BUG#30017 log-slave-updates incorrect behavior for cluster · 9e72aacf
      unknown authored
      - let the receiving injector thread decide what to do
      (recommit for 5.1.22 target)
      
      
      sql/ha_ndbcluster.cc:
        BUG#30017 log-slave-updates incorrect behavior for cluster
        - let the receiving injector thread decide what to do
      sql/ha_ndbcluster_binlog.cc:
        BUG#30017 log-slave-updates incorrect behavior for cluster
        - let the receiving injector thread decide what to do
      9e72aacf
    • unknown's avatar
      Bug#28744, Bug#29363 · e81734ce
      unknown authored
      
      mysql-test/suite/rpl/include/rpl_mixed_ddl.inc:
        updated main test for DDL
      mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
        updated main test for DML
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
        updated result file
      mysql-test/suite/rpl/t/disabled.def:
        updated disabled.def
      e81734ce
    • unknown's avatar
      Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22 · a59096c5
      unknown authored
      into  mysql.com:/data1/mysql-5.1-target-5.1.22
      
      
      a59096c5
    • unknown's avatar
      BUG#30134 restore of backup from different endian can work for timestamp column · 650e06af
      unknown authored
      (recommit for 5.1.22 target)
      
      
      storage/ndb/tools/restore/Restore.cpp:
        Convert byte order of timestamp data type
      650e06af
  5. 22 Aug, 2007 4 commits
    • unknown's avatar
      Bug#30359 · fc766e51
      unknown authored
        "Test federated_bug_25714 issues non-existing shell command"
        Problem caused by missing '$' symbol in eval statement causing it
        to always attempt to run test even if the test was not compiled.
      
      
      mysql-test/include/have_bug25714.inc:
        bug30359
          missing '$' in eval statement
      fc766e51
    • unknown's avatar
      Fix the version number. · 7c5aa8a6
      unknown authored
      
      configure.in:
        Version is 5.1.22 !
      7c5aa8a6
    • unknown's avatar
      ndb_dd_ddl.test, ndb_dd_ddl.result: · 9534a41c
      unknown authored
        Updated test case to correst inconsistant results on different OS per #bug30559
      
      
      mysql-test/suite/ndb/t/ndb_dd_ddl.test:
        Updated test case to correst inconsistant results on different OS per #bug30559
      mysql-test/suite/ndb/r/ndb_dd_ddl.result:
        Updated test case to correst inconsistant results on different OS per #bug30559
      9534a41c
    • unknown's avatar
      Merge trift2.:/MySQL/M51/clone-5.1 · b07fc544
      unknown authored
      into  trift2.:/MySQL/M51/target-5.1.22
      
      
      b07fc544
  6. 21 Aug, 2007 1 commit
    • unknown's avatar
      ndb_dd_dump.test, ndb_dd_dump.result: · 833afa54
      unknown authored
        uncommented the test case stated in bug18856 and commiting to mysql-5.1-target-5.1.22 clone per Tomas
      
      
      mysql-test/suite/ndb/t/ndb_dd_dump.test:
        uncommented the test case stated in bug18856 and commiting to mysql-5.1-target-5.1.22 clone per Tomas
      mysql-test/suite/ndb/r/ndb_dd_dump.result:
        uncommented the test case stated in bug18856 and commiting to mysql-5.1-target-5.1.22 clone per Tomas
      833afa54
  7. 20 Aug, 2007 1 commit
  8. 16 Aug, 2007 1 commit