1. 23 Jan, 2007 2 commits
    • dlenev@mockturtle.local's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 6562df20
      dlenev@mockturtle.local authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg24491
      6562df20
    • dlenev@mockturtle.local's avatar
      Proposed fix for bug#24491 "using alias from source table in insert ... · 2b63f106
      dlenev@mockturtle.local authored
      on duplicate key".
      
      INSERT ... SELECT ... ON DUPLICATE KEY UPDATE which was used in
      stored routine or as prepared statement and which in its ON DUPLICATE
      KEY clause erroneously tried to assign value to a column mentioned only
      in its SELECT part was properly emitting error on the first execution
      but succeeded on the second and following executions.
      
      Code which is responsible for name resolution of fields mentioned in
      UPDATE clause (e.g. see select_insert::prepare()) modifies table list
      and Name_resolution_context used in this process. It uses
      Name_resolution_context_state::save_state/restore_state() to revert
      these modifications. Unfortunately those two methods failed to revert
      properly modifications to TABLE_LIST::next_name_resolution_table
      and this broke name resolution process for successive executions.
      
      This patch fixes Name_resolution_context_state::save_state/restore_state()
      in such way that it properly handles TABLE_LIST::next_name_resolution_table.
      2b63f106
  2. 22 Jan, 2007 1 commit
  3. 20 Jan, 2007 1 commit
  4. 19 Jan, 2007 3 commits
    • dlenev@mockturtle.local's avatar
      Fix for bug #25044 "ALTER TABLE ... ENABLE KEYS acquires global 'opening · 7b1a94ef
      dlenev@mockturtle.local authored
      tables' lock."
      
      Execution of ALTER TABLE ... ENABLE KEYS on a table (which can take rather
      long time) prevented concurrent execution of all statements using tables.
      
      The problem was caused by the fact that we were holding LOCK_open mutex
      during whole duration of this statement and particularly during call
      to handler::enable_indexes(). This behavior was introduced as part of the
      fix for bug 14262 "SP: DROP PROCEDURE|VIEW (maybe more) write to binlog
      too late (race cond)"
      
      The patch simply restores old behavior. Note that we can safely do this as
      this operation takes exclusive lock (similar to name-lock) which blocks both
      DML and DDL on the table being altered.
      
      It also introduces mysql-test/include/wait_show_pattern.inc helper script
      which is used to make test-case for this bug robust enough.
      7b1a94ef
    • malff/marcsql@weblab.(none)'s avatar
      Manual merge · 4064c89d
      malff/marcsql@weblab.(none) authored
      4064c89d
    • malff/marcsql@weblab.(none)'s avatar
      Merge weblab.(none):/home/marcsql/TREE/mysql-4.1-24562 · cacaa52b
      malff/marcsql@weblab.(none) authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-24562-merge
      cacaa52b
  5. 18 Jan, 2007 3 commits
    • malff/marcsql@weblab.(none)'s avatar
      Bug#24562 (ALTER TABLE ... ORDER BY ... with complex expression asserts) · 436e1f59
      malff/marcsql@weblab.(none) authored
      WL#3681 (ALTER TABLE ORDER BY)
      
      Before this fix, the ALTER TABLE statement implemented an ORDER BY option
      with the following characteristics :
      
      1) The order by clause accepts a list of criteria, with optional ASC or
      DESC keywords
      
      2) Each criteria can be a general expression, involving operators,
      native functions, stored functions, user defined functions, subselects ...
      
      With this fix :
      
      1) has been left unchanged, since it's a de-facto existing feature,
      that was already present in the code base and partially covered in the test
      suite. Code coverage for ASC and DESC was missing and has been improved.
      
      2) has been changed to limit the kind of criteria that are permissible:
      now only a column name is valid.
      436e1f59
    • kroki/tomash@moonlight.home's avatar
      Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0 · ec21b828
      kroki/tomash@moonlight.home authored
      into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0-bug24404
      ec21b828
    • kroki/tomash@moonlight.home's avatar
      Bug#24404: strange bug with view+permission+prepared statement. · 6e771358
      kroki/tomash@moonlight.home authored
      The problem was that if a prepared statement accessed a view, the
      access to the tables listed in the query after that view was done in
      the security context of the view.
      
      The bug was in the assigning of the security context to the tables
      belonging to a view: we traversed the list of all query tables
      instead.  It didn't show up in the normal (non-prepared) statements
      because of the different order of the steps of checking privileges
      and descending into a view for normal and prepared statements.
      
      The solution is to traverse the list and stop once the last table
      belonging to the view was processed.
      6e771358
  6. 17 Jan, 2007 4 commits
  7. 16 Jan, 2007 3 commits
  8. 15 Jan, 2007 11 commits
  9. 12 Jan, 2007 9 commits
  10. 11 Jan, 2007 3 commits