1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
bell@sanja.is.com.ua
2005-11-20 20:47:07 +02:00
parent b13dd4ff72
commit 806f9e24ff
44 changed files with 710 additions and 506 deletions

View File

@ -6691,7 +6691,7 @@ void QUICK_INDEX_MERGE_SELECT::add_info_string(String *str)
QUICK_RANGE_SELECT *quick;
bool first= TRUE;
List_iterator_fast<QUICK_RANGE_SELECT> it(quick_selects);
str->append("sort_union(");
str->append(STRING_WITH_LEN("sort_union("));
while ((quick= it++))
{
if (!first)
@ -6713,7 +6713,7 @@ void QUICK_ROR_INTERSECT_SELECT::add_info_string(String *str)
bool first= TRUE;
QUICK_RANGE_SELECT *quick;
List_iterator_fast<QUICK_RANGE_SELECT> it(quick_selects);
str->append("intersect(");
str->append(STRING_WITH_LEN("intersect("));
while ((quick= it++))
{
KEY *key_info= head->key_info + quick->index;
@ -6737,7 +6737,7 @@ void QUICK_ROR_UNION_SELECT::add_info_string(String *str)
bool first= TRUE;
QUICK_SELECT_I *quick;
List_iterator_fast<QUICK_SELECT_I> it(quick_selects);
str->append("union(");
str->append(STRING_WITH_LEN("union("));
while ((quick= it++))
{
if (!first)
@ -8868,7 +8868,7 @@ static void print_sel_tree(PARAM *param, SEL_TREE *tree, key_map *tree_map,
}
}
if (!tmp.length())
tmp.append("(empty)");
tmp.append(STRING_WITH_LEN("(empty)"));
DBUG_PRINT("info", ("SEL_TREE %p (%s) scans:%s", tree, msg, tmp.ptr()));
@ -8894,7 +8894,7 @@ static void print_ror_scans_arr(TABLE *table, const char *msg,
tmp.append(table->key_info[(*start)->keynr].name);
}
if (!tmp.length())
tmp.append("(empty)");
tmp.append(STRING_WITH_LEN("(empty)"));
DBUG_PRINT("info", ("ROR key scans (%s): %s", msg, tmp.ptr()));
DBUG_VOID_RETURN;
}