1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-22 17:44:29 +03:00

Merge bk-internal.mysql.com:/home/bk/mysql-3.23

into mashka.mysql.fi:/home/my/mysql-3.23
This commit is contained in:
monty@mashka.mysql.fi
2003-03-12 16:43:37 +02:00
11 changed files with 69 additions and 33 deletions

View File

@@ -194,6 +194,17 @@ bool Item_field::get_date(TIME *ltime,bool fuzzydate)
return 0;
}
bool Item_field::get_date_result(TIME *ltime,bool fuzzydate)
{
if ((null_value=result_field->is_null()) ||
result_field->get_date(ltime,fuzzydate))
{
bzero((char*) ltime,sizeof(*ltime));
return 1;
}
return 0;
}
bool Item_field::get_time(TIME *ltime)
{
if ((null_value=field->is_null()) || field->get_time(ltime))

View File

@@ -82,6 +82,8 @@ public:
virtual void split_sum_func(List<Item> &fields) {}
virtual bool get_date(TIME *ltime,bool fuzzydate);
virtual bool get_time(TIME *ltime);
virtual bool get_date_result(TIME *ltime,bool fuzzydate)
{ return get_date(ltime,fuzzydate); }
};
@@ -129,8 +131,9 @@ public:
return field->result_type();
}
Field *tmp_table_field() { return result_field; }
bool get_date(TIME *ltime,bool fuzzydate);
bool get_time(TIME *ltime);
bool get_date(TIME *ltime,bool fuzzydate);
bool get_date_result(TIME *ltime,bool fuzzydate);
bool get_time(TIME *ltime);
};
@@ -332,8 +335,8 @@ public:
return tmp;
}
bool get_date(TIME *ltime,bool fuzzydate)
{
return (null_value=(*ref)->get_date(ltime,fuzzydate));
{
return (null_value=(*ref)->get_date_result(ltime,fuzzydate));
}
bool send(String *tmp) { return (*ref)->send(tmp); }
void make_field(Send_field *field) { (*ref)->make_field(field); }

View File

@@ -181,7 +181,7 @@ static my_bool net_realloc(NET *net, ulong length)
void net_clear(NET *net)
{
#ifndef EXTRA_DEBUG
int count; // One may get 'unused' warning
int count; /* One may get 'unused' warning */
bool is_blocking=vio_is_blocking(net->vio);
if (is_blocking)
vio_blocking(net->vio, FALSE);

View File

@@ -2257,6 +2257,8 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
{
JOIN_TAB *tab=join->join_tab+i;
table_map current_map= tab->table->map;
if (i == join->tables-1)
current_map|= RAND_TABLE_BIT;
bool use_quick_range=0;
used_tables|=current_map;