mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
manually merged
configure.in: Auto merged client/mysqldump.c: Auto merged innobase/buf/buf0rea.c: Auto merged innobase/dict/dict0load.c: Auto merged innobase/fil/fil0fil.c: Auto merged innobase/include/fil0fil.h: Auto merged innobase/include/row0mysql.h: Auto merged innobase/include/trx0trx.h: Auto merged innobase/os/os0file.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0mysql.c: Auto merged innobase/row/row0sel.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/trx/trx0trx.c: Auto merged libmysqld/lib_sql.cc: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/alter_table.result: Auto merged mysql-test/r/ctype_ucs.result: Auto merged mysql-test/r/func_str.result: Auto merged mysql-test/r/grant.result: Auto merged mysql-test/r/grant_cache.result: Auto merged mysql-test/r/merge.result: Auto merged mysql-test/r/ndb_blob.result: Auto merged mysql-test/r/ps_1general.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/timezone2.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/t/multi_update.test: Auto merged mysql-test/t/mysqldump.test: Auto merged mysql-test/t/subselect.test: Auto merged ndb/src/ndbapi/NdbBlob.cpp: Auto merged ndb/src/ndbapi/NdbConnection.cpp: Auto merged ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged ndb/src/ndbapi/NdbOperationDefine.cpp: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_myisammrg.cc: Auto merged sql/ha_myisammrg.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql-common/client.c: Auto merged sql/sql_table.cc: Auto merged sql/strfunc.cc: Auto merged sql/unireg.cc: Auto merged vio/vio.c: Auto merged vio/viosocket.c: Auto merged
This commit is contained in:
commit
b99bea6704
107 changed files with 1892 additions and 659 deletions
|
|
@ -380,15 +380,15 @@ convert_error_code_to_mysql(
|
|||
|
||||
} else if (error == (int) DB_LOCK_WAIT_TIMEOUT) {
|
||||
|
||||
/* Since we rolled back the whole transaction, we must
|
||||
tell it also to MySQL so that MySQL knows to empty the
|
||||
cached binlog for this transaction */
|
||||
/* Since we rolled back the whole transaction, we must
|
||||
tell it also to MySQL so that MySQL knows to empty the
|
||||
cached binlog for this transaction */
|
||||
|
||||
if (thd) {
|
||||
ha_rollback(thd);
|
||||
}
|
||||
if (thd) {
|
||||
ha_rollback(thd);
|
||||
}
|
||||
|
||||
return(HA_ERR_LOCK_WAIT_TIMEOUT);
|
||||
return(HA_ERR_LOCK_WAIT_TIMEOUT);
|
||||
|
||||
} else if (error == (int) DB_NO_REFERENCED_ROW) {
|
||||
|
||||
|
|
@ -4075,11 +4075,9 @@ ha_innobase::discard_or_import_tablespace(
|
|||
err = row_import_tablespace_for_mysql(dict_table->name, trx);
|
||||
}
|
||||
|
||||
if (err == DB_SUCCESS) {
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
err = convert_error_code_to_mysql(err, NULL);
|
||||
|
||||
DBUG_RETURN(-1);
|
||||
DBUG_RETURN(err);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
@ -5215,19 +5213,6 @@ ha_innobase::external_lock(
|
|||
|
||||
update_thd(thd);
|
||||
|
||||
if (prebuilt->table->ibd_file_missing && !current_thd->tablespace_op) {
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr, " InnoDB error:\n"
|
||||
"MySQL is trying to use a table handle but the .ibd file for\n"
|
||||
"table %s does not exist.\n"
|
||||
"Have you deleted the .ibd file from the database directory under\n"
|
||||
"the MySQL datadir, or have you used DISCARD TABLESPACE?\n"
|
||||
"Look from section 15.1 of http://www.innodb.com/ibman.html\n"
|
||||
"how you can resolve the problem.\n",
|
||||
prebuilt->table->name);
|
||||
DBUG_RETURN(HA_ERR_CRASHED);
|
||||
}
|
||||
|
||||
trx = prebuilt->trx;
|
||||
|
||||
prebuilt->sql_stat_start = TRUE;
|
||||
|
|
@ -5276,9 +5261,18 @@ ha_innobase::external_lock(
|
|||
prebuilt->select_lock_type = LOCK_S;
|
||||
}
|
||||
|
||||
/* Starting from 4.1.9, no InnoDB table lock is taken in LOCK
|
||||
TABLES if AUTOCOMMIT=1. It does not make much sense to acquire
|
||||
an InnoDB table lock if it is released immediately at the end
|
||||
of LOCK TABLES, and InnoDB's table locks in that case cause
|
||||
VERY easily deadlocks. */
|
||||
|
||||
if (prebuilt->select_lock_type != LOCK_NONE) {
|
||||
|
||||
if (thd->in_lock_tables &&
|
||||
thd->variables.innodb_table_locks) {
|
||||
thd->variables.innodb_table_locks &&
|
||||
(thd->options & OPTION_NOT_AUTOCOMMIT)) {
|
||||
|
||||
ulint error;
|
||||
error = row_lock_table_for_mysql(prebuilt,
|
||||
NULL, LOCK_TABLE_EXP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue