diff options
author | unknown <bell@sanja.is.com.ua> | 2005-11-20 20:47:07 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-11-20 20:47:07 +0200 |
commit | fe63e095816a744950e3a3f6d978f074fd3fcd93 (patch) | |
tree | 178b80a009c667cc88b5c83cbe9636892d375946 /sql/item_strfunc.cc | |
parent | 5d425f936190057f727f73c8575fe5953cf56101 (diff) | |
download | mariadb-git-fe63e095816a744950e3a3f6d978f074fd3fcd93.tar.gz |
Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
sql/field.cc:
Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
sql/ha_berkeley.cc:
A bad example of usage of a string with its length fixed.
sql/ha_federated.cc:
Inefficient usage of String::append() fixed.
sql/ha_myisammrg.cc:
Bad examples of usage of a string with its length fixed.
sql/handler.cc:
Inefficient usage of String::append() fixed.
sql/item.cc:
Bad examples of usage of a string with its length fixed.
sql/item.h:
A bad example of usage of a string with its length fixed.
sql/item_cmpfunc.cc:
Bad examples of usage of a string with its length fixed.
sql/item_func.cc:
Bad examples of usage of a string with its length fixed.
sql/item_strfunc.cc:
Bad examples of usage of a string with its length fixed.
sql/item_subselect.cc:
Bad examples of usage of a string with its length fixed.
sql/item_sum.cc:
Bad examples of usage of a string with its length fixed.
Inefficient usage of String::append() fixed.
sql/item_timefunc.cc:
Inefficient using of String::append() fixed.
Bad examples of usage of a string with its length fixed.
sql/item_uniq.h:
Bad examples of usage of a string with its length fixed.
sql/key.cc:
Bad examples of usage of a string with its length fixed.
sql/log.cc:
Bad examples of usage of a string with its length fixed.
sql/log_event.cc:
Bad examples of usage of a string with its length fixed.
sql/mysqld.cc:
The dummy parser hook allocated.
sql/opt_range.cc:
Inefficient usage of String::append() fixed.
sql/parse_file.cc:
Bad examples of usage of a string with its length fixed.
A hook for unknown keys added to the parser.
sql/parse_file.h:
A hook for unknown keys added to the parser.
sql/protocol.cc:
A bad example of usage of a string with its length fixed.
sql/repl_failsafe.cc:
Bad examples of usage of a string with its length fixed.
sql/share/errmsg.txt:
A warning for old format config file.
sql/slave.cc:
Bad examples of usage of a string with its length fixed.
sql/sp.cc:
Bad examples of usage of a string with its length fixed.
sql/sp_head.cc:
Bad examples of usage of a string with its length fixed.
sql/spatial.cc:
A bad example of usage of a string with its length fixed.
sql/sql_acl.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_analyse.cc:
Bad examples of usage of a string with its length fixed.
Inefficient usage of String::append() fixed.
sql/sql_lex.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_load.cc:
A bad example of usage of a string with its length fixed.
sql/sql_parse.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_prepare.cc:
A bad example of usage of a string with its length fixed.
sql/sql_select.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_show.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_string.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_string.h:
The macro definition moved to sql_string.h to
be accessible in all parts of server.
sql/sql_table.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_trigger.cc:
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
fixed (BUG#14090).
The hook for processing incorrect sql_mode record added.
sql/sql_view.cc:
A dummy hook used for parsing views.
sql/structs.h:
The macro definition moved to sql_string.h to be
accessible in all parts of server.
sql/table.cc:
A bad example of usage of a string with its length fixed.
sql/tztime.cc:
A bad example of usage of a string with its length fixed.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 1e8fe2e695f..a8c51bb6662 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1790,7 +1790,7 @@ String *Item_func_format::val_str(String *str) void Item_func_format::print(String *str) { - str->append("format(", 7); + str->append(STRING_WITH_LEN("format(")); args[0]->print(str); str->append(','); // my_charset_bin is good enough for numbers @@ -1950,7 +1950,7 @@ String *Item_func_make_set::val_str(String *str) void Item_func_make_set::print(String *str) { - str->append("make_set(", 9); + str->append(STRING_WITH_LEN("make_set(")); item->print(str); if (arg_count) { @@ -2331,9 +2331,9 @@ void Item_func_conv_charset::fix_length_and_dec() void Item_func_conv_charset::print(String *str) { - str->append("convert(", 8); + str->append(STRING_WITH_LEN("convert(")); args[0]->print(str); - str->append(" using ", 7); + str->append(STRING_WITH_LEN(" using ")); str->append(conv_charset->csname); str->append(')'); } @@ -2403,7 +2403,7 @@ void Item_func_set_collation::print(String *str) { str->append('('); args[0]->print(str); - str->append(" collate ", 9); + str->append(STRING_WITH_LEN(" collate ")); DBUG_ASSERT(args[1]->basic_const_item() && args[1]->type() == Item::STRING_ITEM); args[1]->str_value.print(str); @@ -2523,9 +2523,9 @@ String *Item_func_unhex::val_str(String *str) void Item_func_binary::print(String *str) { - str->append("cast(", 5); + str->append(STRING_WITH_LEN("cast(")); args[0]->print(str); - str->append(" as binary)", 11); + str->append(STRING_WITH_LEN(" as binary)")); } @@ -2630,7 +2630,7 @@ String* Item_func_export_set::val_str(String* str) } break; case 3: - sep_buf.set(",", 1, default_charset()); + sep_buf.set(STRING_WITH_LEN(","), default_charset()); sep = &sep_buf; break; default: @@ -2745,7 +2745,8 @@ String *Item_func_quote::val_str(String *str) uint arg_length, new_length; if (!arg) // Null argument { - str->copy("NULL", 4, collation.collation); // Return the string 'NULL' + /* Return the string 'NULL' */ + str->copy(STRING_WITH_LEN("NULL"), collation.collation); null_value= 0; return str; } |