summaryrefslogtreecommitdiff
path: root/storage/xtradb/row/row0mysql.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-01-16 11:13:08 +0100
committerSergei Golubchik <sergii@pisem.net>2013-01-16 11:13:08 +0100
commitcf013ff949a5e05d678bdc3a37c56538fcab4a20 (patch)
tree9f2cd15d2d52deaf38321e2cc45a176370186ba0 /storage/xtradb/row/row0mysql.c
parent4ce53556ce5f31ec6b811c0803285cf0c29f4540 (diff)
parent37a5a54a01ab00fb334c89b6ed5e7dc6cef22fe5 (diff)
downloadmariadb-git-cf013ff949a5e05d678bdc3a37c56538fcab4a20.tar.gz
xtradb merge. Percona-Server-5.5.28-rel29.3
Diffstat (limited to 'storage/xtradb/row/row0mysql.c')
-rw-r--r--storage/xtradb/row/row0mysql.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/storage/xtradb/row/row0mysql.c b/storage/xtradb/row/row0mysql.c
index 575160501c3..9ab85940760 100644
--- a/storage/xtradb/row/row0mysql.c
+++ b/storage/xtradb/row/row0mysql.c
@@ -1277,17 +1277,19 @@ run_again:
que_thr_stop_for_mysql_no_error(thr, trx);
- prebuilt->table->stat_n_rows++;
+ if (UNIV_LIKELY(!(trx->fake_changes))) {
- srv_n_rows_inserted++;
+ prebuilt->table->stat_n_rows++;
- if (prebuilt->table->stat_n_rows == 0) {
- /* Avoid wrap-over */
- prebuilt->table->stat_n_rows--;
+ if (prebuilt->table->stat_n_rows == 0) {
+ /* Avoid wrap-over */
+ prebuilt->table->stat_n_rows--;
+ }
+
+ srv_n_rows_inserted++;
+ row_update_statistics_if_needed(prebuilt->table);
}
- if (!(trx->fake_changes))
- row_update_statistics_if_needed(prebuilt->table);
trx->op_info = "";
return((int) err);
@@ -1534,6 +1536,11 @@ run_again:
que_thr_stop_for_mysql_no_error(thr, trx);
+ if (UNIV_UNLIKELY(trx->fake_changes)) {
+ trx->op_info = "";
+ return((int) err);
+ }
+
if (node->is_delete) {
if (prebuilt->table->stat_n_rows > 0) {
prebuilt->table->stat_n_rows--;
@@ -1548,7 +1555,6 @@ run_again:
that changes indexed columns, UPDATEs that change only non-indexed
columns would not affect statistics. */
if (node->is_delete || !(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
- if (!(trx->fake_changes))
row_update_statistics_if_needed(prebuilt->table);
}
@@ -1756,6 +1762,11 @@ run_again:
return(err);
}
+ if (UNIV_UNLIKELY((trx->fake_changes))) {
+
+ return(err);
+ }
+
if (node->is_delete) {
if (table->stat_n_rows > 0) {
table->stat_n_rows--;
@@ -1766,7 +1777,6 @@ run_again:
srv_n_rows_updated++;
}
- if (!(trx->fake_changes))
row_update_statistics_if_needed(table);
return(err);