1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Added NDB storage engine

include/my_base.h:
  Added three new errorcodes to be returned by the handler
sql/Makefile.am:
  Add new files discover.cc, ha_ndbcluster.cc and ha_ndbcluster.h
  Add include path of NDB files
sql/handler.cc:
  Added variable for keeping track of number of "discovers"
  Added NDB to list of storage engines
  Added calls to NDB for commit, rollback etc.
  Added function ha_discover for discovering a table from handler
sql/handler.h:
  Added NDB to list of storage engines
  Added vbariable in transaction for keeping a ndb transaction handle
sql/lex.h:
  Changed AND to AND_SYM and OR to OR_SYM to avoid nameclash
sql/mysql_priv.h:
  Added prototypes for new functions readfrm, writefrm and create_table_from_handler
sql/mysqld.cc:
  Added NDB support
  Disable NDB with --skip-ndbcluster
sql/set_var.cc:
  Add posibilty to show if NDB handler is supported
sql/ha_ndbcluster.cc:
  Add ifdef for whole file for not compiling anything if NDB sholdn't be included
  Updated timestamp handling to use new vars timestamp_default_now and timestamp_on_update_now
sql/sql_base.cc:
  If frm file is not found on disk, ask handler if it knows about the table. Then retry the open.
  This new functionality is called "discover" and can be used by any handler.
sql/sql_class.h:
  Added variable for keeping a NDB connection handle
sql/sql_table.cc:
  Before trying to create a table, ask handler if a table with that name already exists.
  If user said CREATE TABLE IF NOT EXISTS, disocver the table from handler
sql/sql_yacc.yy:
  Add NDBCLUSTER_SYM
  Change AND to AND_SYM
  Change OR to OR_SYM
sql/table.cc:
  Fixe for probelm when NullS is returned from bas_ext of a handler.
This commit is contained in:
unknown
2004-04-15 09:14:14 +02:00
parent fd1d14a017
commit b43af929f8
16 changed files with 3564 additions and 48 deletions

View File

@@ -688,7 +688,10 @@ public:
THD_TRANS all; // Trans since BEGIN WORK
THD_TRANS stmt; // Trans for current statement
uint bdb_lock_count;
uint ndb_lock_count;
#ifdef HAVE_NDBCLUSTER_DB
void* ndb;
#endif
/*
Tables changed in transaction (that must be invalidated in query cache).
List contain only transactional tables, that not invalidated in query
@@ -878,7 +881,8 @@ public:
{
#ifdef USING_TRANSACTIONS
return (transaction.all.bdb_tid != 0 ||
transaction.all.innodb_active_trans != 0);
transaction.all.innodb_active_trans != 0 ||
transaction.all.ndb_tid != 0);
#else
return 0;
#endif