1. 17 May, 2006 1 commit
    • unknown's avatar
      Fixed bug#19077: A nested materialized derived table is used before being populated. · 1c6beaee
      unknown authored
      The convert_constant_item() function converts constant items to ints on
      prepare phase to optimize execution speed. In this case it tries to evaluate
      subselect which contains a derived table and is contained in a derived table. 
      All derived tables are filled only after all derived tables are prepared.
      So evaluation of subselect with derived table at the prepare phase will
      return a wrong result.
      
      A new flag with_subselect is added to the Item class. It indicates that
      expression which this item represents is a subselect or contains a subselect.
      It is set to 0 by default. It is set to 1 in the Item_subselect constructor
      for subselects.
      For Item_func and Item_cond derived classes it is set after fixing any argument
      in Item_func::fix_fields() and Item_cond::fix_fields accordingly.
      The convert_constant_item() function now doesn't convert a constant item
      if the with_subselect flag set in it. 
      
      
      mysql-test/t/view.test:
        Added test case for bug#19077: A nested materialized derived table is used before being populated.
      mysql-test/t/subselect.test:
        Added test case for bug#19077: A nested materialized derived table is used before being populated.
      mysql-test/r/view.result:
        Added test case for bug#19077: A nested materialized derived table is used before being populated.
      mysql-test/r/subselect.result:
        Added test case for bug#19077: A nested materialized derived table is used before being populated.
      sql/item_subselect.cc:
        Fixed bug#19077: A nested materialized derived table is used before being populated.
        The Item_subselect class constructor sets new with_subselect flag to 1.
      sql/item_func.cc:
        Fixed bug#19077: A nested materialized derived table is used before being populated.
        
        The Item_func::fix_fields() sets new with_subselect flag from with_subselect flags of its arguments.
      sql/item_cmpfunc.cc:
        Fixed bug#19077: A nested materialized derived table is used before being populated.
        The convert_constant_item() function now doesn't convert a constant item
        with the with_subselect flag set.
        The Item_cond::fix_fields() sets new with_subselect flag from with_subselect flags of its arguments.
      sql/item.cc:
        Fixed bug#19077: A nested materialized derived table is used before being populated.
        Set new with_subselect flag to default value - 0 in the Item constructor.
      sql/item.h:
        Fixed bug#19077: A nested materialized derived table is used before being populated.
        A new flag with_subselect is added to the Item class. It indicates that
        expression which this item represents is a subselect or contains a subselect.
        It is set to 0 by default.
      1c6beaee
  2. 16 May, 2006 8 commits
  3. 15 May, 2006 20 commits
    • unknown's avatar
      Merge mysql.com:/opt/local/work/mysql-5.0-root · dd8c47ef
      unknown authored
      into  mysql.com:/opt/local/work/mysql-5.0-runtime-merge
      
      
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      dd8c47ef
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · 29bf6575
      unknown authored
      into  mysql.com:/data0/knielsen/tmp-5.0
      
      
      29bf6575
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/andrei-5.0 · bb1c6bf6
      unknown authored
      into  mysql.com:/users/lthalmann/bk/mysql-5.0-rpl
      
      
      bb1c6bf6
    • unknown's avatar
      Merge mysql.com:/usr/local/mysql/mysql-5.0-vgfix · 167d54cd
      unknown authored
      into  mysql.com:/usr/local/mysql/tmp-5.0
      
      
      include/my_sys.h:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      167d54cd
    • unknown's avatar
      Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 9287933a
      unknown authored
      into  dl145j.mysql.com:/tmp/andrei/5.0
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      9287933a
    • unknown's avatar
      Merge mysql.com:/usr/local/mysql/mysql-5.0-vgfix2 · f3be3b6a
      unknown authored
      into  mysql.com:/usr/local/mysql/tmp-5.0
      
      
      f3be3b6a
    • unknown's avatar
      After-merge fixes; some function signatures changed from Item * to Item **. · 798e910b
      unknown authored
      
      sql/item.cc:
        After-merge fixes.
      sql/item.h:
        After-merge fixes.
      sql/item_func.cc:
        After-merge fixes.
      sql/item_func.h:
        After-merge fixes.
      sql/sp_head.cc:
        After-merge fixes.
      798e910b
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · 438131dd
      unknown authored
      into  mysql.com:/usr/local/mysql/tmp-5.0
      
      
      sql/sp_head.cc:
        Manual merge.
      438131dd
    • unknown's avatar
      Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0 · 30c03e20
      unknown authored
      into  mysql.com:/home/alexi/innodb/mysql-5.0-ss547
      
      
      30c03e20
    • unknown's avatar
      Fix two Valgrind memory leak warnings. · a046322b
      unknown authored
      
      client/mysqlbinlog.cc:
        Now my_end() deallocates DBUG by default, but that fails in mysqlbinlog
        because of global destructors that use DBUG.
      dbug/dbug.c:
        Add a facility to deallocate the debug stack, to avoid memory leak warnings
        in Valgrind.
      include/my_dbug.h:
        Add a facility to deallocate the debug stack, to avoid memory leak warnings
        in Valgrind.
      include/my_sys.h:
        Change my_end() to deallocate DBUG memory by default (can be disabled with
        MY_DONT_FREE_DBUG option).
      libmysql/libmysql.c:
        Do not deallocate DBUG during cleanup.
      mysys/my_init.c:
        Change my_end() to deallocate DBUG memory by default (can be disabled with
        MY_DONT_FREE_DBUG option).
      sql/mysqld.cc:
        Add missing my_thread_end() call, seems to occasionally trigger a memory
        leak (not repeatable).
      a046322b
    • unknown's avatar
      Merge mysql.com:/home/alexi/innodb/mysql-4.1-ss29-work · 889e60da
      unknown authored
      into  mysql.com:/home/alexi/innodb/mysql-5.0-ss547-work
       Null merge
      
      
      innobase/os/os0file.c:
        Null merge
      sql/ha_innodb.cc:
        Null merge
      889e60da
    • unknown's avatar
      BUG#14157: utf8 encoding in binlog without set character_set_client: e.g DROP temporary · b6c7f5f2
      unknown authored
      specific to 5.0 version of the patch is motivated by the fact that a wrapper over 
      MYSQLLOG::write can not help in 5.0 where query's charset is embedded into event instance in the constructor.
      
      
      sql/mysql_priv.h:
        this 4.1 specific code does not help in 5.0
      sql/sql_base.cc:
        No wrapper similar to 4.1's version is done since Query_log_event constructor
        takes care of encodings in 5.0 whereas log::write method does it in 4.1.
        We can introduce an additional constuctor for Query_log_event to pass desired
        (i.e system_character_info) charset different from THD's version.
        But I am delaying this while there are not more bugs similar to this one reported.
      b6c7f5f2
    • unknown's avatar
      Remove 'const' that prevents Microsoft VC realize that · 90ffe539
      unknown authored
      Item_trigger_field::set_required_privilege(const bool rw) is an
      overloading of Settable_routine_parameter::set_required_privilege(bool rw).
      
      
      90ffe539
    • unknown's avatar
      Applied innodb-5.0-ss547 snapshot. · c55912b0
      unknown authored
       Fix BUG#19542 "InnoDB doesn't increase the Handler_read_prev counter".
      
      
      innobase/os/os0file.c:
        Applied innodb-5.0-ss547 snapshot.
         Check the page trailers also after writing to disk.
         This improves the chances of diagnosing Bug 18886.
         os_file_check_page_trailers(): New function for checking
         that two copies of the LSN stamped on the pages match.
         os_aio_simulated_handle(): Call os_file_check_page_trailers()
         before and after os_file_write().
      sql/ha_innodb.cc:
        Applied innodb-5.0-ss547 snapshot.
         Increment statistic counter in ha_innobase::index_prev().
      c55912b0
    • unknown's avatar
      Applied innodb-4.1-ss29 snapshot. · 8069b05d
      unknown authored
       Fix BUG#19542 "InnoDB doesn't increase the Handler_read_prev counter.
       
      
      
      innobase/os/os0file.c:
        Applied innodb-4.1-ss29 snapshot.
         Check the page trailers also after writing to disk.
         This improves the chances of diagnosing Bug 18886.
         os_file_check_page_trailers(): New function for checking
         that two copies of the LSN stamped on the pages match.
         os_aio_simulated_handle(): Call os_file_check_page_trailers()
         before and after os_file_write().
      sql/ha_innodb.cc:
        Applied innodb-4.1-ss29 snapshot.
         Increment statistic counter in ha_innobase::index_prev().
      8069b05d
    • unknown's avatar
      Removed two duplicate/redundant suppressions. · 58025175
      unknown authored
      Added some suppressions needed for Valgrind on RHAS3 64-bit.
      
      
      58025175
    • unknown's avatar
      Merge mysql.com:/home/tomash/src/mysql_ab/mysql-5.0 · f298905d
      unknown authored
      into  mysql.com:/home/tomash/src/mysql_ab/mysql-5.0-bug14635
      
      
      sql/sql_acl.cc:
        Auto merged
      f298905d
    • unknown's avatar
      BUG#19618: Crash for unsigned_col NOT IN (-1, ... ) · e5838e16
      unknown authored
      - When manually constructing a SEL_TREE for "t.key NOT IN(...)", take into account that 
        get_mm_parts may return a tree with type SEL_TREE::IMPOSSIBLE
      - Added missing OOM checks
      - Added comments
      
      
      mysql-test/r/func_in.result:
        Testcase for BUG#19618
      mysql-test/t/func_in.test:
        Testcase for BUG#19618
      e5838e16
    • unknown's avatar
      BUG#18037: Fix stack corruption in THD::rollback_item_tree_changes(). · dccd333e
      unknown authored
        
      Stored procedure execution sometimes placed the address of auto variables
      in the list of Item changes to undo in THD::rollback_item_tree_changes().
      This could cause stack corruption.
      
      
      sql/sp_head.cc:
        Avoid storing address of auto variables in global rollback list, to
        prevent stack memory corruption.
      sql/sp_head.h:
        Avoid storing address of auto variables in global rollback list, to
        prevent stack memory corruption.
      sql/sp_rcontext.cc:
        Avoid storing address of auto variables in global rollback list, to
        prevent stack memory corruption.
      sql/sp_rcontext.h:
        Avoid storing address of auto variables in global rollback list, to
        prevent stack memory corruption.
      sql/sql_class.cc:
        Avoid storing address of auto variables in global rollback list, to
        prevent stack memory corruption.
      dccd333e
    • unknown's avatar
      Fix possible race. Use LOCK_grant on access to grant_version. · 5d023fa5
      unknown authored
      
      sql/sql_acl.cc:
        Use LOCK_grant on access to grant_version.
      5d023fa5
  4. 14 May, 2006 5 commits
    • unknown's avatar
      Merge mysql.com:/opt/local/work/mysql-5.0-root · 2ce5e54e
      unknown authored
      into  mysql.com:/opt/local/work/mysql-5.0-runtime-merge
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/im_options_set.result:
        Auto merged
      mysql-test/r/im_options_unset.result:
        Auto merged
      mysql-test/r/trigger-grant.result:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      2ce5e54e
    • unknown's avatar
      Merge mysql.com:/usr_rh9/home/elkin.rh9/4.1 · df8b4a06
      unknown authored
      into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/5.0
      
      
      mysql-test/t/rpl_temporary.test:
        Auto merged
      mysql-test/t/mysqlbinlog.test:
        manual merge
      df8b4a06
    • unknown's avatar
      BUG#19188: incorrect temporary table name of DROP query in replication · b9558d8b
      unknown authored
      manual merge to account 5.0 specific names of TABLE class
      
      
      sql/mysql_priv.h:
        manual merge: changing to 5.0's TABLE class names
      sql/sql_base.cc:
        manual merge: whitespaces and 5.0 TABLE's names
      b9558d8b
    • unknown's avatar
      BUG#14157: utf8 encoding in binlog without set character_set_client · d388da98
      unknown authored
      fixing names length. Got an issue when merged to 5.0, decided to fix starting from 4.1
      
      
      mysql-test/t/mysqlbinlog.test:
        fixing temp table name to fit to 64 bytes for 5.0
      mysql-test/t/rpl_temporary.test:
        fixing temp table name to fit to 64 bytes for 5.0
      d388da98
    • unknown's avatar
      Merge mysql.com:/usr_rh9/home/elkin.rh9/4.1 · ac812dfc
      unknown authored
      into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/5.0
      
      
      mysql-test/r/mysqlbinlog.result:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      mysql-test/r/drop_temp_table.result:
        manual merge use local
      mysql-test/r/mix_innodb_myisam_binlog.result:
        manual merge use local
      mysql-test/r/rpl_temporary.result:
        manual merge use local
      mysql-test/t/mysqlbinlog.test:
        manual merge
      mysql-test/t/rpl_temporary.test:
        manual merge. More than the bugs fixes: using disconnect con1 from 4.1's version instead of kill con1.
      sql/sql_base.cc:
        manual merge, should be in sync with 4.1's version.
      ac812dfc
  5. 13 May, 2006 6 commits
    • unknown's avatar
      Merge rurik.mysql.com:/home/igor/mysql-5.0 · 5b593939
      unknown authored
      into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
      
      
      5b593939
    • unknown's avatar
      Fixed bug #19396: a crash for a an outer join operation · fbafa42b
      unknown authored
      over two views when using syntax with curly braces.
      Each outer join operation must be placed in a separate
      nest. This was not done when the syntax with curly braces
      was used. In some cases, in particular, for queries with outer
      join operation over views it could cause a crash.
      
      
      mysql-test/r/join_outer.result:
        Added a test case for bug #19396.
      mysql-test/t/join_outer.test:
        Added a test case for bug #19396.
      fbafa42b
    • unknown's avatar
      BUG#14157: utf8 encoding in binlog without set character_set_client · 62be79a2
      unknown authored
      fixing a path to find charset by $MYSQL client. I believe the fix is done what should be
      by default. 
      
      
      mysql-test/t/mysqlbinlog.test:
        --character-sets-dir=../sql/share/charsets  is added otherwise client/.libs/lt-mysql
        searches in /usr/local/mysql ... A bug?
      mysql-test/t/rpl_temporary.test:
        --character-sets-dir=../sql/share/charsets/
      62be79a2
    • unknown's avatar
      Bug#17048 CREATE TABLE ... SELECT truncate values · fe3ac300
      unknown authored
      remove initialization of unsigned_flag for Item_decimal
      
      
      mysql-test/r/case.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/metadata.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_2myisam.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_3innodb.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_4heap.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_5merge.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_6bdb.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_7ndb.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/type_float.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/type_newdecimal.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      fe3ac300
    • unknown's avatar
      Merge rurik.mysql.com:/home/igor/mysql-5.0 · e7f87bd0
      unknown authored
      into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
      
      
      e7f87bd0
    • unknown's avatar
      Fixed bug #19490. The bug that caused server crash manifested · 7bb4f778
      unknown authored
      itself when executing queries referring to a view with GROUP BY
      an expression containing non-constant interval.
      It happened because Item_date_add_interval::eq neglected the
      fact that the method can be applied to an expression of the form
          date(col) + interval time_to_sec(col) second
      at the time when col could not be evaluated yet.
      An attempt to evaluate time_to_sec(col) in this method resulted
      in a crash.
      
      
      mysql-test/r/view.result:
        Added a test case for bug #19490.
      mysql-test/t/view.test:
        Added a test case for bug #19490.
      sql/item_timefunc.cc:
        Fixed bug #19490. The bug that caused server crash manifested
        itself when executing queries referring to a view with GROUP BY
        an expression containing non-constant interval.
        It happened because Item_date_add_interval::eq neglected the
        fact that the method can be applied to an expression of the form
            date(col) + interval time_to_sec(col) second
        at the time when col could not be evaluated yet.
        An attempt to evaluate time_to_sec(col) in this method resulted
        in a crash.
        The code of Item_date_add_interval::eq was corrected.
      7bb4f778