Skip to content

Commit 2a42afd

Browse files
author
brian@zim.(none)
committed
Final patch for 5.0 for simplifying storage engine code. We now have just one set of ifdefs. I may also remove the code for creating new handlers.
May changes were to simplify storage engine setup and support for legacy call to show storage engines.
1 parent 0ba8ca2 commit 2a42afd

10 files changed

Lines changed: 91 additions & 101 deletions

File tree

mysql-test/r/ps_1general.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,17 +323,17 @@ execute stmt4;
323323
Engine Support Comment
324324
MyISAM YES/NO Default engine as of MySQL 3.23 with great performance
325325
MEMORY YES/NO Hash based, stored in memory, useful for temporary tables
326-
MRG_MYISAM YES/NO Collection of identical MyISAM tables
327-
ISAM YES/NO Obsolete storage engine, now replaced by MyISAM
328-
MRG_ISAM YES/NO Obsolete storage engine, now replaced by MERGE
329326
InnoDB YES/NO Supports transactions, row-level locking, and foreign keys
330-
BERKELEYDB YES/NO Supports transactions and page-level locking
331-
NDBCLUSTER YES/NO Clustered, fault-tolerant, memory-based tables
327+
BerkeleyDB YES/NO Supports transactions and page-level locking
328+
BLACKHOLE YES/NO /dev/null storage engine (anything you write to it disappears)
332329
EXAMPLE YES/NO Example storage engine
333330
ARCHIVE YES/NO Archive storage engine
334331
CSV YES/NO CSV storage engine
332+
ndbcluster YES/NO Clustered, fault-tolerant, memory-based tables
335333
FEDERATED YES/NO Federated MySQL storage engine
336-
BLACKHOLE YES/NO /dev/null storage engine (anything you write to it disappears)
334+
MRG_MYISAM YES/NO Collection of identical MyISAM tables
335+
binlog YES/NO This is a meta storage engine to represent the binlog in a transaction
336+
ISAM YES/NO Obsolete storage engine
337337
drop table if exists t5;
338338
prepare stmt1 from ' drop table if exists t5 ' ;
339339
execute stmt1 ;

sql/examples/ha_tina.cc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -861,21 +861,6 @@ THR_LOCK_DATA **ha_tina::store_lock(THD *thd,
861861
return to;
862862
}
863863

864-
/*
865-
Range optimizer calls this.
866-
I need to update the information on this.
867-
*/
868-
ha_rows ha_tina::records_in_range(int inx,
869-
const byte *start_key,uint start_key_len,
870-
enum ha_rkey_function start_search_flag,
871-
const byte *end_key,uint end_key_len,
872-
enum ha_rkey_function end_search_flag)
873-
{
874-
DBUG_ENTER("ha_tina::records_in_range ");
875-
DBUG_RETURN(records); // Good guess
876-
}
877-
878-
879864
/*
880865
Create a table. You do not want to leave the table open after a call to
881866
this (the database will call ::open() if it needs to).

sql/examples/ha_tina.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class ha_tina: public handler
7878
*/
7979
virtual double scan_time() { return (double) (records+deleted) / 20.0+10; }
8080
/* The next method will never be called */
81-
virtual double read_time(ha_rows rows) { DBUG_ASSERT(0); return((double) rows / 20.0+1); }
8281
virtual bool fast_key_read() { return 1;}
8382
/*
8483
TODO: return actual upper bound of number of records in the table.
@@ -110,12 +109,6 @@ class ha_tina: public handler
110109
int reset(void);
111110
int external_lock(THD *thd, int lock_type);
112111
int delete_all_rows(void);
113-
ha_rows records_in_range(int inx, const byte *start_key,uint start_key_len,
114-
enum ha_rkey_function start_search_flag,
115-
const byte *end_key,uint end_key_len,
116-
enum ha_rkey_function end_search_flag);
117-
// int delete_table(const char *from);
118-
// int rename_table(const char * from, const char * to);
119112
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
120113

121114
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,

sql/ha_archive.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static HASH archive_open_tables;
137137

138138
/* dummy handlerton - only to have something to return from archive_db_init */
139139
handlerton archive_hton = {
140-
"archive",
140+
"ARCHIVE",
141141
SHOW_OPTION_YES,
142142
"Archive storage engine",
143143
DB_TYPE_ARCHIVE_DB,
@@ -201,7 +201,6 @@ bool archive_db_init()
201201
}
202202
error:
203203
have_archive_db= SHOW_OPTION_DISABLED; // If we couldn't use handler
204-
archive_hton.state= SHOW_OPTION_DISABLED;
205204
DBUG_RETURN(TRUE);
206205
}
207206

sql/ha_berkeley.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ bool berkeley_init(void)
210210
DBUG_RETURN(FALSE);
211211
error:
212212
have_berkeley_db= SHOW_OPTION_DISABLED; // If we couldn't use handler
213-
berkeley_hton.state= SHOW_OPTION_DISABLED;
214213
DBUG_RETURN(TRUE);
215214
}
216215

sql/ha_federated.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@ bool federated_db_init()
428428
}
429429
error:
430430
have_federated_db= SHOW_OPTION_DISABLED; // If we couldn't use handler
431-
federated_hton.state= SHOW_OPTION_DISABLED;
432431
DBUG_RETURN(TRUE);
433432
}
434433

sql/ha_innodb.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,6 @@ innobase_init(void)
14231423
DBUG_RETURN(FALSE);
14241424
error:
14251425
have_innodb= SHOW_OPTION_DISABLED; // If we couldn't use handler
1426-
innobase_hton.state= SHOW_OPTION_DISABLED;
14271426
DBUG_RETURN(TRUE);
14281427
}
14291428

sql/ha_ndbcluster.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4837,7 +4837,6 @@ bool ndbcluster_init()
48374837
delete g_ndb_cluster_connection;
48384838
g_ndb_cluster_connection= NULL;
48394839
have_ndbcluster= SHOW_OPTION_DISABLED; // If we couldn't use handler
4840-
ndbcluster_hton.state= SHOW_OPTION_DISABLED;
48414840
DBUG_RETURN(TRUE);
48424841
}
48434842

0 commit comments

Comments
 (0)