Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
afc619f0
Commit
afc619f0
authored
Dec 02, 2003
by
antony@ltantony.rdg.cyberkinetica.homeunix.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkLog#1280 - Remove fixed table handler from lex/yacc
parent
0a5af444
Changes
42
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
209 additions
and
89 deletions
+209
-89
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
include/mysqld_error.h
include/mysqld_error.h
+2
-1
include/sql_state.h
include/sql_state.h
+1
-0
mysql-test/r/create.result
mysql-test/r/create.result
+6
-8
mysql-test/r/rpl_change_master.result
mysql-test/r/rpl_change_master.result
+2
-2
mysql-test/r/variables.result
mysql-test/r/variables.result
+2
-2
mysql-test/r/warnings.result
mysql-test/r/warnings.result
+2
-2
mysql-test/t/create.test
mysql-test/t/create.test
+2
-2
mysql-test/t/variables.test
mysql-test/t/variables.test
+1
-1
sql/handler.cc
sql/handler.cc
+65
-10
sql/handler.h
sql/handler.h
+11
-1
sql/lex.h
sql/lex.h
+0
-6
sql/mysql_priv.h
sql/mysql_priv.h
+0
-1
sql/mysqld.cc
sql/mysqld.cc
+2
-3
sql/set_var.cc
sql/set_var.cc
+57
-2
sql/set_var.h
sql/set_var.h
+20
-0
sql/share/czech/errmsg.txt
sql/share/czech/errmsg.txt
+1
-0
sql/share/danish/errmsg.txt
sql/share/danish/errmsg.txt
+1
-0
sql/share/dutch/errmsg.txt
sql/share/dutch/errmsg.txt
+1
-0
sql/share/english/errmsg.txt
sql/share/english/errmsg.txt
+1
-0
sql/share/estonian/errmsg.txt
sql/share/estonian/errmsg.txt
+1
-0
sql/share/french/errmsg.txt
sql/share/french/errmsg.txt
+1
-0
sql/share/german/errmsg.txt
sql/share/german/errmsg.txt
+1
-0
sql/share/greek/errmsg.txt
sql/share/greek/errmsg.txt
+1
-0
sql/share/hungarian/errmsg.txt
sql/share/hungarian/errmsg.txt
+1
-0
sql/share/italian/errmsg.txt
sql/share/italian/errmsg.txt
+1
-0
sql/share/japanese/errmsg.txt
sql/share/japanese/errmsg.txt
+1
-0
sql/share/korean/errmsg.txt
sql/share/korean/errmsg.txt
+1
-0
sql/share/norwegian-ny/errmsg.txt
sql/share/norwegian-ny/errmsg.txt
+1
-0
sql/share/norwegian/errmsg.txt
sql/share/norwegian/errmsg.txt
+1
-0
sql/share/polish/errmsg.txt
sql/share/polish/errmsg.txt
+1
-0
sql/share/portuguese/errmsg.txt
sql/share/portuguese/errmsg.txt
+1
-0
sql/share/romanian/errmsg.txt
sql/share/romanian/errmsg.txt
+1
-0
sql/share/russian/errmsg.txt
sql/share/russian/errmsg.txt
+1
-0
sql/share/serbian/errmsg.txt
sql/share/serbian/errmsg.txt
+1
-0
sql/share/slovak/errmsg.txt
sql/share/slovak/errmsg.txt
+1
-0
sql/share/spanish/errmsg.txt
sql/share/spanish/errmsg.txt
+1
-0
sql/share/swedish/errmsg.txt
sql/share/swedish/errmsg.txt
+1
-0
sql/share/ukrainian/errmsg.txt
sql/share/ukrainian/errmsg.txt
+1
-0
sql/sql_show.cc
sql/sql_show.cc
+2
-29
sql/sql_table.cc
sql/sql_table.cc
+2
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+8
-17
No files found.
BitKeeper/etc/logging_ok
View file @
afc619f0
...
@@ -8,6 +8,7 @@ WAX@sergbook.mysql.com
...
@@ -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
...
...
include/mysqld_error.h
View file @
afc619f0
...
@@ -300,4 +300,5 @@
...
@@ -300,4 +300,5 @@
#define ER_WARN_QC_RESIZE 1281
#define ER_WARN_QC_RESIZE 1281
#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_ERROR_MESSAGES 284
#define ER_UNKNOWN_TABLE_ENGINE 1284
#define ER_ERROR_MESSAGES 285
include/sql_state.h
View file @
afc619f0
...
@@ -161,3 +161,4 @@ ER_WARN_DATA_OUT_OF_RANGE, "01000", "",
...
@@ -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"
,
""
,
mysql-test/r/create.result
View file @
afc619f0
...
@@ -200,17 +200,16 @@ t1 CREATE TABLE `t1` (
...
@@ -200,17 +200,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));
...
@@ -349,17 +348,16 @@ t1 CREATE TABLE `t1` (
...
@@ -349,17 +348,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);
...
...
mysql-test/r/rpl_change_master.result
View file @
afc619f0
...
@@ -15,11 +15,11 @@ select * from t1;
...
@@ -15,11 +15,11 @@ select * from t1;
n
n
1
1
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_
retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_m
aster
Slave_IO_State Master_Host Master_User Master_Port Connect_
Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_M
aster
# 127.0.0.1 root 9306 1 master-bin.000001 273 slave-relay-bin.000002 258 master-bin.000001 No No 0 0 214 317 None 0 No #
# 127.0.0.1 root 9306 1 master-bin.000001 273 slave-relay-bin.000002 258 master-bin.000001 No No 0 0 214 317 None 0 No #
change master to master_user='root';
change master to master_user='root';
show slave status;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_
retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_m
aster
Slave_IO_State Master_Host Master_User Master_Port Connect_
Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_M
aster
# 127.0.0.1 root 9306 1 master-bin.000001 214 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 214 4 None 0 No #
# 127.0.0.1 root 9306 1 master-bin.000001 214 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 214 4 None 0 No #
select release_lock("a");
select release_lock("a");
release_lock("a")
release_lock("a")
...
...
mysql-test/r/variables.result
View file @
afc619f0
...
@@ -121,7 +121,7 @@ Variable_name Value
...
@@ -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 I
NNO
DB
table_type I
nno
DB
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'
...
@@ -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';
...
...
mysql-test/r/warnings.result
View file @
afc619f0
...
@@ -121,8 +121,8 @@ select @@warning_count;
...
@@ -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 M
Y
ISAM for table 't1'
Warning 1265 Using storage engine M
y
ISAM for table 't1'
alter table t1 type=isam;
alter table t1 type=isam;
Warnings:
Warnings:
Warning 1265 Using storage engine M
Y
ISAM for table 't1'
Warning 1265 Using storage engine M
y
ISAM for table 't1'
drop table t1;
drop table t1;
mysql-test/t/create.test
View file @
afc619f0
...
@@ -155,7 +155,7 @@ SELECT @@table_type;
...
@@ -155,7 +155,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
);
...
@@ -276,7 +276,7 @@ SELECT @@table_type;
...
@@ -276,7 +276,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
);
...
...
mysql-test/t/variables.test
View file @
afc619f0
...
@@ -124,7 +124,7 @@ set big_tables="OFFF";
...
@@ -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
12
31
--
error
12
84
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
;
...
...
sql/handler.cc
View file @
afc619f0
...
@@ -50,14 +50,33 @@ ulong ha_read_count, ha_write_count, ha_delete_count, ha_update_count,
...
@@ -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[] =
...
@@ -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)
...
@@ -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)
...
@@ -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 */
...
...
sql/handler.h
View file @
afc619f0
...
@@ -131,6 +131,13 @@ enum db_type { DB_TYPE_UNKNOWN=0,DB_TYPE_DIAB_ISAM=1,
...
@@ -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:
...
@@ -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;
...
@@ -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
);
...
...
sql/lex.h
View file @
afc619f0
...
@@ -186,7 +186,6 @@ static SYMBOL symbols[] = {
...
@@ -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[] = {
...
@@ -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[] = {
...
@@ -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[] = {
...
@@ -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
},
...
...
sql/mysql_priv.h
View file @
afc619f0
...
@@ -861,7 +861,6 @@ extern MY_BITMAP temp_pool;
...
@@ -861,7 +861,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
;
...
...
sql/mysqld.cc
View file @
afc619f0
...
@@ -5417,13 +5417,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -5417,13 +5417,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break
;
break
;
case
OPT_TABLE_TYPE
:
case
OPT_TABLE_TYPE
:
{
{
i
nt
type
;
i
f
((
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
:
...
...
sql/set_var.cc
View file @
afc619f0
...
@@ -284,8 +284,8 @@ sys_var_thd_ulong sys_sort_buffer("sort_buffer_size",
...
@@ -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"
,
...
@@ -2403,6 +2403,61 @@ int set_var_password::update(THD *thd)
...
@@ -2403,6 +2403,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
****************************************************************************/
****************************************************************************/
...
...
sql/set_var.h
View file @
afc619f0
...
@@ -343,6 +343,26 @@ public:
...
@@ -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
;
...
...
sql/share/czech/errmsg.txt
View file @
afc619f0
...
@@ -296,3 +296,4 @@ character-set=latin2
...
@@ -296,3 +296,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/danish/errmsg.txt
View file @
afc619f0
...
@@ -290,3 +290,4 @@ character-set=latin1
...
@@ -290,3 +290,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/dutch/errmsg.txt
View file @
afc619f0
...
@@ -298,3 +298,4 @@ character-set=latin1
...
@@ -298,3 +298,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/english/errmsg.txt
View file @
afc619f0
...
@@ -287,3 +287,4 @@ character-set=latin1
...
@@ -287,3 +287,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/estonian/errmsg.txt
View file @
afc619f0
...
@@ -292,3 +292,4 @@ character-set=latin7
...
@@ -292,3 +292,4 @@ character-set=latin7
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/french/errmsg.txt
View file @
afc619f0
...
@@ -287,3 +287,4 @@ character-set=latin1
...
@@ -287,3 +287,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/german/errmsg.txt
View file @
afc619f0
...
@@ -299,3 +299,4 @@ character-set=latin1
...
@@ -299,3 +299,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/greek/errmsg.txt
View file @
afc619f0
...
@@ -287,3 +287,4 @@ character-set=greek
...
@@ -287,3 +287,4 @@ character-set=greek
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/hungarian/errmsg.txt
View file @
afc619f0
...
@@ -289,3 +289,4 @@ character-set=latin2
...
@@ -289,3 +289,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/italian/errmsg.txt
View file @
afc619f0
...
@@ -287,3 +287,4 @@ character-set=latin1
...
@@ -287,3 +287,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/japanese/errmsg.txt
View file @
afc619f0
...
@@ -289,3 +289,4 @@ character-set=ujis
...
@@ -289,3 +289,4 @@ character-set=ujis
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/korean/errmsg.txt
View file @
afc619f0
...
@@ -287,3 +287,4 @@ character-set=euckr
...
@@ -287,3 +287,4 @@ character-set=euckr
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/norwegian-ny/errmsg.txt
View file @
afc619f0
...
@@ -289,3 +289,4 @@ character-set=latin1
...
@@ -289,3 +289,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/norwegian/errmsg.txt
View file @
afc619f0
...
@@ -289,3 +289,4 @@ character-set=latin1
...
@@ -289,3 +289,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/polish/errmsg.txt
View file @
afc619f0
...
@@ -291,3 +291,4 @@ character-set=latin2
...
@@ -291,3 +291,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/portuguese/errmsg.txt
View file @
afc619f0
...
@@ -288,3 +288,4 @@ character-set=latin1
...
@@ -288,3 +288,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/romanian/errmsg.txt
View file @
afc619f0
...
@@ -291,3 +291,4 @@ character-set=latin2
...
@@ -291,3 +291,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/russian/errmsg.txt
View file @
afc619f0
...
@@ -289,3 +289,4 @@ character-set=koi8r
...
@@ -289,3 +289,4 @@ character-set=koi8r
" %lu, - %lu",
" %lu, - %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/serbian/errmsg.txt
View file @
afc619f0
...
@@ -282,3 +282,4 @@ character-set=cp1250
...
@@ -282,3 +282,4 @@ character-set=cp1250
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/slovak/errmsg.txt
View file @
afc619f0
...
@@ -295,3 +295,4 @@ character-set=latin2
...
@@ -295,3 +295,4 @@ character-set=latin2
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/spanish/errmsg.txt
View file @
afc619f0
...
@@ -289,3 +289,4 @@ character-set=latin1
...
@@ -289,3 +289,4 @@ character-set=latin1
"Query cache failed to set size %lu, new query cache size is %lu",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/share/swedish/errmsg.txt
View file @
afc619f0
...
@@ -287,3 +287,4 @@ character-set=latin1
...
@@ -287,3 +287,4 @@ character-set=latin1
"Storleken av "Query cache" kunde inte sättas till %lu, ny storlek är %lu",
"Storleken av "Query cache" kunde inte sättas till %lu, ny storlek är %lu",
"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'",
"Unknown table engine '%s'",
sql/share/ukrainian/errmsg.txt
View file @
afc619f0
...
@@ -292,3 +292,4 @@ character-set=koi8u
...
@@ -292,3 +292,4 @@ character-set=koi8u
" Ԧ ͦ %lu, ͦ Ԧ - %lu",
" Ԧ ͦ %lu, ͦ Ԧ - %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"Unknown key cache '%-.100s'",
"Unknown table engine '%s'",
sql/sql_show.cc
View file @
afc619f0
...
@@ -173,33 +173,6 @@ int mysqld_show_tables(THD *thd,const char *db,const char *wild)
...
@@ -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
;
...
@@ -214,7 +187,7 @@ int mysqld_show_table_types(THD *thd)
...
@@ -214,7 +187,7 @@ int mysqld_show_table_types(THD *thd)
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
++
)
...
...
sql/sql_table.cc
View file @
afc619f0
...
@@ -404,7 +404,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
...
@@ -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,
...
@@ -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
)
...
...
sql/sql_yacc.yy
View file @
afc619f0
...
@@ -241,7 +241,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
...
@@ -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);
...
@@ -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);
...
@@ -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:
...
@@ -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; }
...
@@ -4633,7 +4629,6 @@ keyword:
...
@@ -4633,7 +4629,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 {}
...
@@ -4641,7 +4636,6 @@ keyword:
...
@@ -4641,7 +4636,6 @@ keyword:
| IMPORT {}
| IMPORT {}
| INDEXES {}
| INDEXES {}
| ISOLATION {}
| ISOLATION {}
| ISAM_SYM {}
| ISSUER_SYM {}
| ISSUER_SYM {}
| INNOBASE_SYM {}
| INNOBASE_SYM {}
| INSERT_METHOD {}
| INSERT_METHOD {}
...
@@ -4672,8 +4666,6 @@ keyword:
...
@@ -4672,8 +4666,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 {}
...
@@ -4683,7 +4675,6 @@ keyword:
...
@@ -4683,7 +4675,6 @@ keyword:
| MULTILINESTRING {}
| MULTILINESTRING {}
| MULTIPOINT {}
| MULTIPOINT {}
| MULTIPOLYGON {}
| MULTIPOLYGON {}
| MYISAM_SYM {}
| NAMES_SYM {}
| NAMES_SYM {}
| NATIONAL_SYM {}
| NATIONAL_SYM {}
| NCHAR_SYM {}
| NCHAR_SYM {}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment