1. 07 Dec, 2006 1 commit
    • kostja@bodhi.local's avatar
      A fix and test cases for · 90072e69
      kostja@bodhi.local authored
      Bug#4968 "Stored procedure crash if cursor opened on altered table"
      Bug#19733 "Repeated alter, or repeated create/drop, fails"
      Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from 
      stored procedure."
      Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
      Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"
      
      Test cases for bugs 4968, 19733, 6895 will be added in 5.0.
      
      Re-execution of CREATE DATABASE, CREATE TABLE and ALTER TABLE 
      statements in stored routines or as prepared statements caused
      incorrect results (and crashes in versions prior to 5.0.25).
      In 5.1 the problem occured only for CREATE DATABASE, CREATE TABLE
      SELECT and CREATE TABLE with INDEX/DATA DIRECTOY options).
      
      The problem of bugs 4968, 19733, 19282 and 6895 was that functions
      mysql_prepare_table, mysql_create_table and mysql_alter_table were not
      re-execution friendly: during their operation they used to modify contents
      of LEX (members create_info, alter_info, key_list, create_list),
      thus making the LEX unusable for the next execution.
      In particular, these functions removed processed columns and keys from
      create_list, key_list and drop_list. Search the code in sql_table.cc 
      for drop_it.remove() and similar patterns to find evidence.
      
      The fix is to supply to these functions a usable copy of each of the
      above structures at every re-execution of an SQL statement. 
      
      To simplify memory management, LEX::key_list and LEX::create_list
      were added to LEX::alter_info, a fresh copy of which is created for
      every execution.
      
      The problem of crashing bug 22060 stemmed from the fact that the above 
      metnioned functions were not only modifying HA_CREATE_INFO structure in 
      LEX, but also were changing it to point to areas in volatile memory of 
      the execution memory root.
       
      The patch solves this problem by creating and using an on-stack
      copy of HA_CREATE_INFO (note that code in 5.1 already creates and
      uses a copy of this structure in mysql_create_table()/alter_table(),
      but this approach didn't work well for CREATE TABLE SELECT statement).
      90072e69
  2. 04 May, 2006 1 commit
    • tnurnberg@mysql.com's avatar
      Bug#19025 4.1 mysqldump doesn't correctly dump "auto_increment = [int]" · 5becb110
      tnurnberg@mysql.com authored
      mysqldump / SHOW CREATE TABLE will show the NEXT available value for
      the PK, rather than the *first* one that was available (that named in
      the original CREATE TABLE ... AUTO_INCREMENT = ... statement).
      
      This should produce correct and robust behaviour for the obvious use
      cases -- when no data were inserted, then we'll produce a statement
      featuring the same value the original CREATE TABLE had; if we dump
      with values, INSERTing the values on the target machine should set the
      correct next_ID anyway (and if not, we'll still have our AUTO_INCREMENT =
      ... to do that). Lastly, just the CREATE statement (with no data) for
      a table that saw inserts would still result in a table that new values
      could safely be inserted to).
      
      There seems to be no robust way however to see whether the next_ID
      field is > 1 because it was set to something else with CREATE TABLE
      ... AUTO_INCREMENT = ..., or because there is an AUTO_INCREMENT column
      in  the table (but no initial value was set with AUTO_INCREMENT = ...)
      and then one or more rows were INSERTed, counting up next_ID. This
      means that in both cases, we'll generate an AUTO_INCREMENT =
      ... clause in SHOW CREATE TABLE / mysqldump.  As we also show info on,
      say, charsets even if the user did not explicitly give that info in
      their own CREATE TABLE, this shouldn't be an issue.
      
      As per above, the next_ID will be affected by any INSERTs that have
      taken place, though.  This /should/ result in correct and robust
      behaviour, but it may look non-intuitive to some users if they CREATE
      TABLE ... AUTO_INCREMENT = 1000 and later (after some INSERTs) have
      SHOW CREATE TABLE give them a different value (say, CREATE TABLE
      ... AUTO_INCREMENT = 1006), so the docs should possibly feature a
      caveat to that effect.
      
      It's not very intuitive the way it works now (with the fix), but it's
      *correct*.  We're not storing the original value anyway, if we wanted
      that, we'd have to change on-disk representation?
      
      If we do dump/load cycles with empty DBs, nothing will change.  This
      changeset includes an additional test case that proves that tables
      with rows will create the same next_ID for AUTO_INCREMENT = ... across
      dump/restore cycles.
      
      Confirmed by support as likely solution for client's problem.
      5becb110
  3. 30 Apr, 2006 1 commit
  4. 01 Nov, 2005 1 commit
  5. 03 Oct, 2005 1 commit
  6. 29 Sep, 2005 1 commit
  7. 14 Sep, 2005 1 commit
  8. 09 Sep, 2005 1 commit
    • gluh@eagle.intranet.mysql.r18.ru's avatar
      Bug#12817 SHOW STATUS now blob fields · 99bc9607
      gluh@eagle.intranet.mysql.r18.ru authored
         This fix is cancellation of ChangeSet
         1.2329 05/07/12 08:35:30 reggie@linux.site +8 -0
         Bug 7142  Show Fields from fails using Borland's dbExpress interface
         The reason is we can't fix bug#7142 without
         breaking of existing applications/APIs that worked fine with earlier 4.1
         bug 7142 is fixed in 5.0
      
      99bc9607
  9. 19 Jul, 2005 1 commit
  10. 12 Jul, 2005 1 commit
  11. 07 Jul, 2005 1 commit
  12. 16 Apr, 2005 1 commit
    • sergefp@mysql.com's avatar
      Fix for BUG#9439: · 6b4e759c
      sergefp@mysql.com authored
      Changed type of "Sub_part" column in SHOW KEYS from TINYINT to SMALLINT (as MAX_KEY_LENGTH=1024)
      (this is the final cset with proper tests)
      6b4e759c
  13. 23 Mar, 2005 1 commit
    • gbichot@quadita2.mysql.com's avatar
      "After Monty's review" changes to the fix for BUG#8325 "Deadlock in... · 19499229
      gbichot@quadita2.mysql.com authored
      "After Monty's review" changes to the fix for BUG#8325 "Deadlock in replication thread stops replication":
      s/sleep/safe_sleep (thread safe); sleep 0/1/2/3/4/5/5/5 (get slave less late);
      no message on error log (deadlock is too common sometimes), a global counter
      instead (SHOW STATUS LIKE 'slave_retried_transactions').
      Plus a fix for libmysql/Makefile.shared
      19499229
  14. 15 Mar, 2005 2 commits
  15. 05 Feb, 2005 1 commit
  16. 21 Jan, 2005 1 commit
  17. 19 Jan, 2005 1 commit
    • timour@mysql.com's avatar
      Final patch for BUG#4285. · 7fb0de20
      timour@mysql.com authored
      This patch collects all previous patches into one.
      
      The main problem was due to that there is are two variables -
      dflt_key_cache and sql_key_cache with have more or less duplicate
      function. The reson for the bug was that the default value in the key
      cache hash was set to dflt_key_cache, then sql_key_cache was set to a
      new key cache object, and then dflt_key_cache was set to sql_key_cache
      which was different from the dflt_key_cache_var. After sending SIGHUP,
      the server was using the original default value for the key cache hash,
      which was different from the actual key cache object used for the
      default key cache.
      7fb0de20
  18. 10 Jan, 2005 1 commit
  19. 08 Jan, 2005 1 commit
  20. 09 Dec, 2004 1 commit
    • dlenev@brandersnatch.localdomain's avatar
      Fix for bug #6765 "Implicit access to time zone description · 4b0882e0
      dlenev@brandersnatch.localdomain authored
      tables requires privileges for them if some table or column level grants
      present" (with after-review fixes).
      
      We should set SELECT_ACL for implicitly opened tables in 
      my_tz_check_n_skip_implicit_tables() to be able to bypass privilege
      checking in check_grant(). Also we should exclude those tables from
      privilege checking in multi-update.
      4b0882e0
  21. 02 Dec, 2004 1 commit
  22. 02 Nov, 2004 1 commit
    • monty@mysql.com's avatar
      Remove usage of !$ from mysql-tests · 2185f1a5
      monty@mysql.com authored
      Added protocol::flush() for easier embedded-server code
      Increase block allocation variables a bit as they where a bit too small for MySQL 4.1
      Added option --silent to client_test
      2185f1a5
  23. 29 Oct, 2004 1 commit
  24. 25 Oct, 2004 1 commit
  25. 19 Oct, 2004 1 commit
    • monty@mishka.local's avatar
      Review of all code pushed since last review · 04c23808
      monty@mishka.local authored
      Simple optimzations and cleanups
      Removed compiler warnings and fixed portability issues
      Added client functions 'mysql_embedded()' to allow client to check if we are using embedded server
      Fixes for purify
      04c23808
  26. 07 Oct, 2004 1 commit
    • monty@mysql.com's avatar
      After merge fixes · 6239edc1
      monty@mysql.com authored
      Some bigger code changes was necessary becasue of the multi-table-update and the new HANDLER code
      6239edc1
  27. 04 Oct, 2004 1 commit
    • bar@mysql.com's avatar
      sql_show.cc: · 53484855
      bar@mysql.com authored
        ctype_recode does not hang anymore. Small fix after Marko's change.
      53484855
  28. 01 Oct, 2004 2 commits
  29. 26 Sep, 2004 1 commit
    • magnus@shellback.(none)'s avatar
      WL#1424 Updated after review · 059941db
      magnus@shellback.(none) authored
      * Changed the implementation of ndbcluster_find_files to be more efficient, using only one mutex lock
      * Moved ha_find_files to end of mysql_find_files so that it can be passed the list that we are interested to find. 
      059941db
  30. 25 Sep, 2004 1 commit
  31. 24 Sep, 2004 2 commits
  32. 21 Sep, 2004 1 commit
  33. 13 Sep, 2004 1 commit
  34. 11 Aug, 2004 1 commit
  35. 10 Jul, 2004 1 commit
  36. 08 Jul, 2004 1 commit
  37. 30 Jun, 2004 1 commit