1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
This commit is contained in:
serg@serg.mylan
2004-08-07 23:18:13 +02:00
parent 6e8503142e
commit e1e1c39bda
5 changed files with 20 additions and 7 deletions

View File

@ -641,7 +641,7 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw,
if (*var_name != '$')
goto err;
digit = *++var_name - '0';
if (!(digit < 10 && digit >= 0))
if (digit < 0 || digit >= 10)
{
const char* save_var_name = var_name, *end;
uint length;
@ -660,7 +660,7 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw,
length < MAX_VAR_NAME)
{
char buff[MAX_VAR_NAME+1];
strmake(buff, save_var_name, length);
strmake(buff, save_var_name, length);
v= var_from_env(buff, "");
}
var_name--; /* Point at last character */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -268,8 +268,8 @@ void Item_bool_func2::fix_length_and_dec()
int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
{
owner= item;
func= comparator_matrix[type][(owner->functype() == Item_func::EQUAL_FUNC)?
1:0];
func= comparator_matrix[type]
[test(owner->functype() == Item_func::EQUAL_FUNC)];
if (type == ROW_RESULT)
{
uint n= (*a)->cols();

View File

@ -868,7 +868,7 @@ JOIN::optimize()
((group_list && const_tables != tables &&
(!simple_group ||
!test_if_skip_sort_order(&join_tab[const_tables], group_list,
HA_POS_ERROR, 0))) || select_distinct) &&
unit->select_limit_cnt, 0))) || select_distinct) &&
tmp_table_param.quick_group && !procedure)
{
need_tmp=1; simple_order=simple_group=0; // Force tmp table without sort