1. 03 Jun, 2010 2 commits
  2. 02 Jun, 2010 8 commits
  3. 01 Jun, 2010 10 commits
  4. 31 May, 2010 5 commits
  5. 29 May, 2010 1 commit
    • Alexey Kopytov's avatar
      Bug #48537: difference of index selection between rpm binary · 966d6d2f
      Alexey Kopytov authored
                  and .tar.gz, windows vs linux..
      
      On Intel x86 machines index selection by the MySQL query
      optimizer could sometimes depend on the compiler version and
      optimization flags used to build the server binary.
      
      The problem was a result of a known issue with floating point
      calculations on x86: since internal FPU precision (80 bit)
      differs from precision used by programs (32-bit float or 64-bit
      double), the result of calculating a complex expression may
      depend on how FPU registers are allocated by the compiler and
      whether intermediate values are spilled from FPU to memory. In
      this particular case compiler versions and optimization flags
      had an effect on cost calculation when choosing the best index
      in best_access_path().
      
      A possible solution to this problem which has already been
      implemented in mysql-trunk is to limit FPU internal precision
      to 64 bits. So the fix is a backport of the relevant code to
      5.1 from mysql-trunk.
      966d6d2f
  6. 28 May, 2010 5 commits
  7. 27 May, 2010 9 commits
    • Dmitry Lenev's avatar
      Null-merged the 5.1-only version of fix for bug #46947 · fae1efb5
      Dmitry Lenev authored
      "Embedded SELECT without FOR UPDATE is causing a lock"
      into 5.5 tree. One of 5.5 trees already contains a
      more thorough version of the fix.
      fae1efb5
    • Dmitry Lenev's avatar
      A 5.1-only version of fix for bug #46947 "Embedded SELECT · 78c6a8ca
      Dmitry Lenev authored
      without FOR UPDATE is causing a lock".
      
      SELECT statements with subqueries referencing InnoDB tables
      were acquiring shared locks on rows in these tables when they
      were executed in REPEATABLE-READ mode and with statement or
      mixed mode binary logging turned on.
      
      This was a regression which were introduced when fixing
      bug 39843.
      
      The problem was that for tables belonging to subqueries
      parser set TL_READ_DEFAULT as a lock type. In cases when
      statement/mixed binary logging at open_tables() time this
      type of lock was converted to TL_READ_NO_INSERT lock at
      open_tables() time and caused InnoDB engine to acquire
      shared locks on reads from these tables. Although in some
      cases such behavior was correct (e.g. for subqueries in
      DELETE) in case of SELECT it has caused unnecessary locking.
      
      This patch implements minimal version of the fix for the
      specific problem described in the bug-report which supposed
      to be not too risky for pushing into 5.1 tree.
      The 5.5 tree already contains a more appropriate solution
      which also addresses other related issues like bug 53921
      "Wrong locks for SELECTs used stored functions may lead
      to broken SBR".
      
      This patch tries to solve the problem by ensuring that
      TL_READ_DEFAULT lock which is set in the parser for
      tables participating in subqueries at open_tables()
      time is interpreted as TL_READ_NO_INSERT or TL_READ.
      TL_READ is used only if we know that this is a SELECT
      and that this particular table is not used by a stored
      function.
      
      Test coverage is added for both InnoDB and MyISAM.
      
      This patch introduces an "incompatible" change in locking
      scheme for subqueries used in SELECT ... FOR UPDATE and
      SELECT .. IN SHARE MODE.
      
      In 4.1 (as well as in 5.0 and 5.1 before fix for bug 39843)
      the server would use a snapshot InnoDB read for subqueries
      in SELECT FOR UPDATE and SELECT .. IN SHARE MODE statements,
      regardless of whether the binary log is on or off.
      
      If the user required a different type of read (i.e. locking
      read), he/she could request so explicitly by providing FOR
      UPDATE/IN SHARE MODE clause for each individual subquery.
      
      The patch for bug 39843 broke this behaviour (which was not
      documented or tested), and started to use locking reads for
      all subqueries in SELECT ... FOR UPDATE/IN SHARE MODE.
      This patch restores 4.1 behaviour.
      
      This patch should be mostly null-merged into 5.5 tree.
      78c6a8ca
    • Inaam Rana's avatar
      Fix the printout in for long semaphore waits to not · 063574c3
      Inaam Rana authored
      list a thread doing a wait_ex as an s-lock waiter.
      063574c3
    • Sergey Glukhov's avatar
      mysql-5.1-bugteam->mysql-trunk-merge · d7c73e79
      Sergey Glukhov authored
      d7c73e79
    • Sergey Glukhov's avatar
      Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins · fa3570f9
      Sergey Glukhov authored
      There are two problems:
      1. In simplify_joins function we calculate table dependencies. If STRAIGHT_JOIN hint
      is used for whole SELECT we do not count it and as result some dependendecies
      might be lost. It leads to incorrect table order which is returned by
      join_tab_cmp_straight() function.
      2. make_join_statistics() calculate the transitive closure for relations a particular
      JOIN_TAB is 'dependent on'.
      We aggregate the dependent table_map of a JOIN_TAB by adding dependencies from other
      tables which we depend on. However, this may also cause new dependencies to be
      available after we have completed processing a certain JOIN_TAB.
      Both these problems affect condition pushdown and as result condition might be pushed
      into wrong table which leads to crash or even omitted which leads to wrong result.
      The fix:
      1. Use modified 'transitive closure' algorithm provided by Ole John Aske
      2. Update table dependences in simplify_joins according to 
         global STRAIGHT_JOIN hint.
      Note: the patch also fixes bugs 46091 & 51492
      fa3570f9
    • Alexey Kopytov's avatar
      eaea879d
    • Alexey Kopytov's avatar
      Manual merge from mysql-5.1-bugteam to mysql-trunk-merge. · 17325b8d
      Alexey Kopytov authored
      Null-merged patch for bug 53907.
      
      Conflicts:
      
         conflict      sql/sql_parse.cc
      17325b8d
    • Alexey Kopytov's avatar
      Automerge. · 54a006fa
      Alexey Kopytov authored
      54a006fa
    • Alexey Kopytov's avatar
      Automerge. · b19c8805
      Alexey Kopytov authored
      b19c8805