1. 13 Oct, 2006 1 commit
    • unknown's avatar
      Fix for Bug #17544 "Cannot do atomic log rotate", · 9438b985
      unknown authored
      Bug #21785 "Server crashes after rename of the log table" and
      Bug #21966 "Strange warnings on create like/repair of the log
                  tables"
      
      According to the patch, from now on, one should use RENAME to
      perform a log table rotation (this should also be reflected in
      the manual).
      
      Here is a sample:
      
      use mysql;
      CREATE TABLE IF NOT EXISTS general_log2 LIKE general_log;
      RENAME TABLE general_log TO general_log_backup, general_log2 TO general_log;
      
      The rules for Rename of the log tables are following:
            IF   1. Log tables are enabled
            AND  2. Rename operates on the log table and nothing is being
                    renamed to the log table.
            DO   3. Throw an error message.
            ELSE 4. Perform rename.
       
      The very RENAME query will go the the old (backup) table. This is
      consistent with the behavoiur we have with binlog ROTATE LOGS
      statement.
      
      Other problems, which are solved by the patch are:
      
      1) Now REPAIR of the log table is exclusive operation (as it should be), this
         also eliminates lock-related warnings. and
      2) CREATE LIKE TABLE now usese usual read lock on the source table rather
         then name lock, which is too restrictive. This way we get rid of another
         log table-related warning, which occured because of the above fact
         (as a side-effect, name lock resulted in a warning).
      
      
      mysql-test/r/log_tables.result:
        update result file
      mysql-test/t/log_tables.test:
        Add tests for the bugs
      sql/handler.cc:
        update comment
      sql/handler.h:
        update function to reflect changes in log tables
        locking logic.
      sql/lock.cc:
        Now we allow locking of the log tables for "privileged" threads
        Privileged thread must explicitly close and lock log tables. This
        is required for admin operations such as REPAIR.
      sql/log.cc:
        Changes to the file:
        1) Add checks for table schema. It's more important now,
           as we allow rename of the log tables. Since we should
           check for schema when writing to a log table.
           E.g. if one created a table with one-only comlumn and
           renamed it to general_log, the server should cope with
           it.
        2) refactor LOGGER::flush(), so that we can now use the same
           machinery as we use in FLUSH LOGS in other statements:
           whenever we have to perform  a serious operation on the log
           tables, we have to
           (a) lock logger, which blocks other concurrent statements (such 
           as selects) (b) close logs. Then perform an
           exclusive operation, c) reenable logs and d) unlock logger.
        3) Add a function to check if a given table is a log table.
        4) Add support for "privileged" thread
        5) merge is_[general/slow]_log_table_enabled() into one function.
        6) Add new function: reopen _log_tables, which reopens the tables,
           which were enabled (after temporary close, required for admin
           operation)
      sql/log.h:
        1) add a new call close_n_lock_tables(). Now we use it instead of
           LOGGER::flush() in FLUSH LOGS implementation.
        2) add a prototype for the function to check if a given
           table is a log table;
        3) add privileged table flag to table logger
        4) merge is_[general/slow]_log_table_enabled()
           into one function.
      sql/mysql_priv.h:
        move log table defines to log.h
      sql/sql_delete.cc:
        use new function check_if_log_table() instead of direct strcmp
      sql/sql_rename.cc:
        Traverse the list of tables in mysql_rename_tables
        to make sure that log tables are processed correctly
        (that is, according to the rules specified in the
        main CS comment)
      sql/sql_table.cc:
        1) mysql_admin_table() should disable logs if it performs
           exclusive admin operation on a log table. This way we
           also eliminate warning on REPAIR of the log table.
        2) mysql_create_like_table should read-lock the source table
           instead getting name lock on it. Name lock is too restrictive
           in this case.
      sql/share/errmsg.txt:
        Add a new error message for rename of the log tables
      sql/table.cc:
        use new function instead of direct strcmp.
        change my_strcasecmp() -> strcmp(), when
        comparing system db and table names
      storage/csv/ha_tina.cc:
        update function to reflect changes in log tables
        locking logic.
      storage/myisam/ha_myisam.cc:
        update function to reflect changes in log tables
        locking logic.
      9438b985
  2. 01 Sep, 2006 3 commits
    • unknown's avatar
      Merge alik.:/mnt/raid/alik/MySQL/devel/5.1-tree · d57163fc
      unknown authored
      into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
      
      
      mysql-test/t/disabled.def:
        SCCS merged
      d57163fc
    • unknown's avatar
      Merge moonbone.local:/home/evgen/bk-trees/mysql-5.1-opt · 16de51bc
      unknown authored
      into  moonbone.local:/work/tmp_merge-5.1-mysql
      
      
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      mysql-test/r/view.result:
        SCCS merged
      mysql-test/t/view.test:
        SCCS merged
      16de51bc
    • unknown's avatar
      Removed Windows from tests since bug#19107 is known to hang test · 22d76f5a
      unknown authored
      
      mysql-test/t/disabled.def:
        Removed disabled test since it only affects Windows
      mysql-test/t/partition.test:
        Removed Windows from test since bug#19107 is known to hang test
      mysql-test/t/partition_mgm_err2.test:
        Removed Windows from test since bug#19107 is known to hang test
      22d76f5a
  3. 31 Aug, 2006 15 commits
  4. 30 Aug, 2006 6 commits
    • unknown's avatar
      Post-merge fixes. · 0ec1397d
      unknown authored
      
      mysql-test/lib/mtr_process.pl:
        Apply manually the merge from 5.0
      mysql-test/mysql-test-run.pl:
        Apply manually the merge from 5.0
      mysql-test/r/grant.result:
        A post-merge fix.
      mysql-test/r/im_cmd_line.result:
        A post-merge fix.
      mysql-test/r/im_instance_conf.result:
        A post-merge fix.
      mysql-test/r/sp.result:
        A post-merge fix.
      mysql-test/t/grant.test:
        A post-merge fix.
      mysql-test/t/im_cmd_line.imtest:
        A post-merge fix.
      mysql-test/t/im_instance_conf.imtest:
        A post-merge fix.
      sql/field.cc:
        A post-merge fix.
      sql/item_cmpfunc.cc:
        A post-merge fix.
      sql/sp_head.cc:
        A post-merge fix.
      sql/sp_head.h:
        A post-merge fix.
      0ec1397d
    • unknown's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.1 · ff318949
      unknown authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
      
      
      ff318949
    • unknown's avatar
      sql_base.cc, ndb_condition_pushdown.result, opt_range.cc: · 00c24198
      unknown authored
        After merge changes
      
      
      mysql-test/r/ndb_condition_pushdown.result:
        After merge changes
      sql/sql_base.cc:
        After merge changes
      sql/opt_range.cc:
        After merge changes
      00c24198
    • unknown's avatar
      disabled some tests to get passing tests · e87b6090
      unknown authored
      
      mysql-test/t/disabled.def:
        disabled some tests to get some tests passing.
      e87b6090
    • unknown's avatar
      Fix for bug #20907 · 62accb04
      unknown authored
      CMake versions > 2.4 allow linking to STATIC or SHARED libraries only.
      
      
      
      libmysql/CMakeLists.txt:
        Fix for Cmake BC problems (as suggested by Elliot)
      62accb04
    • unknown's avatar
      bug#21676 select * from information_schema.files crashes server · 7c96e948
      unknown authored
      skip engine handling if engine is disabled
      
      
      7c96e948
  5. 29 Aug, 2006 14 commits
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime-safemerge · 5fab3969
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
      
      
      BitKeeper/deleted/.del-im_check_os.inc:
        Auto merged
      BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
        Auto merged
      BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
        Auto merged
      BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
        Auto merged
      configure.in:
        Auto merged
      BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
        Auto merged
      include/mysql_com.h:
        Auto merged
      mysql-test/lib/mtr_io.pl:
        Auto merged
      mysql-test/r/im_daemon_life_cycle.result:
        Auto merged
      mysql-test/r/im_life_cycle.result:
        Auto merged
      mysql-test/r/im_utils.result:
        Auto merged
      mysql-test/r/sp-error.result:
        Auto merged
      mysql-test/r/trigger.result:
        Auto merged
      mysql-test/r/type_varchar.result:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      mysql-test/t/im_daemon_life_cycle.imtest:
        Auto merged
      mysql-test/t/im_life_cycle.imtest:
        Auto merged
      mysql-test/t/im_utils.imtest:
        Auto merged
      mysql-test/t/sp-error.test:
        Auto merged
      mysql-test/t/trigger.test:
        Auto merged
      mysql-test/t/type_varchar.test:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_row.cc:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/item_strfunc.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/net_serv.cc:
        Auto merged
      sql/protocol.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_cache.cc:
        Auto merged
      sql/sql_cache.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_error.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_trigger.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Use local. Alik will merge his changes manually.
      mysql-test/lib/mtr_process.pl:
        Use local.
      mysql-test/r/grant.result:
        Use local.
      mysql-test/r/sp.result:
        Use local.
      mysql-test/r/ps.result:
        Manual merge.
      mysql-test/t/grant.test:
        Manual merge.
      mysql-test/t/ps.test:
        Manual merge.
      mysql-test/t/sp.test:
        Manual merge.
      sql/Makefile.am:
        Manual merge.
      sql/field.cc:
        Manual merge.
      sql/mysqld.cc:
        Manual merge.
      sql/share/errmsg.txt:
        Manual merge.
      sql/sp.cc:
        Manual merge.
      sql/sp_head.h:
        Manual merge.
      sql/sql_trigger.cc:
        Manual merge.
      sql/sql_view.cc:
        Manual merge.
      5fab3969
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1 · 15ede695
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      15ede695
    • unknown's avatar
      A fix for Bug#14897 "ResultSet.getString("table.column") sometimes · 4355ea5a
      unknown authored
      doesn't find the column"
      
      When a user was using 4.1 tables with VARCHAR column and 5.0 server
      and a query that used a temporary table to resolve itself, the
      table metadata for the varchar column sent to client was incorrect:
      MYSQL_FIELD::table member was empty.
      
      The bug was caused by implicit "upgrade" from old VARCHAR to new
      VARCHAR hard-coded in Field::new_field, which did not preserve
      the information about the original table. Thus, the field metadata
      of the "upgraded" field pointed to an auxiliary temporary table
      created for query execution.
      
      The fix is to copy the pointer to the original table to the new field.
      
      
      mysql-test/r/type_varchar.result:
        Update test results (Bug#14897)
      mysql-test/t/type_varchar.test:
        Add a test case for Bug#14897 "ResultSet.getString("table.column") 
        sometimes doesn't find the column"
      sql/field.cc:
        Preserve the original table name when converting fields from 
        old VARCHAR to new VARCHAR.
      mysql-test/std_data/14897.frm:
        New BitKeeper file ``mysql-test/std_data/14897.frm''
      4355ea5a
    • unknown's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.1 · 1f1539d9
      unknown authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
      
      
      1f1539d9
    • unknown's avatar
      Merge moonbone.local:/work/tmp_merge-5.0-mysql · f5738219
      unknown authored
      into  moonbone.local:/work/tmp_merge-5.1-opt-mysql
      
      
      BUILD/check-cpu:
        Auto merged
      include/config-netware.h:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/r/group_by.result:
        Auto merged
      mysql-test/r/join_outer.result:
        Auto merged
      mysql-test/r/ndb_condition_pushdown.result:
        Auto merged
      mysql-test/r/range.result:
        Auto merged
      mysql-test/r/select.result:
        Auto merged
      mysql-test/r/subselect.result:
        Auto merged
      mysql-test/r/type_datetime.result:
        Auto merged
      mysql-test/r/user_var.result:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      mysql-test/t/range.test:
        Auto merged
      mysql-test/t/select.test:
        Auto merged
      mysql-test/t/type_datetime.test:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      sql/ha_innodb.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/opt_range.h:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_delete.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_load.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      storage/innobase/btr/btr0btr.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/fsp/fsp0fsp.c:
        Auto merged
      storage/innobase/include/buf0buf.ic:
        Auto merged
      storage/innobase/log/log0log.c:
        Auto merged
      storage/innobase/log/log0recv.c:
        Auto merged
      storage/innobase/os/os0file.c:
        Auto merged
      storage/innobase/row/row0sel.c:
        Auto merged
      storage/innobase/srv/srv0start.c:
        Auto merged
      storage/innobase/ut/ut0dbg.c:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      client/mysqltest.c:
        Manual merge
      mysql-test/r/innodb_mysql.result:
        Manual merge
      mysql-test/t/innodb_mysql.test:
        Manual merge
      mysql-test/t/join_outer.test:
        Manual merge
      sql/item_cmpfunc.cc:
        Manual merge
      sql/mysql_priv.h:
        Manual merge
      sql/opt_range.cc:
        Manual merge
      sql/sql_base.cc:
        Manual merge
      storage/innobase/include/btr0cur.ic:
        Manual merge
      storage/innobase/row/row0mysql.c:
        Manual merge
      f5738219
    • unknown's avatar
      Merge lamia.home:/home/timka/mysql/src/5.0-bug-21456 · 2592d4a1
      unknown authored
      into  lamia.home:/home/timka/mysql/src/5.1-bug-21456
      
      
      mysql-test/r/distinct.result:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      2592d4a1
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · c923270f
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17591
      
      
      c923270f
    • unknown's avatar
      Preliminary patch for the following bugs: · 33294b1b
      unknown authored
        - BUG#15934: Instance manager fails to work;
        - BUG#18020: IM connect problem;
        - BUG#18027: IM: Server_ID differs;
        - BUG#18033: IM: Server_ID not reported;
        - BUG#21331: Instance Manager: Connect problems in tests;
      
      The only test suite has been changed
      (server codebase has not been modified).
      
      
      BitKeeper/deleted/.del-im_check_os.inc:
        Rename: mysql-test/include/im_check_os.inc -> BitKeeper/deleted/.del-im_check_os.inc
      mysql-test/include/im_check_env.inc:
        Include only this file from all IM-tests.
      mysql-test/lib/mtr_io.pl:
        Update mtr_get_pid_from_file() to workaround race,
        described in BUG#21884.
      mysql-test/lib/mtr_process.pl:
        Refactor im_start()/im_stop() so that they will be more
        reliable. There are the following user-visible changes:
          - if one of these functions fails, the test suite
            is aborted;
          - mtr_im_stop() now determines whether the component is
            alive or not not only by checking PID, but also by trying
            to connect to the component;
          - after starting IM, the test suite waits for it to start
            accepting client connections and to start all its guarded
            mysqld instances;
          - a lot of debug-logs have been added in order to simplify
            investigation of future failures.
      mysql-test/mysql-test-run.pl:
        1. Get rid of kill_and_cleanup();
        2. Move im_start()/im_stop() to mtr_process.pl;
        3. Change default IM port to 9311 so that it does not interfere
           with default slave port;
      mysql-test/r/im_daemon_life_cycle.result:
        Updated result file.
      mysql-test/r/im_life_cycle.result:
        Updated result file.
      mysql-test/r/im_options_set.result:
        Updated result file.
      mysql-test/r/im_options_unset.result:
        Updated result file.
      mysql-test/r/im_utils.result:
        Updated result file.
      mysql-test/t/im_daemon_life_cycle.imtest:
        Updated IM-test.
      mysql-test/t/im_life_cycle.imtest:
        Updated IM-test.
      mysql-test/t/im_options_set.imtest:
        Updated IM-test.
      mysql-test/t/im_options_unset.imtest:
        Updated IM-test.
      mysql-test/t/im_utils.imtest:
        Updated IM-test.
      33294b1b
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · b2d1f7a4
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17591
      
      
      mysql-test/r/view.result:
        Manual merge.
      mysql-test/t/view.test:
        Manual merge.
      b2d1f7a4
    • unknown's avatar
      BUG#17591: Updatable view not possible with trigger or stored function · 7a5a2544
      unknown authored
      When a view was used inside a trigger or a function, lock type for
      tables used in a view was always set to READ (thus making the view
      non-updatable), even if we were trying to update the view.
      
      The solution is to set lock type properly.
      
      
      mysql-test/r/view.result:
        Add result for bug#17591: Updatable view not possible with trigger
        or stored function.
      mysql-test/t/view.test:
        Add test case for bug#17591: Updatable view not possible with trigger
        or stored function.
      sql/sql_view.cc:
        Move the code that sets requested lock type before the point where
        we exit from mysql_make_view() when we process a placeholder for
        prelocked table.
      7a5a2544
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/51-work · 9ec8dba6
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      9ec8dba6
    • unknown's avatar
      ndb - · 8501296a
      unknown authored
        Add order by in rpl_(ndb)_multi_update3 to make result deterministic
      
      
      mysql-test/extra/rpl_tests/rpl_multi_update3.test:
        Add order by in rpl_(ndb)_multi_update3 to make result deterministic
      mysql-test/r/rpl_multi_update3.result:
        Add order by in rpl_(ndb)_multi_update3 to make result deterministic
      mysql-test/r/rpl_ndb_multi_update3.result:
        Add order by in rpl_(ndb)_multi_update3 to make result deterministic
      8501296a
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/51-work · d4ffbe74
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      storage/ndb/src/kernel/blocks/backup/Backup.cpp:
        Auto merged
      d4ffbe74
    • unknown's avatar
      ndb - · 2479d384
      unknown authored
        fix backup/lcp race
      
      
      storage/ndb/src/kernel/blocks/backup/Backup.cpp:
        fix backup/lcp race
      2479d384
  6. 28 Aug, 2006 1 commit