summaryrefslogtreecommitdiff
path: root/sql/sql_analyse.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-06-04 08:29:08 +0300
committerunknown <monty@hundin.mysql.fi>2002-06-04 08:29:08 +0300
commitdaff6c5115b74c611222095fff40d075909ae454 (patch)
treed273a823d7f94fdea3e5775b8d8cd0b912812b0f /sql/sql_analyse.cc
parent08526ba32d9f4c353640b928edfdde862efc8596 (diff)
parentad4e68655565878b31ac67ef1819d9ef29312c51 (diff)
downloadmariadb-git-daff6c5115b74c611222095fff40d075909ae454.tar.gz
merge with 4.0 to get last fixes to last merge
BitKeeper/etc/logging_ok: auto-union Docs/manual.texi: Auto merged client/mysqltest.c: Auto merged mysql-test/r/alter_table.result: Auto merged mysql-test/r/func_math.result: Auto merged sql/hostname.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_analyse.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: merge with 4.0
Diffstat (limited to 'sql/sql_analyse.cc')
-rw-r--r--sql/sql_analyse.cc27
1 files changed, 16 insertions, 11 deletions
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index cc3406d0f54..91d6b967929 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -90,21 +90,21 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result,
(*param->item)->val() < 0)
{
net_printf(&thd->net, ER_WRONG_PARAMETERS_TO_PROCEDURE, proc_name);
- return 0;
+ DBUG_RETURN(0);
}
pc->max_tree_elements = (uint) (*param->item)->val_int();
param = param->next;
if (param->next) // no third parameter possible
{
net_printf(&thd->net, ER_WRONG_PARAMCOUNT_TO_PROCEDURE, proc_name);
- return 0;
+ DBUG_RETURN(0);
}
// second parameter
if ((*param->item)->type() != Item::INT_ITEM ||
(*param->item)->val() < 0)
{
net_printf(&thd->net, ER_WRONG_PARAMETERS_TO_PROCEDURE, proc_name);
- return 0;
+ DBUG_RETURN(0);
}
pc->max_treemem = (uint) (*param->item)->val_int();
}
@@ -112,7 +112,7 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result,
(*param->item)->val() < 0)
{
net_printf(&thd->net, ER_WRONG_PARAMETERS_TO_PROCEDURE, proc_name);
- return 0;
+ DBUG_RETURN(0);
}
// if only one parameter was given, it will be the value of max_tree_elements
else
@@ -148,21 +148,26 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result,
if (item->result_type() == STRING_RESULT)
*f_info++ = new field_str(item, pc);
}
- return pc;
-} // proc_analyse_init
+ DBUG_RETURN(pc);
+}
-// return 1 if number, else return 0
-// store info about found number in info
-// NOTE:It is expected, that elements of 'info' are all zero!
+/*
+ Return 1 if number, else return 0
+ store info about found number in info
+ NOTE:It is expected, that elements of 'info' are all zero!
+*/
+
bool test_if_number(NUM_INFO *info, const char *str, uint str_len)
{
const char *begin, *end = str + str_len;
DBUG_ENTER("test_if_number");
- // MySQL removes any endspaces of a string, so we must take care only of
- // spaces in front of a string
+ /*
+ MySQL removes any endspaces of a string, so we must take care only of
+ spaces in front of a string
+ */
for (; str != end && my_isspace(system_charset_info, *str); str++) ;
if (str == end)
return 0;