1. 05 Nov, 2007 1 commit
    • unknown's avatar
      Bug #28597 Replication doesn't start after upgrading to 5.1.18 · ec4c562c
      unknown authored
      Since bug@20166, which replaced the binlog file name generating to base
      on pidfile_name instead of the previous glob_hostname, the binlog file
      name suddenly started to be stored solely in the absolute path format,
      including a case when --log-bin option meant a relative path.
      What's more serious, the path for binlog file can lead unrequestedly 
      to pid-file directory so that after any proper fix for this bug
      there might be similar to the bug report consequences for one who
      upgrades from post-fix-bug@20166-pre-fix-bug@28597 to post-fix-bug@28597.
      
      Fixed with preserving`pidfile_name' (intr.by bug@20166) but stripping
      off its directory part. This restores the original logics of storing
      the names in compatible with --log-bin option format and with the
      requirement for --log-bin ralative path to corresond to the data directory.
      Side effects for this fix:
      
      effective fixing bug@27070, refining its test;
      ensuring no overrun for buff can happen anymore (Bug#31836 
      insufficient space reserved for the suffix of relay log file name);
      bug#31837  --remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql missed
      in rpl_temporary.test;
      fixes Bug@28603  Invalid log-bin default location;
      
      
      mysql-test/t/rpl_dual_pos_advance.test:
        After correcting the logics of log file name composing workaround for
        
          Bug #27070 server logs are created unrequested and in wrong directory
        
        is removed.
      mysql-test/t/rpl_temporary.test:
        remaining temp file of the test removed
      sql/log.cc:
        stripping off the directory part of `pidfile_name' for binlog name
        generating (which fixes two more bugs on wrong binlog file location);
        ensuring no overrun for buff can happen anymore (Bug #31836 
        insufficient space reserved for the suffix of relay log file name);
      ec4c562c
  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 · 166fab60
      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.
      166fab60
  4. 05 Oct, 2007 1 commit
    • unknown's avatar
      Bug#31081 server crash in regexp function · 7ea99203
      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.
      7ea99203
  5. 04 Oct, 2007 3 commits
    • unknown's avatar
      Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0 · b15b8807
      unknown authored
      into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug29309-wrong_master_timestamp
      
      b15b8807
    • unknown's avatar
      Bug #29309 Incorrect "Seconds_Behind_Master" value in SHOW SLAVE STATUS after FLUSH LOGS · 68b40be8
      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.
      68b40be8
    • unknown's avatar
      Bug#29323 mysql client only accetps ANSI encoded files · 995a3333
      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
      995a3333
  6. 03 Oct, 2007 4 commits
    • unknown's avatar
      Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · 492b7a44
      unknown authored
      into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug26000_show_slave_status_when_no_active_mi
      
      492b7a44
    • unknown's avatar
      Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · 021c19ff
      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
      021c19ff
    • unknown's avatar
      BUG#30752 rpl_dual_pos_advance valgrind (jump depends on uninitialized LOG_INFO) · 8d7af8f0
      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.
      8d7af8f0
    • unknown's avatar
      Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b30315 · 56fe8fc4
      unknown authored
      into  mysql.com:/home/bar/mysql-work/mysql-5.0-rpl
      
      56fe8fc4
  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 · 9c0448fa
      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.
      9c0448fa
  10. 25 Sep, 2007 1 commit
  11. 22 Sep, 2007 1 commit
  12. 20 Sep, 2007 2 commits
    • unknown's avatar
      result fix · bf3d46a8
      unknown authored
      bf3d46a8
    • unknown's avatar
      Bug#27747 database metadata doesn't return sufficient column default info · b7734724
      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
      b7734724
  13. 19 Sep, 2007 1 commit
  14. 15 Sep, 2007 1 commit
    • unknown's avatar
      select.test: · 6bcc6c25
      unknown authored
        Post-fix for bug#27695.
      
      
      mysql-test/t/select.test:
        Post-fix for bug#27695.
      6bcc6c25
  15. 14 Sep, 2007 13 commits
  16. 13 Sep, 2007 3 commits
    • unknown's avatar
      Merge trift2.:/MySQL/M50/push-5.0 · 31132dc9
      unknown authored
      into  trift2.:/MySQL/M50/tmp-5.0
      
      31132dc9
    • unknown's avatar
      Fixed bug #27695. · ede3c722
      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.
      ede3c722
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb · 7082c70e
      unknown authored
      into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
      
      7082c70e