1. 12 May, 2010 2 commits
    • Staale Smedseng's avatar
      Bug #49756 Rows_examined is always 0 in the slow query log for · 44fe4c70
      Staale Smedseng authored
      update statements
            
      Only SELECT statements report any examined rows in the slow
      log. Slow UPDATE, DELETE and INSERT statements report 0 rows
      examined, unless the statement has a condition including a
      SELECT substatement.
            
      This patch adds counting of examined rows for the UPDATE and
      DELETE statements. An INSERT ... VALUES statement will still 
      not report any rows as examined.
      44fe4c70
    • Sven Sandberg's avatar
      BUG#50410: rpl_ndb tests should run with binlog_format=row · b0b0000d
      Sven Sandberg authored
      Problem: The rpl_ndb did not set binlog_format explicitly. Since
      the default is binlog_format=statement, it means that the suite
      ran with that. ndb does not support binlog_format=statement,
      and many tests were skipped because they sourced
      include/have_binlog_format_row_or_mixed.inc
      Fix: set binlog_format=row explicitly in the configuration file
      for the rpl_ndb suite.
      b0b0000d
  2. 11 May, 2010 2 commits
    • Martin Hansson's avatar
      6549653f
    • Martin Hansson's avatar
      Bug#48157: crash in Item_field::used_tables · 27ac666f
      Martin Hansson authored
            
      MySQL handles the join syntax "JOIN ... USING( field1,
      ... )" and natural joins by building the same parse tree as
      a corresponding join with an "ON t1.field1 = t2.field1 ..."
      expression would produce. This parse tree was not cleaned up
      properly in the following scenario. If a thread tries to
      lock some tables and finds that the tables were dropped and
      re-created while waiting for the lock, it cleans up column
      references in the statement by means a per-statement free
      list. But if the statement was part of a stored procedure,
      column references on the stored procedure's free list
      weren't cleaned up and thus contained pointers to freed
      objects.
            
      Fixed by adding a call to clean up the current prepared
      statement's free list.
      
      This is a backport from MySQL 5.1
      27ac666f
  3. 10 May, 2010 3 commits
    • Mattias Jonsson's avatar
      merge · af2de573
      Mattias Jonsson authored
      af2de573
    • Martin Hansson's avatar
      Bug#50939: Loose Index Scan unduly relies on engine to · 1c5200f6
      Martin Hansson authored
      remember range endpoints
      
      The Loose Index Scan optimization keeps track of a sequence
      of intervals. For the current interval it maintains the
      current interval's endpoints. But the maximum endpoint was
      not stored in the SQL layer; rather, it relied on the
      storage engine to retain this value in-between reads. By
      coincidence this holds for MyISAM and InnoDB. Not for the
      partitioning engine, however.
      
      Fixed by making the key values iterator 
      (QUICK_RANGE_SELECT) keep track of the current maximum endpoint.
      This is also more efficient as we save a call through the
      handler API in case of open-ended intervals.
      
      The code to calculate endpoints was extracted into 
      separate methods in QUICK_RANGE_SELECT, and it was possible to
      get rid of some code duplication as part of fix.
      1c5200f6
    • Jim Winstead's avatar
      Using an initial command with mysql_options(..., MYSQL_INIT_COMMAND, ...) · bea06832
      Jim Winstead authored
      that generated multiple result sets (such as a stored procedure or a
      multi-statement command) would leave the connection unusable. (Bug #42373)
      
      A side-effect of this bug fix is to make MYSQL_INIT_COMMAND settings ignored
      when connecting from within the server, but none of the existing mechanisms
      for connecting from within the server use or need to set the initial command.
      bea06832
  4. 09 May, 2010 1 commit
  5. 08 May, 2010 1 commit
  6. 07 May, 2010 2 commits
  7. 06 May, 2010 3 commits
    • Gleb Shchepa's avatar
      Bug #53088: mysqldump with -T & --default-character-set set · c4021e2d
      Gleb Shchepa authored
                  truncates text/blob to 766 chars
      
      mysqldump and SELECT ... INTO OUTFILE truncated long BLOB/TEXT
      values to size of 766 bytes (MAX_FIELD_WIDTH or 255 * 3 + 1).
      
      The select_export::send_data method has been modified to
      reallocate a conversion buffer for long field data.
      c4021e2d
    • Martin Hansson's avatar
      Merge of fix for Bug#52357 · 9bd08c19
      Martin Hansson authored
      9bd08c19
    • Martin Hansson's avatar
      Bug#52357: Assertion failed: join->best_read in · 4e75f7c0
      Martin Hansson authored
      greedy_search optimizer_search_depth=0
      
      The algorithm inside restore_prev_nj_state failed to
      properly update the counters within the NESTED_JOIN
      tree. The counter was decremented each time a table in the
      node was removed from the QEP, the correct thing to do being
      only to decrement it when the last table in the child node
      was removed from the plan. This lead to node counters
      getting negative values and the plan thus appeared
      impossible. An assertion caught this.
      
      Fixed by not recursing up the tree unless the last table in
      the join nest node is removed from the plan
      4e75f7c0
  8. 05 May, 2010 1 commit
    • Georgi Kodinov's avatar
      On behalf of Kristofer : · 1132c354
      Georgi Kodinov authored
      Bug#53417 my_getwd() makes assumptions on the buffer sizes which not always hold true
            
      The mysys library contains many functions for rewriting file paths. Most of these
      functions makes implicit assumptions on the buffer sizes they write to. If a path is put
      in my_realpath() it will propagate to my_getwd() which assumes that the buffer holding
      the path name is greater than 2. This is not true in cases.
            
      In the special case where a VARBIN_ITEM is passed as argument to the LOAD_FILE function
      this can lead to a crash.
            
      This patch fixes the issue by introduce more safe guards agaist buffer overruns.
      1132c354
  9. 04 May, 2010 6 commits
  10. 03 May, 2010 3 commits
    • Kristofer Pettersson's avatar
      Automerge · 83fb8a77
      Kristofer Pettersson authored
      83fb8a77
    • Kristofer Pettersson's avatar
      Bug#50373 --secure-file-priv="" · 5b6ebdf0
      Kristofer Pettersson authored
      Iterative patch improvement. Previously committed patch
      caused wrong result on Windows. The previous patch also
      broke secure_file_priv for symlinks since not all file
      paths which must be compared against this variable are
      normalized using the same norm.
      
      The server variable opt_secure_file_priv wasn't
      normalized properly and caused the operations
      LOAD DATA INFILE .. INTO TABLE ..
      and
      SELECT load_file(..)
      to do different interpretations of the 
      --secure-file-priv option.
           
      The patch moves code to the server initialization
      routines so that the path always is normalized
      once and only once.
            
      It was also intended that setting the option
      to an empty string should be equal to 
      lifting all previously set restrictions. This
      is also fixed by this patch.
      5b6ebdf0
    • Georgi Kodinov's avatar
      Bug #53371: COM_FIELD_LIST can be abused to bypass table level grants. · 6ae9c701
      Georgi Kodinov authored
      The server was not checking the supplied to COM_FIELD_LIST table name
      for validity and compliance to acceptable table names standards.
      Fixed by checking the table name for compliance similar to how it's 
      normally checked by the parser and returning an error message if 
      it's not compliant.
      6ae9c701
  11. 01 May, 2010 1 commit
  12. 30 Apr, 2010 3 commits
    • Alexey Kopytov's avatar
      Automerge. · 0f5afe5d
      Alexey Kopytov authored
      0f5afe5d
    • Alexey Kopytov's avatar
      Bug #48419: another explain crash.. · 96366e11
      Alexey Kopytov authored
      WHERE predicates containing references to empty tables in a
      subquery were handled incorrectly by the optimizer when
      executing EXPLAIN. As a result, the optimizer could try to
      evaluate such predicates rather than just stop with
      "Impossible WHERE noticed after reading const tables" as 
      it would do in a non-subquery case. This led to valgrind 
      errors and crashes.
      
      Fixed the code checking the above condition so that subqueries
      are not excluded and hence are handled in the same way as top
      level SELECTs.
      96366e11
    • Vasil Dimov's avatar
      Disable innodb.innodb, main.ps_3innodb and main.partition_innodb_plugin · 8e6e1634
      Vasil Dimov authored
      mysql-tests because those emit (spurious?) valgrind warnings.
      8e6e1634
  13. 29 Apr, 2010 7 commits
  14. 28 Apr, 2010 5 commits
    • Vasil Dimov's avatar
      Bug#53046 dict_update_statistics_low can still be run concurrently · 792ea1f6
      Vasil Dimov authored
      on same table
      
      Followup to vasil.dimov@oracle.com-20100428102033-dt3caf531rs3lidr :
      
      Add more asserions, which I forgot.
      792ea1f6
    • Vasil Dimov's avatar
      Revert the fix of Bug#38996 Race condition in ANALYZE TABLE · 7cf27d38
      Vasil Dimov authored
      This is branches/zip@r6032 in SVN and _is part_ of
      revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6113
      in BZR.
      
      This is being reverted because now the code is serialized directly on
      index->stat_n_diff_key_vals[] as the fix for
      Bug#53046 dict_update_statistics_low can still be run concurrently on same table
      goes.
      7cf27d38
    • Vasil Dimov's avatar
      Followup to vasil.dimov@oracle.com-20100428084627-wtrmc66wqvjsdgj7: · 1a489632
      Vasil Dimov authored
      Address Marko's suggestions wrt the fix of
      Bug#53046 dict_update_statistics_low can still be run concurrently
      on same table
      1a489632
    • Vasil Dimov's avatar
      Fix Bug#53046 dict_update_statistics_low can still be run concurrently · 90fa66ab
      Vasil Dimov authored
      on same table
      
      Protect dict_index_t::stat_n_diff_key_vals[] with an array of
      mutexes.
      
      Testing: tested all code paths under UNIV_SYNC_DEBUG
      for the one in dict_print() one has to enable the InnoDB table monitor:
      CREATE TABLE innodb_table_monitor (a int) ENGINE=INNODB;
      90fa66ab
    • Marko Makela's avatar
      Merge r6103 from InnoDB Plugin to the built-in InnoDB to fix Bug #53202: · 831f2c9c
      Marko Makela authored
        ------------------------------------------------------------------------
        r6103 | marko | 2009-10-26 15:46:18 +0200 (Mon, 26 Oct 2009) | 4 lines
        Changed paths:
           M /branches/zip/row/row0ins.c
      
        branches/zip: row_ins_alloc_sys_fields(): Zero out the system columns
        DB_TRX_ID, DB_ROLL_PTR and DB_ROW_ID, in order to avoid harmless
        Valgrind warnings about uninitialized data.  (The warnings were
        harmless, because the fields would be initialized at a later stage.)
        ------------------------------------------------------------------------
      831f2c9c