An error occurred fetching the project authors.
  1. 28 May, 2007 1 commit
    • kostja@vajra.(none)'s avatar
      5.1 version of a fix and test cases for bugs: · c7594877
      kostja@vajra.(none) authored
      Bug#4968 ""Stored procedure crash if cursor opened on altered table"
      Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
      Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from 
      stored procedure."
      Bug#19733 "Repeated alter, or repeated create/drop, fails"
      Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"
      Bug#24879 "Prepared Statements: CREATE TABLE (UTF8 KEY) produces a 
      growing key length" (this bug is not fixed 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 are not
      re-execution friendly: during their operation they 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 in mysql_execute_command.
      
      Additionally, this patch splits the part of mysql_alter_table
      that analizes and rewrites information from the parser into
      a separate function - mysql_prepare_alter_table, in analogy with
      mysql_prepare_table, which is renamed to mysql_prepare_create_table.
      c7594877
  2. 23 May, 2007 1 commit
    • dlenev@mockturtle.local's avatar
      5.1 version of fix for: · 8e8f4c05
      dlenev@mockturtle.local authored
        Bug #23667 "CREATE TABLE LIKE is not isolated from alteration
                    by other connections"
        Bug #18950 "CREATE TABLE LIKE does not obtain LOCK_open"
      As well as:
        Bug #25578 "CREATE TABLE LIKE does not require any privileges
                    on source table".
      
      The first and the second bugs resulted in various errors and wrong
      binary log order when one tried to execute concurrently CREATE TABLE LIKE
      statement and DDL statements on source table or DML/DDL statements on its
      target table.
      
      The problem was caused by incomplete protection/table-locking against
      concurrent statements implemented in mysql_create_like_table() routine.
      We solve it by simply implementing such protection in proper way.
      Most of actual work for 5.1 was already done by fix for bug 20662 and
      preliminary patch changing locking in ALTER TABLE.
      
      The third bug allowed user who didn't have any privileges on table create
      its copy and therefore circumvent privilege check for SHOW CREATE TABLE.
      
      This patch solves this problem by adding privilege check, which was missing.
      
      Finally it also removes some duplicated code from mysql_create_like_table()
      and thus fixes bug #26869 "TABLE_LIST::table_name_length inconsistent with
      TABLE_LIST::table_name".
      8e8f4c05
  3. 26 Apr, 2007 1 commit
  4. 29 Mar, 2007 1 commit
  5. 27 Mar, 2007 1 commit
  6. 02 Mar, 2007 1 commit
    • antony@ppcg5.local's avatar
      WL#2936 · dc24473c
      antony@ppcg5.local authored
        "Server Variables for Plugins"
        Implement support for plugins to declare server variables.
        Demonstrate functionality by removing InnoDB specific code from sql/*
        New feature for HASH - HASH_UNIQUE flag
        New feature for DYNAMIC_ARRAY - initializer accepts preallocated ptr.
        Completed support for plugin reference counting.
      dc24473c
  7. 23 Feb, 2007 1 commit
    • monty@mysql.com/narttu.mysql.fi's avatar
      Fixed compiler warnings · f0ae3ce9
      monty@mysql.com/narttu.mysql.fi authored
      Fixed compile-pentium64 scripts
      Fixed wrong estimate of update_with_key_prefix in sql-bench
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1
      Fixed unsafe define of uint4korr()
      Fixed that --extern works with mysql-test-run.pl
      Small trivial cleanups
      This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
      Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc
      Split handle_one_connection() into reusable sub functions.
      Split create_new_thread() into reusable sub functions.
      Added thread_scheduler; Preliminary interface code for future thread_handling code.
      
      Use 'my_thread_id' for internal thread id's
      Make thr_alarm_kill() to depend on thread_id instead of thread
      Make thr_abort_locks_for_thread() depend on thread_id instead of thread
      In store_globals(), set my_thread_var->id to be thd->thread_id.
      Use my_thread_var->id as basis for my_thread_name()
      The above changes makes the connection we have between THD and threads more soft.
      
      Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions
      Fixed compiler warnings
      Fixed core dumps when running with --debug
      Removed setting of signal masks (was never used)
      Made event code call pthread_exit() (portability fix)
      Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called.
      Made handling of thread_id and thd->variables.pseudo_thread_id uniform.
      Removed one common 'not freed memory' warning from mysqltest
      Fixed a couple of usage of not initialized warnings (unlikely cases)
      Suppress compiler warnings from bdb and (for the moment) warnings from ndb
      f0ae3ce9
  8. 28 Jan, 2007 1 commit
    • monty@mysql.com/narttu.mysql.fi's avatar
      After merge fixes · 410fc81a
      monty@mysql.com/narttu.mysql.fi authored
      Removed a lot of compiler warnings
      Removed not used variables, functions and labels
      Initialize some variables that could be used unitialized (fatal bugs)
      %ll -> %l
      410fc81a
  9. 27 Dec, 2006 1 commit
  10. 18 Dec, 2006 1 commit
  11. 30 Nov, 2006 1 commit
    • monty@mysql.com/narttu.mysql.fi's avatar
      Fixed compiler warnings (Mostly VC++): · 3a35c300
      monty@mysql.com/narttu.mysql.fi authored
      - Removed not used variables
      - Changed some ulong parameters/variables to ulonglong (possible serious bug)
      - Added casts to get rid of safe assignment from longlong to long (and similar)
      - Added casts to function parameters
      - Fixed signed/unsigned compares
      - Added some constructores to structures
      - Removed some not portable constructs
      
      Better fix for bug Bug #21428 "skipped 9 bytes from file: socket (3)" on "mysqladmin shutdown"
      (Added new parameter to net_clear() to define when we want the communication buffer to be emptied)
      3a35c300
  12. 26 Nov, 2006 1 commit
    • monty@mysql.com/nosik.monty.fi's avatar
      Fixed a LOT of compiler warnings · fa81a82e
      monty@mysql.com/nosik.monty.fi authored
      Added missing DBUG_RETURN statements (in mysqldump.c)
      Added missing enums
      Fixed a lot of wrong DBUG_PRINT() statements, some of which could cause crashes
      Removed usage of %lld and %p in printf strings as these are not portable or produces different results on different systems.
      fa81a82e
  13. 02 Oct, 2006 2 commits
  14. 30 Sep, 2006 1 commit
  15. 26 Sep, 2006 2 commits
  16. 21 Sep, 2006 1 commit
    • dlenev@mockturtle.local's avatar
      Fix for bug#20670 "UPDATE using key and invoking trigger that modifies · 5f149dde
      dlenev@mockturtle.local authored
      this key does not stop" (5.1 version).
      
      UPDATE statement which WHERE clause used key and which invoked trigger
      that modified field in this key worked indefinetely.
      
      This problem occured because in cases when UPDATE statement was
      executed in update-on-the-fly mode (in which row is updated right
      during evaluation of select for WHERE clause) the new version of
      the row became visible to select representing WHERE clause and was
      updated again and again.
      We already solve this problem for UPDATE statements which does not
      invoke triggers by detecting the fact that we are going to update
      field in key used for scanning and performing update in two steps,
      during the first step we gather information about the rows to be
      updated and then doing actual updates. We also do this for
      MULTI-UPDATE and in its case we even detect situation when such
      fields are updated in triggers (actually we simply assume that
      we always update fields used in key if we have before update
      trigger).
      
      The fix simply extends this check which is done with help of
      check_if_key_used()/QUICK_SELECT_I::check_if_keys_used()
      routine/method in such way that it also detects cases when
      field used in key is updated in trigger. We do this by
      changing check_if_key_used() to take field bitmap instead
      field list as argument and passing TABLE::write_set
      to it (we also have to add info about fields used in
      triggers to this bitmap a bit earlier).
      As nice side-effect we have more precise and thus more optimal
      perfomance-wise check for the MULTI-UPDATE.
      Also check_if_key_used() routine and similar method were renamed
      to is_key_used()/is_keys_used() in order to better reflect that
      it is simple boolean predicate.
      Finally, partition_key_modified() routine now also takes field
      bitmap instead of field list as argument.
      5f149dde
  17. 15 Sep, 2006 1 commit
  18. 31 Aug, 2006 1 commit
  19. 22 Aug, 2006 1 commit
  20. 17 Aug, 2006 1 commit
    • andrey@example.com's avatar
      Cleanup patch. · 081b8659
      andrey@example.com authored
      There is an existing macros for initializing LEX_STRINGs
      with constant strings -> C_STRING_WITH_LEN. Change existing code to use it.
      (char *) STRING_WITH_LEN -> C_STRING_WITH_LEN
      081b8659
  21. 08 Aug, 2006 1 commit
  22. 05 Aug, 2006 1 commit
  23. 02 Aug, 2006 2 commits
    • ingo/istruewing@chilla.local's avatar
      Bug#18775 - Temporary table from alter table visible to other threads · 8e4c36ad
      ingo/istruewing@chilla.local authored
      Continued implementation of WL#1324 (table name to filename encoding)
      
      The intermediate (not temporary) files of the new table
      during ALTER TABLE was visible for SHOW TABLES. These
      intermediate files are copies of the original table with
      the changes done by ALTER TABLE. After all the data is
      copied over from the original table, these files are renamed 
      to the original tables file names. So they are not temporary 
      files. They persist after ALTER TABLE, but just with another 
      name.
      
      In 5.0 the intermediate files are invisible for SHOW TABLES
      because all file names beginning with "#sql" were suppressed.
      
      This failed since 5.1.6 because even temporary table names were
      converted when making file names from them. The prefix became
      converted to "@0023sql". Converting the prefix during SHOW TABLES
      would suppress the listing of user tables that start with "#sql".
      
      The solution of the problem is to continue the implementation of
      the table name to file name conversion feature. One requirement
      is to suppress the conversion for temporary table names.
      
      This change is straightforward for real temporary tables as there
      is a function that creates temporary file names.
      
      But the generated path names are located in TMPDIR and have no
      relation to the internal table name. This cannot be used for
      ALTER TABLE. Its intermediate files need to be in the same
      directory as the old table files. And it is necessary to be
      able to deduce the same path from the same table name repeatedly.
      
      Consequently the intermediate table files must be handled like normal
      tables. Their internal names shall start with tmp_file_prefix
      (#sql) and they shall not be converted like normal table names.
      
      I added a flags parameter to all relevant functions that are
      called from ALTER TABLE. It is used to suppress the conversion
      for the intermediate table files.
      
      The outcome is that the suppression of #sql in SHOW TABLES
      works again. It does not suppress user tables as these are
      converted to @0023sql on file level.
      
      This patch does also fix ALTER TABLE ... RENAME, which could not 
      rename a table with non-ASCII characters in its name.
      
      It does also fix the problem that a user could create a table like
      `#sql-xxxx-yyyy`, where xxxx is mysqld's pid and yyyy is the thread
      ID of some other thread, which prevented this thread from running 
      ALTER TABLE.
      
      Some of the above problems are mentioned in Bug 1405, which can
      be closed with this patch.
      
      This patch does also contain some minor fixes for other forgotten
      conversions. Still known problems are reported as bugs 21370,
      21373, and 21387.
      8e4c36ad
    • mikael/pappa@dator5.(none)'s avatar
      BUG#18198: Fixes to handle VARCHAR strings properly · 6425e335
      mikael/pappa@dator5.(none) authored
      New methods to handle VARCHAR strings and CHAR's which are not
      using a binary collation.
      Indentation fixes
      Now strings are run through strnxfrm before they are processed
      by the partition function
      We do not allow collations where strnxfrm expands the string since
      we want the resulting string to fit in the same value range as
      the original.
      6425e335
  24. 31 Jul, 2006 1 commit
  25. 24 Jul, 2006 1 commit
  26. 21 Jul, 2006 1 commit
  27. 20 Jul, 2006 1 commit
  28. 27 Jun, 2006 1 commit
  29. 23 Jun, 2006 1 commit
  30. 21 Jun, 2006 1 commit
    • bar@mysql.com's avatar
      Bug#20086: Can't get data from key partitioned tables with VARCHAR key · bfae7303
      bar@mysql.com authored
      The problem appeared because the same values produced different hash
      during INSERT and SELECT for VARCHAR data type.
      Fix:
      VARCHAR required special treatment to avoid hashing of length bytes
      (leftmost one or two bytes) as well as trailing bytes beyond real length,
      which could contain garbage. Fix is done by introducing hash() - new method
      in the Field class.
      bfae7303
  31. 14 Jun, 2006 1 commit
  32. 13 Jun, 2006 1 commit
  33. 12 Jun, 2006 2 commits
  34. 06 Jun, 2006 2 commits
  35. 05 Jun, 2006 1 commit