summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-07-20 20:02:36 +0400
committerunknown <konstantin@mysql.com>2005-07-20 20:02:36 +0400
commitec55fec92dd2a1cbb502345aba259b5fdfec6f5f (patch)
tree67f17393fe4e37a40bbcdee210b4e126d3cbb834 /sql/handler.h
parentb6823b66922c8ea7325541a8c7c132e9027fa412 (diff)
downloadmariadb-git-ec55fec92dd2a1cbb502345aba259b5fdfec6f5f.tar.gz
Implement MySQL framework to support consistent read views in
cursors. This should fix Bug#11813 when InnoDB part is in (tested with a draft patch). The idea of the patch is that if a storage engine supports consistent read views, we open one when open a cursor, set is as the active view when fetch from the cursor, and close together with cursor close. sql/examples/ha_archive.cc: - extend handlerton with cursors methods; fix coding style sql/examples/ha_example.cc: - extend handlerton with cursors methods; fix coding style sql/examples/ha_tina.cc: - extend handlerton with cursors methods; fix coding style sql/ha_berkeley.cc: - extend handlerton with cursors methods sql/ha_blackhole.cc: - extend handlerton with cursors methods; fix coding style sql/ha_federated.cc: - extend handlerton with cursors methods; fix coding style sql/ha_heap.cc: - extend handlerton with cursors methods; fix coding style sql/ha_innodb.cc: - extend handlerton with cursors methods sql/ha_myisam.cc: - extend handlerton with cursors methods; fix coding style sql/ha_myisammrg.cc: - extend handlerton with cursors methods; fix coding style sql/ha_ndbcluster.cc: - extend handlerton with cursors methods sql/handler.h: - extend handlerton with cursors methods sql/sql_select.cc: - create a consistent read view when we open a cursor, set it for a fetch, and free when we closing the cursor. sql/sql_select.h: - add Cursor::ht_info to remember read views used in a cursor. tests/mysql_client_test.c: Disable an assert that will be no longer valid when consistent read views in InnoDB are used.
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 02b2353b890..276f50bde63 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -106,9 +106,11 @@
/*
Note: the following includes binlog and closing 0.
- so: innodb+bdb+ndb+binlog+0
+ so: innodb + bdb + ndb + binlog + myisam + myisammrg + archive +
+ example + csv + heap + blackhole + federated + 0
+ (yes, the sum is deliberately inaccurate)
*/
-#define MAX_HA 6
+#define MAX_HA 14
/*
Bits in index_ddl_flags(KEY *wanted_index)
@@ -349,6 +351,9 @@ typedef struct
int (*recover)(XID *xid_list, uint len);
int (*commit_by_xid)(XID *xid);
int (*rollback_by_xid)(XID *xid);
+ void *(*create_cursor_read_view)();
+ void (*set_cursor_read_view)(void *);
+ void (*close_cursor_read_view)(void *);
uint32 flags; /* global handler flags */
} handlerton;