1. 08 Oct, 2008 1 commit
    • Georgi Kodinov's avatar
      Bug #32124: crash if prepared statements refer to variables in the where clause · 6d54b044
      Georgi Kodinov authored
                        
      The code to get read the value of a system variable was extracting its value 
      on PREPARE stage and was substituting the value (as a constant) into the parse tree.
      Note that this must be a reversible transformation, i.e. it must be reversed before
      each re-execution.
      Unfortunately this cannot be reliably done using the current code, because there are
      other non-reversible source tree transformations that can interfere with this
      reversible transformation.
      Fixed by not resolving the value at PREPARE, but at EXECUTE (as the rest of the 
      functions operate). Added a cache of the value (so that it's constant throughout
      the execution of the query). Note that the cache also caches NULL values.
      Updated an obsolete related test suite (variables-big) and the code to test the 
      result type of system variables (as per bug 74).
      
      mysql-test/extra/rpl_tests/rpl_insert_id.test:
        Bug #32124: removed ambiguous testcase
      mysql-test/r/innodb_data_home_dir_basic.result:
        Bug #32124: fixed wrong test case
      mysql-test/r/innodb_flush_method_basic.result:
        Bug #32124: fixed wrong test case
      mysql-test/r/ps_11bugs.result:
        Bug #32124: test case
      mysql-test/r/ssl_capath_basic.result:
        Bug #32124: fixed wrong test case
      mysql-test/r/ssl_cipher_basic.result:
        Bug #32124: fixed wrong test case
      mysql-test/r/variables.result:
        Bug #32124: system vars are shown as such in EXPLAIN EXTENDED, not as constants.
      mysql-test/suite/rpl/r/rpl_insert_id.result:
        Bug #32124: removed ambiguous testcase
      mysql-test/t/ps_11bugs.test:
        Bug #32124: test case
      sql/item.cc:
        Bug #32124: placed the code to convert string to longlong or double 
        to a function (so that it can be reused)
      sql/item.h:
        Bug #32124: placed the code to convert string to longlong or double 
        to a function (so that it can be reused)
      sql/item_func.cc:
        Bug #32124: moved the evaluation of system variables at runtime (val_xxx).
      sql/item_func.h:
        Bug #32124: moved the evaluation of system variables at runtime (val_xxx).
      sql/set_var.cc:
        Bug #32124: removed the code that calculated the system variable's value 
        at PREPARE
      sql/set_var.h:
        Bug #32124: removed the code that calculated the system variable's value 
        at PREPARE
      tests/mysql_client_test.c:
        Bug #32124 : removed the reading of the system variable, because its max
        length is depended on the system charset and client charset and can't be
        easily calculated.
      6d54b044
  2. 06 Oct, 2008 11 commits
  3. 04 Oct, 2008 2 commits
  4. 03 Oct, 2008 6 commits
    • Chad MILLER's avatar
      Merge fix for Bug#35754. · 1fd6774b
      Chad MILLER authored
      1fd6774b
    • Chad MILLER's avatar
      Merge fix for Bug#35754. · aa1a6922
      Chad MILLER authored
      aa1a6922
    • Andrei Elkin's avatar
      merge with the main 5.1-bugteam · 48a40e2e
      Andrei Elkin authored
      48a40e2e
    • Davi Arnaut's avatar
      Bug#37481: status.test fails randomly · 30d46cac
      Davi Arnaut authored
      The problem was that the test was trying to obtain a lock on
      a table in one connection without ensuring that a insert which
      was executed in another connection had released the lock on the
      same table.
      
      The solution is to add a dummy select query after the insert to
      ensure that the table is unlocked and closed by the time it tries
      to lock it again. This is enough to prevent test failures described
      in the bug report. As an extra safety measure, concurrent inserts
      are disabled.
      
      Remove comments that calculated the Table_locks_immediate. This
      value is not tested anymore and it's calculation did not reflect
      the actual value.
      
      mysql-test/r/status.result:
        Update test case result.
      mysql-test/t/status.test:
        Issue a dummy select to ensure that tables are unlocked after a
        insert and disable concurrent inserts as a extra-safety.
      30d46cac
    • Davi Arnaut's avatar
      Wrap function used for debugging with the DBUG_OFF condition. · b0e03c13
      Davi Arnaut authored
      Function uses a variable only available under debug mode.
      b0e03c13
    • Andrei Elkin's avatar
      Bug #28786 binlog_killed.test fails: 'reset master' does not reset binlogging · b41e0818
      Andrei Elkin authored
      The test failed originally -- did not reset binlogging - for the reason
      identified by bug@15580.
      However it never can be run on the embedded platfrom for yet another cause -
      the embedded can not KILL query.
            
      Comments added to the test particularly relating `reset master'
      to the mentioned bug.
      
      mysql-test/suite/binlog/t/binlog_killed.test:
        adding commets explaining why the test has to have include/not_embedded.inc guard.
      b41e0818
  5. 02 Oct, 2008 16 commits
  6. 01 Oct, 2008 4 commits
    • Matthias Leich's avatar
      Fix for Bug#37744 Expected result of "<engine>_storedproc" test · 36920634
      Matthias Leich authored
                        is inconsistent
      + several improvements
      Details:
      - The subtest with assignment of floating point numbers to
        DECIMAL parameters in functions and procedures checks
        now that the final DECIMAL value is the same as if we assign
        the floating point numbers to columns, user variables etc.
        = The impact of math libs or truncation must be the same.
      - Remove storage engine variants of this test because the
        stored procedure properties tested do not depend on
        the storage engine.
        Use the fastest storage engine (MEMORY) for any tables
        needed.
      - reset global sort_buffer_size to startup value
      - Partially improved formatting.
      36920634
    • Ingo Struewing's avatar
      merge · 907cce4e
      Ingo Struewing authored
      907cce4e
    • Georgi Kodinov's avatar
      7adf7154
    • Georgi Kodinov's avatar
      Bug#37943: Reproducible mysqld crash/sigsegv in sel_trees_can_be_ored · eb3c0806
      Georgi Kodinov authored
                  
      When analyzing the possible index use cases the server was re-using an internal structure.
      This is wrong, as this internal structure gets updated during the analysis.
      Fixed by making a copy of the internal structure for every place it needs to be used.
      Also stopped the generation of empty SEL_TREE structures that unnecessary 
      complicate the analysis.
      
      mysql-test/r/index_merge.result:
        Bug#37943: test case
      mysql-test/t/index_merge.test:
        Bug#37943: test case
      sql/opt_range.cc:
        Bug#37943: 
         - Make copy constructors for SEL_TREE and sub-structures and use them when OR-ing trees.
         - don't generate empty SEL_TREEs. Return NULL instead.
      eb3c0806