mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
filesort.cc, sql_analyse.cc, item_func.cc, item_strfunc.cc, field.cc:
Unnesessary binary() calls have been removed
This commit is contained in:
@ -732,7 +732,7 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows)
|
||||
{
|
||||
if (must_be_blob)
|
||||
{
|
||||
if (item->binary())
|
||||
if (item->charset() == &my_charset_bin)
|
||||
answer->append("TINYBLOB", 8);
|
||||
else
|
||||
answer->append("TINYTEXT", 8);
|
||||
@ -750,21 +750,21 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows)
|
||||
}
|
||||
else if (max_length < (1L << 16))
|
||||
{
|
||||
if (item->binary())
|
||||
if (item->charset() == &my_charset_bin)
|
||||
answer->append("BLOB", 4);
|
||||
else
|
||||
answer->append("TEXT", 4);
|
||||
}
|
||||
else if (max_length < (1L << 24))
|
||||
{
|
||||
if (item->binary())
|
||||
if (item->charset() == &my_charset_bin)
|
||||
answer->append("MEDIUMBLOB", 10);
|
||||
else
|
||||
answer->append("MEDIUMTEXT", 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item->binary())
|
||||
if (item->charset() == &my_charset_bin)
|
||||
answer->append("LONGBLOB", 8);
|
||||
else
|
||||
answer->append("LONGTEXT", 8);
|
||||
|
Reference in New Issue
Block a user