summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-06-10 11:59:45 +0300
committerunknown <monty@mysql.com>2004-06-10 11:59:45 +0300
commit3e5eb498bcc47361928d20672ff6c76329860cef (patch)
tree1899e10015ceea27466380baa0f763700a85cb5d /sql
parent4075c305154e11dc8bacae917ea0194119785dfb (diff)
parent3665b3be90c2821dc95903cdf39df7a54e3c91a1 (diff)
downloadmariadb-git-3e5eb498bcc47361928d20672ff6c76329860cef.tar.gz
Merge with 3.23 to get latest bug fixes
mysql-test/t/type_date.test: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/item_cmpfunc.h: Auto merged sql/sql_acl.cc: Auto merged mysql-test/r/type_date.result: merge with 3.23
Diffstat (limited to 'sql')
-rw-r--r--sql/field.cc18
-rw-r--r--sql/field.h1
-rw-r--r--sql/item_cmpfunc.h1
-rw-r--r--sql/sql_acl.cc4
4 files changed, 21 insertions, 3 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 4e9718ca458..7273c9036c4 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -2960,6 +2960,24 @@ String *Field_time::val_str(String *val_buffer,
return val_buffer;
}
+bool Field_time::get_date(TIME *ltime,
+ bool fuzzydate __attribute__((unused)))
+{
+ long tmp=(long) sint3korr(ptr);
+ ltime->neg=0;
+ if (tmp < 0)
+ {
+ ltime->neg= 1;
+ tmp=-tmp;
+ }
+ ltime->hour=tmp/10000;
+ tmp-=ltime->hour*10000;
+ ltime->minute= tmp/100;
+ ltime->second= tmp % 100;
+ ltime->year= ltime->month= ltime->day= ltime->second_part= 0;
+ return 0;
+}
+
bool Field_time::get_time(TIME *ltime)
{
long tmp=(long) sint3korr(ptr);
diff --git a/sql/field.h b/sql/field.h
index 6f049e3809e..5a1ab163266 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -690,6 +690,7 @@ public:
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
+ bool get_date(TIME *ltime,bool fuzzydate);
bool get_time(TIME *ltime);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 9f19e7575d5..a0bcd864d4b 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -583,7 +583,6 @@ public:
Item_cond() : Item_bool_func(), abort_on_null(1) { const_item_cache=0; }
Item_cond(Item *i1,Item *i2) :Item_bool_func(), abort_on_null(0)
{ list.push_back(i1); list.push_back(i2); }
- ~Item_cond() { list.delete_elements(); }
bool add(Item *item) { return list.push_back(item); }
bool fix_fields(THD *,struct st_table_list *);
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 9b676442995..4af6f407b57 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2715,7 +2715,7 @@ bool check_grant_all_columns(THD *thd, ulong want_access, TABLE *table)
if (table->grant.version != grant_version)
{
table->grant.grant_table=
- table_hash_search(thd->host,thd->ip,thd->db,
+ table_hash_search(thd->host, thd->ip, table->table_cache_key,
thd->priv_user,
table->real_name,0); /* purecov: inspected */
table->grant.version=grant_version; /* purecov: inspected */
@@ -2821,7 +2821,7 @@ ulong get_column_grant(THD *thd, TABLE_LIST *table, Field *field)
if (table->grant.version != grant_version)
{
table->grant.grant_table=
- table_hash_search(thd->host,thd->ip,thd->db,
+ table_hash_search(thd->host, thd->ip, table->db,
thd->priv_user,
table->real_name,0); /* purecov: inspected */
table->grant.version=grant_version; /* purecov: inspected */