1. 21 May, 2011 1 commit
  2. 16 May, 2011 5 commits
    • Guilhem Bichot's avatar
      Fix for BUG#11755168 '46895: test "outfile_loaddata" fails (reproducible)'. · 25221ccc
      Guilhem Bichot authored
      In sql_class.cc, 'row_count', of type 'ha_rows', was used as last argument for
      ER_TRUNCATED_WRONG_VALUE_FOR_FIELD which is
      "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld".
      So 'ha_rows' was used as 'long'.
      On SPARC32 Solaris builds, 'long' is 4 bytes and 'ha_rows' is 'longlong' i.e. 8 bytes.
      So the printf-like code was reading only the first 4 bytes.
      Because the CPU is big-endian, 1LL is 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01
      so the first four bytes yield 0. So the warning message had "row 0" instead of
      "row 1" in test outfile_loaddata.test:
      -Warning	1366	Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1
      +Warning	1366	Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 0
      
      All error-messaging functions which internally invoke some printf-life function
      are potential candidate for such mistakes.
      One apparently easy way to catch such mistakes is to use
      ATTRIBUTE_FORMAT (from my_attribute.h).
      But this works only when call site has both:
      a) the format as a string literal
      b) the types of arguments.
      So:
        func(ER(ER_BLAH), 10);
      will silently not be checked, because ER(ER_BLAH) is not known at
      compile time (it is known at run-time, and depends on the chosen
      language).
      And
        func("%s", a va_list argument);
      has the same problem, as the *real* type of arguments is not
      known at this site at compile time (it's known in some caller).
      Moreover,
        func(ER(ER_BLAH));
      though possibly correct (if ER(ER_BLAH) has no '%' markers), will not
      compile (gcc says "error: format not a string literal and no format
      arguments").
      
      Consequences:
      1) ATTRIBUTE_FORMAT is here added only to functions which in practice
      take "string literal" formats: "my_error_reporter" and "print_admin_msg".
      2) it cannot be added to the other functions: my_error(),
      push_warning_printf(), Table_check_intact::report_error(),
      general_log_print().
      
      To do a one-time check of functions listed in (2), the following
      "static code analysis" has been done:
      1) replace
        my_error(ER_xxx, arguments for substitution in format)
      with the equivalent
        my_printf_error(ER_xxx,ER(ER_xxx), arguments for substitution in
      format),
      so that we have ER(ER_xxx) and the arguments *in the same call site*
      2) add ATTRIBUTE_FORMAT to push_warning_printf(),
      Table_check_intact::report_error(), general_log_print()
      3) replace ER(xxx) with the hard-coded English text found in
      errmsg.txt (like: ER(ER_UNKNOWN_ERROR) is replaced with
      "Unknown error"), so that a call site has the format as string literal
      4) this way, ATTRIBUTE_FORMAT can effectively do its job
      5) compile, fix errors detected by ATTRIBUTE_FORMAT
      6) revert steps 1-2-3.
      The present patch has no compiler error when submitted again to the
      static code analysis above.
      It cannot catch all problems though: see Field::set_warning(), in
      which a call to push_warning_printf() has a variable error
      (thus, not replacable by a string literal); I checked set_warning() calls
      by hand though.
      
      See also WL 5883 for one proposal to avoid such bugs from appearing
      again in the future.
      
      The issues fixed in the patch are:
      a) mismatch in types (like 'int' passed to '%ld')
      b) more arguments passed than specified in the format.
      This patch resolves mismatches by changing the type/number of arguments,
      not by changing error messages of sql/share/errmsg.txt. The latter would be wrong,
      per the following old rule: errmsg.txt must be as stable as possible; no insertions
      or deletions of messages, no changes of type or number of printf-like format specifiers,
      are allowed, as long as the change impacts a message already released in a GA version.
      If this rule is not followed:
      - Connectors, which use error message numbers, will be confused (by insertions/deletions
      of messages)
      - using errmsg.sys of MySQL 5.1.n with mysqld of MySQL 5.1.(n+1)
      could produce wrong messages or crash; such usage can easily happen if
      installing 5.1.(n+1) while /etc/my.cnf still has --language=/path/to/5.1.n/xxx;
      or if copying mysqld from 5.1.(n+1) into a 5.1.n installation.
      When fixing b), I have verified that the superfluous arguments were not used in the format
      in the first 5.1 GA (5.1.30 'bteam@astra04-20081114162938-z8mctjp6st27uobm').
      Had they been used, then passing them today, even if the message doesn't use them
      anymore, would have been necessary, as explained above.
      25221ccc
    • Kent Boortz's avatar
      - Changes needed to use newer WiX version (Bug#60029) · de91727e
      Kent Boortz authored
      - Added an alterantive search path for WiX components
      - Added a custom welcome dialog to include the copyright line (Bug#59805 and Bug#59512)
      - Excluded some binaries to make package smaller, in effect makig the
        "essentials" package obsolete
      - Added a bit more error checking when running the WiX tools
      
      WiX XML changes done by Johannes Taxacher
      de91727e
    • Andrei Elkin's avatar
      Bug 12535301 - SYS_VARS.RPL_INIT_SLAVE_FUNC MISMATCHES IN DAILY-5.5 · 68e6a24d
      Andrei Elkin authored
      notifying PB2 the test fails through mysql-test/collections/default.experimental.
      68e6a24d
    • Alexander Nozdrin's avatar
      Ignore auto-generated files. · 19523cae
      Alexander Nozdrin authored
      19523cae
    • Alexander Nozdrin's avatar
      A patch for Bug#12429877: QUERY_TABLES_LIST::SROUTINES IS NOT · da96e915
      Alexander Nozdrin authored
      FREED IN FLUSH_READ_LOCK (VALGRIND WARNING).
      
      The problem was that under some circustances the memory allocated
      for Query_tables_list::sroutines was not freed properly.
      The cause of this problem was the absence of
      LEX::restore_backup_query_tables_list() call in one of the branches
      in mysql_table_grant() function.
      da96e915
  3. 14 May, 2011 2 commits
  4. 13 May, 2011 4 commits
  5. 12 May, 2011 14 commits
  6. 11 May, 2011 7 commits
    • Luis Soares's avatar
      BUG#12416700 · efc20dca
      Luis Soares authored
      Automerged bzr bundle from bug report into latest mysql-5.5.
      efc20dca
    • Magnus Blåudd's avatar
      Merge bug 12384993 · d8a9b36b
      Magnus Blåudd authored
      d8a9b36b
    • Alexander Nozdrin's avatar
      Ignore auto-generated files. · cbf455cf
      Alexander Nozdrin authored
      cbf455cf
    • Georgi Kodinov's avatar
      merge from mysql-5.5 · 621dc095
      Georgi Kodinov authored
      621dc095
    • MySQL Build Team's avatar
      Cloning of the 5.5.13 release from Mysql-5.5, · 94f42465
      MySQL Build Team authored
      increase the version number by two
      94f42465
    • Georgi Kodinov's avatar
      Bug #11744875: 4082: integer lengths cause truncation with distinct concat · a914a321
      Georgi Kodinov authored
      and innodb
      
      The 5.5 version of the patch.
      
      The server doesn't restrict the data that can be inserted into integer columns 
      with explicitly specified length that's smaller than what the type can handle,
      e.g. 1234 can be inserted into an INT(2) column just fine.
      Thus, when calcualting the maximum width of expressions involving such 
      restricted integer columns we need to use the implicit maximum width of 
      the field instead of the explicitly speficied one.
      Fixed the server to use the implicit maximum in such cases and made sure 
      the implicit maximum is addjusted the same way as the explicit one wrt
      signedness.
      
      Fixed several test case results (ctype_*.result, metadata.result and 
      type_ranges.result) to reflect the extended column widths.
      
      Added a regression test case in distinct.test.
      
      Note : this is the behavior preserving fix that makes 5.5 behave as 5.1 and 
      earlier. In the mysql trunk we'll add a insert time check for the explict 
      maximum size.
      a914a321
    • Magnus Blåudd's avatar
      Bug#12384993 EXTRA/RPL_TEST/CHECK_TYPE.INC NEED SUPPORT FOR SPECIFIC ENGINE · f8e86f50
      Magnus Blåudd authored
       - add support for choosing the engine of test
          table(t1) with $engine_type
       - add primary key to the test table(t1) to support
         replication of BLOB/TEXT (also with ENGINE=ndb)
       - change the suppression since the warning printed to error log
        now says "Column 1"
      f8e86f50
  7. 10 May, 2011 4 commits
  8. 09 May, 2011 3 commits