An error occurred fetching the project authors.
  1. 23 Oct, 2009 1 commit
  2. 15 Oct, 2009 1 commit
  3. 14 Oct, 2009 1 commit
    • Alexander Barkov's avatar
      A postfix for backporting WL#1397 convert XML -> SQL · 4def5216
      Alexander Barkov authored
      mysql-test/r/loadxml.result
      mysql-test/t/loadxml.test
        Fixing non-deterministic test results
      
      sql/sql_yacc.yy
        Initializing fname_first using get_tok_end() instead of get_ptr().
        The latter is grammar-dependant. The former is not.
      4def5216
  4. 12 Oct, 2009 1 commit
  5. 30 Sep, 2009 2 commits
    • Kristofer Pettersson's avatar
      Bug#34895 'show procedure status' or 'show function status' + · df2122a2
      Kristofer Pettersson authored
                'flush tables' crashes
      
      The server crashes when 'show procedure status' and 'flush tables' are
      run concurrently.
      
      This is caused by the way mysql.proc table is added twice to the list
      of table to lock although the requirements on the current locking API
      assumes differently.
      
      No test case is submitted because of the nature of the crash which is 
      currently difficult to reproduce in a deterministic way.
      
      This is a backport from 5.1
      
      myisam/mi_dbug.c:
        * check_table_is_closed is only used in EXTRA_DEBUG mode but since it is
        iterating over myisam shared data it still needs to be protected by an
        appropriate mutex.
      sql/sql_yacc.yy:
        * Since the I_S mechanism is already handling the open and close of 
        mysql.proc there is no need for the method sp_add_to_query_tables.
      df2122a2
    • MySQL Build Team's avatar
      Backport into build-200909301147-5.0.84sp1 · 31c0647f
      MySQL Build Team authored
      > ------------------------------------------------------------
      > revno: 2796
      > revision-id: sergey.glukhov@sun.com-20090827102219-sgjz0v5t1rfccs14
      > parent: joro@sun.com-20090824122803-1d5jlaysjc7a7j6q
      > committer: Sergey Glukhov <Sergey.Glukhov@sun.com>
      > branch nick: mysql-5.0-bugteam
      > timestamp: Thu 2009-08-27 15:22:19 +0500
      > message:
      >   Bug#46184 Crash, SELECT ... FROM derived table procedure analyze
      >   The crash happens because select_union object is used as result set
      >   for queries which have derived tables.
      >   select_union use temporary table as data storage and if
      >   fields count exceeds 10(count of values for procedure ANALYSE())
      >   then we get a crash on fill_record() function.
      31c0647f
  6. 29 Sep, 2009 1 commit
    • Kristofer Pettersson's avatar
      Bug#42108 Wrong locking for UPDATE with subqueries leads to broken statement · da9a5ef6
      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.
      
      sql/sql_yacc.yy:
        * Set lock_option to either TL_READ_NO_INSERT or
          TL_READ for any sub-SELECT following UPDATE.
        * Changed line adjusted for parser identation
          rules; code begins at column 13.
      da9a5ef6
  7. 28 Sep, 2009 2 commits
    • Tatiana A. Nurnberg's avatar
      Bug#43746: YACC return wrong query string when parse 'load data infile' sql statement · 4102363f
      Tatiana A. Nurnberg authored
      "load data" statements were written to the binlog as a mix of the original statement
      and bits recreated from parse-info. This relied on implementation details and broke
      with IGNORE_SPACES and versioned comments.
      
      We now completely resynthesize the query for LOAD DATA for binlog (which among other
      things normalizes them somewhat with regard to case, spaces, etc.).
      We have already parsed the query properly, so we make use of that rather
      than mix-and-match string literals and parsed items.
      This should make us safe with regard to versioned comments, even those
      spanning multiple tokens. Also no longer affected by IGNORE_SPACES.
      
      mysql-test/r/mysqlbinlog.result:
        LOAD DATA INFILE normalized
      mysql-test/suite/binlog/r/binlog_killed_simulate.result:
        LOAD DATA INFILE normalized
      mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
        LOAD DATA INFILE normalized
      mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
        LOAD DATA INFILE normalized
      mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
        LOAD DATA INFILE normalized
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
        LOAD DATA INFILE normalized
      mysql-test/suite/rpl/r/rpl_loaddata.result:
        LOAD DATA INFILE normalized
      mysql-test/suite/rpl/r/rpl_loaddata_fatal.result:
        LOAD DATA INFILE normalized; offsets adjusted to reflect that
      mysql-test/suite/rpl/r/rpl_loaddata_map.result:
        LOAD DATA INFILE normalized
      mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
        test for #43746 - trying to break LOAD DATA part of parser
      mysql-test/suite/rpl/r/rpl_stm_log.result:
        LOAD DATA INFILE normalized
      mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
        try to break the LOAD DATA part of the parser (test for #43746)
      mysql-test/t/mysqlbinlog.test:
        LOAD DATA INFILE normalized; adjust offsets to reflect that
      sql/log_event.cc:
        clean up Load_log_event::print_query and friends so they don't print
        excess spaces. add support for printing charset names to print_query.
      sql/log_event.h:
        We already have three places where we synthesize LOAD DATA queries.
        Better use one of those!
      sql/sql_lex.h:
        When binlogging LOAD DATA statements, we make up the statement to
        be logged (from the parse-info, rather than substrings of the
        original query) now. Consequently, we no longer need (string-)
        pointers into the original query.
      sql/sql_load.cc:
        Completely rewrote write_execute_load_query_log_event() to synthesize the
        LOAD DATA statement wholesale, rather than piece it together from
        synthesized bits and literal excerpts from the original query. This
        will not only give us a nice, normalized statement (all uppercase,
        no excess spaces, etc.), it will also handle comments, including
        versioned comments right, which is certainly more than we can say
        about the previous incarnation.
      sql/sql_yacc.yy:
        We're no longer assembling LOAD DATA statements from bodyparts of the
        original query, so some bookkeeping in the parser can go.
      4102363f
    • Georgi Kodinov's avatar
      Ported WL#3220 to mysql-next-mr. · 2118bd10
      Georgi Kodinov authored
      2118bd10
  8. 22 Sep, 2009 1 commit
    • MySQL Build Team's avatar
      Backport into build-200909221805-5.1.37sp1 · 9c9458db
      MySQL Build Team authored
      > ------------------------------------------------------------
      > revno: 3085 [merge]
      > revision-id: sergey.glukhov@sun.com-20090827105925-j56pdghdzb8nlw3p
      > parent: alfranio.correia@sun.com-20090827093227-9exafl3k6362bvq7
      > parent: sergey.glukhov@sun.com-20090827102219-sgjz0v5t1rfccs14
      > committer: Sergey Glukhov <Sergey.Glukhov@sun.com>
      > branch nick: mysql-5.1-bugteam
      > timestamp: Thu 2009-08-27 15:59:25 +0500
      > message:
      >   5.0-bugteam->5.1-bugteam merge
      > ------------------------------------------------------------
      > Use --include-merges or -n0 to see merged revisions.
      9c9458db
  9. 10 Sep, 2009 3 commits
  10. 07 Sep, 2009 1 commit
    • Martin Hansson's avatar
      Bug#46259: 5.0.83 -> 5.1.36, query doesn't work · 2cb3a131
      Martin Hansson authored
            
      The parser rule for expressions in a udf parameter list contains 
      two hacks: 
      First, the parser input stream is read verbatim, bypassing 
      the lexer.
      Second, the Item::name field is overwritten. If the argument to a
      udf was a field, the field's name as seen by name resolution was
      overwritten this way.
      If the field name was quoted or escaped, it would appear as e.g. "`field`".
      Fixed by not overwriting field names.
      
      mysql-test/r/udf.result:
        Bug#46259: Test result.
      mysql-test/t/udf.test:
        Bug#46259: Test case.
      sql/sql_yacc.yy:
        Bug#46259: Fix.
      2cb3a131
  11. 29 Aug, 2009 1 commit
    • unknown's avatar
      Bug #44331 Restore of database with events produces warning in replication · f32c08bd
      unknown authored
      If an EVENT is created without the DEFINER clause set explicitly or with it set  
      to CURRENT_USER, the master and slaves become inconsistent. This issue stems from 
      the fact that in both cases, the DEFINER is set to the CURRENT_USER of the current 
      thread. On the master, the CURRENT_USER is the mysqld's user, while on the slave,  
      the CURRENT_USER is empty for the SQL Thread which is responsible for executing 
      the statement.
      
      To fix the problem, we do what follows. If the definer is not set explicitly,  
      a DEFINER clause is added when writing the query into binlog; if 'CURRENT_USER' is 
      used as the DEFINER, it is replaced with the value of the current user before 
      writing to binlog.
      
      mysql-test/suite/rpl/r/rpl_create_if_not_exists.result:
        Updated the result file after fixing bug#44331
      mysql-test/suite/rpl/r/rpl_drop_if_exists.result:
        Updated the result file after fixing bug#44331
      mysql-test/suite/rpl/r/rpl_events.result:
        Test result of Bug#44331
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
        Updated the result file after fixing bug#44331
      mysql-test/suite/rpl/t/rpl_events.test:
        Added test to verify if the definer is consistent between master and slave
        when the event is created without the DEFINER clause set explicitly or the
        DEFINER is set to CURRENT_USER
      sql/events.cc:
        The "create_query_string" function is added to create a new query string 
        for removing executable comments.
      sql/sql_yacc.yy:
        The remember_name token was added for recording the offset of EVENT_SYM.
      f32c08bd
  12. 27 Aug, 2009 1 commit
    • Sergey Glukhov's avatar
      Bug#46184 Crash, SELECT ... FROM derived table procedure analyze · 367c14b8
      Sergey Glukhov authored
      The crash happens because select_union object is used as result set
      for queries which have derived tables.
      select_union use temporary table as data storage and if
      fields count exceeds 10(count of values for procedure ANALYSE())
      then we get a crash on fill_record() function.
      
      
      mysql-test/r/analyse.result:
        test result
      mysql-test/r/subselect.result:
        result fix
      mysql-test/t/analyse.test:
        test case
      mysql-test/t/subselect.test:
        test fix
      sql/sql_yacc.yy:
        The crash happens because select_union object is used as result set
        for queries which have derived tables.
        select_union use temporary table as data storage and if
        fields count exceeds 10(count of values for procedure ANALYSE())
        then we get a crash on fill_record() function.
      367c14b8
  13. 12 Aug, 2009 1 commit
  14. 31 Jul, 2009 1 commit
    • Gleb Shchepa's avatar
      Bug# 30946: mysqldump silently ignores --default-character-set · 4e95179a
      Gleb Shchepa authored
                  when used with --tab
      
      1) New syntax: added CHARACTER SET clause to the
        SELECT ... INTO OUTFILE (to complement the same clause in
        LOAD DATA INFILE).
        mysqldump is updated to use this in --tab mode.
      
      2) ESCAPED BY/ENCLOSED BY field parameters are documented as
         accepting CHAR argument, however SELECT .. INTO OUTFILE
         silently ignored rests of multisymbol arguments.
         For the symmetrical behavior with LOAD DATA INFILE the
         server has been modified to fail with the same error:
      
           ERROR 42000: Field separator argument is not what is
                        expected; check the manual
      
      3) Current LOAD DATA INFILE recognizes field/line separators
         "as is" without converting from client charset to data
         file charset. So, it is supposed, that input file of
         LOAD DATA INFILE consists of data in one charset and
         separators in other charset. For the compatibility with
         that [buggy] behaviour SELECT INTO OUTFILE implementation
         has been saved "as is" too, but the new warning message
         has been added:
      
           Non-ASCII separator arguments are not fully supported
      
         This message warns on field/line separators that contain
         non-ASCII symbols.
      
      
      client/mysqldump.c:
        mysqldump has been updated to call SELECT ... INTO OUTFILE
        statement with a charset from the --default-charset command
        line parameter.
      mysql-test/r/mysqldump.result:
        Added test case for bug #30946.
      mysql-test/r/outfile_loaddata.result:
        Added test case for bug #30946.
      mysql-test/t/mysqldump.test:
        Added test case for bug #30946.
      mysql-test/t/outfile_loaddata.test:
        Added test case for bug #30946.
      sql/field.cc:
        String conversion code has been moved from check_string_copy_error()
        to convert_to_printable() for reuse.
      sql/share/errmsg.txt:
        New WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED message has been added.
      sql/sql_class.cc:
        The select_export::prepare() method has been modified to:
        
          1) raise the ER_WRONG_FIELD_TERMINATORS error on multisymbol
             ENCLOSED BY/ESCAPED BY field arguments like LOAD DATA INFILE;
        
          2) warn with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED
             message on non-ASCII field or line separators.
        
        The select_export::send_data() merhod has been modified to
        convert item data to output charset (see new SELECT INTO OUTFILE
        syntax). By default the BINARY charset is used for backward
        compatibility.
      sql/sql_class.h:
        The select_export::write_cs field added to keep output
        charset.
      sql/sql_load.cc:
        mysql_load has been modified to warn on non-ASCII field or
        line separators with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED
        message.
      sql/sql_string.cc:
        New global function has been added: convert_to_printable()
        (common code has been moved from check_string_copy_error()).
      sql/sql_string.h:
        New String::is_ascii() method and new global convert_to_printable()
        function have been added.
      sql/sql_yacc.yy:
        New syntax: added CHARACTER SET clause to the
        SELECT ... INTO OUTFILE (to complement the same clause in
        LOAD DATA INFILE). By default the BINARY charset is used for
        backward compatibility.
      4e95179a
  15. 29 Jul, 2009 2 commits
    • Mikael Ronstrom's avatar
      Bug#46354, when defining partitions without subpartition definition after... · a8e7535e
      Mikael Ronstrom authored
      Bug#46354, when defining partitions without subpartition definition after defining it with the first partition and using list partition caused crash, fixed by more error checks in parser
      a8e7535e
    • Guilhem Bichot's avatar
      Bug#45829 "CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing": · a58b887c
      Guilhem Bichot authored
      those keywords do nothing in 5.1 (they are meant for future versions, for example featuring the Maria engine)
      so they are here removed from the syntax. Adding those keywords to future versions when needed is:
      - WL#5034 "Add TRANSACTIONA=0|1 and PAGE_CHECKSUM=0|1 clauses to CREATE TABLE"
      - WL#5037 "New ROW_FORMAT value for CREATE TABLE: PAGE"
      
      mysql-test/r/create.result:
        test that syntax is not accepted
      mysql-test/t/create.test:
        test that syntax is not accepted
      sql/handler.cc:
        remove ROW_FORMAT=PAGE
      sql/handler.h:
        Mark unused objects, but I don't remove them by fear of breaking any plugin which includes this file
        (see also table.h)
      sql/lex.h:
        removing syntax
      sql/sql_show.cc:
        removing output of noise keywords in SHOW CREATE TABLE and INFORMATION_SCHEMA.TABLES
      sql/sql_table.cc:
        removing TRANSACTIONAL
      sql/sql_yacc.yy:
        removing syntax
      sql/table.cc:
        removing TRANSACTIONAL, PAGE_CHECKSUM. Their place in the frm file is not reclaimed,
        for compatibility with older 5.1.
      sql/table.h:
        Mark unused objects, but I don't remove them by fear of breaking any plugin which includes this file
        (and there are several engines which use the content TABLE_SHARE and thus rely on a certain binary
        layout of this structure).
      a58b887c
  16. 16 Jul, 2009 1 commit
  17. 15 Jul, 2009 1 commit
    • Georgi Kodinov's avatar
      Bug #45287: phase 1 : 32 bit compilation warnings · 45b687c0
      Georgi Kodinov authored
      Fixed the following problems:
      1. cmake 2.6 warning because of a changed default on
      how the dependencies to libraries with a specified 
      path are resolved.
      Fixed by requiring cmake 2.6.
      2. Removed an obsolete pre-NT4 hack including defining
      Windows system defines to alter the behavior of windows.h.
      3. Disabled warning C4065 on compiling sql_yacc.cc because
      of a know incompatibility in some of the newer bison binaries.
      45b687c0
  18. 11 Jul, 2009 1 commit
    • Gleb Shchepa's avatar
      Bug #41156: List of derived tables acts like a chain of · 8b278847
      Gleb Shchepa authored
                  mutually-nested subqueries
      
      Queries of the form
      
        SELECT * FROM (SELECT 1) AS t1,
                      (SELECT 2) AS t2,...
                      (SELECT 32) AS t32
      
      caused the "Too high level of nesting for select" error
      as if the query has a form
      
        SELECT * FROM (SELECT 1 FROM (SELECT 2 FROM (SELECT 3 FROM...
      
      
      The table_factor parser rule has been modified to adjust
      the LEX::nest_level variable value after every derived table.
      
      
      mysql-test/r/derived.result:
        Added test case for bug #41156.
      mysql-test/t/derived.test:
        Added test case for bug #41156.
      sql/sql_yacc.yy:
        Bug #41156: List of derived tables acts like a chain of
                    mutually-nested subqueries
        
        The select_derived2 parser rule calls mysql_new_select()
        calls push_context() and nest_level++, however only
        the pop_context() was called at the end of derived table
        parsing at the table_factor rule.
        
        The table_factor parser rule has been modified to adjust
        the LEX::nest_level variable value after every derived table.
      8b278847
  19. 24 Jun, 2009 1 commit
    • MySQL Build Team's avatar
      Backport into build-200906240007-5.1.34sp1 · 11d2b7fe
      MySQL Build Team authored
      > ------------------------------------------------------------
      > revno: 2852.2.3
      > revision-id: davi.arnaut@sun.com-20090403194600-60ufn0tz1gx1kl0l
      > parent: gni@mysql.com-20090403184200-vnjtpsv4an79w8bu
      > parent: davi.arnaut@sun.com-20090403191154-0ho2nai3chjsmpof
      > committer: Davi Arnaut <Davi.Arnaut@Sun.COM>
      > branch nick: 43230-5.1
      > timestamp: Fri 2009-04-03 16:46:00 -0300
      > message:
      >   Merge Bug#43230 into mysql-5.1-bugteam
      >     ------------------------------------------------------------
      >     revno: 1810.3855.16
      >     revision-id: davi.arnaut@sun.com-20090403191154-0ho2nai3chjsmpof
      >     parent: chad@mysql.com-20090402152928-3ld60a56h86njcpg
      >     committer: Davi Arnaut <Davi.Arnaut@Sun.COM>
      >     branch nick: 43230-5.0
      >     timestamp: Fri 2009-04-03 16:11:54 -0300
      >     message:
      >       Bug#43230: SELECT ... FOR UPDATE can hang with FLUSH TABLES WITH READ LOCK indefinitely
      >       
      >       The problem is that a SELECT .. FOR UPDATE statement might open
      >       a table and later wait for a impeding global read lock without
      >       noticing whether it is holding a table that is being waited upon
      >       the the flush phase of the process that took the global read
      >       lock.
      >       
      >       The same problem also affected the following statements:
      >       
      >       LOCK TABLES .. WRITE
      >       UPDATE .. SET (update and multi-table update)
      >       TRUNCATE TABLE ..
      >       LOAD DATA ..
      >       
      >       The solution is to make the above statements wait for a impending
      >       global read lock before opening the tables. If there is no
      >       impending global read lock, the statement raises a temporary
      >       protection against global read locks and progresses smoothly
      >       towards completion.
      >       
      >       Important notice: the patch does not try to address all possible
      >       cases, only those which are common and can be fixed unintrusively
      >       enough for 5.0.
      11d2b7fe
  20. 23 Jun, 2009 1 commit
    • Alexey Botchkov's avatar
      Bug#44676 5.4 deprecation messages allege feature removal in lower version · 24af8a43
      Alexey Botchkov authored
          changed the deprecation border to 6.0 in this case
      
      per-file comments:
        mysql-test/r/backup.result
          Bug#44676      5.4 deprecation messages allege feature removal in lower version
          test result fixed
        mysql-test/r/show_check.result
          Bug#44676      5.4 deprecation messages allege feature removal in lower version
          test result fixed
        mysql-test/r/sp-error.result
          Bug#44676      5.4 deprecation messages allege feature removal in lower version
          test result fixed
        mysql-test/r/sp.result
          Bug#44676      5.4 deprecation messages allege feature removal in lower version
          test result fixed
        mysql-test/r/sp_trans.result
          Bug#44676      5.4 deprecation messages allege feature removal in lower version
          test result fixed
        mysql-test/r/warnings.result
          Bug#44676      5.4 deprecation messages allege feature removal in lower version
          test result fixed
        mysql-test/suite/rpl/r/rpl_sp.result
          Bug#44676      5.4 deprecation messages allege feature removal in lower version
          test result fixed
        sql/mysqld.cc
      Bug#44676      5.4 deprecation messages allege feature removal in lower version
        sql/set_var.cc
      Bug#44676      5.4 deprecation messages allege feature removal in lower version
        sql/sql_table.cc
      Bug#44676      5.4 deprecation messages allege feature removal in lower version
        sql/sql_yacc.yy
      Bug#44676      5.4 deprecation messages allege feature removal in lower version
      24af8a43
  21. 17 Jun, 2009 1 commit
    • Staale Smedseng's avatar
      Bug #43414 Parenthesis (and other) warnings compiling MySQL · 3b0e6e41
      Staale Smedseng authored
      with gcc 4.3.2
            
      Compiling MySQL with gcc 4.3.2 and later produces a number of 
      warnings, many of which are new with the recent compiler
      versions.
                        
      This bug will be resolved in more than one patch to limit the
      size of changesets. This is the second patch, fixing more
      of the warnings.
      3b0e6e41
  22. 10 Jun, 2009 1 commit
    • Staale Smedseng's avatar
      Bug #43414 Parenthesis (and other) warnings compiling MySQL · a1035097
      Staale Smedseng authored
      with gcc 4.3.2
      
      Compiling MySQL with gcc 4.3.2 and later produces a number of 
      warnings, many of which are new with the recent compiler
      versions.
                  
      This bug will be resolved in more than one patch to limit the
      size of changesets. This is the second patch, fixing more
      of the warnings.
      a1035097
  23. 27 May, 2009 2 commits
    • Georgi Kodinov's avatar
      Bug #38159: Function parsing problem generates misleading error message · 80730df7
      Georgi Kodinov authored
            
      Added a more detailed error message on calling an ambiguous missing function.
      
      mysql-test/r/ps.result:
        Bug #38159: fixed existing tests
      mysql-test/r/sp-error.result:
        Bug #38159: test case
      mysql-test/t/ps.test:
        Bug #38159: fixed existing tests
      mysql-test/t/sp-error.test:
        Bug #38159: test case
      sql/item_func.cc:
        Bug #38159: generate more detailed error message
      sql/share/errmsg.txt:
        Bug #38159: add a more detailed error message
      sql/sql_derived.cc:
        Bug #38159: treat the detailed error message the same way as the
        generic one
      sql/sql_lex.cc:
        Bug #38159: 
          - detect if the token is ambiguous and print the appropriate error.
          - backport is_lex_native_function() from 5.1
      sql/sql_lex.h:
        Bug #38159: detect if the token is ambiguous and print the appropriate error.
      sql/sql_yacc.yy:
        Bug #38159: generate more detailed error message
      sql/table.cc:
        Bug #38159: treat the detailed error message the same way as the
        generic one
      80730df7
    • Alexey Kopytov's avatar
      Bug #44767: invalid memory reads in password() and · 1b8322c3
      Alexey Kopytov authored
                  old_password() functions   
      The PASSWORD() and OLD_PASSWORD() functions could lead to   
      memory reads outside of an internal buffer when used with BLOB   
      arguments.   
        
      String::c_ptr() assumes there is at least one extra byte  
      in the internally allocated buffer when adding the trailing  
      '\0'.  This, however, may not be the case when a String object  
      was initialized with externally allocated buffer.  
        
      The bug was fixed by adding an additional "length" argument to  
      make_scrambled_password_323() and make_scrambled_password() in  
      order to avoid String::c_ptr() calls for  
      PASSWORD()/OLD_PASSWORD().  
        
      However, since the make_scrambled_password[_323] functions are  
      a part of the client library ABI, the functions with the new  
      interfaces were implemented with the 'my_' prefix in their  
      names, with the old functions changed to be wrappers around  
      the new ones to maintain interface compatibility.  
      
      mysql-test/r/func_crypt.result:
        Added a test case for bug #44767.
      mysql-test/t/func_crypt.test:
        Added a test case for bug #44767.
      sql/item_strfunc.cc:
        Use the new my_make_scrambled_password*() to avoid 
        String::c_ptr().
      sql/item_strfunc.h:
        Changed Item_func[_old]_password::alloc() interfaces so that
        we can use the new my_make_scrambled_password*() functions.
      sql/mysql_priv.h:
        Added declarations for the new my_make_scrambled_password*() 
        functions.
      sql/password.c:
        Added new my_make_scrambled_password*() functions with an
        additional "length" argument. Changed ones to be wrappers
        around the new ones to maintain interface compatibility.
      sql/sql_yacc.yy:
        Utilize the new password hashing functions with additional length
        argument.
      1b8322c3
  24. 03 Apr, 2009 1 commit
    • Davi Arnaut's avatar
      Bug#43230: SELECT ... FOR UPDATE can hang with FLUSH TABLES WITH READ LOCK indefinitely · 72e97882
      Davi Arnaut authored
      The problem is that a SELECT .. FOR UPDATE statement might open
      a table and later wait for a impeding global read lock without
      noticing whether it is holding a table that is being waited upon
      the the flush phase of the process that took the global read
      lock.
      
      The same problem also affected the following statements:
      
      LOCK TABLES .. WRITE
      UPDATE .. SET (update and multi-table update)
      TRUNCATE TABLE ..
      LOAD DATA ..
      
      The solution is to make the above statements wait for a impending
      global read lock before opening the tables. If there is no
      impending global read lock, the statement raises a temporary
      protection against global read locks and progresses smoothly
      towards completion.
      
      Important notice: the patch does not try to address all possible
      cases, only those which are common and can be fixed unintrusively
      enough for 5.0.
      
      mysql-test/r/lock_multi.result:
        Add test case result for Bug#43230
      mysql-test/t/lock_multi.test:
        Add test case for Bug#43230
      sql/sql_lex.cc:
        Initialize flag.
      sql/sql_lex.h:
        Add a flag to the lexer.
      sql/sql_parse.cc:
        Wait for the global read lock is a write lock is going to be
        taken. The wait is done before opening tables.
      sql/sql_yacc.yy:
        Protect against the GRL if its a SELECT .. FOR UPDATE or LOCK TABLES
        .. WRITE statement.
      72e97882
  25. 05 Mar, 2009 1 commit
    • Kristofer Pettersson's avatar
      Bug#39843 DELETE requires write access to table in subquery in where clause · ddaede80
      Kristofer Pettersson authored
      An unnecessarily restrictive lock were taken on sub-SELECTs during DELETE.
      
      During parsing, a global structure is reused for sub-SELECTs and the attribute
      keeping track of lock options were not reset properly.
      This patch introduces a new attribute to keep track on the syntactical lock
      option elements found in a sub-SELECT and then sets the lock options accordingly.
      
      Now the sub-SELECTs will try to acquire a READ lock if possible
      instead of a WRITE lock as inherited from the outer DELETE statement.
      
      
      mysql-test/r/lock.result:
        Added test case for bug39843
      mysql-test/t/lock.test:
        Added test case for bug39843
      sql/sql_lex.cc:
        * Reset member variable lock_option on each new query.
      sql/sql_lex.h:
        * Introduced new member variable 'lock_option' which is keeping track
          of the syntactical lock option of a (sub-)select query.
      sql/sql_parse.cc:
        * Wrote comments to functions.
      sql/sql_yacc.yy:
        * Introduced an attribute to keep track of syntactical lock options
          in sub-selects.
        * Made sure that the default value TL_READ_DEFAULT is at the begining
          of each subselect-rule.
      ddaede80
  26. 16 Feb, 2009 1 commit
  27. 12 Feb, 2009 1 commit
    • Georgi Kodinov's avatar
      Bug #33813: Schema names are case-sensitive in DROP FUNCTION · 1c5fa3b6
      Georgi Kodinov authored
            
      Additional fix:
       1. Revert the unification of DROP FUNCTION
      and DROP PROCEDURE, because DROP FUNCTION can be used to
      drop UDFs (that have a non-qualified name and don't require
      database name to be present and valid).
       2. Fixed the case sensitivity problem by adding a call to 
      check_db_name() (similar to the sp_name production).
      1c5fa3b6
  28. 10 Feb, 2009 1 commit
    • Georgi Kodinov's avatar
      Bug #33813: Schema names are case-sensitive in DROP FUNCTION · 0669b793
      Georgi Kodinov authored
      The parser was not using the correct fully-qualified-name
      production for DROP FUNCTION.
      Fixed by copying the production from DROP PROCEDURE.
      Tested in the windows specific suite to make sure it's 
      tested on a case-insensitive file system.
      
      mysql-test/r/windows.result:
        Bug #33813: test case
      mysql-test/t/windows.test:
        Bug #33813: test case
      sql/sql_yacc.yy:
        Bug #33813: use the correct production for the name in
        DROP PROCEDURE
      0669b793
  29. 08 Jan, 2009 1 commit
    • Mattias Jonsson's avatar
      Bug#39893: Crash if select on a partitioned table, when partitioning is disabled · 48e0325c
      Mattias Jonsson authored
      Problem was that it tried to run partitioning function calls when
      opening a partitioned table, when it was explicitly disabled.
      
      Solution is to check if the partitioning plugin is ready to use before
      using any partitioning specific calls.
      
      mysql-test/r/disabled_partition.require:
        Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
        
        New require file to use when partitioning is disabled (but compiled in)
      mysql-test/r/not_partition.result:
        Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
        
        Updated testcase
      mysql-test/r/partition_disabled.result:
        Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
        
        New result file
      mysql-test/std_data/parts/t1.frm:
        Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
        
        frm file for 'create table t1 (a int) partition by hash (a)'
      mysql-test/t/not_partition.test:
        Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
        
        Updated test cases
      mysql-test/t/partition_disabled-master.opt:
        Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
        
        New opt file
      mysql-test/t/partition_disabled.test:
        Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
        
        New test file (looks like not_partition.test, but with different errors)
      sql/sql_yacc.yy:
        Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
        
        Better error message (it is already built with partitioning, but is explicitly
        disabled).
      sql/table.cc:
        Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
        
        If the partitioning plugin is not ready, fail to open the table.
      48e0325c
  30. 21 Nov, 2008 1 commit
    • Alexey Botchkov's avatar
      Bug#25058 ignored return codes in memory allocation functions · d445b215
      Alexey Botchkov authored
         memory allocation error checks added for functions
         calling insert_dynamic()
      
      per-file messages:
        myisam/mi_delete.c
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
        myisam/mi_write.c
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
        server-tools/instance-manager/instance_options.cc
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
        sql/slave.cc
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
        sql/sp_head.cc
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
        sql/sp_head.h
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
        sql/sp_pcontext.cc
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
        sql/sp_pcontext.h
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
        sql/sql_select.cc
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
        sql/sql_yacc.yy
      Bug#25058 ignored return codes in memory allocation functions
          out-of-memory errors handled
      d445b215
  31. 10 Nov, 2008 1 commit
  32. 23 Oct, 2008 1 commit
  33. 10 Oct, 2008 1 commit
    • Mattias Jonsson's avatar
      Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work · c6115db4
      Mattias Jonsson authored
      on non-partitioned table
      
      Problem was that partitioning specific commands was accepted
      for non partitioned tables and treated like
      ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE, after bug-20129 was fixed,
      which changed the code path from mysql_alter_table to
      mysql_admin_table.
      
      Solution was to check if the table was partitioned before
      trying to execute the admin command
      
      mysql-test/r/partition_mgm_err.result:
        Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
        on non-partitioned table
        
        Updated test result
      mysql-test/t/partition_mgm_err.test:
        Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
        on non-partitioned table
        
        Updated test case
      sql/ha_partition.cc:
        Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
        on non-partitioned table
        
        Simplified the code by using ALTER_ADMIN_PARTITION for all
        commands that go through mysql_admin_tables and is set
        for partitioning specific commands that.
      sql/ha_partition.h:
        Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
        on non-partitioned table
        
        Simplified the code by using ALTER_ADMIN_PARTITION for all
        commands that go through mysql_admin_tables and is set
        for partitioning specific commands that.
      sql/sql_lex.h:
        Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
        on non-partitioned table
        
        Simplified the code by using ALTER_ADMIN_PARTITION for all
        commands that go through mysql_admin_tables and is set
        for partitioning specific commands that.
        
        Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
        added ALTER_ADMIN_PARTITION instead.
      sql/sql_partition.cc:
        Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
        on non-partitioned table
        
        Simplified the code by using ALTER_ADMIN_PARTITION for all
        commands that go through mysql_admin_tables and is set
        for partitioning specific commands that.
        
        Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
        added ALTER_ADMIN_PARTITION instead.
      sql/sql_table.cc:
        Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
        on non-partitioned table
        
        Give error and return if trying partitioning admin command
        on non partitioned table.
        
        Simplified the code by using ALTER_ADMIN_PARTITION for all
        commands that go through mysql_admin_tables and is set
        for partitioning specific commands that.
        
        Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
        added ALTER_ADMIN_PARTITION instead.
      sql/sql_yacc.yy:
        Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
        on non-partitioned table
        
        Simplified the code by using ALTER_ADMIN_PARTITION for all
        commands that go through mysql_admin_tables and is set
        for partitioning specific commands that.
        
        Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
        added ALTER_ADMIN_PARTITION instead.
      c6115db4
  34. 02 Oct, 2008 1 commit
    • Sergey Glukhov's avatar
      Bug#35924 DEFINER should be stored 'quoted' in I_S · d51e2c07
      Sergey Glukhov authored
      The '@' symbol can not be used in the host name according to rfc952.
      The fix:
      added function check_host_name(LEX_STRING *str)
      which checks that all symbols in host name string are valid and
      host name length is not more than max host name length
      (just moved check_string_length() function from the parser into check_host_name()).
      
      
      mysql-test/r/create.result:
        test result
      mysql-test/t/create.test:
        test case
      sql/mysql_priv.h:
        added function check_host_name(LEX_STRING *str)
      sql/sql_parse.cc:
        added function check_host_name(LEX_STRING *str)
        which checks that all symbols in host name string are valid and
        host name length is not more than max host name length(HOSTNAME_LENGTH).
      sql/sql_yacc.yy:
        using newly added function check_host_name()
      d51e2c07