An error occurred fetching the project authors.
  1. 24 Jan, 2006 1 commit
    • unknown's avatar
      Make it possible to run mysql-test-run.pl with default test suite in different vardir. · d40f7056
      unknown authored
      mysql-test/include/have_outfile.inc:
        Use MYSQLTEST_VARDIR
      mysql-test/include/test_outfile.inc:
        Use MYSQLTEST_VARDIR
      mysql-test/mysql-test-run.pl:
        Create variable $MYSQLTEST_VARDIR that points to  the vardir
        Don't create a symlink from var/ to the physical vardir if it's somewhere else
        Setup a symlink(or copy dir on windows) for std_data so it is available in the physical vardir
        Use "../tmp" as slave-load-tmpdir, since the server is started in var/master-data and slave in var/slave-data they will both find the dumps in "../tmp"
      mysql-test/mysql-test-run.sh:
        Export MYSQLTEST_VARDIR, always pointing at mysql-test/var
      mysql-test/r/backup.result:
        Use MYSQLTEST_VARDIR
      mysql-test/r/blackhole.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/loaddata.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/mysqlbinlog.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/mysqltest.result:
        Use MYSQLTEST_VARDIR
      mysql-test/r/outfile.result:
        Use MYSQLTEST_VARDIR
      mysql-test/r/query_cache.result:
        Add missing drop function
      mysql-test/r/rpl000001.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/rpl000004.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/rpl_innodb.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/rpl_loaddata.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/rpl_loaddata_rule_m.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/rpl_loaddata_rule_s.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/rpl_loaddatalocal.result:
        Use MYSQLTEST_VARDIR
      mysql-test/r/rpl_log.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/rpl_misc_functions.result:
        Use MYSQLTEST_VARDIR
      mysql-test/r/rpl_replicate_do.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/rpl_rewrite_db.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/rpl_timezone.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/symlink.result:
        Use MYSQLTEST_VARDIR
      mysql-test/r/trigger.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/view.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/r/warnings.result:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/backup-master.sh:
        Use MYSQLTEST_VARDIR
      mysql-test/t/backup.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/blackhole.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/ctype_ucs_binlog.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/im_daemon_life_cycle-im.opt:
        Use MYSQLTEST_VARDIR
      mysql-test/t/im_options_set.imtest:
        Use MYSQLTEST_VARDIR
      mysql-test/t/im_options_unset.imtest:
        Use MYSQLTEST_VARDIR
      mysql-test/t/loaddata.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/myisam.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/mysqlbinlog.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/mysqlbinlog2.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/mysqldump.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/mysqltest.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/ndb_autodiscover.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/outfile.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/query_cache.test:
        Add missing drop function
      mysql-test/t/repair.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl000001.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/rpl000004.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/rpl000009.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl000015-slave.sh:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl000017-slave.sh:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_EE_error.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_charset.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_drop_db.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_flush_log_loop-master.opt:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_flush_log_loop-master.sh:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_flush_log_loop-slave.opt:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_flush_log_loop-slave.sh:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_innodb.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/rpl_loaddata.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/rpl_loaddata_rule_m.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/rpl_loaddata_rule_s.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/rpl_loaddatalocal.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_log.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/rpl_misc_functions-slave.sh:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_misc_functions.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_replicate_do.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/rpl_rewrite_db.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/rpl_rotate_logs-slave.sh:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_rotate_logs.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/rpl_timezone.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/show_check.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/sp-destruct.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/symlink.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/temp_table-master.opt:
        Use MYSQLTEST_VARDIR
      mysql-test/t/trigger-compat.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/trigger-grant.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/trigger.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/type_varchar.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/user_var-binlog.test:
        Use MYSQLTEST_VARDIR
      mysql-test/t/view.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/t/warnings.test:
        Use "../std_data_ln" to find std_data files
      mysql-test/include/sourced.inc:
        New BitKeeper file ``mysql-test/include/sourced.inc''
      mysql-test/include/sourced1.inc:
        New BitKeeper file ``mysql-test/include/sourced1.inc''
      d40f7056
  2. 30 Sep, 2005 1 commit
    • unknown's avatar
      Tell the user that this ROLLBACK is added by mysqlbinlog (so that he does not... · 1e148ca4
      unknown authored
      Tell the user that this ROLLBACK is added by mysqlbinlog (so that he does not wonder if it's present in binlog). This was brought up by Salle - thanks Salle.
      
      
      client/mysqlbinlog.cc:
        tell the user that this ROLLBACK is added by mysqlbinlog (so that he does not wonder if it's present in binlog)
      mysql-test/r/ctype_ucs_binlog.result:
        update
      mysql-test/r/mysqlbinlog.result:
        update
      mysql-test/r/mysqlbinlog2.result:
        update
      mysql-test/r/rpl_charset.result:
        update
      mysql-test/r/rpl_timezone.result:
        update
      mysql-test/r/user_var-binlog.result:
        update
      1e148ca4
  3. 21 Sep, 2005 1 commit
  4. 24 Mar, 2005 1 commit
  5. 21 Mar, 2005 1 commit
    • unknown's avatar
      Last part of WL#1062: better replication of timezones: no more use · ac46bf77
      unknown authored
      of SET ONE_SHOT; storing tz info directly in event (if this info is needed),
      it's now allowed to have different global tz on master and slave.
      
      
      client/mysqlbinlog.cc:
        we need MAX_TIME_ZONE_NAME_LENGTH when processing log_event.h, and it's declared in mysql_priv.h
      mysql-test/r/rpl_timezone.result:
        result update
      mysql-test/t/rpl_timezone-slave.opt:
        Now that we can have different global value of timezone on master and slave, let's test it.
      mysql-test/t/rpl_timezone.test:
        Tests of the new replication of timezones: checking the output of mysqlbinlog,
        replication of CONVERT_TZ().
      sql/ha_innodb.cc:
        No very fast shutdown on Netware (anyway it's disabled on all platforms,
        but this is so that we don't forget to keep it disabled on Netware in the future).
      sql/log.cc:
        No more need to write SET ONE_SHOT to binlog for character set and timezone
        (as we store this info  directly nin the Query_log_event now).
      sql/log_event.cc:
        Exclude ::write() methods if MYSQL_CLIENT.
        Storing timezone info in the Query_log_event in master. Re-reading it in slave.
        Small code cleanups. I plan to not store the end 0 of catalog in binlog
        events soon.
      sql/log_event.h:
        replication of time zones: a place for tz info in Query_log_event,
        in LAST_EVENT_INFO. Plus if we are compiling a client, we don't need
        the ::write() methods, so keeping them out (of mysqlbinlog.cc;
        keeping them in, resulted in problem that mysqlbinlog does not know Timezone
        structure).
      sql/mysql_priv.h:
        moving this define from tztime.h (tztime.h has things which are
        too much for a client like mysqlbinlog).
      sql/set_var.cc:
        It's now allowed to change global value of charset or timezone even if using binlogging
        or if being a slave.
        Making CONVERT_TZ(,,@@session.time_zone) replicate.
      sql/set_var.h:
        these ::check()s are not needed anymore (changing global charset
        or timezone is now allowed even if binlogging or slave)
      sql/slave.cc:
        No more need to check for same global timezone if master is 5.x
        (ok, strictly speaking if it is > 5.0.3 but this is alpha).
      sql/slave.h:
        a function to wrap settings of charset to default.
      sql/tztime.cc:
        Adaptation of my_tz_find() to the case where it's not called from inside
        a query (i.e. cannot join its tz tables to the query's ones): this variant
        opens the tz tables itself, reads from them, and closes them. This is presently
        only used by the slave SQL thread (when it sets the tz before executing a query).
      sql/tztime.h:
        declaration of new function, plus moving symbol to mysql_priv.h
        for easier usage in mysqlbinlog (Dmitri, pardon me).
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      ac46bf77
  6. 16 Mar, 2005 1 commit
    • unknown's avatar
      WL#874 "Extended LOAD DATA". · 5f75c8f5
      unknown authored
      Now one can use user variables as target for data loaded from file
      (besides table's columns). Also LOAD DATA got new SET-clause in which
      one can specify values for table columns as expressions.
      
      For example the following is possible:
      LOAD DATA INFILE 'words.dat' INTO TABLE t1 (a, @b) SET c = @b + 1;
      
      This patch also implements new way of replicating LOAD DATA.
      Now we do it similarly to other queries.
      We store LOAD DATA query in new Execute_load_query event
      (which is last in the sequence of events representing LOAD DATA).
      When we are executing this event we simply rewrite part of query which
      holds name of file (we use name of temporary file) and then execute it
      as usual query. In the beggining of this sequence we use Begin_load_query
      event which is almost identical to Append_file event
      
      
      client/mysqlbinlog.cc:
        Added support of two new binary log events Begin_load_query_log_event and
        Execute_load_query_log_Event which are used to replicate LOAD DATA INFILE.
      mysql-test/r/ctype_ucs.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/insert_select.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/loaddata.result:
        Added tests for new LOAD DATA features.
      mysql-test/r/mix_innodb_myisam_binlog.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results (don't dare to get rid from binlog positions
        completely since it seems that this test uses them).
      mysql-test/r/mysqlbinlog.result:
        New approach for binlogging of LOAD DATA statement. Now we store it as
        usual query and rewrite part in which file is specified when needed.
        So now mysqlbinlog output for LOAD DATA much more closer to its initial
        form. Updated test'd results accordingly.
      mysql-test/r/mysqldump.result:
        Made test more robust to other tests failures.
      mysql-test/r/rpl000015.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_change_master.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results.
      mysql-test/r/rpl_charset.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly
      mysql-test/r/rpl_deadlock.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly
      mysql-test/r/rpl_error_ignored_table.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/rpl_flush_log_loop.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_flush_tables.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/rpl_loaddata.result:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event...
        
        Updated test's results wwith new binlog positions.
      mysql-test/r/rpl_loaddata_rule_m.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
        Since now LOAD DATA is replicated much in the same way as usual query
        --binlog_do/ignore_db work for it inthe same way as for usual queries.
      mysql-test/r/rpl_loaddata_rule_s.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_loaddatalocal.result:
        Added nice test for case when it is important that LOAD DATA LOCAL
        ignores duplicates.
      mysql-test/r/rpl_log.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly (don't dare to get rid from binlog 
        positions completely since it seems that this test uses them).
      mysql-test/r/rpl_log_pos.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_max_relay_size.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_multi_query.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_relayrotate.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_replicate_do.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_reset_slave.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_rotate_logs.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_server_id1.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_server_id2.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly.
      mysql-test/r/rpl_temporary.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/rpl_timezone.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/rpl_until.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results accordingly and tweaked test a bit to bring it
        back to good shape.
      mysql-test/r/rpl_user_variables.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/r/user_var.result:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test's results and made it more robust for future similar 
        changes.
      mysql-test/t/ctype_ucs.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      mysql-test/t/insert_select.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      mysql-test/t/loaddata.test:
        Added test cases for new LOAD DATA functionality.
      mysql-test/t/mix_innodb_myisam_binlog.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/mysqlbinlog.test:
        New way of replicating LOAD DATA local. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event...
        
        Thus we need new binlog positions for LOAD DATA events.
      mysql-test/t/mysqlbinlog2.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/mysqldump.test:
        Made test more robust for failures of other tests.
      mysql-test/t/rpl_charset.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_deadlock.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_error_ignored_table.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      mysql-test/t/rpl_flush_tables.test:
        Addition of two new types of binary log events shifted binlog positions.
        Made test more robust for future similar changes.
      mysql-test/t/rpl_loaddata.test:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event...
        
        Apropritely updated comments in test.
      mysql-test/t/rpl_loaddata_rule_m.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar 
        changes.
        Since now LOAD DATA is replicated much in the same way as usual query
        --binlog_do/ignore_db work for it inthe same way as for usual queries.
      mysql-test/t/rpl_loaddata_rule_s.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_loaddatalocal.test:
        Added nice test for case when it is important that LOAD DATA LOCAL
        ignores duplicates.
      mysql-test/t/rpl_log.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly (don't dare to get rid from binlog positions
        completely since it seems that this test uses them).
      mysql-test/t/rpl_log_pos.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_multi_query.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly.
      mysql-test/t/rpl_temporary.test:
        Addition of two new types of binary log events shifted binlog positions.
        Made test more robust for future similar changes.
      mysql-test/t/rpl_timezone.test:
        Addition of two new types of binary log events shifted binlog positions.
        Made test more robust for future similar changes.
      mysql-test/t/rpl_until.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and tweaked it a bit to bring it back to good
        shape.
      mysql-test/t/rpl_user_variables.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      mysql-test/t/user_var.test:
        Addition of two new types of binary log events shifted binlog positions.
        Updated test accordingly and made it more robust for future similar
        changes.
      sql/item_func.cc:
        Added Item_user_var_as_out_param class that represents user variable
        which used as out parameter in LOAD DATA.
        
        Moved code from Item_func_set_user_var::update_hash() function to
        separate static function to be able to reuse it in this new class.
      sql/item_func.h:
        Added Item_user_var_as_out_param class that represents user variable
        which used as out parameter in LOAD DATA.
      sql/log_event.cc:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event.
      sql/log_event.h:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event.
      sql/mysql_priv.h:
        Now mysql_load() has two more arguments. They are needed to pass list of
        columns and corresponding expressions from new LOAD DATA's SET clause.
      sql/share/errmsg.txt:
        Added new error message which is used to forbid loading of data from
        fixed length rows to variables.
      sql/sql_lex.h:
        Added LEX::fname_start/fname_end members. 
        They are pointers to part of LOAD DATA statement which should be
        rewritten during replication (file name + little extra).
      sql/sql_load.cc:
        Added support for extended LOAD DATA. 
        Now one can use user variables as target for data loaded from file 
        (besides table's columns). Also LOAD DATA got new SET-clause in which
        one can specify values for table columns as expressions.
        
        Updated mysql_load()/read_fixed_length()/read_sep_field() to support
        this functionality (now they can read data from file to both columns and
        variables and assign do calculations and assignments specified in SET
        clause).
        
        We also use new approach for LOAD DATA binlogging/replication.
      sql/sql_parse.cc:
        mysql_execute_command():
          Since now we have SET clause in LOAD DATA we should also check
          permissions for tables used in its expressions. Also mysql_load()
          has two more arguments to pass information about this clause.
      sql/sql_repl.cc:
        New way of replicating LOAD DATA. Now we do it similarly to other
        queries. We store LOAD DATA query in new Execute_load_query event
        (which is last in the sequence of events representing LOAD DATA).
        When we are executing this event we simply rewrite part of query which
        holds name of file (we use name of temporary file) and then execute it
        as usual query. In the beggining of this sequence we use Begin_load_query
        event which is almost identical to Append_file event.
      sql/sql_repl.h:
        struct st_load_file_info:
          Removed memebers which are no longer needed for LOAD DATA binnlogging.
      sql/sql_yacc.yy:
        Added support for extended LOAD DATA syntax. Now one can use
        user variables as target for data loaded from file (besides table's 
        columns). Also LOAD DATA got new SET-clause in which one can specify
        values for table columns as expressions.
        
        For example the following is possible:
        LOAD DATA INFILE 'words.dat' INTO TABLE t1 (a, @b) SET c = @b + 1;
        
        Also now we save pointers to the beginning and to the end of part of 
        LOAD DATA statement which should be rewritten during replication.
      5f75c8f5
  7. 16 Feb, 2005 1 commit
  8. 03 Feb, 2005 1 commit
    • unknown's avatar
      WL#1062 "log charset info into all Query_log_event": · 7636b12f
      unknown authored
      we store 7 bytes (1 + 2*3) in every Query_log_event.
      In the future if users want binlog optimized for small size and less safe,
      we could add --binlog-no-charset (and binlog-no-sql-mode etc): charset info
      is something by design optional (even if for now we don't offer possibility to disable it):
      it's not a binlog format change.
      We try to reduce the number of get_charset() calls in the slave SQL thread to a minimum
      by caching the charset read from the previous event (which will often be equal to the one of the current event).
      We don't use SET ONE_SHOT for charset-aware repl (we still do for timezones, will be fixed later).
      No more errors if one changes the global value of charset vars on master or slave
      (as we log charset info in all Query_log_event).
      Not fixing Load_log_event as it will be rewritten soon by Dmitri.
      Testing how mysqlbinlog behaves in rpl_charset.test.
      mysqlbinlog needs to know where charset file is (to be able to convert a charset number found
      in binlog (e.g. in User_var_log_event) to a charset name); mysql-test-run needs to pass
      the correct value for this option to mysqlbinlog.
      Many result udpates (adding charset info into every event shifts log_pos in SHOW BINLOG EVENTS).
      Roughly the same job is to be done for timezones :)
      
      
      client/mysqlbinlog.cc:
        mysqlbinlog needs charsets knowledge, to be able to convert a charset
        number found in binlog to a charset name (to be able to print things
        like this:
        SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
      mysql-test/mysql-test-run.sh:
        tell mysqlbinlog about charsets dir
      mysql-test/r/ctype_ucs.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/drop_temp_table.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/insert_select.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/mix_innodb_myisam_binlog.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/mysqlbinlog.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/mysqlbinlog2.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
        The log_pos shift is why the SET INSERT_ID=4 event changes position in the result.
      mysql-test/r/rpl_charset.result:
        Running mysqlbinlog to check how it behaves on charset stuff.
        SET ONE_SHOT is now gone.
        Repl of LOAD DATA INFILE is not yet charset-aware (will soon be, when WL#874 is pushed)
        and, anyway result has a dependency on the temp filename (SQL-LOAD-*-[0-9] which is not constant).
        No more errors if one changes global character sets.
      mysql-test/r/rpl_error_ignored_table.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_flush_log_loop.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_flush_tables.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_loaddata.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_loaddata_rule_m.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_log.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_max_relay_size.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_relayrotate.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_replicate_do.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_rotate_logs.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_temporary.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_timezone.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/rpl_user_variables.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/r/user_var.result:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      mysql-test/t/rpl_charset.test:
        Running mysqlbinlog to check how it behaves on charset stuff (so, need fixed timestamp).
        SET ONE_SHOT is not printed to binlog anymore, so no need to test if ::exec_event() works ok.
        Repl of LOAD DATA INFILE is not yet charset-aware (will soon be, when WL#874 is pushed)
        and, anyway result has a dependency on the temp filename (SQL-LOAD-*-[0-9] which is not constant).
        No more errors if one changes global character sets.
      mysql-test/t/rpl_user_variables.test:
        different binlogging of charsets results in shifted log_pos and
        one added SET @@CHARACTER_SET... per mysqlbinlog run.
      sql/log.cc:
        No more SET ONE_SHOT for charsets (remains for TZ until solved with Dmitri).
      sql/log_event.cc:
        We now log charset info in each Query_log_event in binlog. It's 2*3 = 6 bytes:
        session character_set_client, session collation_connection, session collation_server.
        Now we would need only one byte per variable, but Bar said 2 is safer for the future.
        When slave or mysqlbinlog reads that info, it needs to get_charset() on these numbers (so, 3 get_charset() calls),
        as most of the time the 6-byte charset info will be equal to the previous event's,
        we cache the previous event's charset and if equal, no need to get_charset().
        As "flags2", SQL_MODE, catalog, autoinc variables, charset info is not a permanent addition:
        in the future we can add options to the master to not log any of these, old 5.0 should be able
        to parse these.
        A little bit of cleanup on autoinc stuff in replication.
        Fixing a bug in Start_log_event_v3::exec_event() where we used rli->relay_log.description_event_for_exec->binlog_version
        while we should use binlog_version (if it's a 3.23 master, that's all that counts; not the fact that the relay log is
        in 5.0 format).
      sql/log_event.h:
        binlogging of charset info in each Query_log_event.
      sql/mysql_priv.h:
        comment
      sql/set_var.cc:
        checks to refuse change of global charset variables are removed: they were needed for 4.1->4.1
        but not for 5.0.3->5.0.3.
        Yes this opens a breach if one does 4.1->5.0.3, where the checks would still be needed. But these checks would need
        reading relay_log.description_event_for_queue, which is currently an object used in many places by the I/O
        thread and only it. So, currently we don't take mutexes for this object, and if we read the object in set_var.cc
        (client thread) we need to add mutexes everywhere, but the replication code is already too broken with mutexes
        now (no consistent use of mutexes); mutex usage in replication should be fixed but preferrably during/after
        multimaster coding as it's going to shuffle mutexes already.
      sql/set_var.h:
        Since we don't forbid global change of charset vars for replication/binlogging,
        don't need specific ::check() methods anymore
      sql/slave.cc:
        Some little debug info which has nothing to do with charsets.
        Disabling master's charset check when slave I/O thread connects.
        Functions for charset caching/invalidating in the slave SQL thread.
      sql/slave.h:
        Cached charset in the slave SQL thread.
      7636b12f
  9. 16 Jan, 2005 1 commit
    • unknown's avatar
      XA (not completely polished out yet) · 88bd301d
      unknown authored
      include/my_pthread.h:
        cleanup. don't use gcc extensions
      innobase/include/trx0sys.ic:
        Jan's fix for innobase_xa_prepare
      innobase/read/read0read.c:
        Jan's fix for innobase_xa_prepare
      innobase/trx/trx0trx.c:
        Jan's fix for innobase_xa_prepare
      mysql-test/include/varchar.inc:
        test fix
      mysql-test/r/ctype_ucs.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/drop_temp_table.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/insert_select.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/mix_innodb_myisam_binlog.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/myisam.result:
        test fix
      mysql-test/r/rpl000015.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_change_master.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_charset.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_error_ignored_table.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_flush_log_loop.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_flush_tables.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_loaddata.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_loaddata_rule_m.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_loaddata_rule_s.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_log.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_log_pos.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_max_relay_size.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_relayrotate.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_replicate_do.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_reset_slave.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_rotate_logs.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_server_id1.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_server_id2.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_temporary.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_timezone.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_until.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/rpl_user_variables.result:
        new log event - all binlog positions are changed :(
      mysql-test/r/user_var.result:
        new log event - all binlog positions are changed :(
      mysql-test/t/ctype_ucs.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/mix_innodb_myisam_binlog.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/mysqlbinlog.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/mysqlbinlog2.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/rpl_charset.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/rpl_error_ignored_table.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/rpl_loaddata_rule_m.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/rpl_loaddata_rule_s.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/rpl_log.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/rpl_log_pos.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/rpl_user_variables.test:
        new log event - all binlog positions are changed :(
      mysql-test/t/user_var.test:
        new log event - all binlog positions are changed :(
      mysys/hash.c:
        typo fixed
      sql/ha_berkeley.cc:
        handlerton framework
      sql/ha_berkeley.h:
        handlerton framework
      sql/ha_innodb.cc:
        handlerton framework
      sql/ha_innodb.h:
        handlerton framework
      sql/handler.cc:
        new transaction handling, handlerton framework, two-phase commit, XA support
      sql/handler.h:
        new transaction handling, handlerton framework, two-phase commit, XA support
      sql/lex.h:
        XA commands
      sql/log.cc:
        new transaction handling, handlerton framework, two-phase commit,
        XA support, tc-logging, TC_LOG_MMAP class
      sql/log_event.cc:
        Xid_log_event
      sql/log_event.h:
        Xid_log_event, LOG_EVENT_BINLOG_CLOSED_F flag
      sql/mysql_priv.h:
        wrapper for query_id++
      sql/mysqld.cc:
        new command-line options --log-tc, --log-tc-size, --tc-heuristic-recover,
        new status variables Tc_log_page_size, Tc_log_max_pages_used, Tc_log_page_waits.
        init/stop tc logging
      sql/set_var.h:
        warning fixed
      sql/share/errmsg.txt:
        XA error messages
      sql/sp_head.cc:
        s/query_id++/next_query_id()/
      sql/sql_base.cc:
        typo fixed. new transaction handling.
      sql/sql_class.cc:
        cleanup of THD.transaction
      sql/sql_class.h:
        TC_LOG classes, new status variables, new savepoint handling, XA support
      sql/sql_insert.cc:
        comments
      sql/sql_lex.cc:
        s/found_colon/found_semicolon/
      sql/sql_lex.h:
        SQLCOM_XA_xxx, XA related changes in Lex
      sql/sql_parse.cc:
        cleanup, XA commands, new savepoint handling
      sql/sql_repl.cc:
        two functions moved to log.cc
      sql/sql_repl.h:
        two functions moved to log.cc
      sql/sql_trigger.cc:
        s/lex.name_and_length/lex.ident/
      sql/sql_yacc.yy:
        XA commands, cleanup
      88bd301d
  10. 20 Oct, 2004 1 commit
    • unknown's avatar
      errors without code removed · 066c9056
      unknown authored
      net_printf/send_error calls replaced by my_error family functions
      -1/1 (sent/unsent) error reporting removed
      (WL#2133)
      
      
      include/mysqld_error.h:
        new errors added.
      mysql-test/r/rpl_charset.result:
        new error
      mysql-test/r/rpl_timezone.result:
        new error
      mysql-test/r/sp-security.result:
        more clean error message
      mysql-test/r/sp.result:
        now error state intercepted correctly
      mysql-test/t/connect.test:
        new error message
      mysql-test/t/rpl_charset.test:
        new error message
      mysql-test/t/rpl_timezone.test:
        new error
      mysql-test/t/sp-security.test:
        more correct error handling
      mysql-test/t/sp.test:
        now error state intercepted correctly
      sql/ha_innodb.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/ha_innodb.h:
        -1/1 (sent/unsent) error reporting removed
      sql/item.cc:
        only boolean values should be returned by fix_fields()
      sql/item_cmpfunc.cc:
        only boolean values should be returned by fix_fields()
      sql/item_func.cc:
        only boolean values should be returned by fix_fields()
        net_printf/send_error calls replaced by my_error family functions
      sql/item_row.cc:
        only boolean values should be returned by fix_fields()
      sql/item_subselect.cc:
        only boolean values should be returned by fix_fields()
        -1/1 (sent/unsent) error reporting removed
      sql/item_subselect.h:
        -1/1 (sent/unsent) error reporting removed
      sql/item_sum.cc:
        only boolean values should be returned by fix_fields()
      sql/item_timefunc.cc:
        only boolean values should be returned by fix_fields()
      sql/item_uniq.h:
        only boolean values should be returned by fix_fields()
      sql/mysql_priv.h:
        -1/1 (sent/unsent) error reporting removed
      sql/mysqld.cc:
        net_printf/send_error calls replaced by my_error family functions
        changes in my_message_sql to support error handling correctly
      sql/protocol.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/protocol_cursor.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/repl_failsafe.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/repl_failsafe.h:
        -1/1 (sent/unsent) error reporting removed
      sql/set_var.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/share/czech/errmsg.txt:
        new error messages
      sql/share/danish/errmsg.txt:
        new error messages
      sql/share/dutch/errmsg.txt:
        new error messages
      sql/share/english/errmsg.txt:
        new error messages
      sql/share/estonian/errmsg.txt:
        new error messages
      sql/share/french/errmsg.txt:
        new error messages
      sql/share/german/errmsg.txt:
        new error messages
      sql/share/greek/errmsg.txt:
        new error messages
      sql/share/hungarian/errmsg.txt:
        new error messages
      sql/share/italian/errmsg.txt:
        new error messages
      sql/share/japanese/errmsg.txt:
        new error messages
      sql/share/korean/errmsg.txt:
        new error messages
      sql/share/norwegian-ny/errmsg.txt:
        new error messages
      sql/share/norwegian/errmsg.txt:
        new error messages
      sql/share/polish/errmsg.txt:
        new error messages
      sql/share/portuguese/errmsg.txt:
        new error messages
      sql/share/romanian/errmsg.txt:
        new error messages
      sql/share/russian/errmsg.txt:
        new error messages
      sql/share/serbian/errmsg.txt:
        new error messages
      sql/share/slovak/errmsg.txt:
        new error messages
      sql/share/spanish/errmsg.txt:
        new error messages
      sql/share/swedish/errmsg.txt:
        new error messages
      sql/share/ukrainian/errmsg.txt:
        new error messages
      sql/slave.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/slave.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sp.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/sp_head.cc:
        new eror handling support
        net_printf/send_error calls replaced by my_error family functions
      sql/sp_rcontext.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_acl.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_acl.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_base.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_class.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_class.h:
        my_messhage_sql now set/reset query_error flag
      sql/sql_db.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_delete.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_do.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_error.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_handler.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_help.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_insert.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_lex.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_load.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_map.cc:
        errors without code removed
      sql/sql_parse.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed from mysql_execute_command
      sql/sql_prepare.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_repl.cc:
        error messages fixed
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_repl.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_select.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_select.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_show.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_table.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_trigger.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_udf.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_union.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_update.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_view.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_view.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_yacc.yy:
        net_printf/send_error calls replaced by my_error family functions
      066c9056
  11. 15 Jul, 2004 2 commits
    • unknown's avatar
      after merge fixes (making rpl_charset and rpl_timezone pass). · 898ceb0f
      unknown authored
      Replication of charsets and timezones should shortly be changed to not need ONE_SHOT
      (but 5.0 should still be able to read it, to be able to replicate 4.1 masters).
      
      
      mysql-test/r/rpl_charset.result:
        result update after the merge (only binlog positions differ from 4.1)
      mysql-test/r/rpl_timezone.result:
        result update after the merge (only binlog positions differ from 4.1)
      sql/log.cc:
        use ONE_SHOT to save charset and TZ info in the binlog (until I rewrite this soon)
      sql/set_var.cc:
        Even if in the future, 5.0 will not use ONE_SHOT in ITS binlog, it must still be able to interpret it, to make 4.1->5.0 replication possible
      sql/set_var.h:
        Even if in the future, 5.0 will not use ONE_SHOT in ITS binlog, it must still be able to interpret it, to make 4.1->5.0 replication possible
      898ceb0f
    • unknown's avatar
      After merge fixes · 46ea874f
      unknown authored
      Note: The following tests fails
      - fulltext (Sergei has promised to fix)
      - rpl_charset (Guilhem should fix)
      - rpl_timezone (Dimitray has promised to fix)
      
      Sanja needs to check out the calling of close_thread_tables() in sp_head.cc
      
      
      myisam/mi_check.c:
        After merge fix
      myisam/sort.c:
        After merge fix
      mysql-test/mysql-test-run.sh:
        Export master socket to mysqltest
      mysql-test/r/func_group.result:
        Make result repeatable
      mysql-test/r/mysqlbinlog.result:
        After merge fix
      mysql-test/r/ps_1general.result:
        After merge fix
      mysql-test/r/ps_2myisam.result:
        After merge fix
      mysql-test/r/ps_3innodb.result:
        After merge fix
      mysql-test/r/ps_4heap.result:
        After merge fix
      mysql-test/r/ps_5merge.result:
        After merge fix
      mysql-test/r/ps_6bdb.result:
        After merge fix
      mysql-test/r/rpl_flush_log_loop.result:
        After merge fix
      mysql-test/r/rpl_replicate_do.result:
        After merge fix
      mysql-test/r/rpl_temporary.result:
        After merge fix
      mysql-test/r/rpl_timezone.result:
        After merge fix
        Note that this test fails now (Dimitry has promised to fix this)
      mysql-test/r/rpl_user_variables.result:
        After merge fix
      mysql-test/r/select.result:
        After merge fix
      mysql-test/r/sp-error.result:
        After merge fix
      mysql-test/r/sp-security.result:
        After merge fix
      mysql-test/r/sp.result:
        After merge fix
      mysql-test/r/user_var.result:
        After merge fix
      mysql-test/r/variables.result:
        After merge fix
      mysql-test/t/alter_table.test:
        After merge fix
      mysql-test/t/derived.test:
        After merge fix
      mysql-test/t/func_group.test:
        Make result repeatable
      mysql-test/t/grant_cache.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/multi_update.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl000015.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl000017.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl000018.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl_charset.test:
        After merge fix
      mysql-test/t/rpl_heap.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/rpl_rotate_logs.test:
        Use MASTER_MYSOCK instead of master.sock
      mysql-test/t/sp-error.test:
        after merge fix
      mysql-test/t/sp-security.test:
        after merge fix
      mysql-test/t/user_var.test:
        after merge fix
      scripts/mysql_fix_privilege_tables.sh:
        This can now be exectued from the source distribution
      sql/handler.cc:
        Cleanup
      sql/handler.h:
        More debugging
      sql/item.h:
        Indentation fixes
      sql/item_cmpfunc.cc:
        After merge fixes
      sql/opt_range.cc:
        After merge fixes
      sql/opt_range.h:
        After merge fixes
      sql/sp.cc:
        After merge fixes
      sql/sp_head.cc:
        Remove closing of thread tables in a SP function as this caused a core dump.
        (Has to be fixed better)
      sql/sql_base.cc:
        More debugging
      sql/sql_handler.cc:
        After merge fixes
        (We have to call ha_index_or_rnd_end() before calling close_thread_table())
      sql/sql_parse.cc:
        More debugging
      sql/sql_prepare.cc:
        After merge fixes
      sql/sql_select.cc:
        After merge fixes
      46ea874f
  12. 18 Jun, 2004 1 commit
    • unknown's avatar
      WL#1264 "Per-thread time zone support infrastructure". · 6aaccbcb
      unknown authored
      Added basic per-thread time zone functionality (based on public
      domain elsie-code). Now user can select current time zone
      (from the list of time zones described in system tables).
      All NOW-like functions honor this time zone, values of TIMESTAMP
      type are interpreted as values in this time zone, so now
      our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
      LOCAL TIME ZONE (or proper PostgresSQL type).
        
      WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
      function".
        
      Fixed problems described in Bug #2336 (Different number of warnings 
      when inserting bad datetime as string or as number). This required
      reworking of datetime realted warning hadling (they now generated 
      at Field object level not in conversion functions).
        
      Optimization: Now Field class descendants use table->in_use member
      instead of current_thd macro.
      
      
      include/my_global.h:
        Added macro for reading of 32-bit ints stored in network order from
        unaligned memory location.
      include/mysqld_error.h:
        Added error-code for invalid timestamp warning and error-code
        for wrong or unknown time zone specification.
      libmysqld/Makefile.am:
        Added main per-thread time zone support file to libmysqld
      libmysqld/lib_sql.cc:
        Added initialization of time zones infrastructure to embedded server.
      mysql-test/r/connect.result:
        Updated test result since now mysql database contains more
        system tables.
      mysql-test/r/date_formats.result:
        Now when truncation occurs during conversion to datetime value we are producing Warnings 
        instead of Notes. Also we are giving more clear warnings about this in some cases.
      mysql-test/r/func_sapdb.result:
        New warnings about truncation occured during conversion to datetime value added due
        their better handling.
      mysql-test/r/func_time.result:
        New warnings about truncation occured during conversion to datetime value added due
        their better handling.
      mysql-test/r/select.result:
        New warnings about truncation occured during conversion to datetime value added due
        their better handling. Also tweaked test a bit to made it less ambigious for reader.
      mysql-test/r/system_mysql_db.result:
        Updated test result because new system tables holding time zone descriptions were 
        added.
      mysql-test/r/timezone.result:
        Updated timezone.test to use new system variable which shows system time zone.
        Added test of warning which is produced if someone tries to store non-existing (due 
        falling into spring time-gap) datetime value into TIMESTAMP field.
      mysql-test/r/type_datetime.result:
        Separated and extended test of values and warnings produced for bad values stored in 
        DATETTIME fields.
      mysql-test/r/type_time.result:
        Now we are producing more consistent warning when we are truncating datetime value while
        storing it in TIME field.
      mysql-test/r/type_timestamp.result:
        Separated and extended test of values and warnings produced for bad
        values stored in TIMESTAMP fields.
      mysql-test/t/select.test:
        Updated test to make it less ambigous for reader.
      mysql-test/t/timezone.test:
        Updated timezone.test to use new system variable which shows system time zone.
        Added test of warning which is produced if someone tries to store non-existing (due 
        falling into spring time-gap) datetime value into TIMESTAMP field.
      mysql-test/t/type_datetime.test:
        Separated and extended test of values and warnings produced for bad
        values stored in DATETTIME fields.
      mysql-test/t/type_timestamp.test:
        Separated and extended test of values and warnings produced for bad
        values stored in TIMESTAMP fields.
      scripts/mysql_create_system_tables.sh:
        Added creation of tables with time zone descriptions.
        Also added descriptions of time zones used in tests.
      scripts/mysql_fix_privilege_tables.sql:
        Added mysql.time_zone* tables family.
      sql/Makefile.am:
        Added files implementing time zone support to server, also added
        rules for building of mysql_tzinfo_to_sql converter and test_time
        test.
      sql/field.cc:
        Now we are using per-thread time zone for TIMESTAMP <-> whatever conversion.
        Fixed generation of warnings for datetime types (DATETIME/TIMESTAMP/DATE/...) and
        any other Field to datetime conversion (now we are generating warnings no in lower
        level functions like in str_to_TIME() but in Field methods. This allows generate
        better and more consistent warnings and to reuse code of str_to_TIME() outside of
        server).
        
        Added 3rd parameter to set_warning() method to be able to not increment cut fields
        but still produce a warning. Also added set_datetime_warning() family of auxiliary 
        methods which allow easier generate datetime related warnings.
        Also replaced occurences of current_thd with table->in_use member, added
        asserts for catching all places there we need to set table->in_use
        accordingly. Renamed fix_datetime() function to number_to_TIME() and
        moved it to sql/time.cc there it fits better.
      sql/field.h:
        Added comment about places where we can use table->in_use member
        instead of current_thd.
        Added 3rd parameter to Field::set_warning() method and set_datetime_warning()
        family of methods.
      sql/field_conv.cc:
        Field::set_warning() method with 2 arguments was replaced with more 
        generic set_warning() method with 3 arguments.
      sql/ha_berkeley.cc:
        Now we set table->in_use for temporary tables so we have to use
        table->tmp_table for checking if table is temporary.
      sql/item.cc:
        Replaced calls to str_to_time() and str_to_TIME() funcs with their warning
        generating analogs.
      sql/item_create.cc:
        Added creation of CONVERT_TZ function as FUNC_ARG3.
      sql/item_create.h:
        Added creation of CONVERT_TZ function as FUNC_ARG3.
      sql/item_timefunc.cc:
        Added support of per-thread time zone to NOW-like and FROM_UNIXTIME,
        UNIX_TIMESTAMP functions. 
        Added support for CONVERT_TZ function.
        Removed call to str_to_timestamp function which caused non-optimal
        behavior in certain cases. Replaced calls to str_to_time() function 
        with its warning generating analog.
      sql/item_timefunc.h:
        Added support of per-thread time zone to NOW-like and
        FROM_UNIXTIME, UNIX_TIMESTAMP functions.
        Added support of CONVERT_TZ function.
      sql/lex.h:
        Added support of CONVERT_TZ function.
      sql/log.cc:
        Added support for replication of statements depending on time zone.
      sql/mysql_priv.h:
        Now including headers with per-thread time zone support functions
        and classes. Added portable replacement of time_t - my_time_t type. 
        Added time zone as one of query distinguishing parameters for
        query cache. 
        Fixed declarations of str_to_TIME, str_to_time and 
        my_system_gmt_sec (former my_gmt_sec) since now they have one more
        out parameter which informs about wrong datetime value or data 
        truncation during conversion.
        Added warning generating version of str_to_TIME() and str_to_time()
        functions.
        Thrown away str_to_datetime/timestamp functions since they are not
        needed any longer. Added number_to_TIME function.
      sql/mysqld.cc:
        Added per-thread time zone support initialization.
        Added new startup parameter --default-time-zone.
      sql/set_var.cc:
        Added support for per-thread time_zone variable.
        Renamed old timezone variable to system_time_zone.
      sql/set_var.h:
        Added support for per-thread time_zone variable.
      sql/share/czech/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/danish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/dutch/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/english/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/estonian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/french/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/german/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/greek/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/hungarian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/italian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/japanese/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/korean/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/norwegian-ny/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/norwegian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/polish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/portuguese/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/romanian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/russian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/serbian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/slovak/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/spanish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/swedish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/ukrainian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/slave.cc:
        In order to support replication of statements using time zones in 4.1 we should 
        ensure that both master and slave have same default time zone.
      sql/sql_base.cc:
        Now we are setting TABLE::in_use member for all tables (which assume
        calls to Field::store or val_ methods).
      sql/sql_cache.cc:
        Added time zone as one more query distinguishing parameter
        for query cache.
      sql/sql_class.cc:
        Added THD::time_zone_used variable indicating that this query
        uses per thread time zone.
      sql/sql_class.h:
        Added per-thread time zone variable. Added THD::time_zone_used
        variable indicating that this query uses per thread time zone
        so if this is updating query the time zone should be logged to 
        binlog.
      sql/sql_insert.cc:
        We should set TABLE::in_use member pointing to thread which is called
        INSERT DELAYED and not to worker thread.
      sql/sql_load.cc:
        Field::set_warning() now has one more argument now.
      sql/sql_parse.cc:
        Resetting THD::time_zone_used variable in the end of query
        processing.
      sql/sql_select.cc:
        Now we are setting TABLE::in_use member for all tables (which assume
        calls to Field::store or val_ methods).
      sql/sql_show.cc:
        Now using per thread time zone for extended show tables.
      sql/time.cc:
        Added support for per-thread time zones for TIMESTAMP type and
        reworked generation of warnings for TIMESTAMP and DATETIME types.
        (Introduced new TIME_to_timestamp() function. Removed hours 
        normalisation from former my_gmt_sec() since it was not working 
        and not used anywhere now, but breaks parameter constness, added
        to this function generation of warning if we are falling in spring 
        time-gap. Removed str_to_timestamp and str_to_datetime functions 
        which are no longer used. Moved fix_datetime function from
        sql/field.cc to this file as number_to_TIME() function. Added
        out parameter for str_to_TIME and str_to_time functions which
        indicates if value was truncated during conversion, removed direct 
        generation of warnings from this functions.)
      sql/unireg.cc:
        Now we are setting TABLE::in_use member for all tables (which assume
          calls to Field::store or val_ methods).
      BitKeeper/etc/ignore:
        Added sql/test_time sql/mysql_tzinfo_to_sql libmysqld/tztime.cc to the ignore list
      6aaccbcb