1. 29 Jan, 2009 4 commits
  2. 28 Jan, 2009 11 commits
    • Sergey Petrunia's avatar
      Merge · 8731a7c2
      Sergey Petrunia authored
      8731a7c2
    • Sergey Petrunia's avatar
      BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result · a9608b19
      Sergey Petrunia authored
      Item_in_optimizer::is_null() evaluated "NULL IN (SELECT ...)" to NULL regardless of
      whether subquery produced any records, this was a documented limitation.
      
      The limitation has been removed (see bugs 8804, 24085, 24127) now
      Item_in_optimizer::val_int() correctly handles all cases with NULLs. Make
      Item_in_optimizer::is_null() invoke val_int() to return correct values for
      "NULL IN (SELECT ...)".
      
      
      mysql-test/r/subselect.result:
        BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
        - Testcase
      mysql-test/t/subselect.test:
        BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
        - Testcase
      a9608b19
    • Gleb Shchepa's avatar
      b135bcab
    • Gleb Shchepa's avatar
      Bug #39069: <row constructor> IN <table-subquery> seriously · 334e249f
      Gleb Shchepa authored
                  messed up
      
      "ROW(...) IN (SELECT ... FROM DUAL)" always returned TRUE.
      
      Item_in_subselect::row_value_transformer rewrites "ROW(...)
      IN SELECT" conditions into the "EXISTS (SELECT ... HAVING ...)"
      form.
      For a subquery from the DUAL pseudotable resulting HAVING
      condition is an expression on constant values, so further
      transformation with optimize_cond() eliminates this HAVING
      condition and resets JOIN::having to NULL.
      Then JOIN::exec treated that NULL as an always-true-HAVING
      and that caused a bug.
      
      To distinguish an optimized out "HAVING TRUE" clause from
      "HAVING FALSE" we already have the JOIN::having_value flag.
      However, JOIN::exec() ignored JOIN::having_value as described
      above as if it always set to COND_TRUE.
      
      The JOIN::exec method has been modified to take into account
      the value of the JOIN::having_value field.
      
      
      mysql-test/r/subselect3.result:
        Added test case for bug #39069.
      mysql-test/t/subselect3.test:
        Added test case for bug #39069.
      sql/sql_select.cc:
        Bug #39069: <row constructor> IN <table-subquery> seriously
                    messed up
        
        The JOIN::exec method has been modified to take into account
        the value of the JOIN::having_value field.
      334e249f
    • Davi Arnaut's avatar
      Merge from 5.0-bugteam · a931ac09
      Davi Arnaut authored
      a931ac09
    • Davi Arnaut's avatar
      Remove test case for bug 40264. · aa0641dc
      Davi Arnaut authored
      Dirty close tricky does not work on Windows.
      
      mysql-test/r/query_cache_notembedded.result:
        Remove test case result.
      mysql-test/t/query_cache_notembedded.test:
        Remove test case.
      aa0641dc
    • Georgi Kodinov's avatar
      merged bug 42366 to 5.1-bugteam · 5e84d00a
      Georgi Kodinov authored
      5e84d00a
    • Alfranio Correia's avatar
      BUG#35583 mysqlbinlog replay fails with ERROR 1146 when temp tables are used · 23d032c3
      Alfranio Correia authored
            
      When using CREATE TEMPORARY TABLE LIKE to create a temporary table, 
      or using TRUNCATE to delete all rows of a temporary table, they 
      did not set the tmp_table_used flag, and cause the omission of
      "SET @@session.pseudo_thread_id" when dumping binlog with mysqlbinlog,
      and cause error when replay the statements.
            
      This patch fixed the problem by setting tmp_table_used in these two
      cases. (Done by He Zhenxing 2009-01-12)
      
      
      mysql-test/suite/binlog/r/binlog_tmp_table.result:
        Add test case for BUG#35583
      mysql-test/suite/binlog/t/binlog_tmp_table.test:
        Add test case for BUG#35583
      sql/sql_delete.cc:
        set thd->tmp_table_used when truncate temporary table
      sql/sql_table.cc:
        set thd->tmp_table_used when using create like to create temporary tables
      23d032c3
    • Georgi Kodinov's avatar
      Bug #42366: server-cert.pem expired: "Not After : Jan 27 08:54:13 2009 GMT" · 06e18528
      Georgi Kodinov authored
            
      Re-generated the PKI files needed.
      Removed the ones that are not needed.
      Updated the tests to reference the correct SSL subject.
      
      mysql-test/r/openssl_1.result:
        Bug #42366: Updated the tests to reference the correct SSL subject
      mysql-test/std_data/cacert.pem:
        Bug #42366: Re-generated the PKI files needed.
      mysql-test/std_data/client-cert.pem:
        Bug #42366: Re-generated the PKI files needed.
      mysql-test/std_data/client-key.pem:
        Bug #42366: Re-generated the PKI files needed.
      mysql-test/std_data/server-cert-des.pem:
        Bug #42366: Removed the ones that are not needed.
      mysql-test/std_data/server-cert.pem:
        Bug #42366: Re-generated the PKI files needed.
      mysql-test/std_data/server-key-des.pem:
        Bug #42366: Removed the ones that are not needed.
      mysql-test/std_data/server-key.pem:
        Bug #42366: Re-generated the PKI files needed.
      mysql-test/std_data/server8k-cert.pem:
        Bug #42366: Re-generated the PKI files needed.
      mysql-test/std_data/server8k-key.pem:
        Bug #42366: Re-generated the PKI files needed.
      mysql-test/t/openssl_1.test:
        Bug #42366: Updated the tests to reference the correct SSL subject
      06e18528
    • Satya B's avatar
      Fix for BUG#39886 - Table full for MEMORY table is not written into error log · fe75e52c
      Satya B authored
      When a MEMORY table is full the error is returned to client but not written
      to error log.
      
      Fixed the handler api to write the error mesage to error log when the table is
      full.
      
      Note: No TestCase included as testing the error log is non-trivial.
      
      
      sql/handler.cc:
        Fixed handler::print_error() to write the error message to error log
        when the table is full.
      fe75e52c
    • Alfranio Correia's avatar
      d9ccc5b6
  3. 27 Jan, 2009 2 commits
    • Alfranio Correia's avatar
      BUG#36391: "mysqlbinlog creates invalid charset statements" · 0888d7c0
      Alfranio Correia authored
            
      The fix for BUG#20103 "Escaping with backslash does not work as expected"
      was implemented too greedy though in that it not only changes the behavior
      of backslashes within strings but in general, so disabling command shortcuts
      like \G or \C (which in turn leads to Bug #36391: "mysqlbinlog creates invalid charset
      statements").
            
      The fix allows the escaping with backslash to take place only inside a string, 
      thus enabling the execution of command shortcuts and presevering the fix for
      BUG#20103.
      0888d7c0
    • Andrei Elkin's avatar
      Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails · da8df39c
      Andrei Elkin authored
      Fixing pb failures caused by mtr invokes the test with --tmpdir to which
      there are  sensitive operations in the test
      and setup_fake_relay_log.inc also needed --secure-file-priv for its own separate
      directory.
      
      Fixed with removing SELECT INTO OUTFILE and deploying --exec echo instead in the marco.
      The test's opt file should contain --secure-file-priv=$MYSQL_TEST_DIR as the test
      operations deal with files located in $MYSQL_TEST_DIR.
      
      mysql-test/include/setup_fake_relay_log.inc:
        Refining setup_fake_relay_log.inc to not use --secure-file-priv sensitive feature.
        The latter should remain available for the test.
      da8df39c
  4. 26 Jan, 2009 7 commits
    • Chad MILLER's avatar
      Merge from team tree. · d81f6d61
      Chad MILLER authored
      d81f6d61
    • Chad MILLER's avatar
      Merge from 5.1 team tree. · 94a08035
      Chad MILLER authored
      94a08035
    • Horst Hunger's avatar
    • Chad MILLER's avatar
      Merge fix for bug 38145 from 5.0. · 34dabc06
      Chad MILLER authored
      34dabc06
    • Andrei Elkin's avatar
      Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails · b33437f1
      Andrei Elkin authored
            
      Overriding a default value of --secure-file-priv on pb.mtr to be $MYSQLTEST_VARDIR which 
      makes pb's mtr happy to execute the regression test for the bug.
      
      
      mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
        satisfying pb's mtr that uses --vardir to shm.
      b33437f1
    • Andrei Elkin's avatar
      Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails · 5f7750ce
      Andrei Elkin authored
      Overriding a default value of --secure-file-priv on pb.mtr with a value allowable 
      the test to pass on pb.
      
      mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
        Overriding a default value of --secure-file-priv with a value allowable the test to pass on pb.
      5f7750ce
    • Ramil Kalimullin's avatar
      Fix for bug #37756: enabling fulltext indexes with · 80fe6268
      Ramil Kalimullin authored
        myisam_repair_threads > 1 causes crash
      
      Problem: parallel repair (myisam_repair_threads > 1) of a myisam
      table with two or more fulltext keys that use the same parser may
      lead to a server crash. ALTER TABLE ENABLE KEYS is affected as well.
      
      Fix: properly initialize fulltext structures for parallel repair.
      
      Note: 1. there's no deterministic test case.
      2. now we call parser->init() for each fulltext key
      (not for each fulltext parser used).
      
      
      storage/myisam/ft_parser.c:
        Fix for bug #37756: enabling fulltext indexes with
          myisam_repair_threads > 1 causes crash
        
        In ftparser_call_initializer() we "group" parsers
        and allocate parameters for each unique parser used.
        In case of parallel repairing we may have a bunch
        of parsers that use the only MI_INFO structure.
        Each of these parsers must have its own parameter
        structure in order not to interfere with others.
        
        Moreover, the allocation is done without mutex
        lock so parallel ftparser_call_initializer() calls
        are unsafe.
        
        Now we don't "group" the fulltext parsers.
        Parameter allocation code moved to ftparser_alloc_param()
        function which is called from mi_repair_parallel() as well
        to allocate parameters for each parser used.
      storage/myisam/ftdefs.h:
        Fix for bug #37756: enabling fulltext indexes with
          myisam_repair_threads > 1 causes crash
        
        ftparser_alloc_param(MI_INFO *info) added.
      storage/myisam/mi_check.c:
        Fix for bug #37756: enabling fulltext indexes with
          myisam_repair_threads > 1 causes crash
        
        ftparser_alloc_param(info) called in case of parallel
        repair to allocate fulltext parser parameters.
      storage/myisam/mi_open.c:
        Fix for bug #37756: enabling fulltext indexes with
          myisam_repair_threads > 1 causes crash
        
        set keyinfo->ftkey_nr and share->ftkeys.
      80fe6268
  5. 24 Jan, 2009 1 commit
  6. 23 Jan, 2009 6 commits
    • Horst Hunger's avatar
      due to merge · 02c57a12
      Horst Hunger authored
      02c57a12
    • Horst Hunger's avatar
      due to merge. · 2775f867
      Horst Hunger authored
      2775f867
    • Gleb Shchepa's avatar
      Bug#42188: crash and/or memory corruption with user variables · 93991b6b
      Gleb Shchepa authored
                 in trigger
      
      Interchangeable calls to the mysql_change_user client function
      and invocations of a trigger changing some user variable caused
      a memory corruption and a crash.
      
      The mysql_change_user API call forces TDH::cleanup() on a server
      that frees user variable entries.
      However it didn't reset Item_func_set_user_var::entry to NULL
      because Item_func_set_user_var::cleanup() was not overloaded.
      So, Item_func_set_user_var::entry held a pointer to freed memory,
      that caused a crash.
      
      The Item_func_set_user_var::cleanup method has been overloaded
      to cleanup the Item_func_set_user_var::entry field.
      
      
      mysql-test/r/user_var.result:
        Added test case for bug #42188.
      mysql-test/t/user_var.test:
        Added test case for bug #42188.
      sql/item_func.cc:
        Bug#42188: crash and/or memory corruption with user variables
                   in trigger
        
        The Item_func_set_user_var::cleanup method has been overloaded
        to cleanup the Item_func_set_user_var::entry field.
      sql/item_func.h:
        Bug#42188: crash and/or memory corruption with user variables
                   in trigger
        
        The Item_func_set_user_var::cleanup method has been overloaded
        to cleanup the Item_func_set_user_var::entry field.
      93991b6b
    • Horst Hunger's avatar
      Fix for bug#39108: Set global wait timeout within the test, not more via opt file. · d5741428
      Horst Hunger authored
      Deleted the opt file. Replaced the sleeps by wait condition. Made some beautyfications.
      Inserted review results.   
      d5741428
    • Andrei Elkin's avatar
      Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails · db337eb8
      Andrei Elkin authored
      an additional changeset to remove printing a path name.
      
      mysql-test/suite/rpl/r/rpl_cross_version.result:
        removing a local exec env dependency
      mysql-test/suite/rpl/t/rpl_cross_version.test:
        refining a test to not have local exec env dependency.
      db337eb8
    • Andrei Elkin's avatar
      merge from 5.1-bt to a local tree. · 00ca9099
      Andrei Elkin authored
      00ca9099
  7. 22 Jan, 2009 5 commits
    • Andrei Elkin's avatar
      Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails · 8c3389f3
      Andrei Elkin authored
      It's a regression issue.
      The reason of the bug appeared to be an error introduced into 5.1 source code.
      A piece of code in Create_file_log_event::do_apply_event() did not have test
      coverage which made make test and pb unaware.
            
      Fixed with inverting the old value of the return value from 
      Create_file_log_event::do_apply_event().
      The rpl test suite is extended with `rpl_cross_version' the file to hold 
      regression cases similar to the current.
      
      
      mysql-test/suite/rpl/r/rpl_cross_version.result:
        new results file
      mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
        options to the server to be able to start replication to itself
      mysql-test/suite/rpl/t/rpl_cross_version.test:
        regression test for bug#31240.
      sql/log_event.cc:
        Correcting the return value from  Create_file_log_event::do_apply_event()
      8c3389f3
    • Satya B's avatar
      updating to the latest bugteam-5.1 branch · 2e3422fa
      Satya B authored
      2e3422fa
    • Davi Arnaut's avatar
      Merge test case of Bug#40264 to mysql-5.1-bugteam · 6157433b
      Davi Arnaut authored
      sql/sql_cache.cc:
        Assert that results are always complete.
      6157433b
    • Davi Arnaut's avatar
      Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit · ecfdc356
      Davi Arnaut authored
      The problem is that the query cache was storing partial results
      if the statement failed when sending the results to the client.
      This could cause clients to hang when trying to read the results
      from the cache as they would, for example, wait indefinitely for
      a eof packet that wasn't saved.
      
      The solution is to always discard the caching of a query that
      failed to send its results to the associated client.
      
      mysql-test/r/query_cache_notembedded.result:
        Add test case result for Bug#40264
      mysql-test/t/query_cache_notembedded.test:
        Add test case for Bug#40264
      sql/sql_cache.cc:
        Abort if a unreported error was raised.
      ecfdc356
    • Satya B's avatar
      TestCase for BUG#41574 - REPAIR TABLE: crashes for compressed tables · 4a3e9851
      Satya B authored
      Extending the existing testcase written for BUG#40949 to verify
      repair table operation for compressed tables
      
      
      
      mysql-test/r/myisampack.result:
        Modified result file for myisampack.test
      mysql-test/t/myisampack.test:
        Modified Testcase to test repair operation for compressed tables
      4a3e9851
  8. 21 Jan, 2009 1 commit
  9. 20 Jan, 2009 1 commit
  10. 16 Jan, 2009 2 commits