~clint-fewbar/ubuntu/maverick/mysql-5.1/increase-killtimeout

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/row/row0mysql.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.2.1 upstream) (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100621153105-lv81twvjdgzvzrre
Tags: 5.1.48-1ubuntu1
* Merge from debian unstable, remaining changes:
  + debian/control:
     * Update maintainer according to spec.
     * Move section from "misc" to "database".
     * Added libmysqlclient16-dev an empty transitional package. 
     * Added mysql-client-core-5.1 package.
     * Suggest mailx for mysql-server-5.1
     * Add mysql-testsuite package so you can run the testsuite seperately.
  + debian/additions/my.cnf:
    * Remove language options. Error message files are located in a different directory in Mysql
      5.0. Setting the language option to use /usr/share/mysql/english breaks Mysql 5.0. Both 5.0
      and 5.1 use a different value that works. (LP: #316974)
  + Add apparmor profile:
    + debian/apparmor-profile: apparmor-profile
    + debian/rules, debian/mysql-server-5.1.files: install apparmor profile
    + debian/mysql-server-5.1.dirs: add etc/apparmor.d/fore-complain
    + debian/mysql-server-5.1.postrm: remove symlink in force-complain/ on purge.
    + debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    + debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    + debian/mysql-server-5.1.postinst: reload apparmor profiles
  * Convert the package from sysvinit to upstart:
    + debian/mysql-server-5.1.mysql.upstart: Add upstart script.
    + debian/mysql-server-5.1.mysql.init: Dropped, unused now with upstart.
    + debian/additions/mysqld_safe_syslog.cnf: Dropped, unused now with upstart.
    + debian/additons/my.cnf: Remove pid declaration and setup error logging to /var/log/mysql since
      we're not piping anything around logger anymore.
    + debian/rules, debian/mysql-server-5.1.logcheck.ignore.{paranoid,worstation},
      debian/mysql-server-5.1.logcheck.ignore.server: : Remove references to mysqld_safe
    + debian/patches/38_scripts_mysqld_safe.sh_signals.dpatch: Dropped
  * Added -fno-strict-aliasing to CFLAGS to get around mysql testsuite build failures.
  * Add Apport hook (LP: #354188):
    + debian/mysql-server-5.1.py: apport package hook
    + debian/rules: Make it installable
  * debian/mysql-server-5.1.mysql-server.logrotate: Check to see if mysql is running before
    running logrotate. (LP: #513135)
  * Make the testsuite installable. (LP: #530752)
    + debian/mysql-server-5.1.files, debian/rules: install apport package hook
  * debian/mysql-server-5.1.preinst: Set mysql user's home directory
    to /nonexistent to protect against having the /var/lib/mysql
    user-writeable. If an attacker can trick mysqld into creating
    dot files in the home directory, he could do .rhost-like attacks
    on the system. (LP: #293258)
  * debian/control: mysql-client-5.1 should depend on mysql-core-client-5.1.
    (LP: #590952) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
522
522
        case DB_CANNOT_ADD_CONSTRAINT:
523
523
        case DB_TOO_MANY_CONCURRENT_TRXS:
524
524
        case DB_OUT_OF_FILE_SPACE:
 
525
        case DB_INTERRUPTED:
525
526
                if (savept) {
526
527
                        /* Roll back the latest, possibly incomplete
527
528
                        insertion or update */
1645
1646
}
1646
1647
 
1647
1648
/*********************************************************************//**
1648
 
Calculates the key number used inside MySQL for an Innobase index. We have
1649
 
to take into account if we generated a default clustered index for the table
1650
 
@return the key number used inside MySQL */
1651
 
UNIV_INTERN
1652
 
ulint
1653
 
row_get_mysql_key_number_for_index(
1654
 
/*===============================*/
1655
 
        const dict_index_t*     index)  /*!< in: index */
1656
 
{
1657
 
        const dict_index_t*     ind;
1658
 
        ulint                   i;
1659
 
 
1660
 
        ut_a(index);
1661
 
 
1662
 
        i = 0;
1663
 
        ind = dict_table_get_first_index(index->table);
1664
 
 
1665
 
        while (index != ind) {
1666
 
                ind = dict_table_get_next_index(ind);
1667
 
                i++;
1668
 
        }
1669
 
 
1670
 
        if (row_table_got_default_clust_index(index->table)) {
1671
 
                ut_a(i > 0);
1672
 
                i--;
1673
 
        }
1674
 
 
1675
 
        return(i);
1676
 
}
1677
 
 
1678
 
/*********************************************************************//**
1679
1649
Locks the data dictionary in shared mode from modifications, for performing
1680
1650
foreign key check, rollback, or other operation invisible to MySQL. */
1681
1651
UNIV_INTERN
2059
2029
                                FOREIGN KEY (a, b) REFERENCES table2(c, d),
2060
2030
                                        table2 can be written also with the
2061
2031
                                        database name before it: test.table2 */
 
2032
        size_t          sql_length,     /*!< in: length of sql_string */
2062
2033
        const char*     name,           /*!< in: table full name in the
2063
2034
                                        normalized form
2064
2035
                                        database_name/table_name */
2080
2051
 
2081
2052
        trx_set_dict_operation(trx, TRX_DICT_OP_TABLE);
2082
2053
 
2083
 
        err = dict_create_foreign_constraints(trx, sql_string, name,
2084
 
                                              reject_fks);
 
2054
        err = dict_create_foreign_constraints(trx, sql_string, sql_length,
 
2055
                                              name, reject_fks);
2085
2056
        if (err == DB_SUCCESS) {
2086
2057
                /* Check that also referencing constraints are ok */
2087
2058
                err = dict_load_foreigns(name, TRUE);
2425
2396
                goto funct_exit;
2426
2397
        }
2427
2398
 
2428
 
        new_id = dict_hdr_get_new_id(DICT_HDR_TABLE_ID);
 
2399
        dict_hdr_get_new_id(&new_id, NULL, NULL);
2429
2400
 
2430
2401
        /* Remove all locks except the table-level S and X locks. */
2431
2402
        lock_remove_all_on_table(table, FALSE);
2787
2758
 
2788
2759
                        dict_index_t*   index;
2789
2760
 
2790
 
                        space = 0;
 
2761
                        dict_hdr_get_new_id(NULL, NULL, &space);
2791
2762
 
2792
 
                        if (fil_create_new_single_table_tablespace(
2793
 
                                    &space, table->name, FALSE, flags,
 
2763
                        if (space == ULINT_UNDEFINED
 
2764
                            || fil_create_new_single_table_tablespace(
 
2765
                                    space, table->name, FALSE, flags,
2794
2766
                                    FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
2795
2767
                                ut_print_timestamp(stderr);
2796
2768
                                fprintf(stderr,
2895
2867
 
2896
2868
        mem_heap_free(heap);
2897
2869
 
2898
 
        new_id = dict_hdr_get_new_id(DICT_HDR_TABLE_ID);
 
2870
        dict_hdr_get_new_id(&new_id, NULL, NULL);
2899
2871
 
2900
2872
        info = pars_info_create();
2901
2873