1. 24 Jan, 2007 1 commit
    • unknown's avatar
      Merge mockturtle.local:/home/dlenev/src/mysql-5.0-bg24491 · a45938bf
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg24491
      
      
      mysql-test/t/sp-error.test:
        Auto merged
      sql/item.h:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      mysql-test/r/ps.result:
        SCCS merged
      mysql-test/r/sp-error.result:
        SCCS merged
      mysql-test/t/disabled.def:
        SCCS merged
      mysql-test/t/ps.test:
        SCCS merged
      a45938bf
  2. 23 Jan, 2007 2 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 5f544ed0
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg24491
      
      
      sql/item.h:
        Auto merged
      mysql-test/r/ps.result:
        Manual merge.
      mysql-test/t/ps.test:
        Manual merge.
      5f544ed0
    • unknown's avatar
      Proposed fix for bug#24491 "using alias from source table in insert ... · 1dead07d
      unknown 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.
      
      
      mysql-test/r/ps.result:
        Added test case for bug#24491 "using alias from source table in insert ...
        on duplicate key"
      mysql-test/r/sp-error.result:
        Added test case for bug#24491 "using alias from source table in insert ...
        on duplicate key"
      mysql-test/t/ps.test:
        Added test case for bug#24491 "using alias from source table in insert ...
        on duplicate key"
      mysql-test/t/sp-error.test:
        Added test case for bug#24491 "using alias from source table in insert ...
        on duplicate key"
      sql/item.h:
        Name_resolution_context::save_state/restore_state():
          At the moment these methods are used only by code implementing
          INSERT and INSERT ... SELECT statements. This code doesn't modify
         'next_name_resolution_table' member of table list element
          corresponding to the first table of SELECT clause (pointed by
          'first_name_resolution_table'). But it modifies table list element
          corresponding to the target table of INSERT (pointed by 'table_list')
          So these methods were changed to reflect this.
      1dead07d
  3. 22 Jan, 2007 2 commits
  4. 20 Jan, 2007 2 commits
  5. 19 Jan, 2007 8 commits
    • unknown's avatar
      Merge mockturtle.local:/home/dlenev/src/mysql-5.0-bg25044 · 701b785e
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg25044
      
      
      sql/sql_table.cc:
        Auto merged
      701b785e
    • unknown's avatar
      Fix for bug #25044 "ALTER TABLE ... ENABLE KEYS acquires global 'opening · ac5e6f60
      unknown 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.
      
      
      mysql-test/include/wait_slave_status.inc:
        Now wait_slave_status.inc reuses more generic wait_output_matches.inc script.
      sql/sql_table.cc:
        mysql_alter_table():
          Changed ALTER TABLE ... ENABLE/DISABLE KEYS not to hold LOCK_open mutex
          during call to handler::enable_indexes() as the latter can take rather
          long time and therefore such ALTER would block execution of all other
          statements that use tables. We can safely do this as this operation takes 
          exclusive lock (similar to name-lock) on the table which is altered.
      mysql-test/include/wait_show_pattern.inc:
        New BitKeeper file ``mysql-test/include/wait_show_pattern.inc''
      mysql-test/r/alter_table-big.result:
        New BitKeeper file ``mysql-test/r/alter_table-big.result''
      mysql-test/t/alter_table-big.test:
        New BitKeeper file ``mysql-test/t/alter_table-big.test''
      ac5e6f60
    • unknown's avatar
      Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1 · a361cf1b
      unknown authored
      into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1-bug25211
      
      
      a361cf1b
    • unknown's avatar
      BUG#25211: events_bugs.test fails on sapsrv1 · 35fdeff8
      unknown authored
      The problem was that the events_bugs test could randomly fail due to
      races in the test case.
      
      The solution is to replace fixed sleeps with reliable polling of a
      certain state to settle.  For that, a new auxiliary script
      include/wait_condition.inc is used, that allows waiting for a given
      query to return true.
      
      
      mysql-test/include/wait_until_rows_count.inc:
        Script is rewritten using new include/wait_condition.inc.
      mysql-test/r/events_bugs.result:
        Update result: add missing quotation mark.
      mysql-test/t/events_bugs.test:
        Replace --sleep with the reliable waiting for a certain state.
      mysql-test/include/wait_condition.inc:
        New BitKeeper file ``mysql-test/include/wait_condition.inc''
      35fdeff8
    • unknown's avatar
      Manual merge · 898740b6
      unknown authored
      898740b6
    • unknown's avatar
      Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-24562-merge · f99f7917
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.1-24562-merge
      
      
      mysql-test/r/alter_table.result:
        Auto merged
      mysql-test/t/alter_table.test:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      f99f7917
    • unknown's avatar
      Manual merge · 6c6a2785
      unknown authored
      6c6a2785
    • unknown's avatar
      Merge weblab.(none):/home/marcsql/TREE/mysql-4.1-24562 · 65d0e46d
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-24562-merge
      
      
      mysql-test/t/alter_table.test:
        Auto merged
      65d0e46d
  6. 18 Jan, 2007 5 commits
    • unknown's avatar
      Bug#24562 (ALTER TABLE ... ORDER BY ... with complex expression asserts) · d4ee8ceb
      unknown 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.
      
      
      mysql-test/r/alter_table.result:
        Prevent ALTER TABLE ORDER BY clauses to use general expressions.
      mysql-test/t/alter_table.test:
        Prevent ALTER TABLE ORDER BY clauses to use general expressions.
      sql/sql_yacc.yy:
        Prevent ALTER TABLE ORDER BY clauses to use general expressions.
      d4ee8ceb
    • unknown's avatar
      Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0-bug24404 · a7d2fa14
      unknown authored
      into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1-bug24404
      
      
      mysql-test/r/view_grant.result:
        Auto merged
      mysql-test/t/view_grant.test:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      a7d2fa14
    • unknown's avatar
      Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0 · fa710dfb
      unknown authored
      into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0-bug24404
      
      
      sql/sql_view.cc:
        Auto merged
      mysql-test/r/view_grant.result:
        Manual merge.
      mysql-test/t/view_grant.test:
        Manual merge.
      fa710dfb
    • unknown's avatar
      Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0-bug24404 · 60758fb1
      unknown authored
      into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1-bug24404
      
      
      sql/sql_view.cc:
        Auto merged
      mysql-test/r/view_grant.result:
        Manual merge.
      mysql-test/t/view_grant.test:
        Manual merge.
      60758fb1
    • unknown's avatar
      Bug#24404: strange bug with view+permission+prepared statement. · 0541dcad
      unknown 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.
      
      
      mysql-test/r/view_grant.result:
        Add result for bug#24404: strange bug with view+permission+prepared
        statement.
      mysql-test/t/view_grant.test:
        Add test case for bug#24404: strange bug with view+permission+prepared
        statement.
      sql/sql_view.cc:
        Remove dead line.
        When setting security context, we should traverse the list of tables
        belonging to a given view, not all query tables.  We achieve that by
        stopping at the first table past view_tables_tail.
      0541dcad
  7. 17 Jan, 2007 7 commits
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime · 5d92d2d7
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      sql/mysqld.cc:
        Auto merged
      5d92d2d7
    • unknown's avatar
      Disable symlinks under valgrind builds (again), with a comment. · c9078c40
      unknown authored
      
      sql/mysqld.cc:
        Once again, disable symlink.test under valgrind builds. symlink.test
        fails deep in mi_repair - the result of this having been disabled
        for almost 5 years.
      c9078c40
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime · c9bd73df
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      sql/sql_parse.cc:
        Use local.
      c9bd73df
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-4.1-runtime · eeaf11b2
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime-debug-max
      
      
      sql/sql_parse.cc:
        SCCS merged
      eeaf11b2
    • unknown's avatar
      Fix a failure of lowercase_tables2 test on powermacg5, introduced · f7e41bae
      unknown authored
      by the patch for Bug#4968
      
      
      sql/sql_parse.cc:
        Fix lowercase_tables2 test failure on powermacg5: table_case_name()
        function needed create_info.alias if lowercase_table_names=2, which
        was not set for the stack copy of HA_CREATE_INFO. Move the
        update of create_info.alias from create_table_precheck to 
        mysql_execute_command, so that it is done on the right object.
      f7e41bae
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime-debug-max · 3cdad08c
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      sql/mysqld.cc:
        Auto merged
      mysql-test/r/ps.result:
        SCCS merged
      mysql-test/t/ps.test:
        Use local
      3cdad08c
    • unknown's avatar
      Fix a ps.test failure in 5.0-runtime tree. · 06bc6836
      unknown authored
      
      mysql-test/r/ps.result:
        Update result files.
      mysql-test/t/ps.test:
        Disable result ouptut of SHOW CREATE TABLE: DATA DIRECTORY option
        may be present or absent from the output depending on the build
        otpions and the operating system, so the output is not consistent
        across supported platforms.
      sql/mysqld.cc:
        Remove a tricky #ifdef dependency of --use-symbolic-links on PURIFY
        added in 2002: DEBUG options should not influence server functionality.
        This backfired by producing different output of SHOW CREATE TABLE
        depending on the build options (see also Bug#25677 "With 
        --skip-symbolic-links option on, DATA DIRECTORY clause
        is silently ignored".
      06bc6836
  8. 16 Jan, 2007 8 commits
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime · b1cd0571
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      mysql-test/t/ps.test:
        Use local.
      mysql-test/t/backup.test:
        SCCS merged
      b1cd0571
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-4.1-runtime · 329f6ba1
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime
      
      
      mysql-test/t/backup.test:
        Auto merged
      mysql-test/t/ps.test:
        Manual merge.
      329f6ba1
    • unknown's avatar
      A fix for the broken 4.1-runtime tree. · 9cff68bb
      unknown authored
      
      mysql-test/t/backup.test:
        Backport a patch for sporadically failing myisam.test (and now ps.test)
        from 5.0. The cause was in backup.test not cleaning up tables in
        mysqltest-vardir/tmp after itself.
      mysql-test/t/ps.test:
        Add additional protection against possible failure in the middle of
        backup.test
      9cff68bb
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime · 4f4385d6
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      sql/sql_select.cc:
        Auto merged
      4f4385d6
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime · 3634cce7
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      BitKeeper/deleted/.del-libmysqld.dsp~78dc6a589e5a4149:
        Auto merged
      BitKeeper/deleted/.del-mysql.dsw~7ea9e16395f139f4:
        Auto merged
      BitKeeper/deleted/.del-mysql_explain_log.sh~5ddc62808e16bd57:
        Auto merged
      BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
        Auto merged
      BitKeeper/deleted/.del-mysqldemb.dsp~1baf8c0e59ee9f7e:
        Auto merged
      BitKeeper/deleted/.del-mysqldmax.dsp~5d213fe1c204142e:
        Auto merged
      mysql-test/r/ps.result:
        Auto merged
      mysql-test/r/select.result:
        Auto merged
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/t/select.test:
        Auto merged
      mysql-test/t/sp.test:
        Auto merged
      mysys/my_read.c:
        Auto merged
      scripts/make_binary_distribution.sh:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_list.h:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      storage/innobase/buf/buf0buf.c:
        Auto merged
      storage/innobase/dict/dict0dict.c:
        Auto merged
      storage/innobase/fil/fil0fil.c:
        Auto merged
      storage/innobase/ha/ha0ha.c:
        Auto merged
      storage/innobase/include/hash0hash.h:
        Auto merged
      storage/innobase/lock/lock0lock.c:
        Auto merged
      storage/innobase/log/log0recv.c:
        Auto merged
      support-files/MySQL-shared-compat.spec.sh:
        Auto merged
      configure.in:
        Use local
      sql/sql_parse.cc:
        Use local
      sql/sql_table.cc:
        Use local
      mysql-test/t/ps.test:
        SCCS merged
      3634cce7
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.1-root · 7017cb07
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      sql/sql_class.h:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      7017cb07
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 22f62e8a
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg20390-2
      
      
      22f62e8a
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 061ea692
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg20390
      
      
      061ea692
  9. 15 Jan, 2007 5 commits
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · f71b6a84
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-6298
      
      
      f71b6a84
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/tmp_merge · c8fccee6
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-root
      
      
      BitKeeper/deleted/.del-mysql.dsw~7ea9e16395f139f4:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
        Auto merged
      BitKeeper/deleted/.del-mysqldemb.dsp~1baf8c0e59ee9f7e:
        Auto merged
      BitKeeper/deleted/.del-mysqldmax.dsp~5d213fe1c204142e:
        Auto merged
      mysys/my_read.c:
        Auto merged
      scripts/make_binary_distribution.sh:
        Auto merged
      server-tools/instance-manager/listener.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sp_head.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      sql/sql_string.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      storage/heap/hp_block.c:
        Auto merged
      storage/heap/hp_write.c:
        Auto merged
      storage/innobase/buf/buf0buf.c:
        Auto merged
      storage/innobase/dict/dict0dict.c:
        Auto merged
      storage/innobase/fil/fil0fil.c:
        Auto merged
      storage/innobase/ha/ha0ha.c:
        Auto merged
      storage/innobase/include/hash0hash.h:
        Auto merged
      storage/innobase/lock/lock0lock.c:
        Auto merged
      storage/innobase/log/log0recv.c:
        Auto merged
      support-files/MySQL-shared-compat.spec.sh:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      BitKeeper/deleted/.del-libmysqld.dsp~78dc6a589e5a4149:
        SCCS merged
      mysql-test/t/view.test:
        Manual merge.
      c8fccee6
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 095e2527
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime
      
      
      095e2527
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · ce3a483d
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime
      
      
      ce3a483d
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-4.1-runtime · 2ba119c6
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime
      
      
      sql/sql_parse.cc:
        Auto merged
      2ba119c6