Commit 00d5e43c authored by mskold@mysql.com's avatar mskold@mysql.com

Added support for condition pushdown to storage engine for LIKE of varbin

parent 07cdc9e3
...@@ -6620,7 +6620,9 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond, ...@@ -6620,7 +6620,9 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
} }
case(Item_func::LIKE_FUNC): { case(Item_func::LIKE_FUNC): {
if (!value || !field) break; if (!value || !field) break;
if (value->qualification.value_type != Item::STRING_ITEM) break; if ((value->qualification.value_type != Item::STRING_ITEM) &&
(value->qualification.value_type != Item::VARBIN_ITEM))
break;
// Save value in right format for the field type // Save value in right format for the field type
value->save_in_field(field); value->save_in_field(field);
DBUG_PRINT("info", ("Generating LIKE filter: like(%d,%s,%d)", DBUG_PRINT("info", ("Generating LIKE filter: like(%d,%s,%d)",
...@@ -6636,7 +6638,9 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond, ...@@ -6636,7 +6638,9 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
} }
case(Item_func::NOTLIKE_FUNC): { case(Item_func::NOTLIKE_FUNC): {
if (!value || !field) break; if (!value || !field) break;
if (value->qualification.value_type != Item::STRING_ITEM) break; if ((value->qualification.value_type != Item::STRING_ITEM) &&
(value->qualification.value_type != Item::VARBIN_ITEM))
break;
// Save value in right format for the field type // Save value in right format for the field type
value->save_in_field(field); value->save_in_field(field);
DBUG_PRINT("info", ("Generating NOTLIKE filter: notlike(%d,%s,%d)", DBUG_PRINT("info", ("Generating NOTLIKE filter: notlike(%d,%s,%d)",
......
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