mirror of
https://github.com/MariaDB/server.git
synced 2026-05-01 20:55:32 +02:00
Automerge.
This commit is contained in:
commit
f4420a3b90
3 changed files with 34 additions and 5 deletions
|
|
@ -4578,13 +4578,14 @@ Item_func::optimize_type Item_func_like::select_optimize() const
|
|||
if (args[1]->const_item())
|
||||
{
|
||||
String* res2= args[1]->val_str((String *)&cmp.value2);
|
||||
const char *ptr2;
|
||||
|
||||
if (!res2)
|
||||
if (!res2 || !(ptr2= res2->ptr()))
|
||||
return OPTIMIZE_NONE;
|
||||
|
||||
if (*res2->ptr() != wild_many)
|
||||
if (*ptr2 != wild_many)
|
||||
{
|
||||
if (args[0]->result_type() != STRING_RESULT || *res2->ptr() != wild_one)
|
||||
if (args[0]->result_type() != STRING_RESULT || *ptr2 != wild_one)
|
||||
return OPTIMIZE_OP;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue