~ubuntu-branches/ubuntu/raring/mysql-5.5/raring-proposed

« back to all changes in this revision

Viewing changes to storage/innobase/handler/ha_innodb.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-01-16 08:29:25 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130116082925-znscu5xswxo6pmw2
Tags: 5.5.29-0ubuntu1
* SECURITY UPDATE: Update to 5.5.29 to fix security issues (LP: #1100264)
  - http://www.oracle.com/technetwork/topics/security/cpujan2013-1515902.html
* debian/patches/CVE-2012-5611.patch: removed, included upstream.
* debian/patches/38_scripts__mysqld_safe.sh__signals.patch: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1008
1008
        case DB_TABLE_NOT_FOUND:
1009
1009
                return(HA_ERR_NO_SUCH_TABLE);
1010
1010
 
1011
 
        case DB_TOO_BIG_RECORD:
1012
 
                my_error(ER_TOO_BIG_ROWSIZE, MYF(0),
1013
 
                         page_get_free_space_of_empty(flags
1014
 
                                                      & DICT_TF_COMPACT) / 2);
 
1011
        case DB_TOO_BIG_RECORD: {
 
1012
                /* If prefix is true then a 768-byte prefix is stored
 
1013
                locally for BLOB fields. Refer to dict_table_get_format() */
 
1014
                bool prefix = ((flags & DICT_TF_FORMAT_MASK)
 
1015
                               >> DICT_TF_FORMAT_SHIFT) < UNIV_FORMAT_B;
 
1016
                my_printf_error(ER_TOO_BIG_ROWSIZE,
 
1017
                        "Row size too large (> %lu). Changing some columns "
 
1018
                        "to TEXT or BLOB %smay help. In current row "
 
1019
                        "format, BLOB prefix of %d bytes is stored inline.",
 
1020
                        MYF(0),
 
1021
                        page_get_free_space_of_empty(flags &
 
1022
                                DICT_TF_COMPACT) / 2,
 
1023
                        prefix ? "or using ROW_FORMAT=DYNAMIC "
 
1024
                        "or ROW_FORMAT=COMPRESSED ": "",
 
1025
                        prefix ? DICT_MAX_FIXED_COL_LEN : 0);
1015
1026
                return(HA_ERR_TO_BIG_ROW);
 
1027
        }
1016
1028
 
1017
1029
        case DB_TOO_BIG_INDEX_COL:
1018
1030
                my_error(ER_INDEX_COLUMN_TOO_LONG, MYF(0),
1473
1485
        ut_a(block > 0);
1474
1486
        ut_a(max_value > 0);
1475
1487
 
1476
 
        /* Current value should never be greater than the maximum. */
1477
 
        ut_a(current <= max_value);
1478
 
 
1479
1488
        /* According to MySQL documentation, if the offset is greater than
1480
1489
        the step then the offset is ignored. */
1481
1490
        if (offset > block) {
1482
1491
                offset = 0;
1483
1492
        }
1484
1493
 
1485
 
        /* Check for overflow. */
 
1494
        /* Check for overflow. Current can be > max_value if the value is
 
1495
        in reality a negative value.The visual studio compilers converts
 
1496
        large double values automatically into unsigned long long datatype
 
1497
        maximum value */
1486
1498
        if (block >= max_value
1487
1499
            || offset > max_value
1488
 
            || current == max_value
 
1500
            || current >= max_value
1489
1501
            || max_value - offset <= offset) {
1490
1502
 
1491
1503
                next_value = max_value;
6098
6110
                                "InnoDB: Index %s for table %s is"
6099
6111
                                " marked as corrupted",
6100
6112
                                index_name, table_name);
6101
 
                        DBUG_RETURN(1);
 
6113
                        DBUG_RETURN(HA_ERR_INDEX_CORRUPT);
6102
6114
                } else {
6103
6115
                        push_warning_printf(
6104
6116
                                user_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
6109
6121
 
6110
6122
                /* The caller seems to ignore this.  Thus, we must check
6111
6123
                this again in row_search_for_mysql(). */
6112
 
                DBUG_RETURN(2);
 
6124
                DBUG_RETURN(HA_ERR_TABLE_DEF_CHANGED);
6113
6125
        }
6114
6126
 
6115
6127
        ut_a(prebuilt->search_tuple != 0);
11648
11660
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
11649
11661
static MYSQL_SYSVAR_UINT(change_buffering_debug, ibuf_debug,
11650
11662
  PLUGIN_VAR_RQCMDARG,
11651
 
  "Debug flags for InnoDB change buffering (0=none)",
11652
 
  NULL, NULL, 0, 0, 1, 0);
 
11663
  "Debug flags for InnoDB change buffering (0=none, 2=crash at merge)",
 
11664
  NULL, NULL, 0, 0, 2, 0);
11653
11665
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
11654
11666
 
11655
11667
static MYSQL_SYSVAR_BOOL(random_read_ahead, srv_random_read_ahead,