1. 21 Feb, 2011 6 commits
    • Magnus Blåudd's avatar
      Merge · 08e4eba4
      Magnus Blåudd authored
      08e4eba4
    • Jon Olav Hauglid's avatar
      Bug #11754461 CANNOT ALTER TABLE WHEN KEY PREFIX TOO LONG · f7a0b45f
      Jon Olav Hauglid authored
      The problem was that doing ALTER TABLE on a table which had a key
      on a TEXT/BLOB column with a prefix longer than the maximum number
      of characteres in this column (as per the character set), by mistake,
      caused an error (Error 1170 - ER_BLOB_KEY_WITHOUT_LENGTH).
      
      This bug not repeatable in 5.5.
      
      This patch adds a regression test to alter_table.test and
      contains no code changes.
      f7a0b45f
    • Magnus Blåudd's avatar
      Remove last traces of HAVE_NDBCLUSTER_DB define - it has not had an effect in... · 4846dac0
      Magnus Blåudd authored
      Remove last traces of HAVE_NDBCLUSTER_DB define - it has not had an effect in a long time and is just confusing.
      At the same time backport the removal of OPT_NDB_CONNECTSTRING and OPT_NDBCLUSTER values from "enum options_client"
      4846dac0
    • Sergey Vojtovich's avatar
      Merge. · 95b4ff00
      Sergey Vojtovich authored
      95b4ff00
    • Nirbhay Choubey's avatar
    • Nirbhay Choubey's avatar
      Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH · 876502d7
      Nirbhay Choubey authored
                     ("-") IN DATABASE NAMES IN ALTER DATABASE.
      
      mysqldump did not quote database name in 'ALTER DATABASE'
      statements in its output. This can further cause a failure
      while loading if database name contains a hyphen '-'.
      
      This happened as, while printing the 'ALTER DATABASE'
      statements, the database name was not quoted.
      
      Fixed by quoting the database name.
      
      
      client/mysqldump.c:
        Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH
                       ("-") IN DATABASE NAMES IN ALTER DATABASE.
        
        Modified the print statement in order to print the quoted
        database name for 'ALTER DATABASE' statements.
      mysql-test/r/mysqldump.result:
        Added a test case for bug#11766310.
      mysql-test/t/mysqldump.test:
        Added a test case for bug#11766310.
      876502d7
  2. 18 Feb, 2011 12 commits
    • Alexander Barkov's avatar
      Merging from 5.1 · b7d30e27
      Alexander Barkov authored
      b7d30e27
    • Alexander Barkov's avatar
      A post-fix for b58036. · e2e6eb8f
      Alexander Barkov authored
      e2e6eb8f
    • Alexander Barkov's avatar
      7a7c9582
    • Alexander Barkov's avatar
      Bug#11765108 (Bug#58036) client utf32, utf16, ucs2 should be disallowed, they crash server · 5f55c232
      Alexander Barkov authored
      A separate fix for 5.1 (as 5.1 and 5.5 have seriously
      differged in the related pieces of the code).
      A patch for 5.5 was approved earlier.
      
      Problem: ucs2 was correctly disallowed in "SET NAMES" only,
      while mysql_real_connect() and mysql_change_user() still allowed
      to use ucs2, which made server crash.
      
      Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user().
      
        @ sql/sql_priv.h
          - changing return type for thd_init_client_charset() to bool,
            to return errors to the caller
      
        @ sql/sql_var.cc
          - using new function
      
        @ sql/sql_connect.cc
          - thd_client_charset_init:
            in case of unsupported client character set send error and return true;
            in case of success return false
          - check_connection:
            Return error if character set initialization failed
      
        @ sql/sql_parse.cc
          - check charset in the very beginnig of the CMD_CHANGE_USER handling code
      
        @ tests/mysql_client_test.c
          - adding tests
      5f55c232
    • Vasil Dimov's avatar
      Merge mysql-5.1 -> mysql-5.5 (empty) · 7dc0bbb2
      Vasil Dimov authored
      7dc0bbb2
    • Vasil Dimov's avatar
      Merge mysql-5.5-innodb -> mysql-5.5 · 6a435e05
      Vasil Dimov authored
      6a435e05
    • Vasil Dimov's avatar
      Merge mysql-5.1-innodb -> mysql-5.1 · 4b7a9247
      Vasil Dimov authored
      4b7a9247
    • Martin Hansson's avatar
      Merge of fix for Bug#11766675. · 4d7042ce
      Martin Hansson authored
      4d7042ce
    • Martin Hansson's avatar
      Bug#11766675 - 59839: Aggregation followed by subquery yields wrong result · 61b25617
      Martin Hansson authored
      The loop that was looping over subqueries' references to outer field used a
      local boolean variable to tell whether the field was grouped or not. But the
      implementor failed to reset the variable after each iteration. Thus a field
      that was not directly aggregated appeared to be.
      
      Fixed by resetting the variable upon each new iteration.
      61b25617
    • Alexander Barkov's avatar
      Bug#11765108 (Bug#58036) client utf32, utf16, ucs2 should be disallowed, they crash server · f4beb929
      Alexander Barkov authored
      Problem: ucs2 was correctly disallowed in "SET NAMES" only,
      while mysql_real_connect() and mysql_change_user() still allowed
      to use ucs2, which made server crash.
      
      Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user().
      
        @ sql/set_var.cc
          Using new function.
      
        @ sql/sql_acl.cc
          - Return error if character set initialization failed
          - Getting rid of pointer aliasing:
            Initialize user_name to NULL, to avoid double free().
      
        @ sql/sql_connect.cc
          - in case of unsupported client character set send error and return true
          - in case of success return false
      
        @ sql/sql_connect.h
          - changing return type for thd_init_client_charset() to bool,
            to return errors to the caller
      
        @ sql/sql_parse.h
          - introducing a new function, to reuse in all places where we need
          to check client character set.
      
        @ tests/mysql_client_test.c
          Adding test
      f4beb929
    • Sergey Vojtovich's avatar
      BUG#11766720 - setting storage engine to null segfaults mysqld · 659ff293
      Sergey Vojtovich authored
      MONTHNAME(0) claims that it is about to return NOT NULL
      value, whereas it actually returns NULL.
      
      As a result storage_engine variable (which cannot be NULL)
      protection was bypassed and NULL value was accepted, causing
      server crash.
      
      Fixed MONTHNAME(0) to report valid NULL flag.
      
      mysql-test/r/func_time.result:
        A test case for BUG#11766720.
      mysql-test/t/func_time.test:
        A test case for BUG#11766720.
      sql/item_timefunc.cc:
        MONTHNAME(0) must report NULL, as opposed to base class
        MONTH(0) which is NOT NULL.
        
        Fixed Item_func_monthname to inherit from Item_str_func
        instead of Item_func_month.
      sql/item_timefunc.h:
        MONTHNAME(0) must report NULL, as opposed to base class
        MONTH(0) which is NOT NULL.
        
        Fixed Item_func_monthname to inherit from Item_str_func
        instead of Item_func_month.
      659ff293
    • Alexander Barkov's avatar
      Bug#60101 COALESCE with cp1251 tables causes [Err] 1267 - Illegal mix of collations · 0db53b19
      Alexander Barkov authored
            
      Problem:
        IF() did not copy collation derivation and repertoire from
        an argument if the opposite argument was NULL:
          IF(cond, res1, NULL)
          IF(cond, NULL, res2)
        only CHARSET_INFO pointer was copied.
        This resulted in illegal mix of collations error.
      
      Fix:
        copy all collation parameters from the non-NULL argument:
        CHARSET_INFO pointer, derivation, repertoire.
      0db53b19
  3. 17 Feb, 2011 15 commits
  4. 16 Feb, 2011 7 commits