1. 13 Mar, 2006 1 commit
    • unknown's avatar
      Fixed bug#17366: Unchecked Item_int results in server crash · 1da91c4a
      unknown authored
      When there is conjunction of conds, the substitute_for_best_equal_field()
      will call the eliminate_item_equal() function in loop to build final
      expression. But if eliminate_item_equal() finds that some cond will always
      evaluate to 0, then that cond will be substituted by Item_int with value ==
      0. In this case on the next iteration eliminate_item_equal() will get that 
      Item_int and treat it as Item_cond. This is leads to memory corruption and
      server crash on cleanup phase.
      
      To the eliminate_item_equal() function was added DBUG_ASSERT for checking
      that all items treaten as Item_cond are really Item_cond.
      The substitute_for_best_equal_field() now checks that if
      eliminate_item_equal() returns Item_int and it's value is 0 then this 
      value is returned as the result of whole conjunction.
      
      
      mysql-test/t/subselect.test:
        Added test for bug#17366: Unchecked Item_int results in server crash
      mysql-test/r/subselect.result:
         Added test for bug#17366: Unchecked Item_int results in server crash
      sql/sql_select.cc:
        Fixed bug#17366: Unchecked Item_int results in server crash
         
        To the eliminate_item_equal() function was added DBUG_ASSERT for checking
        that all items treaten as Item_cond are really Item_cond.
        The substitute_for_best_equal_field() now checks that if
        eliminate_item_equal() returns something other than Item_cond and if it is
        then this value is returned as the result of whole conjunction.
      1da91c4a
  2. 23 Feb, 2006 8 commits
    • unknown's avatar
      Merge paul@bk-internal.mysql.com:/home/bk/mysql-5.0 · f7e2d6a4
      unknown authored
      into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-5.0
      
      f7e2d6a4
    • unknown's avatar
      mysqld.cc: · fded06a0
      unknown authored
        Fix out of order entries in option struct.
      
      
      sql/mysqld.cc:
        Fix out of order entries in option struct.
      fded06a0
    • unknown's avatar
      Change snprintf to my_snprintf · b9feb8c6
      unknown authored
      
      client/mysqldump.c:
        snprintf =>  my_snprintf
      b9feb8c6
    • unknown's avatar
      Aix52 build fix · 0ed044df
      unknown authored
      
      client/mysqldump.c:
        Declare variable in start of function
      0ed044df
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 95444d9d
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/t/sp.test:
        Auto merged
      95444d9d
    • unknown's avatar
      Merge fixup · b8a77b14
      unknown authored
      
      client/mysqltest.c:
        Fix after merge, do_eval has three args
        Remove extre return in do_block
      b8a77b14
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/mysqltest_replace/my50-mysqltest_replace · f8577541
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      
      client/mysqltest.c:
        Auto merged
      mysql-test/r/mysqltest.result:
        Auto merged
      mysql-test/t/mysqldump.test:
        Auto merged
      mysql-test/t/mysqltest.test:
        Merge
      f8577541
    • unknown's avatar
      Add new parameter to do_eval so that only unescaped variables in input string... · 09eee68d
      unknown authored
      Add new parameter to do_eval so that only unescaped variables in input string is expanded and rest of string is left untouched.
      
      
      client/mysqltest.c:
        Add new parameter to 'do_eval' that will add any escape chars found in the input string to the output string. 
        This is used in 'do_system' and in 'do_exec' where only unescaped variables
        will be expanded, rest of the string will be left untouched.
      mysql-test/r/mysqltest.result:
        Update test result
      mysql-test/t/mysqldump.test:
        Revert previous patch that added extra \\ in "exec" command
      mysql-test/t/mysqltest.test:
        Revert previous patch that added extra \\ in exec command
      09eee68d
  3. 22 Feb, 2006 4 commits
    • unknown's avatar
      Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/5.0 · 657dcda4
      unknown authored
      into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/5.0-bug17265
      
      657dcda4
    • unknown's avatar
      BUG#17265 Assertion failure in rpl_row_view01. · fc08a36c
      unknown authored
      To quote Timour review lines:
      
      The actual cause of the bug is that sql_base.cc:setup_wild()
      sets "select_lex->with_wild = 0" (in the end of the function) once
      it expands all wild-cards, and wild-card expansion is done during
      the prepare phase. During this phase we replace all "*" with the
      corresponding items, which for views happen to be references to
      references. When we do execute, select_lex->with_wild = 0, and
      all "*" are already replaced by the corresponding items, which
      in the case of views need to be dereferenced first.
      
      Fixed by refining the assert. Regression test for the bug is rpl_row_view01,
      as was reported.
      
      
      sql/item.cc:
        Refined asssert, suggested by Evgen, due to BUG#17265 prepared statement for select with ps-protocol 
        does not hold the former.
      fc08a36c
    • unknown's avatar
      Fix for BUG#7787: Stored procedures: improper warning for "grant execute" statement. · bb8e3a28
      unknown authored
      The problem was that error flag was not reset.
      
      
      mysql-test/r/sp-security.result:
        Results for test case for BUG#7787.
      mysql-test/t/sp-security.test:
        A test case for BUG#7787.
      sql/sp.cc:
        Reset errors after sp_find_routine().
      bb8e3a28
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · e3323e45
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      e3323e45
  4. 21 Feb, 2006 15 commits
  5. 20 Feb, 2006 7 commits
  6. 18 Feb, 2006 5 commits
    • unknown's avatar
      In previous push, a DROP TABLE at the end of test was missing. · 23e6848a
      unknown authored
      
      mysql-test/r/mix_innodb_myisam_binlog.result:
        result update
      mysql-test/t/mix_innodb_myisam_binlog.test:
        cleanup in the end
      23e6848a
    • unknown's avatar
      Fix for BUG#13897 "failure to do SET SQL_MODE=N where N is a number > 31" (the... · 10ce919b
      unknown authored
      Fix for BUG#13897 "failure to do SET SQL_MODE=N where N is a number > 31" (the original bug's title isn't the simplest
      symptom). sys_var::check_set() was wrong. mysqlbinlog makes use of such SET SQL_MODE=N
      (where N is interpreted like if SQL_MODE was a field of type SET), so
      this bug affected recovery from binlogs if the server was running with certain SQL_MODE values,
      for example the default values on Windows (STRICT_TRANS_TABLES); to work around this bug people
      had to edit mysqlbinlog's output.
      
      
      mysql-test/r/sql_mode.result:
        result update
      mysql-test/t/sql_mode.test:
        test for various numeric SQL_MODE values
      sql/set_var.cc:
        For a set, it does not make sense to test if the supplied argument exceeds the number of elements in the set
        (such test would make sense for an enum), but rather to check if it exceeds 2^this (to verify
        that only reasonable bits are set).
      10ce919b
    • unknown's avatar
      Fix for BUG#14769 "Function fails to replicate if fails half-way (slave stops)": · a6fe7f7c
      unknown authored
      if the function, invoked in a non-binlogged caller (e.g. SELECT, DO), failed half-way on the master,
      slave would stop and complain that error code between him and master mismatch. 
      To solve this, when a stored function is invoked in a non-binlogged caller (e.g. SELECT, DO), we binlog the function
      call as SELECT instead of as DO (see revision comment of sp_head.cc for more).
      And: minor wording change in the help text.
      This cset will cause conflicts in 5.1, I'll merge.
      
      
      mysql-test/r/rpl_sp.result:
        result update
      mysql-test/t/rpl_sp-slave.opt:
        bug just fixed so option not needed
      mysql-test/t/rpl_sp.test:
        test for more half-failed functions with DO and SELECT, to test the bug of this changeset.
        cleanup at the end.
      sql/mysqld.cc:
        function -> stored function (change suggested by Paul)
      sql/sp_head.cc:
        When a function updates data and is called from a non-binlogged statement (SELECT, DO), we binlog it 
        as SELECT myfunc(), and not DO myfunc() like before.
      a6fe7f7c
    • unknown's avatar
      Fix for BUG#16559 "Replication Problems with Non transactional tables inside... · 94beb83b
      unknown authored
      Fix for BUG#16559 "Replication Problems with Non transactional tables inside an interrupted trans.":
      problem was: when a connection disconnects having an open transaction affecting MyISAM and InnoDB, the ROLLBACK event stored in the binary log
      contained a non-zero error code (1053 because of the disconnection), so when slave applied the transaction, slave complained that its ROLLBACK succeeded
      (error_code=0) while master's had 1053, so slave stopped. But internally generated binlog events such as this ROLLBACK
      should always have 0 as error code, as is true in 4.1 and was accidentally broken in 5.0,
      so that there is no false alarm.
      
      
      mysql-test/r/mix_innodb_myisam_binlog.result:
        result update
      mysql-test/t/mix_innodb_myisam_binlog.test:
        test for BUG#16559
      sql/log.cc:
        Internally generated binlog events should always have an error code of zero (like in 4.1; in 5.0 this was accidentally broken).
      94beb83b
    • unknown's avatar
      --help option added to mysql_upgrade script · 8acb3a27
      unknown authored
      
      scripts/mysql_upgrade.sh:
        --help option implemented
      8acb3a27