summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2013-12-05 01:00:28 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2013-12-05 01:00:28 +0100
commit54d4589ddeedb69c62c02cc2846c441a49488b8c (patch)
treeff11935880677038cefa01dc542c52b6a4105626 /storage
parenta8b09c14efbbb051e0d682fa9dd0961028b43203 (diff)
downloadmariadb-git-54d4589ddeedb69c62c02cc2846c441a49488b8c.tar.gz
- Previous MDEV-5261 was generating wrong warnings
modified: storage/connect/ha_connect.cc
Diffstat (limited to 'storage')
-rw-r--r--storage/connect/ha_connect.cc82
1 files changed, 43 insertions, 39 deletions
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 1e9e7bab075..343a90e54e5 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -4600,9 +4600,9 @@ int ha_connect::create(const char *name, TABLE *table_arg,
} // endfor field
- if (IsFileType(type)) {
- table= table_arg; // Used by called functions
+ table= table_arg; // Used by called functions
+ if (IsFileType(type)) {
if (!options->filename) {
// The file name is not specified, create a default file in
// the database directory named table_name.table_type.
@@ -4666,45 +4666,48 @@ int ha_connect::create(const char *name, TABLE *table_arg,
} // endif filename
- // To check whether indexes have to be made or remade
- if (!g->Xchk) {
- PIXDEF xdp;
+ } // endif type
- // We should be in CREATE TABLE
- if (thd_sql_command(table->in_use) != SQLCOM_CREATE_TABLE)
- push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0,
- "Wrong command in create, please contact CONNECT team");
+ // To check whether indexes have to be made or remade
+ if (!g->Xchk) {
+ PIXDEF xdp;
- // Get the index definitions
- if (xdp= GetIndexInfo()) {
- if (IsTypeIndexable(type)) {
- PDBUSER dup= PlgGetUser(g);
- PCATLG cat= (dup) ? dup->Catalog : NULL;
-
- if (cat) {
- cat->SetDataPath(g, table_arg->s->db.str);
-
- if ((rc= optimize(table->in_use, NULL))) {
- printf("Create rc=%d %s\n", rc, g->Message);
- my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
- rc= HA_ERR_INTERNAL_ERROR;
- } else
- CloseTable(g);
-
- } // endif cat
-
- } else {
- sprintf(g->Message, "Table type %s is not indexable", options->type);
- my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
- rc= HA_ERR_INTERNAL_ERROR;
- } // endif Indexable
+ // We should be in CREATE TABLE
+ if (thd_sql_command(table->in_use) != SQLCOM_CREATE_TABLE)
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0,
+ "Wrong command in create, please contact CONNECT team");
- } // endif xdp
+ // Get the index definitions
+ if (xdp= GetIndexInfo()) {
+ if (IsTypeIndexable(type)) {
+ PDBUSER dup= PlgGetUser(g);
+ PCATLG cat= (dup) ? dup->Catalog : NULL;
+
+ if (cat) {
+ cat->SetDataPath(g, table_arg->s->db.str);
+
+ if ((rc= optimize(table->in_use, NULL))) {
+ printf("Create rc=%d %s\n", rc, g->Message);
+ my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
+ rc= HA_ERR_INTERNAL_ERROR;
+ } else
+ CloseTable(g);
+
+ } // endif cat
+
+ } else {
+ sprintf(g->Message, "Table type %s is not indexable", options->type);
+ my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
+ rc= HA_ERR_INTERNAL_ERROR;
+ } // endif Indexable
- } else {
- PIXDEF xdp= GetIndexInfo();
+ } // endif xdp
- if (xdp && !IsTypeIndexable(type)) {
+ } else {
+ PIXDEF xdp= GetIndexInfo();
+
+ if (xdp) {
+ if (!IsTypeIndexable(type)) {
g->Xchk= NULL;
sprintf(g->Message, "Table type %s is not indexable", options->type);
my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
@@ -4714,11 +4717,12 @@ int ha_connect::create(const char *name, TABLE *table_arg,
((PCHK)g->Xchk)->newsep= GetBooleanOption("Sepindex", false);
} // endif Indexable
- } // endif Xchk
+ } else if (!((PCHK)g->Xchk)->oldpix)
+ g->Xchk= NULL;
- table= st;
- } // endif type
+ } // endif Xchk
+ table= st;
DBUG_RETURN(rc);
} // end of create