1. 20 Aug, 2010 8 commits
    • Georgi Kodinov's avatar
      merge · c95f7a98
      Georgi Kodinov authored
      c95f7a98
    • Georgi Kodinov's avatar
      merge · c9d20d6c
      Georgi Kodinov authored
      c9d20d6c
    • Georgi Kodinov's avatar
      merge · cd8060a7
      Georgi Kodinov authored
      cd8060a7
    • Georgi Kodinov's avatar
      merge · 97e84715
      Georgi Kodinov authored
      97e84715
    • Georgi Kodinov's avatar
      merge · 4013e7b8
      Georgi Kodinov authored
      4013e7b8
    • Georgi Kodinov's avatar
      merge · 7d3a9b4c
      Georgi Kodinov authored
      7d3a9b4c
    • Georgi Kodinov's avatar
      merge · 162b3837
      Georgi Kodinov authored
      162b3837
    • Georgi Kodinov's avatar
      Bug #55826: create table .. select crashes with when · 6bea77ae
      Georgi Kodinov authored
        KILL_BAD_DATA is returned
      
      Two problems discovered with the LEAST()/GREATEST() 
      functions:
      1. The check for a null value should happen even 
      after the second call to val_str() in the args. This is
      important because two subsequent calls to the same
      Item::val_str() may yield different results.
      Fixed by checking for NULL value before dereferencing
      the string result.
      
      2. While looping over the arguments and evaluating them 
      the loop should stop if there was an error evaluating so far
      or the statement was killed. Fixed by checking for error
      and bailing out.
      6bea77ae
  2. 19 Aug, 2010 4 commits
  3. 18 Aug, 2010 2 commits
    • unknown's avatar
      The patch is 5.1 part of the worklog. It is for 5.1 only. · 9228dce6
      unknown authored
      So null merge.
      9228dce6
    • unknown's avatar
      WL#5370 Keep forward-compatibility when changing · 9d681150
      unknown authored
              'CREATE TABLE IF NOT EXISTS ... SELECT' behaviour
      BUG#55474, BUG#55499, BUG#55598, BUG#55616 and BUG#55777 are fixed
      in this patch too.
      
      This is the 5.1 part.
      It implements:
      - if the table exists, binlog two events: CREATE TABLE IF NOT EXISTS
        and INSERT ... SELECT
      
      - Insert nothing and binlog nothing on master if the existing object
        is a view. It only generates a warning that table already exists.
      
      
      mysql-test/r/trigger.result:
        Ather this patch, 'CREATE TABLE IF NOT EXISTS ... SELECT' will not
        insert anything if the creating table already exists and is a view.
      sql/sql_class.h:
        Declare virtual function write_to_binlog() for select_insert.
        It's used to binlog 'create select'
      sql/sql_insert.cc:
        Implement write_to_binlog();
        Use write_to_binlog() instead of binlog_query() to binlog the statement.
        if the table exists, binlog two events: CREATE TABLE IF NOT EXISTS
        and INSERT ... SELECT
      sql/sql_lex.h:
        Declare create_select_start_with_brace and create_select_pos.
        They are helpful for binlogging 'create select'
      sql/sql_parse.cc:
        Do nothing on master if the existing object is a view.
      sql/sql_yacc.yy:
        Record the relative postion of 'SELECT' in the 'CREATE ...SELECT' statement.
        Record whether there is a '(' before the 'SELECT' clause.
      9d681150
  4. 17 Aug, 2010 1 commit
  5. 16 Aug, 2010 6 commits
    • Georgi Kodinov's avatar
      merge · 3f58b7cd
      Georgi Kodinov authored
      3f58b7cd
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-5.5. · 98f69947
      Alexander Nozdrin authored
      98f69947
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-5.5-stage. · 32edab6b
      Alexander Nozdrin authored
      32edab6b
    • Sunny Bains's avatar
      Merge from -c3476 mysql-5.1-security. · 3c4d4e0a
      Sunny Bains authored
           ------------------------------------------------------------
           revno: 3476
           committer: Sunny Bains <Sunny.Bains@Oracle.Com>
           branch nick: 5.1-security
           timestamp: Thu 2010-08-05 19:18:17 +1000
           message:
             Fix bug# 55543 - InnoDB Plugin: Signal 6: Assertion failure in file fil/fil0fil.c line 4306
      
               The bug is due to a double delete of a BLOB, once via:
      
                     rollback -> btr_cur_pessimistic_delete()
      
               and the second time via purge.
      
               The bug is in row_upd_clust_rec_by_insert(). There we relinquish ownership
               of the non-updated BLOB columns in btr_cur_mark_extern_inherited_fields()
               before building the row entry that will be inserted and whose contents will
               be logged in the UNDO log. However, we don't set the BLOB column later to
               INHERITED so that a possible rollback will not free the original row's
               non-updated BLOB entries. This is because the condition that checks for
               that is in :
      
           		    	if (node->upd_ext) {}.
      
               node->upd_ext is non-NULL only if a BLOB column was updated and that column
               is part of some key ordering (see row_upd_replace()). This results in the
               non-update BLOB columns being deleted during a rollback and subsequently by
               purge again.
      
               rb://413
      3c4d4e0a
    • Sunny Bains's avatar
      Fix Bug #55277 - Failing assertion: auto_inc > 0 · adde4bac
      Sunny Bains authored
      Handle overflow when reading value from SELECT MAX(C) FROM T;
      
      Call ha_innobase::info() after initializing the autoinc value
      in ha_innobase::open().
      
      Fix for both the builtin and plugin.
      
      rb://402
      
      Merge from mysql-5.1-security.
      adde4bac
    • Sunny Bains's avatar
      9ab59902
  6. 15 Aug, 2010 1 commit
  7. 13 Aug, 2010 8 commits
    • Georgi Kodinov's avatar
      Bug #55565: debug assertion when ordering by expressions with user · 8b25c0e4
      Georgi Kodinov authored
      variable assignments
      
      The assert() that is firing is checking if expressions that can't be
      null return a NULL when evaluated.
      MAKEDATE() function can return NULL if the second argument is 
      less then or equal to 0. Thus its nullability depends not only on 
      the nullability of its arguments but also on their values.
      Fixed by (overoptimistically) setting MAKEDATE() to be nullable 
      despite the nullability of its arguments.
      Test added.
      Had to update one test result to reflect the metadata change.
      8b25c0e4
    • Vasil Dimov's avatar
      Manually merge a changeset from mysql-5.1-security: · 7f8627e3
      Vasil Dimov authored
        ------------------------------------------------------------
        revno: 3475
        revision-id: jimmy.yang@oracle.com-20100804103744-vbpeghipkz6pyc9z
        parent: jimmy.yang@oracle.com-20100804101133-c38qqbm0fkwn9jhc
        committer: Jimmy Yang <jimmy.yang@oracle.com>
        branch nick: mysql-5.1-security
        timestamp: Wed 2010-08-04 03:37:44 -0700
        message:
          Fix bug #54678, InnoDB, TRUNCATE, ALTER, I_S SELECT, crash or deadlock
          
          rb://399 approved by Sunny Bains
        modified:
          storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
          storage/innodb_plugin/include/dict0dict.h 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fdict0dict.h
          storage/innodb_plugin/include/dict0dict.ic 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fdict0dict.ic
          storage/innodb_plugin/row/row0mysql.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Frow%2Frow0mysql.c
      7f8627e3
    • Vasil Dimov's avatar
      Merge mysql-5.1-security -> mysql-5.5-security up to · 5ecd1920
      Vasil Dimov authored
      sunny.bains@oracle.com-20100805092434-tvxxzjgqgslo14en
      
      This is a null merge of InnoDB changes which will be ported into a
      separate commits.
      5ecd1920
    • Vasil Dimov's avatar
      Merge mysql-5.1-security -> mysql-5.5-security up to c3473 · fc5b0950
      Vasil Dimov authored
      (this is a null merge)
      fc5b0950
    • Georgi Kodinov's avatar
      merge · 53e0b31e
      Georgi Kodinov authored
      53e0b31e
    • Georgi Kodinov's avatar
      Bug #55615 and bug #55564 · 4bf81165
      Georgi Kodinov authored
      An user assignment variable expression that's 
      evaluated in a logical expression context 
      (Item::val_bool()) can be pre-calculated in a 
      temporary table for GROUP BY.
      However when the expression value is used after the
      temp table creation it was re-evaluated instead of
      being read from the temp table due to a missing 
      val_bool_result() method.
      Fixed by implementing the method.
      4bf81165
    • Alexander Nozdrin's avatar
      Disable test cases due to Bug 55966. · 427efc3a
      Alexander Nozdrin authored
      427efc3a
    • Georgi Kodinov's avatar
      Bug #55580 : segfault in read_view_sees_trx_id · 790852c0
      Georgi Kodinov authored
      The server was not checking for errors generated during
      the execution of Item::val_xxx() methods when copying
      data to the group, order, or distinct temp table's row.
      Fixed by extending the copy_funcs() to return an error
      code and by checking for that error code on the places
      copy_funcs() is called. 
      Test case added.
      790852c0
  8. 12 Aug, 2010 3 commits
  9. 11 Aug, 2010 1 commit
    • Guilhem Bichot's avatar
      fix for Bug #55672 "mysql_upgrade dies with internal error": · 53c8b221
      Guilhem Bichot authored
      it couldn't parse the --ssl option.
      
      client/mysql_upgrade.c:
        mysql_upgrade parses its options and passes some of them to the underlying
        tools (mysqlcheck etc). To do this passdown, it reconstructs a
        command-line-suitable text from the my_option object (which
        contains the option's name and option's value). For options
        which expect no parameter, it just had to use the option's name;
        for other options, it had to concatenate the option's name,
        a "=" symbol, and the option's value; it had code to handle
        this latter case, but only for GET_STR options (options taking a
        string as value). But since the work on WL 4738, the --ssl
        option, a GET_BOOL, which used to have no parameter (NO_ARG), can
        now have one (OPT_ARG), so with --ssl we came to the "default"
        label, error. Fixed by constructing the command-line-suitable
        representation for GET_BOOL too. For --ssl it will produce
        --ssl=1 ; for --ssl=0, it will produce --ssl=0.
      mysql-test/include/mysql_upgrade_preparation.inc:
        handles requirements of tests which use mysql_upgrade
      mysql-test/r/mysql_upgrade_ssl.result:
        result; without the code fix we would get "internal error".
      mysql-test/t/mysql_upgrade.test:
        This test has requirements before running; moved them
        to an include file in order to share with mysql_upgrade_ssl.
      mysql-test/t/mysql_upgrade_ssl.test:
        test for bug. Couldn't go into mysql_upgrade.test as this new test requires
        SSL support. --force is needed, in case mysql_upgrade.test run before
        (in which case mysql_upgrade_ssl would say that upgrade has already been
        done); --force forces the upgrade in all cases.
      53c8b221
  10. 12 Aug, 2010 1 commit
  11. 11 Aug, 2010 2 commits
  12. 10 Aug, 2010 3 commits