1. 03 Nov, 2009 3 commits
    • Jorgen Loland's avatar
      Bug#48177 - SELECTs with NOT IN subqueries containing NULL · bec35067
      Jorgen Loland authored
                  values return too many records
      
      WHERE clauses with "outer_value_list NOT IN subselect" were
      handled incorrectly if the outer value list contained multiple 
      items where at least one of these could be NULL. The first 
      outer record with NULL value was handled correctly, but if a 
      second record with NULL value existed, the optimizer would 
      choose to reuse the result it got on the last execution of the 
      subselect. This is incorrect if the outer value list has 
      multiple items.
           
      The fix is to make Item_in_optimizer::val_int (in 
      item_cmpfunc.cc) reuse the result of the latest execution
      for NULL values only if all values in the outer_value_list 
      are NULL.
      
      
      mysql-test/r/subselect3.result:
        Added test for BUG#48177
      mysql-test/t/subselect3.test:
        Added test for BUG#48177
      sql/item_cmpfunc.cc:
        Make Item_in_optimizer::val_int (in item_cmpfunc.cc) reuse the result of the latest execution for NULL values only if all values in the outer_value_list are NULL.
      bec35067
    • unknown's avatar
      Manual Merge · 9519c8e5
      unknown authored
      9519c8e5
    • unknown's avatar
      BUG#48216 Replication fails on all slaves after upgrade to 5.0.86 on master · 98198851
      unknown authored
      When a sessione is closed, all temporary tables of the session are automatically 
      dropped and are binlogged. But it will be binlogged with wrong database names when
      the length of the temporary tables' database names are greater than the 
      length of the current database name or the current database is not set.
      
      Query_log_event's db_len is forgot to set when Query_log_event's db is set.
      This patch wrote code to set db_len immediately after db has set.
      
      
      98198851
  2. 02 Nov, 2009 2 commits
  3. 03 Nov, 2009 4 commits
    • Sergey Vojtovich's avatar
      cd167ee2
    • Sergey Vojtovich's avatar
      Clean-ups after applying InnoDB snapshot 5.1-ss6129: · b703edd7
      Sergey Vojtovich authored
      - disabled main.innodb_bug47777.test with InnoDB plugin
        until fix for plugin is applied.
      - disabled main.innodb-autoinc.test (failing)
      - re-enabled main.innodb_bug39438.test
      - added error message suppression to innodb_bug39438, as
        requested by InnoDB/Oracle
      - reverted change to main.innodb_bug34300 as plugin specific.
      b703edd7
    • Vladislav Vaintroub's avatar
      merge · b5177748
      Vladislav Vaintroub authored
      b5177748
    • Vladislav Vaintroub's avatar
      Bug #47423 mtr connects to wrong database · 2377eed3
      Vladislav Vaintroub authored
      The reason for the bug is that mysqtest as well as other client tools
      running in test suite (mysqlbinlog, mysqldump) will first try to connect 
      whatever database has created shared memory with default base name 
      "MySQL" and use this. (Same effect could be seen on Unix if mtr would
      not care to calculate "port" and "socket" parameter).
            
      The fix ensures that all client tools and  running in mtr use unique  
      per-database shared memory base parameters, so there is no possibility
      to clash with already installed one. We use socket name for shared memory 
      base (it's known to be unique). This shared-memory-base is written to the
      MTR config file to the [client] and [mysqld] sections. Fix made also made 
      sure all client tools understand and correctly handle --shared-memory-base.
      Prior to this patch  it was not the case for  mysqltest, mysqlbinlog and 
      mysql_client_test.
            
      All new connections done from mtr scripts via connect() will by default 
      set shared-memory-base. And finally, there is a possibility to force 
      shared memory or pipe connection and overwrite shared memory/pipe base name
      from within mtr scripts via optional PIPE or SHM modifier. This functionality
      was manually backported from 6.0
      (original patch  http://lists.mysql.com/commits/74749)
      2377eed3
  4. 02 Nov, 2009 18 commits
    • Vladislav Vaintroub's avatar
      Bug#47571: idle named pipe connection is unkillable · e0800807
      Vladislav Vaintroub authored
      Bug#31621: Windows server hanging during shutdown using named pipes 
                 and idle connection
                  
      Problem: when idle pipe connection is forcefully closed with KILL
      statement or when the server goes down, thread that is closing connection
      would hang infinitely in CloseHandle(). The reason for the hang is that 
      named pipe operations are performed synchronously. In this mode all IOs
      on pipe are serialized, that is CloseHandle() will not abort ReadFile() 
      in another thread, but wait for ReadFile() to complete.
                  
      The fix implements asynchrnous mode for named pipes, where operation of file
      are not synchronized. Read/Write operation would fire an async IO and wait for
      either IO completion or timeout.
                  
      Note, that with this patch timeouts are properly handled for named pipes.
            
      Post-review: Win32 timeout code has been fixed for named pipes and shared
      memory. We do not store pointer to NET in vio structure, only the read and 
      write timeouts.
      
      
      include/violite.h:
        Add pipe_overlapped to Vio structure for async IO for named pipes.
      sql-common/client.c:
        Use asynchronous pipe IO.
      sql/mysqld.cc:
        Use asynchronous pipe IO.
      vio/vio.c:
        -Refactor timeouts for win32 protocols: shared memory and named pipes.
        Store read/write timeout in VIO structure, instead of storing pointer
        to NET. New function vio_win32_timeout called indirectly via 
        vio_timeout changes these values.
      vio/vio_priv.h:
        Remove vio_ignore_timeout.
        Add vio_win32_timeout to be used for named pipes and shared memory.
      vio/viosocket.c:
        Use async IO for named pipes.
        After issuing IO, wait for either IO completion, pipe_close_event
        or timeout.
                
        Refactor timeouts for named pipe and shared memory.
      e0800807
    • Davi Arnaut's avatar
      Automerge. · d87301d7
      Davi Arnaut authored
      d87301d7
    • Luis Soares's avatar
    • Luis Soares's avatar
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · 63ef1103
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6129 | vasil | 2009-10-30 17:14:22 +0200 (Fri, 30 Oct 2009) | 4 lines
      branches/5.1:
      
      Revert a change to Makefile.am that sneaked unnoticed in c6127.
      63ef1103
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · 66fc8224
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6127 | vasil | 2009-10-30 11:18:25 +0200 (Fri, 30 Oct 2009) | 18 lines
      branches/5.1:
      
      Backport c6121 from branches/zip:
      
        ------------------------------------------------------------------------
        r6121 | sunny | 2009-10-30 01:42:11 +0200 (Fri, 30 Oct 2009) | 7 lines
        Changed paths:
           M /branches/zip/mysql-test/innodb-autoinc.result
        
        branches/zip: This test has been problematic for sometime now. The underlying
        bug is that the data dictionaries get out of sync. In the AUTOINC code we
        try and apply salve to the symptoms. In the past MySQL made some unrelated
        change and the dictionaries stopped getting out of sync and this test started
        to fail. Now, it seems they have reverted that changed and the test is
        passing again. I suspect this is not he last time that this test will change.
        
        ------------------------------------------------------------------------
      66fc8224
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · 37d83e4d
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6125 | vasil | 2009-10-30 10:31:23 +0200 (Fri, 30 Oct 2009) | 4 lines
      branches/5.1:
      
      White-space fixup.
      37d83e4d
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · f276d544
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6123 | jyang | 2009-10-30 05:43:06 +0200 (Fri, 30 Oct 2009) | 8 lines
      branches/5.1: In os_mem_alloc_large(), if we fail to attach
      the shared memory, reset memory pointer ptr to NULL, and
      allocate memory from conventional pool. This is a port
      from branches/zip.
      Bug #48237 Error handling in os_mem_alloc_large appears to be incorrect
      rb://198  Approved by: Marko
      f276d544
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · c29b740b
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6122 | jyang | 2009-10-30 05:18:38 +0200 (Fri, 30 Oct 2009) | 7 lines
      branches/5.1: Chnage WARN_LEVEL_ERROR to WARN_LEVEL_WARN
      for push_warning_printf() call in innodb.
      Fix Bug#47233: Innodb calls push_warning(MYSQL_ERROR::WARN_LEVEL_ERROR)
      
      rb://170 approved by Marko.
      c29b740b
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · 3af62819
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6076 | vasil | 2009-10-14 19:30:12 +0300 (Wed, 14 Oct 2009) | 4 lines
      branches/5.1:
      
      Fix typo.
      3af62819
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · ebc36267
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6052 | sunny | 2009-10-12 07:09:56 +0300 (Mon, 12 Oct 2009) | 4 lines
      branches/5.1: Reset the statement level autoinc counter on ROLLBACK. Fix
      the test results too.
      rb://164
      
      r6053 | sunny | 2009-10-12 07:37:49 +0300 (Mon, 12 Oct 2009) | 6 lines
      branches/5.1: Copy the maximum AUTOINC value from the old table to the new
      table when MySQL does a CREATE INDEX ON T. This is required because MySQL
      does a table copy, rename and drops the old table.
      Fix Bug#47125: auto_increment start value is ignored if an index is created and engine=innodb
      rb://168
      ebc36267
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · c8d97af6
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6051 | sunny | 2009-10-12 07:05:00 +0300 (Mon, 12 Oct 2009) | 6 lines
      branches/5.1: Ignore negative values supplied by the user when calculating the
      next value to store in dict_table_t. Setting autoincrement columns top negative
      values is undefined behavior and this change should bring the behavior of
      InnoDB closer to what users expect. Added several tests to check.
      rb://162
      c8d97af6
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · 71d24a23
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6045 | jyang | 2009-10-08 02:27:08 +0300 (Thu, 08 Oct 2009) | 7 lines
      branches/5.1: Fix bug #47777. Treat the Geometry data same as
      Binary BLOB in ha_innobase::store_key_val_for_row(), since the
      Geometry data is stored as Binary BLOB in Innodb.
      
      Review: rb://180 approved by Marko Makela.
      71d24a23
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · 7e317016
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6032 | vasil | 2009-10-01 15:55:49 +0300 (Thu, 01 Oct 2009) | 8 lines
      branches/5.1:
      
      Fix Bug#38996 Race condition in ANALYZE TABLE
      
      by serializing ANALYZE TABLE inside InnoDB.
      
      Approved by:	Heikki (rb://175)
      7e317016
    • Sergey Vojtovich's avatar
      Applying InnoDB snashot 5.1-ss6129 · e7452e7b
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r5952 | calvin | 2009-09-22 19:45:07 +0300 (Tue, 22 Sep 2009) | 7 lines
      branches/5.1: fix bug#42383: Can't create table 'test.bug39438'
      
      For embedded server, MySQL may pass in full path, which is
      currently disallowed. It is needed to relax the condition by
      accepting full paths in the embedded case.
      
      Approved by: Heikki (on IM)
      e7452e7b
    • Martin Hansson's avatar
      Bug#47925: regression of range optimizer and date comparison in 5.1.39! · 740b7c4e
      Martin Hansson authored
      When a query was using a DATE or DATETIME value formatted
      using any other separator characters beside hyphen '-', a
      query with a greater-or-equal '>=' condition matching only
      the greatest value in an indexed column, the result was
      empty if index range scan was employed.
      
      The range optimizer got a new feature between 5.1.38 and
      5.1.39 that changes a greater-or-equal condition to a
      greater-than if the value matching that in the query was not
      present in the table. But the value comparison function
      compared the dates as strings instead of dates.
      
      The bug was fixed by splitting the function
      get_date_from_str in two: One part that parses and does
      error checking. This function is now visible outside the
      module. The old get_date_from_str now calls the new
      function.
      
      
      mysql-test/r/range.result:
        Bug#47925: Test result
      mysql-test/t/range.test:
        Bug#47925: Test case
      sql/item.cc:
        Bug#47925: Fix + some edit on the comments
      sql/item.h:
        Bug#47925: Changed function signature
      sql/item_cmpfunc.cc:
        Bug#47925: Split function in two
      sql/item_cmpfunc.h:
        Bug#47925: Declaration of new function
      sql/opt_range.cc:
        Bug#47925: Added THD to function call
      sql/time.cc:
        Bug#47925: Added microsecond comparison
      740b7c4e
    • Davi Arnaut's avatar
      Automerge. · 1955c866
      Davi Arnaut authored
      1955c866
    • Tatiana A. Nurnberg's avatar
      auto-merge · 09c50b63
      Tatiana A. Nurnberg authored
      09c50b63
  5. 01 Nov, 2009 1 commit
  6. 31 Oct, 2009 1 commit
  7. 30 Oct, 2009 11 commits
    • Alexey Kopytov's avatar
      Automerge. · e5a1995d
      Alexey Kopytov authored
      e5a1995d
    • Alexey Kopytov's avatar
      Automerge. · 3df1ae7a
      Alexey Kopytov authored
      3df1ae7a
    • Alexey Kopytov's avatar
      Automerge. · 7f965636
      Alexey Kopytov authored
      7f965636
    • Alexey Kopytov's avatar
      Automerge. · 23cbd659
      Alexey Kopytov authored
      23cbd659
    • Alexey Kopytov's avatar
      Bug #48131: crash group by with rollup, distinct, filesort, · b67cdaa3
      Alexey Kopytov authored
                  with temporary tables
      
      There were two problems the test case from this bug was
      triggering:
      
      1. JOIN::rollup_init() was supposed to wrap all constant Items
      into another object for queries with the WITH ROLLUP modifier
      to ensure they are never considered as constants and therefore
      are written into temporary tables if the optimizer chooses to
      employ them for DISTINCT/GROUP BY handling.
      
      However, JOIN::rollup_init() was called before
      make_join_statistics(), so Items corresponding to fields in
      const tables could not be handled as intended, which was
      causing all kinds of problems later in the query execution. In
      particular, create_tmp_table() assumed all constant items
      except "hidden" ones to be removed earlier by remove_const()
      which led to improperly initialized Field objects for the
      temporary table being created. This is what was causing crashes
      and valgrind errors in storage engines.
      
      2. Even when the above problem had been fixed, the query from
      the test case produced incorrect results due to some
      DISTINCT/GROUP BY optimizations being performed by the
      optimizer that are inapplicable in the WITH ROLLUP case.
      
      Fixed by disabling inapplicable DISTINCT/GROUP BY optimizations
      when the WITH ROLLUP modifier is present, and splitting the
      const-wrapping part of JOIN::rollup_init() into a separate
      method which is now invoked after make_join_statistics() when
      the const tables are already known.
      
      mysql-test/r/olap.result:
        Added a test case for bug #48131.
      mysql-test/t/olap.test:
        Added a test case for bug #48131.
      sql/sql_select.cc:
        1. Disabled inapplicable DISTINCT/GROUP BY optimizations when
        the WITH ROLLUP modifier is present.
        2. Split the const-wrapping part of JOIN::rollup_init() into a
        separate method.
      sql/sql_select.h:
        Added rollup_process_const_fields() declaration.
      b67cdaa3
    • Georgi Kodinov's avatar
      merge · 27c2af97
      Georgi Kodinov authored
      27c2af97
    • Georgi Kodinov's avatar
      merge from 5.0-main · ecef6c33
      Georgi Kodinov authored
      ecef6c33
    • Georgi Kodinov's avatar
      merge · 5bba20bb
      Georgi Kodinov authored
      5bba20bb
    • Georgi Kodinov's avatar
      Bug #48291 : crash with row() operator,select into @var, and · 9d96cd6d
      Georgi Kodinov authored
        subquery returning multiple rows
      
      Error handling was missing when handling subqueires in WHERE 
      and when assigning a SELECT result to a @variable.
      This caused crash(es). 
      
      Fixed by adding error handling code to both the WHERE 
      condition evaluation and to assignment to an @variable.
      9d96cd6d
    • Georgi Kodinov's avatar
      merge · 1e7fb592
      Georgi Kodinov authored
      1e7fb592
    • Georgi Kodinov's avatar
      Bug #48293: crash with procedure analyse, view with > 10 columns, · 851e2509
      Georgi Kodinov authored
      having clause...
      
      The fix for bug 46184 was not very complete. It was not covering
      views using temporary tables and multiple tables in a FROM clause.
      Fixed by reverting the fix for 46184 and making a more general
      check that is checking at the right execution stage and for all
      of the non-supported cases.
      Now PROCEDURE ANALYZE on non-top level SELECT is also forbidden.
      Updated the analyse.test and subselect.test accordingly.
      851e2509