Merge branch 'connect/10.0' into 10.0

This commit is contained in:
Sergei Golubchik 2015-10-27 18:57:28 +01:00
commit 3c5733cd2d
7 changed files with 66 additions and 29 deletions

View file

@ -169,7 +169,7 @@
#define JSONMAX 10 // JSON Default max grp size
extern "C" {
char version[]= "Version 1.03.0007 July 05, 2015";
char version[]= "Version 1.03.0007 October 20, 2015";
#if defined(__WIN__)
char compver[]= "Version 1.03.0007 " __DATE__ " " __TIME__;
char slash= '\\';
@ -1134,7 +1134,10 @@ PTOS ha_connect::GetTableOptionStruct(TABLE_SHARE *s)
{
TABLE_SHARE *tsp= (tshp) ? tshp : (s) ? s : table_share;
return (tsp) ? tsp->option_struct : NULL;
return (tsp && (!tsp->db_plugin ||
!stricmp(plugin_name(tsp->db_plugin)->str, "connect") ||
!stricmp(plugin_name(tsp->db_plugin)->str, "partition")))
? tsp->option_struct : NULL;
} // end of GetTableOptionStruct
/****************************************************************************/
@ -2471,7 +2474,18 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond)
!(colp[i]= tdbp->ColDB(g, (PSZ)pField->field->field_name, 0)))
return NULL; // Column does not belong to this table
if (trace) {
// These types are not yet implemented (buggy)
switch (pField->field->type()) {
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_TIME:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_NEWDATE:
return NULL;
} // endswitch type
if (trace) {
htrc("Field index=%d\n", pField->field->field_index);
htrc("Field name=%s\n", pField->field->field_name);
} // endif trace
@ -2486,12 +2500,10 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond)
if (!i && (ismul))
return NULL;
if ((res= pval->val_str(&tmp)) == NULL)
return NULL; // To be clarified
switch (args[i]->real_type()) {
switch (args[i]->real_type()) {
case COND::STRING_ITEM:
pp->Value= PlugSubAllocStr(g, NULL, res->ptr(), res->length());
res= pval->val_str(&tmp);
pp->Value= PlugSubAllocStr(g, NULL, res->ptr(), res->length());
pp->Type= (pp->Value) ? TYPE_STRING : TYPE_ERROR;
break;
case COND::INT_ITEM:
@ -2520,8 +2532,8 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond)
return NULL;
} // endswitch type
if (trace)
htrc("Value=%.*s\n", res->length(), res->ptr());
if (trace)
htrc("Value type=%hd\n", pp->Type);
// Append the value to the argument list
if (pprec)