1. 09 May, 2006 1 commit
    • unknown's avatar
      Fix for bugs#12472/#15137 'CREATE TABLE ... SELECT ... which explicitly · 4f15a043
      unknown authored
      or implicitly uses stored function gives "Table not locked" error'
      
      CREATE TABLE ... SELECT ... statement which was explicitly or implicitly
      (through view) using stored function gave "Table not locked" error.
      
      The actual bug resides in the current locking scheme of CREATE TABLE SELECT
      code, which first opens and locks tables of the SELECT statement itself,
      and then, having SELECT tables locked, creates the .FRM, opens the .FRM and
      acquires lock on it. This scheme opens a possibility for a deadlock, which
      was present and ignored since version 3.23 or earlier. This scheme also
      conflicts with the invariant of the prelocking algorithm -- no table can
      be open and locked while there are tables locked in prelocked mode.
      
      The patch makes an exception for this invariant when doing CREATE TABLE ...
      SELECT, thus extending the possibility of a deadlock to the prelocked mode.
      We can't supply a better fix in 5.0.
      
      
      mysql-test/r/sp.result:
        Added tests for bugs#12472/#15137 'CREATE TABLE ... SELECT ... which
        explicitly or implicitly uses stored function gives "Table not locked" error'
      mysql-test/t/sp.test:
        Added tests for bugs#12472/#15137 'CREATE TABLE ... SELECT ... which
        explicitly or implicitly uses stored function gives "Table not locked" error'
      sql/mysql_priv.h:
        Added flag which can be passed to open_table() routine in order to ignore
        set of locked tables and prelocked mode.
        We don't need declaration of create_table_from_items() any longer as it was
        moved into sql_insert.cc and made static.
      sql/sql_base.cc:
        open_table():
          Added flag which allows open table ignoring set of locked tables and
          prelocked mode.
      sql/sql_insert.cc:
        Moved create_table_from_items() from sql_table.cc to sql_insert.cc as it was
        not used outside of sql_insert.cc and contains code which is specific for
        CREATE TABLE ... SELECT.
        Also now when we are executing CREATE TABLE ... SELECT ... statement which
        SELECT part requires execution in prelocked mode we ignore set of locked
        tables in order to get access to the table we just have created.
        We probably don't want to do this if we are under real LOCK TABLES since
        it will widen window for deadlock too much.
      sql/sql_table.cc:
        Moved create_table_from_items() routine into sql_insert.cc, since it was not
        used anywhere outside of this file and contains logic which is specific for
        CREATE TABLE ... SELECT statement.
      4f15a043
  2. 05 Apr, 2006 3 commits
    • unknown's avatar
      conf_to_src.c: · 6ef757e4
      unknown authored
        Buffer was too small to load Index.xml.
        So some charsets were not gerenrated.
        Making the buffer bigger, and adding an DBUG_ASSERT,
        to easier catch the problem in the future.
      ctype-extra.c:
        Additional charsets were generated.
      
      
      strings/ctype-extra.c:
        Additional charsets were generated.
      strings/conf_to_src.c:
        Buffer was too small to load Index.xml.
        So some charsets were not gerenrated.
        Making the buffer bigger, and adding an DBUG_ASSERT,
        to easier catch the problem in the future.
      6ef757e4
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0 · af5e4098
      unknown authored
      into sunlight.local:/local_work/16281-bug-5.0-mysql
      
      
      sql/field.h:
        Auto merged
      af5e4098
    • unknown's avatar
      Fixed bug #16281: Multi-table update broken in 5.0 on tables imported from 4.1 · 0f8c1175
      unknown authored
      Mutli-table uses temporary table to store new values for fields. With the
      new values the rowid of the record to be updated is stored in a Field_string
      field. Table to be updated is set as source table of the rowid field.
      But when the temporary table creates the tmp field for the rowid field it
      converts it to a varstring field because the table to be updated was created by
      the v4.1. Due to this the stored rowids were broken and no records for 
      update were found.
      
      The flag can_alter_field_type is added to Field_string class. When it is set to
      0 the field won't be converted to varstring. The Field_string::type() function 
      now always returns MYSQL_TYPE_STRING if can_alter_field_type is set to 0.
      The multi_update::initialize_tables() function now sets can_alter_field_type
      flag to 0 for the rowid fields denying conversion of the field to a varstring
      field.
      
      
      
      sql/field.h:
        Fixed bug #16281: Multi-table update broken in 5.0 on tables imported from 4.1
        The flag can_alter_field_type is added to Field_string class. When it is set to
        0 the field won't be converted to varstring.
        The Field_string::type() function now always returns MYSQL_TYPE_STRING if 
        can_alter_field_type is set to 0.
      sql/sql_update.cc:
        Fixed bug #16281: Multi-table update broken in 5.0 on tables imported from 4.1
        The multi_update::initialize_tables() function now sets can_alter_field_type
        flag to 0 for the rowid fields denying conversion of the field to a varstring
        field.
      0f8c1175
  3. 04 Apr, 2006 8 commits
  4. 03 Apr, 2006 8 commits
  5. 02 Apr, 2006 1 commit
    • unknown's avatar
      Makefile.am: · 6de1d9d3
      unknown authored
        Install Perl mysql-test-run into test directory
      
      
      mysql-test/Makefile.am:
        Install Perl mysql-test-run into test directory
      6de1d9d3
  6. 01 Apr, 2006 13 commits
    • unknown's avatar
      Added a test case for bug #16504. · f0bfea2b
      unknown authored
      Results changed after the bug fix.
      
      
      f0bfea2b
    • unknown's avatar
      Fixed bug #16504. · 5ef6e903
      unknown authored
      Multiple equalities were not adjusted after reading constant tables.
      It resulted in neglecting good index based methods that could be
      used to access of other tables.
      
      
      mysql-test/r/having.result:
        Adjusted a test case results after fix for bug #16504.
      mysql-test/r/select.result:
        Added a test case for bug #16504.
      mysql-test/r/subselect.result:
        Adjusted a test case results after fix for bug #16504.
      mysql-test/r/varbinary.result:
        Adjusted a test case results after fix for bug #16504.
      mysql-test/t/select.test:
        Added a test case for bug #16504.
      sql/item.cc:
        Fixed bug #16504.
        An Item_equal object may contain only a constant member.
        It may happen after reading constant tables.
      sql/item_cmpfunc.cc:
        Fixed bug #16504.
        Added method Item_equal::check_const that check appearance of new 
        constant items in a multiple equality.
      sql/item_cmpfunc.h:
        Fixed bug #16504.
        Added method Item_equal::check_const that check appearance of new 
        constant items in a multiple equality.
      sql/sql_select.cc:
        Fixed bug #16504.
        Adjusted multiple equalities after reading constant tables.
        Fixed a few typo in comments.
      5ef6e903
    • unknown's avatar
      Merge · a6871e27
      unknown authored
      a6871e27
    • unknown's avatar
      Makefile.am: · 2a4e2e8d
      unknown authored
        Let "make install" install mysql-test-run.pl
      mysql.spec.sh:
        Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS (bug#16662)
      
      
      support-files/mysql.spec.sh:
        Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS (bug#16662)
      mysql-test/Makefile.am:
        Let "make install" install mysql-test-run.pl
      2a4e2e8d
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0 · 3eb7f2a2
      unknown authored
      into mysql.com:/Users/kent/mysql/bk/mysql-4.1-new
      
      
      README:
        Auto merged
      3eb7f2a2
    • unknown's avatar
      README: · c19a6fc5
      unknown authored
        Typo (bug#17167)
      
      
      README:
        Typo (bug#17167)
      c19a6fc5
    • unknown's avatar
      zlib.m4: · 3ff1ec0f
      unknown authored
        Use CPPFLAGS when testing to link "libz" found in --with-zlib-dir=,
        and search the given include directory first (bug#18369)
      
      
      config/ac-macros/zlib.m4:
        Use CPPFLAGS when testing to link "libz" found in --with-zlib-dir=,
        and search the given include directory first (bug#18369)
      3ff1ec0f
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-new · 381e1fce
      unknown authored
      into mysql.com:/Users/kent/mysql/bk/mysql-5.0-new
      
      
      BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
        Auto merged
      381e1fce
    • unknown's avatar
      acinclude.m4: · 1f762dab
      unknown authored
        Use CPPFLAGS when testing to link "libz" found in --with-zlib-dir=,
        and search the given include directory first (bug#18369)
      
      
      acinclude.m4:
        Use CPPFLAGS when testing to link "libz" found in --with-zlib-dir=,
        and search the given include directory first (bug#18369)
      1f762dab
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-new · 835d2286
      unknown authored
      into mysql.com:/Users/kent/mysql/bk/mysql-5.0-new
      
      
      VC++Files/libmysqld/libmysqld.vcproj:
        Auto merged
      VC++Files/mysys/mysys.vcproj:
        Auto merged
      VC++Files/sql/mysqld.vcproj:
        Auto merged
      835d2286
    • unknown's avatar
      Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 · ab96fa07
      unknown authored
      into mysql.com:/Users/kent/mysql/bk/mysql-5.0-new
      
      
      ab96fa07
    • unknown's avatar
      Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0 · a432c53f
      unknown authored
      into  mysql.com:/home/alexi/innodb/mysql-5.0-merged
      
      
      a432c53f
    • unknown's avatar
      vcproj files: · 0ad405f9
      unknown authored
        Set MYSQL_SERVER_SUFFIX from build scripts, not hard
        code it into Visual Studio project files, bug#15974
      
      
      VC++Files/bdb/bdb.vcproj:
        Set MYSQL_SERVER_SUFFIX from build scripts, not hard code into project files, bug#15974
      VC++Files/innobase/innobase.vcproj:
        Set MYSQL_SERVER_SUFFIX from build scripts, not hard code into project files, bug#15974
      VC++Files/libmysqld/libmysqld.vcproj:
        Set MYSQL_SERVER_SUFFIX from build scripts, not hard code into project files, bug#15974
      VC++Files/mysqldemb/mysqldemb.vcproj:
        Set MYSQL_SERVER_SUFFIX from build scripts, not hard code into project files, bug#15974
      VC++Files/mysys/mysys.vcproj:
        Set MYSQL_SERVER_SUFFIX from build scripts, not hard code into project files, bug#15974
      VC++Files/sql/mysqld.vcproj:
        Set MYSQL_SERVER_SUFFIX from build scripts, not hard code into project files, bug#15974
      0ad405f9
  7. 31 Mar, 2006 6 commits
    • unknown's avatar
      Makefile.am, yassl.m4: · 872d1d71
      unknown authored
        Enable automake to determine dependency on yaSSL, by explicitly
        listing the .la files in Makefile.am, instead of using
        'yassl_libs_with_path', bug#18273
      
      
      config/ac-macros/yassl.m4:
        Enable automake to determine dependency on yaSSL, by explicitly
        listing the .la files in Makefile.am, instead of using
        'yassl_libs_with_path', bug#18273
      libmysql/Makefile.am:
        Enable automake to determine dependency on yaSSL, by explicitly
        listing the .la files in Makefile.am, instead of using
        'yassl_libs_with_path', bug#18273
      libmysql_r/Makefile.am:
        Enable automake to determine dependency on yaSSL, by explicitly
        listing the .la files in Makefile.am, instead of using
        'yassl_libs_with_path', bug#18273
      872d1d71
    • unknown's avatar
      Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0 · 87c70a59
      unknown authored
      into  mysql.com:/home/alexi/innodb/mysql-5.0-merged
      
      
      87c70a59
    • unknown's avatar
      Applied innodb-5.0-ss398 snapshot. · f6ffb77c
      unknown authored
       Fixed BUG#15650: DELETE with LEFT JOIN crashes server
       with innodb_locks_unsafe_for_binlog.
       Fixed compilation problem with non-C99 compilers
       in btr0sea.c
      
      
      innobase/btr/btr0sea.c:
        Applied innodb-5.0-ss398 snapshot.
         Fix compilation problem with non-C99 compilers.
      sql/ha_innodb.cc:
        Applied innodb-5.0-ss398 snapshot.
         Remove assertion ut_error which crashes the mysqld
         server if it prints a warning about the adaptive latch.
      f6ffb77c
    • unknown's avatar
      Fixed a typo. · 1de12691
      unknown authored
      1de12691
    • unknown's avatar
      Merge mysql.com:/home/timka/mysql/src/5.0-virgin · 085aa5c9
      unknown authored
      into  mysql.com:/home/timka/mysql/src/5.0-bug-16710
      
      
      mysql-test/r/group_min_max.result:
        Auto merged
      mysql-test/t/group_min_max.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      085aa5c9
    • unknown's avatar
      Fix for BUG#16710. · a01d48f9
      unknown authored
      The bug was due to a missed case in the detection of whether an index
      can be used for loose scan. More precisely, the range optimizer chose
      to use loose index scan for queries for which the condition(s) over
      an index key part could not be pushed to the index together with the
      loose scan.
      
      As a result, loose index scan was selecting the first row in the
      index with a given GROUP BY prefix, and was applying the WHERE
      clause after that, while it should have inspected all rows with
      the given prefix, and apply the WHERE clause to all of them.
      
      The fix detects and skips such cases.
      
      
      mysql-test/r/group_min_max.result:
        Added test for BUG#16710.
      mysql-test/t/group_min_max.test:
        Added test for BUG#16710.
      sql/item.cc:
        Added new method [Item | Item_field]::find_item_in_field_list_processor.
      sql/item.h:
        Added new method [Item | Item_field]::find_item_in_field_list_processor.
      sql/opt_range.cc:
        Handle the case when there is no MIN/MAX aggregate function, and a
        keypart of the index being considered, that is after the GROUP BY
        prefix, is used in the WHERE clause and the condition where it is
        used cannot be pushed to the index.
        If this is the case, we rule out this index.
      a01d48f9