1. 12 May, 2011 10 commits
    • unknown's avatar
      BUG#12549572 : CMake file does not include gcov option · d25b5b68
      unknown authored
      This patch inserts an 'ENABLE_GCOV' option for enabling gcov compilation
      on Linux machines. It modifies the CMakeLists.txt setting this option
      to 'OFF' by default.
      
      Note: The option requires a debug build. For example, 
            -DCMAKE_BUILD_TYPE:string="Debug" 
      d25b5b68
    • Jon Olav Hauglid's avatar
      Bug#12346411 SQL/LOG.CC:6509: ASSERTION `PREPARED_XIDS > 0' FAILED · e9b8feef
      Jon Olav Hauglid authored
      This assert could be triggered during two phase commit if binary
      log was used as transaction coordinator log. The triggered assert
      checks that the same number of transaction IDs are processed in
      the prepare and commit phases.
      
      The reason it was triggered, was that the transaction consisted
      of an INSERT/UPDATE IGNORE that had an ignorable error. Since it
      had an error, no row log events were made and therefore
      prepared_xids was 0. However, since it was an IGNORE statement,
      the statement started a read/write statement transaction, committed
      it and completed successfully.
      
      This patch fixes the problem by adjusting the assert to take
      this possibility into account.
      
      Test case added to binlog.binlog_innodb_row.test.
      e9b8feef
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · b677cadd
      Tatjana Azundris Nuernberg authored
      b677cadd
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · 30265fd1
      Tatjana Azundris Nuernberg authored
      30265fd1
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · c2257fc5
      Tatjana Azundris Nuernberg authored
      c2257fc5
    • Tatjana Azundris Nuernberg's avatar
      Bug#11902767/Bug#60580: Statement improperly replicated crashes slave SQL thread · 5047a638
      Tatjana Azundris Nuernberg authored
      If LOAD DATA INFILE featured a SET clause, the name=value pairs
      would be regenerated using item::print. Unfortunately, that code
      is mostly optimized for EXPLAIN EXTENDED output and such, and can
      not be relied on to return valid SQL.
      
      We now name each value its original, user-supplied form and use
      that to create LOAD DATA INFILE statements for statement-based
      replication.
      
      mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
        minor change in syntactic sugar
      mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
        add test case
      mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
        add test case
      sql/sql_load.cc:
        Do not try to item::print values in LOAD DATA INFILE's
        SET clause; they might not even be valid SQL at this
        point. Use our saved version instead.
      sql/sql_yacc.yy:
        If LOAD DATA INFILE has SET name=val clauses, tag the
        individual val-parts with the user's version so we can
        later replicate that, rather than the smashed pieces
        we'd get from item::print once the optimizer's through
        with our poor values.
      5047a638
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · 280dce48
      Tatjana Azundris Nuernberg authored
      280dce48
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · d439f959
      Tatjana Azundris Nuernberg authored
      d439f959
    • Tatjana Azundris Nuernberg's avatar
      e0c0bf32
    • Tatjana Azundris Nuernberg's avatar
      9990ab90
  2. 11 May, 2011 7 commits
    • Luis Soares's avatar
      BUG#12416700 · f38dff98
      Luis Soares authored
      Automerged bzr bundle from bug report into latest mysql-5.5.
      f38dff98
    • Magnus Blåudd's avatar
      Merge bug 12384993 · d4f1d04f
      Magnus Blåudd authored
      d4f1d04f
    • Alexander Nozdrin's avatar
      Ignore auto-generated files. · 40de2831
      Alexander Nozdrin authored
      40de2831
    • Georgi Kodinov's avatar
      merge from mysql-5.5 · ecfbdbd7
      Georgi Kodinov authored
      ecfbdbd7
    • MySQL Build Team's avatar
      Cloning of the 5.5.13 release from Mysql-5.5, · 9337a330
      MySQL Build Team authored
      increase the version number by two
      9337a330
    • Georgi Kodinov's avatar
      Bug #11744875: 4082: integer lengths cause truncation with distinct concat · 5a2ccea2
      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.
      5a2ccea2
    • Magnus Blåudd's avatar
      Bug#12384993 EXTRA/RPL_TEST/CHECK_TYPE.INC NEED SUPPORT FOR SPECIFIC ENGINE · 46c08b94
      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"
      46c08b94
  3. 10 May, 2011 4 commits
  4. 09 May, 2011 3 commits
    • Serge Kozlov's avatar
      automerge 5.1->5.5 · 724cc400
      Serge Kozlov authored
      724cc400
    • Serge Kozlov's avatar
      WL#5867 · 79e4b561
      Serge Kozlov authored
      Replaced the error code by error name
      79e4b561
    • Alexander Nozdrin's avatar
      Patch for Bug#12362125 (SP INOUT HANDLING IS BROKEN FOR TEXT TYPE). · 8f795799
      Alexander Nozdrin authored
      Attempts to assign value to a table column from trigger by using
      NEW.column_name pseudo-variable might result in garbled data.
      That happened when:
        - the column had a BLOB-based type (e.g. TEXT)
          and
        - the value being assigned was retrieved from stored routine variable
          of the same type.
      
      The problem was that BLOB values were not copied correctly in this
      case. Instead of doing a copy of a real value, the value's representation
      in record buffer was copied. This representation is essentially a
      pointer to a buffer associated with the virtual table for routine
      variables where the real value is stored. Since this buffer got
      freed once trigger was left or could have changed its contents when
      new value was assigned to corresponding routine variable such a shallow
      copying resulted in garbled data in NEW.colum_name column.
      
      It worked in 5.1 due to a subtle bug in create_virtual_tmp_table():
        - in 5.1 create_virtual_tmp_table() returned a table which
          had db_low_byte_first == false.
        - in 5.5 and up create_virtual_tmp_table() returns a table which
          has db_low_byte_first == true.
      Actually, db_low_byte_first == false only for ISAM storage engine,
      which was deprecated and removed in 5.0.
      
      Having db_low_byte_first == false led to getting false in the
      complex condition for the 2nd "if" in field_conv(), which in turn
      led to copy-blob-behavior as a fall-back strategy:
        - to->table->s->db_low_byte_first was true (correct value)
        - from->table->s->db_low_byte_first was false (incorrect value)
      
      In 5.5 and up that condition is true, which means blob-values are
      not copied.
      8f795799
  5. 06 May, 2011 8 commits
    • Alexander Nozdrin's avatar
      Patch for Bug#12374486 - SEVERE MEMORY LEAK IN PREPARED STATEMENTS · 32a41e5a
      Alexander Nozdrin authored
      THAT CALL STORED PROCEDURES.
      
      The bug was introduced by WL#4435. The problem was that if a stored
      procedure generated a few result sets with different set of columns,
      a new memory would be allocated after every EXECUTE for every
      result set.
      
      The fix is to introduce a new memory root in scope of MYSQL_STMT,
      and to store result-set metadata in that memory root.
      32a41e5a
    • Alexander Nozdrin's avatar
      Patch for Bug#11848763 / 60025 · acbe8238
      Alexander Nozdrin authored
      (SUBSTRING inside a stored function works too slow).
      
      The user-visible problem was that the server started to consume memory if a
      stored-routine of some sort is executed subsequently. The memory was freed
      only after the corresponding connection was closed.
      
      Technically, the problem was that the memory needed for temporary string
      conversions was allocated on the connection ("persistent") memory root,
      instead of statement one.
      
      The root cause of this problem was the incorrect patch for Bug 55744.
      That patch wrongly fixed a crash in prepared-statement-mode introduced by
      another patch. The patch for Bug 55744 used wrong condition to check if
      prepared statement mode is active (or whether the connection-scoped or
      statement-scoped memory root should be used). The thing is that for
      prepared statements such conversions should be done in the connection
      memory root, so that that the transformations of item-tree were correctly
      remembered in the PREPARE-phase.
      
      The fix is to use proper condition to detect prepared-statement-mode and
      use proper memory root.
      acbe8238
    • Alexander Nozdrin's avatar
      Preliminary patch for Bug#11848763 / 60025 · 52efe3e0
      Alexander Nozdrin authored
      (SUBSTRING inside a stored function works too slow).
      
      Background:
        - THD classes derives from Query_arena, thus inherits the 'state'
          attribute and related operations (is_stmt_prepare() & co).
      
        - Although these operations are available in THD, they must not
          be used. THD has its own attribute to point to the active
          Query_arena -- stmt_arena.
      
        - So, instead of using thd->is_stmt_prepare(),
          thd->stmt_arena->is_stmt_prepare() must be used. This was the root
          cause of Bug 60025.
      
      This patch enforces the proper way of calling those operations.
      is_stmt_prepare() & co are declared as private operations
      in THD (thus, they are hidden from being called on THD instance).
      
      The patch tries to minimize changes in 5.5.
      52efe3e0
    • Magnus Blåudd's avatar
      Add --with-debug=full support to BUILD/* scripts, this option has been lost · 167d2896
      Magnus Blåudd authored
      between 5.1 and 5.5, it's purpose is to set the compiler flags in a way that
      does not optimize away the call stack(i.e don't use any -OX flags at all)
      167d2896
    • Magnus Blåudd's avatar
      Merge in patch for bug 12380149 · 5b141170
      Magnus Blåudd authored
      5b141170
    • Sunanda Menon's avatar
      Merge from mysql-5.0.93-release · 68fac74b
      Sunanda Menon authored
      68fac74b
    • unknown's avatar
      Merge from mysql-5.5.12-release · db4c6f56
      unknown authored
      db4c6f56
    • Karen Langford's avatar
      Merge from mysql-5.1.57-release · 83f19ef4
      Karen Langford authored
      83f19ef4
  6. 05 May, 2011 7 commits
    • Luis Soares's avatar
      BUG#12354268 · 6875f4df
      Luis Soares authored
      Automerge from mysql-5.1 into mysql-5.5.
      6875f4df
    • Luis Soares's avatar
      BUG#12354268 · 902e64da
      Luis Soares authored
      Automerged bzr bundle from bug report:
      luis.soares@oracle.com-20110505224815-6ob90n7suxsoizvs.bundle
      902e64da
    • Luis Soares's avatar
      BUG#11762616: BUG#55229: 'POSTION' · a85150c3
      Luis Soares authored
      Manual merge from mysql-5.1 into mysql-5.5.
      
      Conflicts
      =========
      Text conflict in mysql-test/suite/rpl/t/rpl_row_until.test
      Text conflict in sql/handler.h
      Text conflict in storage/archive/ha_archive.cc
      a85150c3
    • Luis Soares's avatar
      BUG#11762616: BUG#55229: 'POSTION' · 8a08fd43
      Luis Soares authored
                  
      Fix for all "postion" in Oracle files (s/postion/position). 
      Updated the copyright notices where needed.
      8a08fd43
    • Luis Soares's avatar
      BUG#12425924 · f2fa3015
      Luis Soares authored
      Automerging cset into latest mysql-5.5.
      f2fa3015
    • Luis Soares's avatar
      BUG#12354268: MYSQLBINLOG --BASE64-OUTPUT=DECODE-ROWS DOES NOT · 0efb452e
      Luis Soares authored
      WORK WITH --START-POSITION
            
      If setting --start-position to start after the FD event, mysqlbinlog
      will output an error stating that it has not found an FD event.
      However, its not that mysqlbinlog does not find it but rather that it
      does not processes it in the regular way (i.e., it does not print it).
      Given that one is using --base64-output=DECODE-ROWS then not printing
      it is actually fine.
            
      To fix this, we make mysqlbinlog not to complain when it has not
      printed the FD event, is outputing in base64, but is decoding the
      rows.
      0efb452e
    • Tatiana Azundris Nurnberg's avatar
  7. 04 May, 2011 1 commit
    • Luis Soares's avatar
      BUG#12425924: SEMI-SYNC RELATED VALGRIND WARNINGS IN 5.5 CODEBASE · df07595d
      Luis Soares authored
      There are a couple of valgrind warnings in 5.5 codebase, that
      do not exist in 5.6. The root cause was found and fixed in 5.6
      codebase before (BUG#11763880 and BUG#11763879), but the patches
      were only pushed to 5.6.
      
      To fix it in 5.5, we cherrypicked the csets from 5.6 and merged 
      them in 5.5.
      df07595d