diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-10-02 14:38:13 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-10-02 14:38:13 +0200 |
commit | 3a2116241b128b811ee2455845ff9710da3115ac (patch) | |
tree | 7de53fc50126f7a19251303bd1d2a0f6cdb42069 /storage/connect/ha_connect.cc | |
parent | e29fb956145cfa1f4f8c41cafcddea36a20b23aa (diff) | |
parent | d4f6d2f08f228778fd7744554d8b12be05b6a114 (diff) | |
download | mariadb-git-3a2116241b128b811ee2455845ff9710da3115ac.tar.gz |
Merge branch '10.4' into 10.5
Diffstat (limited to 'storage/connect/ha_connect.cc')
-rw-r--r-- | storage/connect/ha_connect.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 1064b14113f..a8a0658f0db 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -3076,6 +3076,8 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) if ((iscol= args[i]->type() == COND::FIELD_ITEM)) { const char *fnm; + char buf[MAX_FIELD_WIDTH]; + String strColumn(buf, sizeof(buf), system_charset_info); ha_field_option_struct *fop; Item_field *pField= (Item_field *)args[i]; @@ -3101,8 +3103,14 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) return NULL; } else { bool h; - fnm= filp->Chk(pField->field->field_name.str, &h); + if (tty == TYPE_AM_MYSQL && !(x || ismul)) + { + strColumn.length(0); + strColumn.qs_append(STRING_WITH_LEN("`")); + strColumn.qs_append(fnm); + strColumn.append(STRING_WITH_LEN("`")); + } if (h && i && !ishav) return NULL; // Having should be col VOP arg @@ -3116,9 +3124,11 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) htrc("Field name=%s\n", pField->field->field_name.str); htrc("Field type=%d\n", pField->field->type()); htrc("Field_type=%d\n", args[i]->field_type()); - } // endif trace - - strcat((ishav ? havg : body), fnm); + } // endif trace + if (tty == TYPE_AM_MYSQL && !(x || ismul)) + strcat((ishav ? havg : body), strColumn.ptr()); + else + strcat((ishav ? havg : body), fnm); } else if (args[i]->type() == COND::FUNC_ITEM) { if (tty == TYPE_AM_MYSQL) { if (!CheckCond(g, filp, args[i])) |