mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
post review changes 2
sql/event_parse_data.cc: don't use "not_used" variable sql/item_timefunc.cc: Item_temporal_func::fix_length_and_dec() and other changes sql/item_timefunc.h: introducing Item_timefunc::fix_length_and_dec() sql/share/errmsg.txt: don't say "column X" in the error message that used not only for columns
This commit is contained in:
parent
03b33425e5
commit
f06cac336b
35 changed files with 461 additions and 440 deletions
|
|
@ -733,11 +733,11 @@ public:
|
|||
void copy(String *dst) const { dst->set(num, &my_charset_bin); }
|
||||
};
|
||||
|
||||
class Lazy_string_dbl: public Lazy_string
|
||||
class Lazy_string_double: public Lazy_string
|
||||
{
|
||||
double num;
|
||||
public:
|
||||
Lazy_string_dbl(double num_arg) : Lazy_string(), num(num_arg) {}
|
||||
Lazy_string_double(double num_arg) : Lazy_string(), num(num_arg) {}
|
||||
void copy(String *dst) const
|
||||
{ dst->set_real(num, NOT_FIXED_DEC, &my_charset_bin); }
|
||||
};
|
||||
|
|
@ -755,6 +755,19 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static inline enum enum_mysql_timestamp_type
|
||||
mysql_type_to_time_type(enum enum_field_types mysql_type)
|
||||
{
|
||||
switch(mysql_type) {
|
||||
case MYSQL_TYPE_TIME: return MYSQL_TIMESTAMP_TIME;
|
||||
case MYSQL_TYPE_TIMESTAMP:
|
||||
case MYSQL_TYPE_DATETIME: return MYSQL_TIMESTAMP_DATETIME;
|
||||
case MYSQL_TYPE_NEWDATE:
|
||||
case MYSQL_TYPE_DATE: return MYSQL_TIMESTAMP_DATE;
|
||||
default: return MYSQL_TIMESTAMP_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
#include "sql_list.h"
|
||||
#include "sql_map.h"
|
||||
#include "my_decimal.h"
|
||||
|
|
@ -2212,7 +2225,7 @@ ulong convert_period_to_month(ulong period);
|
|||
ulong convert_month_to_period(ulong month);
|
||||
void get_date_from_daynr(long daynr,uint *year, uint *month,
|
||||
uint *day);
|
||||
my_time_t TIME_to_timestamp(THD *thd, const MYSQL_TIME *t, my_bool *not_exist);
|
||||
my_time_t TIME_to_timestamp(THD *thd, const MYSQL_TIME *t, uint *error_code);
|
||||
timestamp_type str_to_datetime_with_warn(const char *str, uint length,
|
||||
MYSQL_TIME *l_time, uint flags);
|
||||
void localtime_to_TIME(MYSQL_TIME *to, struct tm *from);
|
||||
|
|
@ -2257,19 +2270,6 @@ int my_time_compare(MYSQL_TIME *a, MYSQL_TIME *b);
|
|||
longlong get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
|
||||
Item *warn_item, bool *is_null);
|
||||
|
||||
static inline enum enum_mysql_timestamp_type
|
||||
mysql_type_to_time_type(enum enum_field_types mysql_type)
|
||||
{
|
||||
switch(mysql_type) {
|
||||
case MYSQL_TYPE_TIME: return MYSQL_TIMESTAMP_TIME;
|
||||
case MYSQL_TYPE_TIMESTAMP:
|
||||
case MYSQL_TYPE_DATETIME: return MYSQL_TIMESTAMP_DATETIME;
|
||||
case MYSQL_TYPE_NEWDATE:
|
||||
case MYSQL_TYPE_DATE: return MYSQL_TIMESTAMP_DATE;
|
||||
default: return MYSQL_TIMESTAMP_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
int test_if_number(char *str,int *res,bool allow_wildcards);
|
||||
void change_byte(uchar *,uint,char,char);
|
||||
void init_read_record(READ_RECORD *info, THD *thd, TABLE *reg_form,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue