1. 06 Oct, 2009 1 commit
  2. 05 Oct, 2009 1 commit
    • Gleb Shchepa's avatar
      Bug #44139: Table scan when NULL appears in IN clause · 2b78dbff
      Gleb Shchepa authored
      SELECT ... WHERE ... IN (NULL, ...) does full table scan,
      even if the same query without the NULL uses efficient range scan.
      
      The bugfix for the bug 18360 introduced an optimization:
      if
        1) all right-hand arguments of the IN function are constants
        2) result types of all right argument items are compatible
           enough to use the same single comparison function to
           compare all of them to the left argument,
      
      then
      
        we can convert the right-hand list of constant items to an array
        of equally-typed constant values for the further
        QUICK index access etc. (see Item_func_in::fix_length_and_dec()).
      
      The Item_null constant item objects have STRING_RESULT
      result types, so, as far as Item_func_in::fix_length_and_dec()
      is aware of NULLs in the right list, this improvement efficiently
      optimizes IN function calls with a mixed right list of NULLs and
      string constants. However, the optimization doesn't affect mixed
      lists of NULLs and integers, floats etc., because there is no
      unique common comparator.
      
      
      New optimization has been added to ignore the result type
      of NULL constants in the static analysis of mixed right-hand lists.
      This is safe, because at the execution phase we care about
      presence of NULLs anyway.
      
      1. The collect_cmp_types() function has been modified to optionally
         ignore NULL constants in the item list.
      2. NULL-skipping code of the Item_func_in::fix_length_and_dec()
         function has been modified to work not only with in_string
         vectors but with in_vectors of other types.
      2b78dbff
  3. 04 Oct, 2009 7 commits
  4. 02 Oct, 2009 2 commits
  5. 01 Oct, 2009 1 commit
  6. 30 Sep, 2009 14 commits
  7. 29 Sep, 2009 14 commits
    • Tatiana A. Nurnberg's avatar
      auto-merge · 00e5cea8
      Tatiana A. Nurnberg authored
      00e5cea8
    • Ingo Struewing's avatar
      WL#4259 - Debug Sync Facility · 21586dfb
      Ingo Struewing authored
      Backport from 6.0 to 5.1.
      Only those sync points are included, which are used in debug_sync.test.
      
        The Debug Sync Facility allows to place synchronization points
        in the code:
        
        open_tables(...)
        
        DEBUG_SYNC(thd, "after_open_tables");
        
        lock_tables(...)
        
        When activated, a sync point can
        
        - Send a signal and/or
        - Wait for a signal
        
        Nomenclature:
        
        - signal:            A value of a global variable that persists
                             until overwritten by a new signal. The global
                             variable can also be seen as a "signal post"
                             or "flag mast". Then the signal is what is
                             attached to the "signal post" or "flag mast".
        
        - send a signal:     Assign the value (the signal) to the global
                             variable ("set a flag") and broadcast a
                             global condition to wake those waiting for
                             a signal.
        
        - wait for a signal: Loop over waiting for the global condition until
                             the global value matches the wait-for signal.
        
        Please find more information in the top comment in debug_sync.cc
        or in the worklog entry.
      21586dfb
    • Kristofer Pettersson's avatar
      4e9be705
    • Tatiana A. Nurnberg's avatar
      auto-merge · caf38a02
      Tatiana A. Nurnberg authored
      caf38a02
    • Kristofer Pettersson's avatar
      autocommit · f79b783b
      Kristofer Pettersson authored
      f79b783b
    • Kristofer Pettersson's avatar
      Bug#42108 Wrong locking for UPDATE with subqueries leads to broken statement · 21d401c2
      Kristofer Pettersson authored
                replication
                    
      MySQL server uses wrong lock type (always TL_READ instead of
      TL_READ_NO_INSERT when appropriate) for tables used in
      subqueries of UPDATE statement. This leads in some cases to
      a broken replication as statements are written in the wrong
      order to the binlog.
      21d401c2
    • Martin Hansson's avatar
      Merge of Bug#35996. · e6b1bade
      Martin Hansson authored
      e6b1bade
    • Alexey Botchkov's avatar
      merging · 355b0405
      Alexey Botchkov authored
      355b0405
    • Davi Arnaut's avatar
      Don't use the semicolon character as a argument separator as it · 73153f1c
      Davi Arnaut authored
      can be interpreted as a shell metacharacter in some circumstances.
      For example, it is interpreted as a command separator when invoking
      a debugger.
      73153f1c
    • Alexey Botchkov's avatar
      merging · 2cafcbb5
      Alexey Botchkov authored
      2cafcbb5
    • Tatiana A. Nurnberg's avatar
      auto-merge · ba6bd996
      Tatiana A. Nurnberg authored
      ba6bd996
    • Alexey Botchkov's avatar
      merging · 45bdc1e0
      Alexey Botchkov authored
      45bdc1e0
    • Davi Arnaut's avatar
      Bug#45567: Fast ALTER TABLE broken for enum and set · fc374036
      Davi Arnaut authored
      The problem was that appending values to the end of an existing
      ENUM or SET column was being treated as table data modification,
      preventing a immediately (fast) table alteration that occurs when
      only table metadata is being modified.
      
      The cause was twofold: adding a enumeration or set members to the 
      end of the list of valid member values was not being considered
      a "compatible" table alteration, and for SET columns, the check
      was being done upon the max display length and not the underlying
      (pack) length of the field.
      
      The solution is to augment the function that checks wether two ENUM
      or SET fields are compatible -- by comparing the pack lengths and
      performing a limited comparison of the member values.
      fc374036
    • Mattias Jonsson's avatar
      merge · ecc556f4
      Mattias Jonsson authored
      ecc556f4