1. 22 Apr, 2011 3 commits
    • Sergey Glukhov's avatar
      5.1 -> 5.5 merge · 19301684
      Sergey Glukhov authored
      19301684
    • Sergey Glukhov's avatar
      Bug#11756928 48916: SERVER INCORRECTLY PROCESSING HAVING CLAUSES WITH AN ORDER BY CLAUSE · a5e8d902
      Sergey Glukhov authored
      Before sorting HAVING condition is split into two parts,
      first part is a table related condition and the rest of is
      HAVING part. Extraction of HAVING part does not take into account
      the fact that some of conditions might be non-const but
      have 'used_tables' == 0 (independent subqueries)
      and because of that these conditions are cut off by
      make_cond_for_table() function.
      The fix is to use (table_map) 0 instead of used_tables in
      third argument for make_cond_for_table() function.
      It allows to extract elements which belong to sorted
      table and in addition elements which are independend
      subqueries.
      
      
      mysql-test/r/having.result:
        test case
      mysql-test/t/having.test:
        test case
      sql/sql_select.cc:
        The fix is to use (table_map) 0 instead of used_tables in
        third argument for make_cond_for_table() function.
        It allows to extract elements which belong to sorted
        table and in addition elements which are independend
        subqueries.
      a5e8d902
    • Sergey Vojtovich's avatar
      Merge. · 923db5a2
      Sergey Vojtovich authored
      923db5a2
  2. 21 Apr, 2011 4 commits
  3. 20 Apr, 2011 6 commits
  4. 18 Apr, 2011 6 commits
  5. 16 Apr, 2011 3 commits
  6. 15 Apr, 2011 9 commits
    • Bjorn Munch's avatar
      null upmerge · bb77d4e0
      Bjorn Munch authored
      bb77d4e0
    • Bjorn Munch's avatar
      merge from 5.5 main · 8bd972e5
      Bjorn Munch authored
      8bd972e5
    • Bjorn Munch's avatar
      merge from 5.1 main · 0c362694
      Bjorn Munch authored
      0c362694
    • Alexander Nozdrin's avatar
      A patch for Bug#11763166 (55847: SHOW WARNINGS returns empty · 060541c0
      Alexander Nozdrin authored
      result set when SQLEXCEPTION is active.
      
      The problem was in a hackish THD::no_warnings_for_error attribute.
      When it was set, an error was not written to Warning_info -- only
      Diagnostics_area state was changed. That means, Diagnostics_area
      might contain error state, which is not present in Warning_info.
      
      The user-visible problem was that in some cases SHOW WARNINGS
      returned empty result set (i.e. there were no warnings) while
      the previous SQL statement failed. According to the MySQL
      protocol errors must be presented in warning list.
      
      The main idea of this patch is to remove THD::no_warnings_for_error.
      There were few places where it was used:
        - sql_admin.cc, handling of REPAIR TABLE USE_FRM.
        - sql_show.cc, when calling fill_schema_table_from_frm().
        - sql_show.cc, when calling fill_table().
      The fix is to either use internal-error-handlers, or to use
      temporary Warning_info storing warnings, which might be ignored.
      
      This patch is needed to fix Bug 11763162 (55843).
      060541c0
    • Sergey Glukhov's avatar
      5.1 -> 5.5 merge · 98d52459
      Sergey Glukhov authored
      98d52459
    • Sergey Glukhov's avatar
      Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U · bba7b9ca
      Sergey Glukhov authored
      Some multibyte sequences could be considered by my_mbcharlen() functions
      as multibyte character but more exact my_ismbchar() does not think so.
      In such a case this multibyte sequences is pushed into 'stack' buffer which
      is too small to accommodate the sequence.
      The fix is to allocate stack buffer in
      compliance with max character length.
      
      
      mysql-test/r/loaddata.result:
        test case
      mysql-test/t/loaddata.test:
        test case
      sql/sql_load.cc:
        allocate stack buffer in compliance with max character length.
      bba7b9ca
    • Bjorn Munch's avatar
      upmerge 12351213,12360195 · 34a312a7
      Bjorn Munch authored
      34a312a7
    • Bjorn Munch's avatar
      Bug #12360195 MTR DOES NOT IGNORE TABS IN EXPERIMENTAL FILE · c95227ca
      Bjorn Munch authored
      Instead of just filtering space, filter white space (\s)
      I left the default.experimental file as is, with tabs.
      c95227ca
    • Tor Didriksen's avatar
      Merge fix for Bug#11765713 from 5.1 · 9cd03942
      Tor Didriksen authored
      9cd03942
  7. 14 Apr, 2011 9 commits
    • Tor Didriksen's avatar
      Bug#11765713 58705: OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES CREATED BY OPT_SUM_QU · dd3d9477
      Tor Didriksen authored
      Valgrind warnings were caused by comparing index values to an un-initialized field.
      
      
      mysql-test/r/subselect.result:
        New test cases.
      mysql-test/t/subselect.test:
        New test cases.
      sql/opt_sum.cc:
        Add thd to opt_sum_query enabling it to test for errors.
        If we have a non-nullable index, we cannot use it to match null values,
        since set_null() will be ignored, and we might compare uninitialized data.
      sql/sql_select.cc:
        Add thd to opt_sum_query, enabling it to test for errors.
      sql/sql_select.h:
        Add thd to opt_sum_query, enabling it to test for errors.
      dd3d9477
    • Bjorn Munch's avatar
      Bug #12351213 MTR --VS-CONFIG DOES NOT WORK LIKE MTR_VS_CONFIG · e675ed06
      Bjorn Munch authored
      Fix for --vs-config applied
      Find.pm incorrectly tested an unitialized local variable instead
        of the global, corrected.
      Find.pm is also wrong in 5.5: uses a non-existent global variable. Fix when
        merging up.
      e675ed06
    • Bjorn Munch's avatar
      Bug #12360501 MTR --GCOV DOES NOT WORK WITH CMAKE BUILDS · 255986a5
      Bjorn Munch authored
      Changed to use $bindir instead of $basedir
      Simplified search for files: find all *.gcno
      Also, .msg and .err files had been mixed up
      255986a5
    • Serge Kozlov's avatar
      autocommit 5.1 -> 5.5 · b655b931
      Serge Kozlov authored
      b655b931
    • Serge Kozlov's avatar
      WL#5867, postfix for binlog_bug23533 · 7634e724
      Serge Kozlov authored
      7634e724
    • Sergey Glukhov's avatar
      automerge · bd94bb5d
      Sergey Glukhov authored
      bd94bb5d
    • Sergey Glukhov's avatar
      5.1 -> 5.5 merge · aaecb549
      Sergey Glukhov authored
      aaecb549
    • Jon Olav Hauglid's avatar
      Bug#12352846 - TRANS_XA_START(THD*): · a5986fa2
      Jon Olav Hauglid authored
                     ASSERTION THD->TRANSACTION.XID_STATE.XID.IS_NULL()
                     FAILED
      
      The triggered assert checks that the previous XA transaction has
      done proper cleanup before a new XA transaction is started.
      The bug that caused it to be triggered was that XA COMMIT did not
      clean up error state if XA COMMIT discovered that the current XA
      transaction had to be rolled back.
      
      This patch fixes the problem by resetting the XA error state
      before XA COMMIT calls ha_rollback_trans(). This allows following
      XA transactions to be started without triggering the assert.
      
      Test case added to xa.test.
      a5986fa2
    • Sergey Glukhov's avatar
      Bug#11756242 48137: PROCEDURE ANALYSE() LEAKS MEMORY WHEN RETURNING NULL · 3abe56f3
      Sergey Glukhov authored
      There are two problems with ANALYSE():
      
      1. Memory leak 
         it happens because do_select() can overwrite
         JOIN::procedure field(with zero value in our case) and
         JOIN destructor don't free the memory allocated for
         JOIN::procedure. The fix is to save original JOIN::procedure
         before do_select() call and restore it after do_select
         execution.
      
      2. Wrong result
         If ANALYSE() procedure is used for the statement with LIMIT clause
         it could retrun empty result set. It happens because of missing 
         analyse::end_of_records() call. First end_send() function call
         returns NESTED_LOOP_QUERY_LIMIT and second call of end_send() with
         end_of_records flag enabled does not happen. The fix is to return
         NESTED_LOOP_OK from end_send() if procedure is active.
      
      
      mysql-test/r/analyse.result:
        test case
      mysql-test/t/analyse.test:
        test case
      sql/sql_select.cc:
        --save original JOIN::procedure before do_select() call and
          restore it after do_select execution.
        --return NESTED_LOOP_OK from end_send() if procedure is active
      3abe56f3