~ubuntu-branches/ubuntu/utopic/mariadb-5.5/utopic-security

« back to all changes in this revision

Viewing changes to storage/tokudb/ha_tokudb_update.cc

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2014-04-17 20:55:22 UTC
  • mfrom: (2.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140417205522-wof4l36nxhlkn89m
* New upstream release, fixing the following security issues:
  * Corresponding MariaDB CVEs for Oracle SPU April 2014 (Closes: #745330)
    - CVE-2014-0384 
    - CVE-2014-2419 
    - CVE-2014-2430 
    - CVE-2014-2431 
    - CVE-2014-2432 
    - CVE-2014-2436 
    - CVE-2014-2438 
    - CVE-2014-2440
* Re-enabled TokuDB with "if arch amd64" in d/rules
* Applied patch to log init output better
  (Closes https://mariadb.atlassian.net/browse/MDEV-5957)

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
// of where conditions (conds).  The function returns 0 if the update is handled in the storage engine.
253
253
// Otherwise, an error is returned.
254
254
int ha_tokudb::fast_update(THD *thd, List<Item> &update_fields, List<Item> &update_values, Item *conds) {
255
 
    TOKUDB_DBUG_ENTER("ha_tokudb::fast_update");
 
255
    TOKUDB_HANDLER_DBUG_ENTER("");
256
256
    int error = 0;
257
257
 
258
258
    if (tokudb_debug & TOKUDB_DEBUG_UPSERT) {
287
287
    }
288
288
 
289
289
return_error:
290
 
    TOKUDB_DBUG_RETURN(error);
 
290
    TOKUDB_HANDLER_DBUG_RETURN(error);
291
291
}
292
292
 
293
293
// Return true if an expression is a simple int expression or a simple function of +- int expression.
549
549
#if 50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699
550
550
    return thd->is_strict_mode();
551
551
#else
552
 
    return test(thd->variables.sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES));
 
552
    return tokudb_test(thd->variables.sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES));
553
553
#endif
554
554
}
555
555
 
837
837
 
838
838
    rw_rdlock(&share->num_DBs_lock);
839
839
 
840
 
    if (share->num_DBs > table->s->keys + test(hidden_primary_key)) { // hot index in progress
 
840
    if (share->num_DBs > table->s->keys + tokudb_test(hidden_primary_key)) { // hot index in progress
841
841
        error = ENOTSUP; // run on the slow path
842
842
    } else {
843
843
        // send the update message    
856
856
// An upsert consists of a row and a list of update expressions (update_fields[i] = update_values[i]).
857
857
// The function returns 0 if the upsert is handled in the storage engine.  Otherwise, an error code is returned.
858
858
int ha_tokudb::upsert(THD *thd, List<Item> &update_fields, List<Item> &update_values) {
859
 
    TOKUDB_DBUG_ENTER("ha_tokudb::upsert");
 
859
    TOKUDB_HANDLER_DBUG_ENTER("");
860
860
 
861
861
    int error = 0;
862
862
 
890
890
    }
891
891
 
892
892
return_error:
893
 
    TOKUDB_DBUG_RETURN(error);
 
893
    TOKUDB_HANDLER_DBUG_RETURN(error);
894
894
}
895
895
 
896
896
// Check if an upsert can be handled by this storage engine.  Return trus if it can.
990
990
 
991
991
    rw_rdlock(&share->num_DBs_lock);
992
992
 
993
 
    if (share->num_DBs > table->s->keys + test(hidden_primary_key)) { // hot index in progress
 
993
    if (share->num_DBs > table->s->keys + tokudb_test(hidden_primary_key)) { // hot index in progress
994
994
        error = ENOTSUP; // run on the slow path
995
995
    } else {
996
996
        // send the upsert message