diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-23 18:49:19 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-23 18:49:19 +0100 |
commit | f26be8cae28a6c947278080d45d546ac2b9fa69f (patch) | |
tree | 59335fe05894192e7227f63922239a4372fb8f62 /storage | |
parent | f48d76620a80174ecdc59c1e70cf4b0024135e4b (diff) | |
download | mariadb-git-f26be8cae28a6c947278080d45d546ac2b9fa69f.tar.gz |
- Work in progress
modified:
storage/connect/filter.h
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/mysql-test/connect/r/alter.result
storage/connect/mysql-test/connect/r/xml.result
Diffstat (limited to 'storage')
-rw-r--r-- | storage/connect/filter.h | 4 | ||||
-rw-r--r-- | storage/connect/ha_connect.cc | 14 | ||||
-rw-r--r-- | storage/connect/ha_connect.h | 15 | ||||
-rw-r--r-- | storage/connect/mysql-test/connect/r/alter.result | 16 | ||||
-rw-r--r-- | storage/connect/mysql-test/connect/r/xml.result | 2 |
5 files changed, 40 insertions, 11 deletions
diff --git a/storage/connect/filter.h b/storage/connect/filter.h index 364c0260ae1..301b3a128de 100644 --- a/storage/connect/filter.h +++ b/storage/connect/filter.h @@ -5,6 +5,8 @@ /* */ /* This file contains the FILTER and derived classes declares. */ /***********************************************************************/ +#ifndef __FILTER__ +#define __FILTER__ /***********************************************************************/ /* Include required application header files */ @@ -170,3 +172,5 @@ class FILTERTRUE : public FILTERX { virtual void Reset(void); virtual bool Eval(PGLOBAL); }; // end of class FILTERTRUE + +#endif // __FILTER__ diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 086086553a3..d557f8e6bce 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -159,7 +159,7 @@ /***********************************************************************/
//efine CONNECT_INI "connect.ini"
extern "C" {
- char version[]= "Version 1.02.0001 February 03, 2014";
+ char version[]= "Version 1.02.0002 March 16, 2014";
#if defined(XMSG)
char msglang[]; // Default message language
@@ -258,6 +258,18 @@ ha_create_table_option connect_field_option_list[]= HA_FOPTION_END
};
+/* + CREATE TABLE option list (index options)
+ + These can be specified in the CREATE TABLE per index: + CREATE TABLE ( field ..., .., INDEX .... *here*, ... ) +*/ +ha_create_table_option connect_index_option_list[]=
+{
+ HA_IOPTION_BOOL("DYN", kindx, 0),
+ HA_IOPTION_BOOL("MAPPED", mapped, 0),
+};
+ /***********************************************************************/
/* Push G->Message as a MySQL warning. */
/***********************************************************************/
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h index 1924d8de185..d8395335edb 100644 --- a/storage/connect/ha_connect.h +++ b/storage/connect/ha_connect.h @@ -130,6 +130,19 @@ struct ha_field_option_struct char *special;
};
+/* + index options can be declared similarly + using the ha_index_option_struct structure. + + Their values can be specified in the CREATE TABLE per index: + CREATE TABLE ( field ..., .., INDEX .... *here*, ... ) +*/ +struct ha_index_option_struct
+{
+ bool kindx;
+ bool mapped;
+};
+ /** @brief
CONNECT_SHARE is a structure that will be shared among all open handlers.
This example implements the minimum of what you will probably need.
@@ -210,7 +223,7 @@ public: The name of the index type that will be used for display.
Don't implement this method unless you really have indexes.
*/
- const char *index_type(uint inx) { return "XPLUG"; }
+ const char *index_type(uint inx) { return "XINDEX"; }
/** @brief
The file extensions.
diff --git a/storage/connect/mysql-test/connect/r/alter.result b/storage/connect/mysql-test/connect/r/alter.result index beef3dcdb18..1994ec335f2 100644 --- a/storage/connect/mysql-test/connect/r/alter.result +++ b/storage/connect/mysql-test/connect/r/alter.result @@ -21,8 +21,8 @@ DROP INDEX xd ON t1; ALTER TABLE t1 ADD INDEX xc (c), ADD INDEX xd (d); SHOW INDEX FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 1 xc 1 c A NULL NULL NULL XPLUG -t1 1 xd 1 d A NULL NULL NULL XPLUG +t1 1 xc 1 c A NULL NULL NULL XINDEX +t1 1 xd 1 d A NULL NULL NULL XINDEX ALTER TABLE t1 DROP INDEX xc, DROP INDEX xd; SHOW INDEX FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment @@ -95,7 +95,7 @@ Warning 1105 This is an outward table, table data were not modified. SELECT * FROM t2; line <?xml version="1.0" encoding="UTF-8"?> -<!-- Created by CONNECT Version 1.02.0001 February 03, 2014 --> +<!-- Created by CONNECT Version 1.02.0002 March 16, 2014 --> <t1> <row> <TH>c</TH> @@ -131,7 +131,7 @@ t1 CREATE TABLE `t1` ( SELECT * FROM t2; line <?xml version="1.0" encoding="UTF-8"?> -<!-- Created by CONNECT Version 1.02.0001 February 03, 2014 --> +<!-- Created by CONNECT Version 1.02.0002 March 16, 2014 --> <t1> <row d="One"> <c>1</c> @@ -182,8 +182,8 @@ t1 CREATE TABLE `t1` ( ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=DBF SHOW INDEX FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 1 xc 1 c A NULL NULL NULL XPLUG -t1 1 xd 1 d A NULL NULL NULL XPLUG +t1 1 xc 1 c A NULL NULL NULL XINDEX +t1 1 xd 1 d A NULL NULL NULL XINDEX SELECT * FROM t1; c d 1 One @@ -214,8 +214,8 @@ line ALTER TABLE t1 ADD INDEX xc (c), ADD INDEX xd (d); SHOW INDEX FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 1 xc 1 c A NULL NULL NULL XPLUG -t1 1 xd 1 d A NULL NULL NULL XPLUG +t1 1 xc 1 c A NULL NULL NULL XINDEX +t1 1 xd 1 d A NULL NULL NULL XINDEX SELECT d FROM t1 WHERE c = 2; d Two diff --git a/storage/connect/mysql-test/connect/r/xml.result b/storage/connect/mysql-test/connect/r/xml.result index aeb1f5edbcd..4768573dc7c 100644 --- a/storage/connect/mysql-test/connect/r/xml.result +++ b/storage/connect/mysql-test/connect/r/xml.result @@ -413,7 +413,7 @@ DROP TABLE t1; SET @a=LOAD_FILE('MYSQLD_DATADIR/test/t1.xml'); SELECT CAST(@a AS CHAR CHARACTER SET latin1); CAST(@a AS CHAR CHARACTER SET latin1) <?xml version="1.0" encoding="iso-8859-1"?> -<!-- Created by CONNECT Version 1.02.0001 February 03, 2014 --> +<!-- Created by CONNECT Version 1.02.0002 March 16, 2014 --> <t1> <line> <node>ÀÁÂÃ</node> |