1. 02 Mar, 2010 2 commits
    • Tatiana A. Nurnberg's avatar
      manual merge · a3edaa0c
      Tatiana A. Nurnberg authored
      a3edaa0c
    • Tatiana A. Nurnberg's avatar
      Bug#48295: explain extended crash with subquery and ONLY_FULL_GROUP_BY sql · c610e978
      Tatiana A. Nurnberg authored
      If an outer query is broken, a subquery might not even get set up.
      EXPLAIN EXTENDED did not expect this and merrily tried to de-ref all
      of the half-setup info.
      
      We now catch this case and print as much as we have, as it doesn't cost us
      anything (doesn't make regular execution slower).
      
      backport from 5.1
      
      mysql-test/r/explain.result:
        Show that EXPLAIN EXTENDED with subquery and illegal out query doesn't crash.
        Show also that SHOW WARNINGS will render an additional Note in the hope of
        being, well, helpful.
      mysql-test/t/explain.test:
        If we have only half a query for EXPLAIN EXTENDED to print (i.e.,
        incomplete subquery info as outer query is illegal), we should
        provide the user with as much info as we easily can if they ask
        for it. What we should not do is crash when they come asking for
        help, that violates etiquette in some countries.
      sql/item_subselect.cc:
        If the sub-query's actually set up, print it. Otherwise, elide.
      c610e978
  2. 26 Feb, 2010 12 commits
    • Sergey Vojtovich's avatar
      Merge innodb-5.1-ss6765 to 5.1-bugteam. · fe229e33
      Sergey Vojtovich authored
      fe229e33
    • Sergey Glukhov's avatar
      automerge · 03561d35
      Sergey Glukhov authored
      03561d35
    • Sergey Glukhov's avatar
      Bug#50995 Having clause on subquery result produces incorrect results. · 9245ed4a
      Sergey Glukhov authored
      The problem is that cond->fix_fields(thd, 0) breaks
      condition(cuts off 'having'). The reason of that is
      that NULL valued Item pointer is present in the
      middle of Item list and it breaks the Item processing
      loop.
      
      
      mysql-test/r/having.result:
        test case
      mysql-test/t/having.test:
        test case
      sql/item_cmpfunc.h:
        added ASSERT to make sure that we do not add NULL valued Item pointer
      sql/sql_select.cc:
        skip adding an item to condition if Item pointer is NULL.
        skip adding a list to condition if this list is empty.
      9245ed4a
    • Evgeny Potemkin's avatar
      Auto-merged fox for the bug#50843. · 6025d0ba
      Evgeny Potemkin authored
      6025d0ba
    • Evgeny Potemkin's avatar
      Bug#50843: Filesort used instead of clustered index led to · 2d4db52e
      Evgeny Potemkin authored
      performance degradation.
      
      Filesort + join cache combination is preferred to full index scan because it
      is usually faster. But it's not the case when the index is clustered one.
      
      Now test_if_skip_sort_order function prefers filesort only if index isn't
      clustered.
      
      mysql-test/r/innodb_mysql.result:
        Added a test case for the bug#50843.
      mysql-test/t/innodb_mysql.test:
        Added a test case for the bug#50843.
      sql/sql_select.cc:
        Bug#50843: Filesort used instead of clustered index led to
        performance degradation.
        Now test_if_skip_sort_order function prefers filesort only if index isn't
        clustered.
      2d4db52e
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot, fixes BUG#50691 · b751f4e0
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6669 | jyang | 2010-02-11 12:24:19 +0200 (Thu, 11 Feb 2010) | 7 lines
      branches/5.1: Fix bug #50691, AIX implementation of readdir_r
      causes InnoDB errors. readdir_r() returns an non-NULL value
      in the case of reaching the end of a directory. It should
      not be treated as an error return.
      
      rb://238 approved by Marko
      b751f4e0
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot, fixes BUG#38901 · 70564eb6
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6613 | inaam | 2010-02-09 20:23:09 +0200 (Tue, 09 Feb 2010) | 11 lines
      branches/5.1: Fix Bug #38901
      InnoDB logs error repeatedly when trying to load page into buffer pool
      
      In buf_page_get_gen() if we are unable to read a page (because of
      corruption or some other reason) we keep on retrying. This fills up
      error log with millions of entries in no time and we'd eventually run
      out of disk space. This patch limits the number of attempts that we
      make (currently set to 100) and after that we abort with a message.
      
      rb://241 Approved by: Heikki
      70564eb6
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot, fixes BUG#49001 · 7ca22516
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6545 | jyang | 2010-02-03 03:57:32 +0200 (Wed, 03 Feb 2010) | 8 lines
      branches/5.1: Fix bug #49001, "SHOW INNODB STATUS deadlock info
      incorrect when deadlock detection aborts". Print the correct
      lock owner when recursive function lock_deadlock_recursive()
      exceeds its maximum depth LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK.
      
      rb://217, approved by Marko.
      7ca22516
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 57c328ba
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6538 | sunny | 2010-01-30 00:43:06 +0200 (Sat, 30 Jan 2010) | 6 lines
      branches/5.1: Check *first_value every time against the column max
      value and  set *first_value to next autoinc if it's > col max value.
      ie.  not rely on what is passed in from MySQL.
      
      [49497] Error 1467 (ER_AUTOINC_READ_FAILED) on inserting a negative value
      rb://236
      57c328ba
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 7633ece0
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6537 | sunny | 2010-01-30 00:35:00 +0200 (Sat, 30 Jan 2010) | 2 lines
      branches/5.1: Undo r6536.
      7633ece0
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · f1c641d1
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6536 | sunny | 2010-01-30 00:13:42 +0200 (Sat, 30 Jan 2010) | 6 lines
      branches/5.1: Check *first_value everytime against the column max
      value and  set *first_value to next autoinc if it's > col max value.
      ie.  not rely on what is passed in from MySQL.
      
      [49497] Error 1467 (ER_AUTOINC_READ_FAILED) on inserting a negative value
      rb://236
      f1c641d1
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · ed057d28
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6535 | sunny | 2010-01-30 00:08:40 +0200 (Sat, 30 Jan 2010) | 11 lines
      branches/5.1: Undo the change from r6424. We need to return DB_SUCCESS even
      if we were unable to initialize the tabe autoinc value. This is required for
      the open to succeed. The only condition we currently treat as a hard error
      is if the autoinc field instance passed in by MySQL is NULL.
      
      Previously if the table autoinc value was 0 and the next value was requested
      we had an assertion that would fail. Change that assertion and treat a value
      of 0 to mean that the autoinc system is unavailable. Generation of next
      value will now return failure.
      
      rb://237
      ed057d28
  3. 25 Feb, 2010 5 commits
    • Gleb Shchepa's avatar
      Bug #45360: wrong results · 936ed6ca
      Gleb Shchepa authored
      Propagation of a large unsigned numeric constant
      in the WHERE expression led to wrong result.
      
      For example,
      "WHERE a = CAST(0xFFFFFFFFFFFFFFFF AS USIGNED) AND FOO(a)",
      where a is an UNSIGNED BIGINT, and FOO() accepts strings,
      was transformed to "... AND FOO('-1')".
      
      That has been fixed.
      
      Also EXPLAIN EXTENDED printed incorrect numeric constants in
      transformed WHERE expressions like above. That has been
      fixed too.
      
      
      mysql-test/r/bigint.result:
        Added test case for bug #45360.
      mysql-test/t/bigint.test:
        Added test case for bug #45360.
      sql/item.cc:
        Bug #45360: wrong results
        
        As far as Item_int_with_ref (and underlaying Item_int)
        class accepts both signed and unsigned 64bit values,
        Item_int::val_str and Item_int::print methods have been
        modified to take into account unsigned_flag.
      936ed6ca
    • Alexey Kopytov's avatar
      Automerge. · 1935327e
      Alexey Kopytov authored
      1935327e
    • Alexey Kopytov's avatar
      Bug #50335: Assertion `!(order->used & map)' in eq_ref_table · 9201bff1
      Alexey Kopytov authored
       
      The problem was in an incorrect debug assertion. The expression 
      used in the failing assertion states that when finding 
      references matching ORDER BY expressions, there can be only one 
      reference to a single table. But that does not make any sense, 
      all test cases for this bug are valid examples with multiple 
      identical WHERE expressions referencing the same table which
      are also present in the ORDER BY list. 
       
      Fixed by removing the failing assertion. We also have to take 
      care of the 'found' counter so that we count multiple 
      references only once. We rely on this fact later in 
      eq_ref_table(). 
      
      mysql-test/r/join.result:
        Added a test case for bug #50335.
      mysql-test/t/join.test:
        Added a test case for bug #50335.
      sql/sql_select.cc:
        Removing the assertion in eq_ref_table() as it does not make
        any sense. We also have to take care of the 'found' counter so 
        that we count multiple references only once. We rely on this 
        fact later in eq_ref_table().
      9201bff1
    • Georgi Kodinov's avatar
      merge · 6b6c2635
      Georgi Kodinov authored
      6b6c2635
    • Georgi Kodinov's avatar
      e3d0b6d7
  4. 23 Feb, 2010 2 commits
    • Magne Mahre's avatar
      Clean-up in the sys_vars test suite after · 6f78ef71
      Magne Mahre authored
      WL#5154 and WL5182
      
      Two result files in the sys_vars suite wasn't 
      properly updated after the change in
      deprecation text
      
      6f78ef71
    • Magne Mahre's avatar
      Revert of a change introduced by Bug#47974 · 710d5710
      Magne Mahre authored
      "TYPE=storage_engine" is deprecated, and will be removed
      in the Celosia release of MySQL.  Since the option is
      present in the Betony release and the version number of
      Celosia is still not decided, we need to bump the
      deprecation version number back up to "6.0".
      710d5710
  5. 22 Feb, 2010 8 commits
  6. 20 Feb, 2010 2 commits
  7. 19 Feb, 2010 3 commits
    • Tatiana A. Nurnberg's avatar
      manual merge · 60a114d8
      Tatiana A. Nurnberg authored
      60a114d8
    • Tatiana A. Nurnberg's avatar
      Bug#49487: crash with explain extended and group_concat in a derived table · 1fc1f462
      Tatiana A. Nurnberg authored
      When EXPLAIN EXTENDED tries to print column names, it checks whether the
      referenced table is CONST (in which case, the column's value rather than
      its name will be printed). If no proper table is reference (i.e. because
      a derived table was used that has since gone out of scope), this will fail
      spectacularly.
      
      This ports an equivalent of the fix for Bug 43354.
      
      mysql-test/r/func_gconcat.result:
        Show that EXPLAIN EXTENDED on a GROUP_CONCAT() on a derived table
        no longer crashes the server.
      mysql-test/t/func_gconcat.test:
        Show that EXPLAIN EXTENDED on a GROUP_CONCAT() on a derived table
        no longer crashes the server.
      sql/item_sum.cc:
        Do not de-ref what cannot be, that is, temp-tables that have gone away.
        This is of questionable utility anyway, since our deref has the sole
        purpose of checking whether the table is const (in which case, we'll
        substitute the column with its value in EXPLAIN EXTENDED - that is all).
      1fc1f462
    • Bjorn Munch's avatar
  8. 18 Feb, 2010 2 commits
    • Tatiana A. Nurnberg's avatar
      Bug#48525: trigger changes "Column 'id' cannot be null" behaviour · e0fbc5d2
      Tatiana A. Nurnberg authored
      CHECK_FIELD_IGNORE was treated as CHECK_FIELD_ERROR_FOR_NULL;
      UPDATE...SET...NULL on NOT NULL fields behaved differently after
      a trigger.
      
      Now distinguishes between IGNORE and ERROR_FOR_NULL and save/restores
      check-field options.
      
      mysql-test/r/trigger.result:
        Show that UPDATE...SET...NULL on NOT NULL columns doesn't behave differently
        when run after a trigger.
      mysql-test/t/trigger.test:
        Show that UPDATE...SET...NULL on NOT NULL columns doesn't behave differently
        when run after a trigger.
      sql/field_conv.cc:
        CHECK_FIELD_IGNORE was treated as CHECK_FIELD_ERROR_FOR_NULL.
        Distinguish between the two.
      sql/sp_head.cc:
        raise error as needed
      sql/sql_class.cc:
        Save and restore check-fields options.
      sql/sql_class.h:
        Make room so we can save check-fields options.
      sql/sql_insert.cc:
        raise error as needed
      e0fbc5d2
    • Georgi Kodinov's avatar
      Bug #51049: main.bug39022 fails in mysql-trunk-merge · 20dfd709
      Georgi Kodinov authored
      Fixed the test to behave correctly with ps-protocol
      and binlog format row.
      20dfd709
  9. 17 Feb, 2010 4 commits