summaryrefslogtreecommitdiff
path: root/sql/sql_analyse.cc
diff options
context:
space:
mode:
authorbar@bar.mysql.r18.ru <>2003-03-13 15:34:46 +0400
committerbar@bar.mysql.r18.ru <>2003-03-13 15:34:46 +0400
commitb4c8ecd8bcd3158e018f2f49819e23942b020e51 (patch)
tree4a17e16683d05adb365b758c5cb48b74c293d367 /sql/sql_analyse.cc
parentdba579bfb3cf0992bdcdb67b877694c6309fcd27 (diff)
downloadmariadb-git-b4c8ecd8bcd3158e018f2f49819e23942b020e51.tar.gz
filesort.cc, sql_analyse.cc, item_func.cc, item_strfunc.cc, field.cc:
Unnesessary binary() calls have been removed
Diffstat (limited to 'sql/sql_analyse.cc')
-rw-r--r--sql/sql_analyse.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index 36464126ae5..d121a151011 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -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);