mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge for update
This commit is contained in:
@ -8,6 +8,7 @@ WAX@sergbook.mysql.com
|
|||||||
administrador@light.hegel.local
|
administrador@light.hegel.local
|
||||||
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
|
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
|
||||||
akishkin@work.mysql.com
|
akishkin@work.mysql.com
|
||||||
|
antony@ltantony.rdg.cyberkinetica.homeunix.net
|
||||||
arjen@co3064164-a.bitbike.com
|
arjen@co3064164-a.bitbike.com
|
||||||
arjen@fred.bitbike.com
|
arjen@fred.bitbike.com
|
||||||
arjen@george.bitbike.com
|
arjen@george.bitbike.com
|
||||||
|
@ -301,4 +301,5 @@
|
|||||||
#define ER_BAD_FT_COLUMN 1282
|
#define ER_BAD_FT_COLUMN 1282
|
||||||
#define ER_UNKNOWN_KEY_CACHE 1283
|
#define ER_UNKNOWN_KEY_CACHE 1283
|
||||||
#define ER_WARN_HOSTNAME_WONT_WORK 1284
|
#define ER_WARN_HOSTNAME_WONT_WORK 1284
|
||||||
#define ER_ERROR_MESSAGES 285
|
#define ER_UNKNOWN_TABLE_ENGINE 1285
|
||||||
|
#define ER_ERROR_MESSAGES 286
|
||||||
|
@ -161,3 +161,4 @@ ER_WARN_DATA_OUT_OF_RANGE, "01000", "",
|
|||||||
ER_WARN_DATA_TRUNCATED, "01000", "",
|
ER_WARN_DATA_TRUNCATED, "01000", "",
|
||||||
ER_WRONG_NAME_FOR_INDEX, "42000", "",
|
ER_WRONG_NAME_FOR_INDEX, "42000", "",
|
||||||
ER_WRONG_NAME_FOR_CATALOG, "42000", "",
|
ER_WRONG_NAME_FOR_CATALOG, "42000", "",
|
||||||
|
ER_UNKNOWN_TABLE_ENGINE, "42000", "",
|
||||||
|
@ -201,17 +201,16 @@ t1 CREATE TABLE `t1` (
|
|||||||
) TYPE=HEAP DEFAULT CHARSET=latin1
|
) TYPE=HEAP DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SET SESSION table_type="gemini";
|
SET SESSION table_type="gemini";
|
||||||
|
ERROR 42000: Unknown table engine 'gemini'
|
||||||
SELECT @@table_type;
|
SELECT @@table_type;
|
||||||
@@table_type
|
@@table_type
|
||||||
GEMINI
|
HEAP
|
||||||
CREATE TABLE t1 (a int not null);
|
CREATE TABLE t1 (a int not null);
|
||||||
Warnings:
|
|
||||||
Warning 1265 Using storage engine MYISAM for table 't1'
|
|
||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`a` int(11) NOT NULL default '0'
|
`a` int(11) NOT NULL default '0'
|
||||||
) TYPE=MyISAM DEFAULT CHARSET=latin1
|
) TYPE=HEAP DEFAULT CHARSET=latin1
|
||||||
SET SESSION table_type=default;
|
SET SESSION table_type=default;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
|
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
|
||||||
@ -347,17 +346,16 @@ t1 CREATE TABLE `t1` (
|
|||||||
) TYPE=HEAP DEFAULT CHARSET=latin1
|
) TYPE=HEAP DEFAULT CHARSET=latin1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SET SESSION table_type="gemini";
|
SET SESSION table_type="gemini";
|
||||||
|
ERROR 42000: Unknown table engine 'gemini'
|
||||||
SELECT @@table_type;
|
SELECT @@table_type;
|
||||||
@@table_type
|
@@table_type
|
||||||
GEMINI
|
HEAP
|
||||||
CREATE TABLE t1 (a int not null);
|
CREATE TABLE t1 (a int not null);
|
||||||
Warnings:
|
|
||||||
Warning 1265 Using storage engine MYISAM for table 't1'
|
|
||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`a` int(11) NOT NULL default '0'
|
`a` int(11) NOT NULL default '0'
|
||||||
) TYPE=MyISAM DEFAULT CHARSET=latin1
|
) TYPE=HEAP DEFAULT CHARSET=latin1
|
||||||
SET SESSION table_type=default;
|
SET SESSION table_type=default;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1(a int,b int,c int unsigned,d date,e char,f datetime,g time,h blob);
|
create table t1(a int,b int,c int unsigned,d date,e char,f datetime,g time,h blob);
|
||||||
|
@ -121,7 +121,7 @@ Variable_name Value
|
|||||||
table_type HEAP
|
table_type HEAP
|
||||||
show global variables like 'table_type';
|
show global variables like 'table_type';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
table_type INNODB
|
table_type InnoDB
|
||||||
set GLOBAL query_cache_size=100000;
|
set GLOBAL query_cache_size=100000;
|
||||||
set GLOBAL myisam_max_sort_file_size=2000000;
|
set GLOBAL myisam_max_sort_file_size=2000000;
|
||||||
show global variables like 'myisam_max_sort_file_size';
|
show global variables like 'myisam_max_sort_file_size';
|
||||||
@ -219,7 +219,7 @@ ERROR HY000: Unknown system variable 'unknown_variable'
|
|||||||
set max_join_size="hello";
|
set max_join_size="hello";
|
||||||
ERROR 42000: Wrong argument type to variable 'max_join_size'
|
ERROR 42000: Wrong argument type to variable 'max_join_size'
|
||||||
set table_type=UNKNOWN_TABLE_TYPE;
|
set table_type=UNKNOWN_TABLE_TYPE;
|
||||||
ERROR 42000: Variable 'table_type' can't be set to the value of 'UNKNOWN_TABLE_TYPE'
|
ERROR 42000: Unknown table engine 'UNKNOWN_TABLE_TYPE'
|
||||||
set table_type=INNODB, big_tables=2;
|
set table_type=INNODB, big_tables=2;
|
||||||
ERROR 42000: Variable 'big_tables' can't be set to the value of '2'
|
ERROR 42000: Variable 'big_tables' can't be set to the value of '2'
|
||||||
show local variables like 'table_type';
|
show local variables like 'table_type';
|
||||||
|
@ -121,8 +121,8 @@ select @@warning_count;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (id int) type=isam;
|
create table t1 (id int) type=isam;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1265 Using storage engine MYISAM for table 't1'
|
Warning 1265 Using storage engine MyISAM for table 't1'
|
||||||
alter table t1 type=isam;
|
alter table t1 type=isam;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1265 Using storage engine MYISAM for table 't1'
|
Warning 1265 Using storage engine MyISAM for table 't1'
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -157,7 +157,7 @@ SELECT @@table_type;
|
|||||||
CREATE TABLE t1 (a int not null);
|
CREATE TABLE t1 (a int not null);
|
||||||
show create table t1;
|
show create table t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# Test what happens when using a non existing table type
|
--error 1284
|
||||||
SET SESSION table_type="gemini";
|
SET SESSION table_type="gemini";
|
||||||
SELECT @@table_type;
|
SELECT @@table_type;
|
||||||
CREATE TABLE t1 (a int not null);
|
CREATE TABLE t1 (a int not null);
|
||||||
@ -277,7 +277,7 @@ SELECT @@table_type;
|
|||||||
CREATE TABLE t1 (a int not null);
|
CREATE TABLE t1 (a int not null);
|
||||||
show create table t1;
|
show create table t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# Test what happens when using a non existing table type
|
--error 1284
|
||||||
SET SESSION table_type="gemini";
|
SET SESSION table_type="gemini";
|
||||||
SELECT @@table_type;
|
SELECT @@table_type;
|
||||||
CREATE TABLE t1 (a int not null);
|
CREATE TABLE t1 (a int not null);
|
||||||
|
@ -124,7 +124,7 @@ set big_tables="OFFF";
|
|||||||
set unknown_variable=1;
|
set unknown_variable=1;
|
||||||
--error 1232
|
--error 1232
|
||||||
set max_join_size="hello";
|
set max_join_size="hello";
|
||||||
--error 1231
|
--error 1284
|
||||||
set table_type=UNKNOWN_TABLE_TYPE;
|
set table_type=UNKNOWN_TABLE_TYPE;
|
||||||
--error 1231
|
--error 1231
|
||||||
set table_type=INNODB, big_tables=2;
|
set table_type=INNODB, big_tables=2;
|
||||||
|
@ -50,14 +50,33 @@ ulong ha_read_count, ha_write_count, ha_delete_count, ha_update_count,
|
|||||||
ha_commit_count, ha_rollback_count,
|
ha_commit_count, ha_rollback_count,
|
||||||
ha_read_rnd_count, ha_read_rnd_next_count;
|
ha_read_rnd_count, ha_read_rnd_next_count;
|
||||||
|
|
||||||
const char *ha_table_type[] = {
|
static SHOW_COMP_OPTION have_yes= SHOW_OPTION_YES;
|
||||||
"", "DIAB_ISAM","HASH","MISAM","PISAM","RMS_ISAM","HEAP", "ISAM",
|
|
||||||
"MRG_ISAM","MYISAM", "MRG_MYISAM", "BDB", "INNODB", "GEMINI", "?", "?",NullS
|
|
||||||
};
|
|
||||||
|
|
||||||
TYPELIB ha_table_typelib=
|
struct show_table_type_st sys_table_types[]=
|
||||||
{
|
{
|
||||||
array_elements(ha_table_type)-3, "", ha_table_type
|
{"MyISAM", &have_yes,
|
||||||
|
"Default type from 3.23 with great performance", DB_TYPE_MYISAM},
|
||||||
|
{"HEAP", &have_yes,
|
||||||
|
"Hash based, stored in memory, useful for temporary tables", DB_TYPE_HEAP},
|
||||||
|
{"MEMORY", &have_yes,
|
||||||
|
"Alias for HEAP", DB_TYPE_HEAP},
|
||||||
|
{"MERGE", &have_yes,
|
||||||
|
"Collection of identical MyISAM tables", DB_TYPE_MRG_MYISAM},
|
||||||
|
{"MRG_MYISAM",&have_yes,
|
||||||
|
"Alias for MERGE", DB_TYPE_MRG_MYISAM},
|
||||||
|
{"ISAM", &have_isam,
|
||||||
|
"Obsolete table type; Is replaced by MyISAM", DB_TYPE_ISAM},
|
||||||
|
{"MRG_ISAM", &have_isam,
|
||||||
|
"Obsolete table type; Is replaced by MRG_MYISAM", DB_TYPE_MRG_ISAM},
|
||||||
|
{"InnoDB", &have_innodb,
|
||||||
|
"Supports transactions, row-level locking and foreign keys", DB_TYPE_INNODB},
|
||||||
|
{"INNOBASE", &have_innodb,
|
||||||
|
"Alias for INNODB", DB_TYPE_INNODB},
|
||||||
|
{"BDB", &have_berkeley_db,
|
||||||
|
"Supports transactions and page-level locking", DB_TYPE_BERKELEY_DB},
|
||||||
|
{"BERKELEYDB",&have_berkeley_db,
|
||||||
|
"Alias for BDB", DB_TYPE_BERKELEY_DB},
|
||||||
|
{NullS, NULL, NullS, DB_TYPE_UNKNOWN}
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *ha_row_type[] = {
|
const char *ha_row_type[] = {
|
||||||
@ -70,6 +89,33 @@ const char *tx_isolation_names[] =
|
|||||||
TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"",
|
TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"",
|
||||||
tx_isolation_names};
|
tx_isolation_names};
|
||||||
|
|
||||||
|
enum db_type ha_resolve_by_name(const char *name, uint namelen)
|
||||||
|
{
|
||||||
|
if (!my_strcasecmp(&my_charset_latin1, name, "DEFAULT")) {
|
||||||
|
return(enum db_type) current_thd->variables.table_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
show_table_type_st *types;
|
||||||
|
for (types= sys_table_types; types->type; types++)
|
||||||
|
{
|
||||||
|
if (!my_strcasecmp(&my_charset_latin1, name, types->type))
|
||||||
|
return(enum db_type)types->db_type;
|
||||||
|
}
|
||||||
|
return DB_TYPE_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *ha_get_table_type(enum db_type db_type)
|
||||||
|
{
|
||||||
|
show_table_type_st *types;
|
||||||
|
for (types= sys_table_types; types->type; types++)
|
||||||
|
{
|
||||||
|
if (db_type == types->db_type)
|
||||||
|
return types->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "none";
|
||||||
|
}
|
||||||
|
|
||||||
/* Use other database handler if databasehandler is not incompiled */
|
/* Use other database handler if databasehandler is not incompiled */
|
||||||
|
|
||||||
enum db_type ha_checktype(enum db_type database_type)
|
enum db_type ha_checktype(enum db_type database_type)
|
||||||
@ -77,18 +123,21 @@ enum db_type ha_checktype(enum db_type database_type)
|
|||||||
switch (database_type) {
|
switch (database_type) {
|
||||||
#ifdef HAVE_BERKELEY_DB
|
#ifdef HAVE_BERKELEY_DB
|
||||||
case DB_TYPE_BERKELEY_DB:
|
case DB_TYPE_BERKELEY_DB:
|
||||||
return(berkeley_skip ? DB_TYPE_MYISAM : database_type);
|
if (berkeley_skip) break;
|
||||||
|
return (database_type);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_INNOBASE_DB
|
#ifdef HAVE_INNOBASE_DB
|
||||||
case DB_TYPE_INNODB:
|
case DB_TYPE_INNODB:
|
||||||
return(innodb_skip ? DB_TYPE_MYISAM : database_type);
|
if (innodb_skip) break;
|
||||||
|
return (database_type);
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_HASH
|
#ifndef NO_HASH
|
||||||
case DB_TYPE_HASH:
|
case DB_TYPE_HASH:
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ISAM
|
#ifdef HAVE_ISAM
|
||||||
case DB_TYPE_ISAM:
|
case DB_TYPE_ISAM:
|
||||||
return (isam_skip ? DB_TYPE_MYISAM : database_type);
|
if (isam_skip) break;
|
||||||
|
return (database_type);
|
||||||
case DB_TYPE_MRG_ISAM:
|
case DB_TYPE_MRG_ISAM:
|
||||||
return (isam_skip ? DB_TYPE_MRG_MYISAM : database_type);
|
return (isam_skip ? DB_TYPE_MRG_MYISAM : database_type);
|
||||||
#else
|
#else
|
||||||
@ -102,7 +151,13 @@ enum db_type ha_checktype(enum db_type database_type)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return(DB_TYPE_MYISAM); /* Use this as default */
|
|
||||||
|
return
|
||||||
|
DB_TYPE_UNKNOWN != (enum db_type) current_thd->variables.table_type ?
|
||||||
|
(enum db_type) current_thd->variables.table_type :
|
||||||
|
DB_TYPE_UNKNOWN != (enum db_type) global_system_variables.table_type ?
|
||||||
|
(enum db_type) global_system_variables.table_type :
|
||||||
|
DB_TYPE_MYISAM;
|
||||||
} /* ha_checktype */
|
} /* ha_checktype */
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,6 +131,13 @@ enum db_type { DB_TYPE_UNKNOWN=0,DB_TYPE_DIAB_ISAM=1,
|
|||||||
DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, DB_TYPE_GEMINI,
|
DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB, DB_TYPE_GEMINI,
|
||||||
DB_TYPE_DEFAULT };
|
DB_TYPE_DEFAULT };
|
||||||
|
|
||||||
|
struct show_table_type_st {
|
||||||
|
const char *type;
|
||||||
|
SHOW_COMP_OPTION *value;
|
||||||
|
const char *comment;
|
||||||
|
enum db_type db_type;
|
||||||
|
};
|
||||||
|
|
||||||
enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED,
|
enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED,
|
||||||
ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED};
|
ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED};
|
||||||
|
|
||||||
@ -372,8 +379,9 @@ public:
|
|||||||
|
|
||||||
/* Some extern variables used with handlers */
|
/* Some extern variables used with handlers */
|
||||||
|
|
||||||
|
extern struct show_table_type_st sys_table_types[];
|
||||||
extern const char *ha_row_type[];
|
extern const char *ha_row_type[];
|
||||||
extern TYPELIB ha_table_typelib, tx_isolation_typelib;
|
extern TYPELIB tx_isolation_typelib;
|
||||||
|
|
||||||
/* Wrapper functions */
|
/* Wrapper functions */
|
||||||
#define ha_commit_stmt(thd) (ha_commit_trans((thd), &((thd)->transaction.stmt)))
|
#define ha_commit_stmt(thd) (ha_commit_trans((thd), &((thd)->transaction.stmt)))
|
||||||
@ -383,6 +391,8 @@ extern TYPELIB ha_table_typelib, tx_isolation_typelib;
|
|||||||
|
|
||||||
#define ha_supports_generate(T) (T != DB_TYPE_INNODB)
|
#define ha_supports_generate(T) (T != DB_TYPE_INNODB)
|
||||||
|
|
||||||
|
enum db_type ha_resolve_by_name(const char *name, uint namelen);
|
||||||
|
const char *ha_get_table_type(enum db_type db_type);
|
||||||
handler *get_new_handler(TABLE *table, enum db_type db_type);
|
handler *get_new_handler(TABLE *table, enum db_type db_type);
|
||||||
my_off_t ha_get_ptr(byte *ptr, uint pack_length);
|
my_off_t ha_get_ptr(byte *ptr, uint pack_length);
|
||||||
void ha_store_ptr(byte *buff, uint pack_length, my_off_t pos);
|
void ha_store_ptr(byte *buff, uint pack_length, my_off_t pos);
|
||||||
|
@ -186,7 +186,6 @@ static SYMBOL symbols[] = {
|
|||||||
{ "HAVING", SYM(HAVING),0,0},
|
{ "HAVING", SYM(HAVING),0,0},
|
||||||
{ "HANDLER", SYM(HANDLER_SYM),0,0},
|
{ "HANDLER", SYM(HANDLER_SYM),0,0},
|
||||||
{ "HASH", SYM(HASH_SYM),0,0},
|
{ "HASH", SYM(HASH_SYM),0,0},
|
||||||
{ "HEAP", SYM(HEAP_SYM),0,0},
|
|
||||||
{ "HELP", SYM(HELP_SYM),0,0},
|
{ "HELP", SYM(HELP_SYM),0,0},
|
||||||
{ "HIGH_PRIORITY", SYM(HIGH_PRIORITY),0,0},
|
{ "HIGH_PRIORITY", SYM(HIGH_PRIORITY),0,0},
|
||||||
{ "HOUR", SYM(HOUR_SYM),0,0},
|
{ "HOUR", SYM(HOUR_SYM),0,0},
|
||||||
@ -219,7 +218,6 @@ static SYMBOL symbols[] = {
|
|||||||
{ "IF", SYM(IF),0,0},
|
{ "IF", SYM(IF),0,0},
|
||||||
{ "IS", SYM(IS),0,0},
|
{ "IS", SYM(IS),0,0},
|
||||||
{ "ISOLATION", SYM(ISOLATION),0,0},
|
{ "ISOLATION", SYM(ISOLATION),0,0},
|
||||||
{ "ISAM", SYM(ISAM_SYM),0,0},
|
|
||||||
{ "ISSUER", SYM(ISSUER_SYM),0,0},
|
{ "ISSUER", SYM(ISSUER_SYM),0,0},
|
||||||
{ "JOIN", SYM(JOIN_SYM),0,0},
|
{ "JOIN", SYM(JOIN_SYM),0,0},
|
||||||
{ "KEY", SYM(KEY_SYM),0,0},
|
{ "KEY", SYM(KEY_SYM),0,0},
|
||||||
@ -268,9 +266,7 @@ static SYMBOL symbols[] = {
|
|||||||
{ "MEDIUMBLOB", SYM(MEDIUMBLOB),0,0},
|
{ "MEDIUMBLOB", SYM(MEDIUMBLOB),0,0},
|
||||||
{ "MEDIUMTEXT", SYM(MEDIUMTEXT),0,0},
|
{ "MEDIUMTEXT", SYM(MEDIUMTEXT),0,0},
|
||||||
{ "MEDIUMINT", SYM(MEDIUMINT),0,0},
|
{ "MEDIUMINT", SYM(MEDIUMINT),0,0},
|
||||||
{ "MERGE", SYM(MERGE_SYM),0,0},
|
|
||||||
{ "MEDIUM", SYM(MEDIUM_SYM),0,0},
|
{ "MEDIUM", SYM(MEDIUM_SYM),0,0},
|
||||||
{ "MEMORY", SYM(MEMORY_SYM),0,0},
|
|
||||||
{ "MICROSECOND", SYM(MICROSECOND_SYM),0,0},
|
{ "MICROSECOND", SYM(MICROSECOND_SYM),0,0},
|
||||||
{ "MIDDLEINT", SYM(MEDIUMINT),0,0}, /* For powerbuilder */
|
{ "MIDDLEINT", SYM(MEDIUMINT),0,0}, /* For powerbuilder */
|
||||||
{ "MIN_ROWS", SYM(MIN_ROWS),0,0},
|
{ "MIN_ROWS", SYM(MIN_ROWS),0,0},
|
||||||
@ -284,8 +280,6 @@ static SYMBOL symbols[] = {
|
|||||||
{ "MULTILINESTRING", SYM(MULTILINESTRING),0,0},
|
{ "MULTILINESTRING", SYM(MULTILINESTRING),0,0},
|
||||||
{ "MULTIPOINT", SYM(MULTIPOINT),0,0},
|
{ "MULTIPOINT", SYM(MULTIPOINT),0,0},
|
||||||
{ "MULTIPOLYGON", SYM(MULTIPOLYGON),0,0},
|
{ "MULTIPOLYGON", SYM(MULTIPOLYGON),0,0},
|
||||||
{ "MRG_MYISAM", SYM(MERGE_SYM),0,0},
|
|
||||||
{ "MYISAM", SYM(MYISAM_SYM),0,0},
|
|
||||||
{ "NAMES", SYM(NAMES_SYM),0,0},
|
{ "NAMES", SYM(NAMES_SYM),0,0},
|
||||||
{ "NATURAL", SYM(NATURAL),0,0},
|
{ "NATURAL", SYM(NATURAL),0,0},
|
||||||
{ "NATIONAL", SYM(NATIONAL_SYM),0,0},
|
{ "NATIONAL", SYM(NATIONAL_SYM),0,0},
|
||||||
|
@ -860,7 +860,6 @@ extern MY_BITMAP temp_pool;
|
|||||||
extern String my_empty_string;
|
extern String my_empty_string;
|
||||||
extern String my_null_string;
|
extern String my_null_string;
|
||||||
extern SHOW_VAR init_vars[],status_vars[], internal_vars[];
|
extern SHOW_VAR init_vars[],status_vars[], internal_vars[];
|
||||||
extern struct show_table_type_st table_type_vars[];
|
|
||||||
extern SHOW_COMP_OPTION have_isam;
|
extern SHOW_COMP_OPTION have_isam;
|
||||||
extern SHOW_COMP_OPTION have_innodb;
|
extern SHOW_COMP_OPTION have_innodb;
|
||||||
extern SHOW_COMP_OPTION have_berkeley_db;
|
extern SHOW_COMP_OPTION have_berkeley_db;
|
||||||
|
@ -5403,13 +5403,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
break;
|
break;
|
||||||
case OPT_TABLE_TYPE:
|
case OPT_TABLE_TYPE:
|
||||||
{
|
{
|
||||||
int type;
|
if ((enum db_type)((global_system_variables.table_type=
|
||||||
if ((type=find_type(argument, &ha_table_typelib, 2)) <= 0)
|
ha_resolve_by_name(argument, strlen(argument)))) == DB_TYPE_UNKNOWN)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"Unknown table type: %s\n",argument);
|
fprintf(stderr,"Unknown table type: %s\n",argument);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
global_system_variables.table_type= type-1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OPT_SERVER_ID:
|
case OPT_SERVER_ID:
|
||||||
|
@ -284,8 +284,8 @@ sys_var_thd_ulong sys_sort_buffer("sort_buffer_size",
|
|||||||
&SV::sortbuff_size);
|
&SV::sortbuff_size);
|
||||||
sys_var_thd_sql_mode sys_sql_mode("sql_mode",
|
sys_var_thd_sql_mode sys_sql_mode("sql_mode",
|
||||||
&SV::sql_mode);
|
&SV::sql_mode);
|
||||||
sys_var_thd_enum sys_table_type("table_type", &SV::table_type,
|
sys_var_thd_table_type sys_table_type("table_type",
|
||||||
&ha_table_typelib);
|
&SV::table_type);
|
||||||
sys_var_long_ptr sys_table_cache_size("table_cache",
|
sys_var_long_ptr sys_table_cache_size("table_cache",
|
||||||
&table_cache_size);
|
&table_cache_size);
|
||||||
sys_var_long_ptr sys_thread_cache_size("thread_cache_size",
|
sys_var_long_ptr sys_thread_cache_size("thread_cache_size",
|
||||||
@ -2408,6 +2408,61 @@ int set_var_password::update(THD *thd)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
Functions to handle table_type
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
bool sys_var_thd_table_type::check(THD *thd, set_var *var)
|
||||||
|
/* Based upon sys_var::check_enum() */
|
||||||
|
{
|
||||||
|
char buff[80];
|
||||||
|
const char *value;
|
||||||
|
String str(buff, sizeof(buff), &my_charset_latin1), *res;
|
||||||
|
|
||||||
|
if (var->value->result_type() == STRING_RESULT)
|
||||||
|
{
|
||||||
|
if (!(res=var->value->val_str(&str)) ||
|
||||||
|
!(var->save_result.ulong_value=
|
||||||
|
(ulong) ha_resolve_by_name(res->ptr(), res->length())))
|
||||||
|
{
|
||||||
|
value= res ? res->c_ptr() : "NULL";
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
err:
|
||||||
|
my_error(ER_UNKNOWN_TABLE_ENGINE, MYF(0), value);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
byte *sys_var_thd_table_type::value_ptr(THD *thd, enum_var_type type,
|
||||||
|
LEX_STRING *base)
|
||||||
|
{
|
||||||
|
ulong val;
|
||||||
|
val= ((type == OPT_GLOBAL) ? global_system_variables.*offset :
|
||||||
|
thd->variables.*offset);
|
||||||
|
const char *table_type= ha_get_table_type((enum db_type)val);
|
||||||
|
return (byte *)table_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sys_var_thd_table_type::set_default(THD *thd, enum_var_type type)
|
||||||
|
{
|
||||||
|
if (type == OPT_GLOBAL)
|
||||||
|
global_system_variables.*offset= (ulong) DB_TYPE_MYISAM;
|
||||||
|
else
|
||||||
|
thd->variables.*offset= (ulong) (global_system_variables.*offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool sys_var_thd_table_type::update(THD *thd, set_var *var)
|
||||||
|
{
|
||||||
|
if (var->type == OPT_GLOBAL)
|
||||||
|
global_system_variables.*offset= var->save_result.ulong_value;
|
||||||
|
else
|
||||||
|
thd->variables.*offset= var->save_result.ulong_value;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Functions to handle sql_mode
|
Functions to handle sql_mode
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -343,6 +343,26 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class sys_var_thd_table_type :public sys_var_thd
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
ulong SV::*offset;
|
||||||
|
public:
|
||||||
|
sys_var_thd_table_type(const char *name_arg, ulong SV::*offset_arg)
|
||||||
|
:sys_var_thd(name_arg), offset(offset_arg)
|
||||||
|
{}
|
||||||
|
bool check(THD *thd, set_var *var);
|
||||||
|
SHOW_TYPE type() { return SHOW_CHAR; }
|
||||||
|
bool check_update_type(Item_result type)
|
||||||
|
{
|
||||||
|
return type != STRING_RESULT; /* Only accept strings */
|
||||||
|
}
|
||||||
|
void set_default(THD *thd, enum_var_type type);
|
||||||
|
bool update(THD *thd, set_var *var);
|
||||||
|
byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class sys_var_thd_bit :public sys_var_thd
|
class sys_var_thd_bit :public sys_var_thd
|
||||||
{
|
{
|
||||||
sys_update_func update_func;
|
sys_update_func update_func;
|
||||||
|
@ -297,3 +297,4 @@ character-set=latin2
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -291,3 +291,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -299,3 +299,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -288,3 +288,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -293,3 +293,4 @@ character-set=latin7
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -288,3 +288,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -300,3 +300,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -288,3 +288,4 @@ character-set=greek
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -290,3 +290,4 @@ character-set=latin2
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -288,3 +288,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -290,3 +290,4 @@ character-set=ujis
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -288,3 +288,4 @@ character-set=euckr
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -290,3 +290,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -290,3 +290,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -292,3 +292,4 @@ character-set=latin2
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -289,3 +289,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -292,3 +292,4 @@ character-set=latin2
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -290,3 +290,4 @@ character-set=koi8r
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -283,3 +283,4 @@ character-set=cp1250
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -296,3 +296,4 @@ character-set=latin2
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -290,3 +290,4 @@ character-set=latin1
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -288,3 +288,4 @@ character-set=latin1
|
|||||||
"Kolumn '%-.64s' kan inte vara del av ett FULLTEXT index",
|
"Kolumn '%-.64s' kan inte vara del av ett FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -293,3 +293,4 @@ character-set=koi8u
|
|||||||
"Column '%-.64s' cannot be part of FULLTEXT index",
|
"Column '%-.64s' cannot be part of FULLTEXT index",
|
||||||
"Unknown key cache '%-.100s'",
|
"Unknown key cache '%-.100s'",
|
||||||
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
|
||||||
|
"Unknown table engine '%s'",
|
||||||
|
@ -173,33 +173,6 @@ int mysqld_show_tables(THD *thd,const char *db,const char *wild)
|
|||||||
** List all table types supported
|
** List all table types supported
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
struct show_table_type_st {
|
|
||||||
const char *type;
|
|
||||||
SHOW_COMP_OPTION *value;
|
|
||||||
const char *comment;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
SHOW_COMP_OPTION have_yes= SHOW_OPTION_YES;
|
|
||||||
|
|
||||||
static struct show_table_type_st sys_table_types[]=
|
|
||||||
{
|
|
||||||
{"MyISAM", &have_yes,
|
|
||||||
"Default type from 3.23 with great performance"},
|
|
||||||
{"HEAP" , &have_yes,
|
|
||||||
"Hash based, stored in memory, useful for temporary tables"},
|
|
||||||
{"MERGE", &have_yes,
|
|
||||||
"Collection of identical MyISAM tables"},
|
|
||||||
{"ISAM", &have_isam,
|
|
||||||
"Obsolete table type; Is replaced by MyISAM"},
|
|
||||||
{"InnoDB", &have_innodb,
|
|
||||||
"Supports transactions, row-level locking and foreign keys"},
|
|
||||||
{"BDB", &have_berkeley_db,
|
|
||||||
"Supports transactions and page-level locking"},
|
|
||||||
{NullS, NULL, NullS}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
int mysqld_show_table_types(THD *thd)
|
int mysqld_show_table_types(THD *thd)
|
||||||
{
|
{
|
||||||
List<Item> field_list;
|
List<Item> field_list;
|
||||||
@ -213,8 +186,8 @@ int mysqld_show_table_types(THD *thd)
|
|||||||
if (protocol->send_fields(&field_list,1))
|
if (protocol->send_fields(&field_list,1))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
|
|
||||||
const char *default_type_name=
|
const char *default_type_name=
|
||||||
ha_table_typelib.type_names[thd->variables.table_type];
|
ha_get_table_type((enum db_type)thd->variables.table_type);
|
||||||
|
|
||||||
show_table_type_st *types;
|
show_table_type_st *types;
|
||||||
for (types= sys_table_types; types->type; types++)
|
for (types= sys_table_types; types->type; types++)
|
||||||
|
@ -404,7 +404,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
|
|||||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
ER_WARN_USING_OTHER_HANDLER,
|
ER_WARN_USING_OTHER_HANDLER,
|
||||||
ER(ER_WARN_USING_OTHER_HANDLER),
|
ER(ER_WARN_USING_OTHER_HANDLER),
|
||||||
ha_table_typelib.type_names[new_db_type],
|
ha_get_table_type(new_db_type),
|
||||||
table_name);
|
table_name);
|
||||||
}
|
}
|
||||||
db_options=create_info->table_options;
|
db_options=create_info->table_options;
|
||||||
@ -2016,7 +2016,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
|||||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
ER_WARN_USING_OTHER_HANDLER,
|
ER_WARN_USING_OTHER_HANDLER,
|
||||||
ER(ER_WARN_USING_OTHER_HANDLER),
|
ER(ER_WARN_USING_OTHER_HANDLER),
|
||||||
ha_table_typelib.type_names[new_db_type],
|
ha_get_table_type(new_db_type),
|
||||||
new_name);
|
new_name);
|
||||||
}
|
}
|
||||||
if (create_info->row_type == ROW_TYPE_NOT_USED)
|
if (create_info->row_type == ROW_TYPE_NOT_USED)
|
||||||
|
@ -241,7 +241,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
|
|||||||
%token GROUP
|
%token GROUP
|
||||||
%token HAVING
|
%token HAVING
|
||||||
%token HASH_SYM
|
%token HASH_SYM
|
||||||
%token HEAP_SYM
|
|
||||||
%token HEX_NUM
|
%token HEX_NUM
|
||||||
%token HIGH_PRIORITY
|
%token HIGH_PRIORITY
|
||||||
%token HOSTS_SYM
|
%token HOSTS_SYM
|
||||||
@ -257,7 +256,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
|
|||||||
%token INTO
|
%token INTO
|
||||||
%token IN_SYM
|
%token IN_SYM
|
||||||
%token ISOLATION
|
%token ISOLATION
|
||||||
%token ISAM_SYM
|
|
||||||
%token JOIN_SYM
|
%token JOIN_SYM
|
||||||
%token KEYS
|
%token KEYS
|
||||||
%token KEY_SYM
|
%token KEY_SYM
|
||||||
@ -296,10 +294,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
|
|||||||
%token MAX_QUERIES_PER_HOUR
|
%token MAX_QUERIES_PER_HOUR
|
||||||
%token MAX_UPDATES_PER_HOUR
|
%token MAX_UPDATES_PER_HOUR
|
||||||
%token MEDIUM_SYM
|
%token MEDIUM_SYM
|
||||||
%token MERGE_SYM
|
|
||||||
%token MEMORY_SYM
|
|
||||||
%token MIN_ROWS
|
%token MIN_ROWS
|
||||||
%token MYISAM_SYM
|
|
||||||
%token NAMES_SYM
|
%token NAMES_SYM
|
||||||
%token NATIONAL_SYM
|
%token NATIONAL_SYM
|
||||||
%token NATURAL
|
%token NATURAL
|
||||||
@ -1126,13 +1121,14 @@ create_table_option:
|
|||||||
| INDEX DIRECTORY_SYM opt_equal TEXT_STRING_sys { Lex->create_info.index_file_name= $4.str; };
|
| INDEX DIRECTORY_SYM opt_equal TEXT_STRING_sys { Lex->create_info.index_file_name= $4.str; };
|
||||||
|
|
||||||
table_types:
|
table_types:
|
||||||
ISAM_SYM { $$= DB_TYPE_ISAM; }
|
ident_or_text
|
||||||
| MYISAM_SYM { $$= DB_TYPE_MYISAM; }
|
{
|
||||||
| MERGE_SYM { $$= DB_TYPE_MRG_MYISAM; }
|
$$ = ha_resolve_by_name($1.str,$1.length);
|
||||||
| HEAP_SYM { $$= DB_TYPE_HEAP; }
|
if ($$ == DB_TYPE_UNKNOWN) {
|
||||||
| MEMORY_SYM { $$= DB_TYPE_HEAP; }
|
net_printf(YYTHD, ER_UNKNOWN_TABLE_ENGINE, $1.str);
|
||||||
| BERKELEY_DB_SYM { $$= DB_TYPE_BERKELEY_DB; }
|
YYABORT;
|
||||||
| INNOBASE_SYM { $$= DB_TYPE_INNODB; };
|
}
|
||||||
|
};
|
||||||
|
|
||||||
row_types:
|
row_types:
|
||||||
DEFAULT { $$= ROW_TYPE_DEFAULT; }
|
DEFAULT { $$= ROW_TYPE_DEFAULT; }
|
||||||
@ -4642,7 +4638,6 @@ keyword:
|
|||||||
| GLOBAL_SYM {}
|
| GLOBAL_SYM {}
|
||||||
| HANDLER_SYM {}
|
| HANDLER_SYM {}
|
||||||
| HASH_SYM {}
|
| HASH_SYM {}
|
||||||
| HEAP_SYM {}
|
|
||||||
| HELP_SYM {}
|
| HELP_SYM {}
|
||||||
| HOSTS_SYM {}
|
| HOSTS_SYM {}
|
||||||
| HOUR_SYM {}
|
| HOUR_SYM {}
|
||||||
@ -4650,7 +4645,6 @@ keyword:
|
|||||||
| IMPORT {}
|
| IMPORT {}
|
||||||
| INDEXES {}
|
| INDEXES {}
|
||||||
| ISOLATION {}
|
| ISOLATION {}
|
||||||
| ISAM_SYM {}
|
|
||||||
| ISSUER_SYM {}
|
| ISSUER_SYM {}
|
||||||
| INNOBASE_SYM {}
|
| INNOBASE_SYM {}
|
||||||
| INSERT_METHOD {}
|
| INSERT_METHOD {}
|
||||||
@ -4681,8 +4675,6 @@ keyword:
|
|||||||
| MAX_QUERIES_PER_HOUR {}
|
| MAX_QUERIES_PER_HOUR {}
|
||||||
| MAX_UPDATES_PER_HOUR {}
|
| MAX_UPDATES_PER_HOUR {}
|
||||||
| MEDIUM_SYM {}
|
| MEDIUM_SYM {}
|
||||||
| MERGE_SYM {}
|
|
||||||
| MEMORY_SYM {}
|
|
||||||
| MICROSECOND_SYM {}
|
| MICROSECOND_SYM {}
|
||||||
| MINUTE_SYM {}
|
| MINUTE_SYM {}
|
||||||
| MIN_ROWS {}
|
| MIN_ROWS {}
|
||||||
@ -4692,7 +4684,6 @@ keyword:
|
|||||||
| MULTILINESTRING {}
|
| MULTILINESTRING {}
|
||||||
| MULTIPOINT {}
|
| MULTIPOINT {}
|
||||||
| MULTIPOLYGON {}
|
| MULTIPOLYGON {}
|
||||||
| MYISAM_SYM {}
|
|
||||||
| NAMES_SYM {}
|
| NAMES_SYM {}
|
||||||
| NATIONAL_SYM {}
|
| NATIONAL_SYM {}
|
||||||
| NCHAR_SYM {}
|
| NCHAR_SYM {}
|
||||||
|
Reference in New Issue
Block a user