summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-11-10 18:02:00 +0100
committerunknown <guilhem@mysql.com>2004-11-10 18:02:00 +0100
commit3b3285b32285964d9959acae6749eea76e1a57d1 (patch)
treef1a7b9fc07d507a919577987ffbf388f1f2c99af /sql/handler.cc
parente862a42d7f17e2505b850d3df7fe727d4fc5eaa7 (diff)
parent313ce62f7036d1626f248bc8cbb197ffc4a9001c (diff)
downloadmariadb-git-3b3285b32285964d9959acae6749eea76e1a57d1.tar.gz
Merge
client/mysqldump.c: Auto merged sql/handler.cc: Auto merged sql/log_event.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/handler.h: SCCS merged
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 2c274c7989e..32f5ad6ff1d 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -583,6 +583,12 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
if (opt_using_transactions)
{
bool operation_done=0;
+ /*
+ As rollback can be 30 times slower than insert in InnoDB, and user may
+ not know there's rollback (if it's because of a dupl row), better warn.
+ */
+ const char *save_proc_info= thd->proc_info;
+ thd->proc_info= "Rolling back";
#ifdef HAVE_NDBCLUSTER_DB
if (trans->ndb_tid)
{
@@ -654,6 +660,7 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
thd->variables.tx_isolation=thd->session_tx_isolation;
if (operation_done)
statistic_increment(ha_rollback_count,&LOCK_status);
+ thd->proc_info= save_proc_info;
}
#endif /* USING_TRANSACTIONS */
DBUG_RETURN(error);
@@ -766,6 +773,24 @@ int ha_savepoint(THD *thd, char *savepoint_name)
DBUG_RETURN(error);
}
+
+int ha_start_consistent_snapshot(THD *thd)
+{
+#ifdef HAVE_INNOBASE_DB
+ if ((have_innodb == SHOW_OPTION_YES) &&
+ !innobase_start_trx_and_assign_read_view(thd))
+ return 0;
+#endif
+ /*
+ Same idea as when one wants to CREATE TABLE in one engine which does not
+ exist:
+ */
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_NO_CONS_READ_ENGINE, ER(ER_NO_CONS_READ_ENGINE));
+ return 0;
+}
+
+
bool ha_flush_logs()
{
bool result=0;