Commit f26be8ca authored by Olivier Bertrand's avatar Olivier Bertrand

- 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
parent f48d7662
......@@ -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__
......@@ -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. */
/***********************************************************************/
......
......@@ -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.
......
......@@ -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
......
......@@ -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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment