[Commits] f5ce44a: Move table record writing outside of loop

Vicentiu Ciorbaru vicentiu at mariadb.org
Tue Sep 20 12:14:21 EEST 2016


revision-id: f5ce44a3872bbe79c308cd2ca5cd157d83020834 (mariadb-10.1.8-272-gf5ce44a)
parent(s): 0046f1de97242a37363651409a9a9b110732b311
author: Vicențiu Ciorbaru
committer: Vicențiu Ciorbaru
timestamp: 2016-09-20 11:11:24 +0200
message:

Move table record writing outside of loop

We can set values in the record buffer first and only perform one table
write call at the end. No need to write to file every time one column is
updated.

Also, remove unused method from Table_read_cursor.

---
 sql/sql_window.cc | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/sql/sql_window.cc b/sql/sql_window.cc
index 6880b0a..2b0e7dc 100644
--- a/sql/sql_window.cc
+++ b/sql/sql_window.cc
@@ -630,18 +630,6 @@ class Table_read_cursor : public Rowid_seq_cursor
     return table->file->ha_rnd_pos(record, curr_rowid);
   }
 
-  bool fetch_prev_row()
-  {
-    uchar *p;
-    if ((p= get_prev_rowid()))
-    {
-      int rc= table->file->ha_rnd_pos(record, p);
-      if (!rc)
-        return true; // restored ok
-    }
-    return false; // didn't restore
-  }
-
 private:
   /* The table that is acccesed by this cursor. */
   TABLE *table;


More information about the commits mailing list