1. 21 Aug, 2009 6 commits
  2. 20 Aug, 2009 3 commits
  3. 19 Aug, 2009 2 commits
    • Georgi Kodinov's avatar
      Bug #46019: ERROR 1356 When selecting from within another · 4207e50e
      Georgi Kodinov authored
      view that has Group By
            
      Table access rights checking function check_grant() assumed
      that no view is opened when it's called.
      This is not true with nested views where the inner view
      needs materialization. In this case the view is already 
      materialized when check_grant() is called for it.
      This caused check_grant() to not look for table level
      grants on the materialized view table.
      Fixed by checking if a view is already materialized and if 
      it is check table level grants using the original table name
      (not the ones of the materialized temp table).
      4207e50e
    • Georgi Kodinov's avatar
      0c8690e5
  4. 17 Aug, 2009 1 commit
  5. 14 Aug, 2009 1 commit
  6. 13 Aug, 2009 4 commits
    • Davi Arnaut's avatar
      Merge from mysql-5.0-bugteam. · 1cf02d95
      Davi Arnaut authored
      1cf02d95
    • Davi Arnaut's avatar
      Bug#46013: rpl_extraColmaster_myisam fails on pb2 · 97dbd987
      Davi Arnaut authored
      Bug#45243: crash on win in sql thread clear_tables_to_lock() -> free()
      Bug#45242: crash on win in mysql_close() -> free()
      Bug#45238: rpl_slave_skip, rpl_change_master failed (lost connection) for STOP SLAVE
      Bug#46030: rpl_truncate_3innodb causes server crash on windows
      Bug#46014: rpl_stm_reset_slave crashes the server sporadically in pb2
      
      When killing a user session on the server, it's necessary to
      interrupt (notify) the thread associated with the session that
      the connection is being killed so that the thread is woken up
      if waiting for I/O. On a few platforms (Mac, Windows and HP-UX)
      where the SIGNAL_WITH_VIO_CLOSE flag is defined, this interruption
      procedure is to asynchronously close the underlying socket of
      the connection.
      
      In order to enable this schema, each connection serving thread
      registers its VIO (I/O interface) so that other threads can
      access it and close the connection. But only the owner thread of
      the VIO might delete it as to guarantee that other threads won't
      see freed memory (the thread unregisters the VIO before deleting
      it). A side note: closing the socket introduces a harmless race
      that might cause a thread attempt to read from a closed socket,
      but this is deemed acceptable.
      
      The problem is that this infrastructure was meant to only be used
      by server threads, but the slave I/O thread was registering the
      VIO of a mysql handle (a client API structure that represents a
      connection to another server instance) as a active connection of
      the thread. But under some circumstances such as network failures,
      the client API might destroy the VIO associated with a handle at
      will, yet the VIO wouldn't be properly unregistered. This could
      lead to accesses to freed data if a thread attempted to kill a
      slave I/O thread whose connection was already broken.
      
      There was a attempt to work around this by checking whether
      the socket was being interrupted, but this hack didn't work as
      intended due to the aforementioned race -- attempting to read
      from the socket would yield a "bad file descriptor" error.
      
      The solution is to add a hook to the client API that is called
      from the client code before the VIO of a handle is deleted.
      This hook allows the slave I/O thread to detach the active vio
      so it does not point to freed memory.
      97dbd987
    • Ramil Kalimullin's avatar
      Fix for bug #46614: Assertion in show_create_trigger() · 1aec6f7a
      Ramil Kalimullin authored
      on SHOW CREATE TRIGGER + MERGE table
      
      Problem: SHOW CREATE TRIGGER erroneously relies on fact
      that we have the only underlying table for a trigger
      (wrong for merge tables).
      
      Fix: remove erroneous assert().
      1aec6f7a
    • 's avatar
      BUG#45574 CREATE IF NOT EXISTS is not binlogged if the object exists · 10e90a1f
      authored
      There is an inconsistency with DROP DATABASE|TABLE|EVENT IF EXISTS and
      CREATE DATABASE|TABLE|EVENT IF NOT EXISTS. DROP IF EXISTS statements are
      binlogged even if either the DB, TABLE or EVENT does not exist. In
      contrast, Only the CREATE EVENT IF NOT EXISTS is binlogged when the EVENT
      exists.  
      
      This patch fixes the following cases for all the replication formats:
      CREATE DATABASE IF NOT EXISTS.
      CREATE TABLE IF NOT EXISTS,
      CREATE TABLE IF NOT EXISTS ... LIKE,
      CREAET TABLE IF NOT EXISTS ... SELECT.
      10e90a1f
  7. 12 Aug, 2009 7 commits
    • Mattias Jonsson's avatar
      merge · 602404b3
      Mattias Jonsson authored
      602404b3
    • Konstantin Osipov's avatar
      A follow up patch for the follow up patch for Bug#45829 · a75f9342
      Konstantin Osipov authored
      "CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, 
      does nothing".
      
      Put back stubs for members of structures that are shared between
      sql/ and pluggable storage engines. to not break ABI unnecessarily.
      To be NULL-merged into 5.4, where we do break the ABI already.
      a75f9342
    • Konstantin Osipov's avatar
      A follow up patch for Bug#45829 "CREATE TABLE TRANSACTIONAL · d82d7ccc
      Konstantin Osipov authored
      PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing"
      Remove unused code that would lead to warnings when compiling
      sql_yacc.yy.
      d82d7ccc
    • Mattias Jonsson's avatar
      manual merge · 0c342270
      Mattias Jonsson authored
      0c342270
    • Mattias Jonsson's avatar
      merge · 475c6423
      Mattias Jonsson authored
      475c6423
    • 's avatar
      Manual Merge · dc4b7b89
      authored
      dc4b7b89
    • 's avatar
      BUG#45516 SQL thread does not use database charset properly · f5be2159
      authored
              
      Replication SQL thread does not set database default charset to 
      thd->variables.collation_database properly, when executing LOAD DATA binlog.
      This bug can be repeated by using "LOAD DATA" command in STATEMENT mode.
              
      This patch adds code to find the default character set of the current database 
      then assign it to thd->db_charset when slave server begins to execute a relay log.
      The test of this bug is added into rpl_loaddata_charset.test 
      f5be2159
  8. 11 Aug, 2009 6 commits
  9. 10 Aug, 2009 4 commits
  10. 08 Aug, 2009 1 commit
    • Davi Arnaut's avatar
      Bug#45010: invalid memory reads during parsing some strange statements · 69fbbdc1
      Davi Arnaut authored
      The problem is that the lexer could inadvertently skip over the
      end of a query being parsed if it encountered a malformed multibyte
      character. A specially crated query string could cause the lexer
      to jump up to six bytes past the end of the query buffer. Another
      problem was that the laxer could use unfiltered user input as
      a signed array index for the parser maps (having upper and lower
      bounds 0 and 256 respectively).
      
      The solution is to ensure that the lexer only skips over well-formed
      multibyte characters and that the index value of the parser maps
      is always a unsigned value.
      69fbbdc1
  11. 07 Aug, 2009 1 commit
    • Martin Hansson's avatar
      Bug#46454: MySQL wrong index optimisation leads to incorrect result & crashes · 5421a8e8
      Martin Hansson authored
      Problem 1:
      When the 'Using index' optimization is used, the optimizer may still - after
      cost-based optimization - decide to use another index in order to avoid using
      a temporary table. But when this happens, the flag to the storage engine to 
      read index only (not table) was still set. Fixed by resetting the flag in the 
      storage engine and TABLE structure in the above scenario, unless the new index
      allows for the same optimization.
      Problem 2:
      When a 'ref' access method was employed by cost-based optimizer, (when the column
      is non-NULLable), it was assumed that it needed no initialization if 'quick' access
      methods (since they are based on range scan). When ORDER BY optimization overrides 
      the decision, however, it expects to have this initialized and hence crashes. 
      Fixed in 5.1 (was fixed in 6.0 already) by initializing 'quick' even when there's 
      'ref' access. 
      5421a8e8
  12. 06 Aug, 2009 4 commits
    • Ignacio Galarza's avatar
      Auto-merge · bcbbef6f
      Ignacio Galarza authored
      bcbbef6f
    • Ignacio Galarza's avatar
      1c07007f
    • Mattias Jonsson's avatar
      Bug#46478: timestamp field incorrectly defaulted · 89b9fbd4
      Mattias Jonsson authored
      when partition is reoganized.
      
      Problem was that table->timestamp_field_type was not changed
      before copying rows between partitions.
      
      fixed by setting it to TIMESTAMP_NO_AUTO_SET as the first thing
      in fast_alter_partition_table, so that all if-branches is covered.
      89b9fbd4
    • Satya B's avatar
      Fix for BUG#45816 - assertion failure with index containing double · ad951044
      Satya B authored
                          column on partitioned table
            
            
      An assertion 'ASSERT_COULUMN_MARKED_FOR_READ' is failed if the query 
      is executed with index containing double column on partitioned table.
      The problem is that assertion expects all the fields which are read,
      to be in the read_set.
            
      In this query only the field 'a' is in the readset as the tables in
      the query are joined by the field 'a' and so the assertion fails 
      expecting other field 'b'.
            
      Since the function cmp() is just comparison of two parameters passed, 
      the assertion is not required.
            
      Fixed by removing the assertion in the double fields comparision
      function and also fixed the index initialization to do ordered
      index scan with RW LOCK which ensures all the fields from a key are in
      the read_set.
       
      
      Note: this bug is not reproducible with other datatypes because the
            assertion doesn't exist in comparision function for other 
            datatypes.
      ad951044