1. 21 Oct, 2007 2 commits
    • unknown's avatar
      Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · e8b8b089
      unknown authored
      into  dsl-hkibras1-ff5fc300-23.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug26199-create_proc_syntax_slave
      
      
      e8b8b089
    • unknown's avatar
      Bug #26199 Replication Failure on Slave when using stored procs with bit-type parameters. · 6cfd9a4f
      unknown authored
      The value of the actual argument of BIT-type-arg stored procedure was binlogged as non-escaped
      sequence of bytes corresponding to internal representation of the bit value.
      
      The patch enforces binlogging of the bit-argument as a valid literal: prefixing the quoted bytes
      sequence with _binary.
      Note, that behaviour of Item_field::var_str for field_type() of MYSQL_TYPE_BIT is exceptional
      in that the returned string contains the binary representation even though result_type() of
      the item is INT_RESULT.
      
      
      mysql-test/r/rpl_sp_effects.result:
        testing stored function and procedure called with BIT-arg.
      mysql-test/t/rpl_sp_effects.test:
        results changed
      sql/sp_head.cc:
        Treating BIT field type specially to for its value to be prefixed and quoted.
      6cfd9a4f
  2. 16 Oct, 2007 1 commit
  3. 13 Oct, 2007 1 commit
    • unknown's avatar
      Bug #29136 erred multi-delete on trans table does not rollback the statement · c8b6d105
      unknown authored
      similar to bug_27716, but it was stressed on in the synopsis on that there is another
      side of the artifact affecting behaviour in transaction.
      
      Fixed with deploying multi_delete::send_error() - otherwise never called - and refining its logic
      to perform binlogging job if needed.
      
      The changeset includes the following side effects:
      - added tests to check bug_23333's scenarios on the mixture of tables for multi_update;
      - fixes bug@30763 with two-liner patch and a test coinciding to one added for bug_23333.
      
      
      mysql-test/r/innodb.result:
        results changed
      mysql-test/r/mix_innodb_myisam_binlog.result:
        results changed
      mysql-test/r/multi_update.result:
        results changed
      mysql-test/t/innodb.test:
        trans table specific test added
      mysql-test/t/mix_innodb_myisam_binlog.test:
        multi-update  and multi-delete of mixure of ta and not-ta tables tests added (relates to bug_23333).
      mysql-test/t/multi_update.test:
        testing another branch of mult-delete: send_eof() (binloggin there), send_error (early return)
      sql/sql_class.h:
        a new flag to designate the fact the statement's error has been handled.
        The flag is checked by ::send_error() methods (multi_update and _delete classes)
      sql/sql_delete.cc:
        expanding multi_delete::send_error to 
        1. early return if error_handled == t
        2. binlogging locally if there was a non-trans table modified side effect
      sql/sql_parse.cc:
        adding multi_update::send_error which can perform binlogging and rollback job in needed
      sql/sql_update.cc:
        issues relating to
         
        1. bug_27716 with zeroing of `updated' to serve as the flag of early return from send_error().
           The flag is changed to be a new member error_handled; also moved outside binlogging branch.
           The reason for this change is that bug_23333 fixes were pushed after the bug_27716's and they
           left this flaw (also no test coverage).
        2. bug_30763 with assertion on trans_safe. I decide to make 2 liner fix for that bug here instead of to remove
           those two assertions. This new bug test case is the same as for multi-update on the mixure of tables.
           The rational for this fix:
           presumption for mutli_update::trans_safe to be set to zero at
           multi_update::multi_update or multi_update::initialize_tables() is incorrect.
        
           trans_safe := false should happen only when a non-transactional table gets modified. 
           Therefore, at initialization the member must be be set to true.
      c8b6d105
  4. 05 Oct, 2007 1 commit
    • unknown's avatar
      Bug#31081 server crash in regexp function · 64b19133
      unknown authored
      Problem: The "regex" library written by Henry Spencer
      does not support tricky character sets like UCS2.
      Fix: convert tricky character sets to UTF8 before calling
      regex functions.
      
      
      mysql-test/r/ctype_uca.result:
        Adding tests
      mysql-test/r/ctype_ucs.result:
        Adding tests
      mysql-test/r/ctype_utf8.result:
        Adding tests
      mysql-test/r/func_regexp.result:
        Adding tests
      mysql-test/t/ctype_uca.test:
        Adding tests
      mysql-test/t/ctype_ucs.test:
        Adding tests
      mysql-test/t/ctype_utf8.test:
        Adding tests
      mysql-test/t/func_regexp.test:
        Adding tests
      sql/item_cmpfunc.cc:
        - Adding new method Item_func_regex::regcomp()
        to share more code between fix_fields() and val_int()
        - Adding conversion from ASCII-incompatible charsets like UCS2
        to UTF8, because the "regexp" does not support these charsets
        - Additional optimization: calculate flags for regcomp only
          once in fix_fields, instead of every regcomp()
      sql/item_cmpfunc.h:
        Adding prototypes for new members and methods
      mysql-test/include/ctype_regex.inc:
        New BitKeeper file ``mysql-test/include/ctype_regex.inc''
        
        Moving common regular expression tests into a separate
        file and uncluding it into func_regexp and into many ctype_xxx tests.
      64b19133
  5. 04 Oct, 2007 3 commits
    • unknown's avatar
      Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0 · 5aba177b
      unknown authored
      into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug29309-wrong_master_timestamp
      
      
      5aba177b
    • unknown's avatar
      Bug #29309 Incorrect "Seconds_Behind_Master" value in SHOW SLAVE STATUS after FLUSH LOGS · bf8a85aa
      unknown authored
      Report claims that Seconds_behind_master behaves unexpectedly. 
      
      Code analysis shows that there is an evident flaw in that treating of FormatDescription event is wrong
      so  that after FLUSH LOGS on slave the Seconds_behind_master's calculation slips and incorrect
      value can be reported to SHOW SLAVE STATUS. 
      Even worse is that the gap between the correct and incorrect deltas grows with time.
      
      Fixed with prohibiting changes to rpl->last_master_timestamp by artifical events (any kind of).
      suggestion as comments is added how to fight with lack of info on the slave side by means of
      new heartbeat feature coming.
      
      The test can not be done ealily fully determistic.
      
      
      sql/log_event.cc:
        changing timestamp is affirmed only by non-artificial events. Artifical FD won't change it anymore.
        The simulation code is off unless server is started with the args from the opt-file.
        The simulation code assumes that it will execute specific schedule generated by rpl_replication_delay.test.
      sql/slave.cc:
        Comments are changed to announce a new possibility to cope with
        Seconds_behind_master jumping due to EOF special treatment (reset of the timestamp)
      mysql-test/suite/manual/r/rpl_replication_delay.result:
        result are not deterministic though there are comments saying the most probable expected
        value for Seconds_behind_master
      mysql-test/suite/manual/t/rpl_replication_delay-slave.opt:
        bug emulation
      mysql-test/suite/manual/t/rpl_replication_delay.test:
        specic test for bug#29309. It's hard to make it reliable as it deals with timestamps.
        (a way to automate the test like this is to have I_S table for show slave status' fields)
        
        A possible way to check results is to run
        grep -i 'show\|seconds' < suite/manual/r/rpl_replication_delay.reject and to get the lines like these:
        
        show slave status /* Second_behind reports 0 */;;
        Seconds_Behind_Master   0
        show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;;
        Seconds_Behind_Master   9
        show slave status /* reports the correct diff with master query time about 3+3 secs */;;
        Seconds_Behind_Master   6
        
        Due to time discreteness of time the reported numbers may slightly vary. That's why the test is not reliable.
      bf8a85aa
    • unknown's avatar
      Bug#29323 mysql client only accetps ANSI encoded files · d0b076b6
      unknown authored
      Fix: ignore BOM marker in the first line.
      
      
      client/mysql.cc:
        Skip BOM marker in the very first line.
      mysql-test/r/mysql.result:
        Adding test
      mysql-test/t/mysql.test:
        Adding test
      d0b076b6
  6. 03 Oct, 2007 4 commits
    • unknown's avatar
      Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · 11045636
      unknown authored
      into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug26000_show_slave_status_when_no_active_mi
      
      
      11045636
    • unknown's avatar
      Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · 53139477
      unknown authored
      into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug26000_show_slave_status_when_no_active_mi
      
      
      sql/sql_parse.cc:
        Auto merged
      53139477
    • unknown's avatar
      BUG#30752 rpl_dual_pos_advance valgrind (jump depends on uninitialized LOG_INFO) · 42cea00e
      unknown authored
      Problem: one thread could read uninitialized memory from (the stack of) another
      thread.
      Fix: swapped order of initializing the memory and making it available to the
      other thread.
      Fix: put lock around the statement that makes the memory available to the other
      thread.
      Fix: all fields of the struct are now initialized in the constructor, to avoid
      future problems.
      
      
      sql/sql_class.h:
        Initialize all members in constructor for more safe future code.
      sql/sql_repl.cc:
        Swap order so that linfo is first initialized, then assigned, instead of the
        other way around.
        Put a lock around the assignment. We use LOCK_thread_count since log_in_use
        uses it: log_in_use may be running concurrently, called from
        MYSQL_LOG::purge_logs.
      42cea00e
    • unknown's avatar
      Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b30315 · eefbdfdb
      unknown authored
      into  mysql.com:/home/bar/mysql-work/mysql-5.0-rpl
      
      
      eefbdfdb
  7. 02 Oct, 2007 2 commits
  8. 01 Oct, 2007 4 commits
  9. 26 Sep, 2007 1 commit
    • unknown's avatar
      Bug #26000 SHOW SLAVE STATUS can crash mysqld during shutdown process · 184cddab
      unknown authored
      active_mi has been reset (shutdown) at the time of quering with 
      SHOW SLAVE STATUS so that 
      at handling of SHOW an attempt to read its members segfaults.
      
      Fixed with checking the value of active_mi before to call show_master_info()
      Merely send_ok() is invoked when active_mi does not exist.
      A test can not be easiely written.
      
      Notice, there are more analogical cases in the code which require a similar
      treatment (to be reported as a bug separately). 
      
      
      sql/sql_parse.cc:
        Ignore reporting and send only OK if master info struct has been destoyed.
        As this must be at shutdown merely a warning is sent to the client.
      184cddab
  10. 25 Sep, 2007 1 commit
  11. 22 Sep, 2007 1 commit
  12. 20 Sep, 2007 2 commits
    • unknown's avatar
      result fix · ad57f912
      unknown authored
      ad57f912
    • unknown's avatar
      Bug#27747 database metadata doesn't return sufficient column default info · fac190a2
      unknown authored
      added get_field_default_value() function which obtains default value from the field
      (used in store_create_info() & get_schema_column_record() functions)
      
      
      mysql-test/r/alter_table.result:
        result fix
      mysql-test/r/create.result:
        result fix
      mysql-test/r/ctype_collate.result:
        result fix
      mysql-test/r/ctype_recoding.result:
        result fix
      mysql-test/r/default.result:
        result fix
      mysql-test/r/gis.result:
        result fix
      mysql-test/r/grant.result:
        result fix
      mysql-test/r/information_schema.result:
        result fix
      mysql-test/r/key.result:
        result fix
      mysql-test/r/mysql.result:
        result fix
      mysql-test/r/ps_1general.result:
        result fix
      mysql-test/r/show_check.result:
        result fix
      mysql-test/r/sp.result:
        result fix
      mysql-test/r/type_enum.result:
        result fix
      mysql-test/r/type_ranges.result:
        result fix
      mysql-test/t/information_schema.test:
        test case
      fac190a2
  13. 19 Sep, 2007 1 commit
  14. 15 Sep, 2007 1 commit
    • unknown's avatar
      select.test: · 692b686d
      unknown authored
        Post-fix for bug#27695.
      
      
      mysql-test/t/select.test:
        Post-fix for bug#27695.
      692b686d
  15. 14 Sep, 2007 13 commits
  16. 13 Sep, 2007 2 commits
    • unknown's avatar
      Merge trift2.:/MySQL/M50/push-5.0 · f2dd535b
      unknown authored
      into  trift2.:/MySQL/M50/tmp-5.0
      
      
      f2dd535b
    • unknown's avatar
      Fixed bug #27695. · 037a0f76
      unknown authored
      Declaring an all space column name in the SELECT FROM DUAL or in a view
      leads to misleading warning message:
      "Leading spaces are removed from name ' '".
      
      The Item::set_name method has been modified to raise warnings like
      "Name ' ' has become ''" in case of the truncation of an all
      space identifier to an empty string identifier instead of the
      "Leading spaces are removed from name ' '" warning message.
      
      
      sql/item.cc:
        Fixed bug #27695.
        The Item::set_name method has been modified to raise warnings like
        "Name ' ' has become ''" in case of the truncation of an all
        space identifier to an empty string identifier instead of the
        "Leading spaces are removed from name ' '" warning message.
      sql/share/errmsg.txt:
        Fixed bug #27695.
      mysql-test/t/select.test:
        Added test case for bug #27695.
      mysql-test/r/select.result:
        Added test case for bug #27695.
      037a0f76