fixed subselect null test
fixed method definition (overloading instead of redefinition) fixed time expression type definition mysql-test/r/subselect.result: test of subselect null test mysql-test/t/subselect.test: test of subselect null test sql/item.h: fixed method definition (overloading instead of redefinition) sql/item_subselect.h: fixed subselect null test sql/item_timefunc.cc: fixed time expression type definition
This commit is contained in:
parent
71a6aa3b0c
commit
1062220566
@ -47,6 +47,11 @@ select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
|
||||
Wrong usage of PROCEDURE and subquery
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
|
||||
Incorrect parameters to procedure 'ANALYSE'
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
a
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
|
||||
a
|
||||
1
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int, b int);
|
||||
|
@ -24,6 +24,8 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
|
||||
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
|
||||
-- error 1108
|
||||
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
|
||||
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
|
||||
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
|
||||
create table t1 (a int);
|
||||
|
@ -208,7 +208,7 @@ public:
|
||||
{
|
||||
return field->result_type();
|
||||
}
|
||||
enum_field_types field_type()
|
||||
enum_field_types field_type() const
|
||||
{
|
||||
return field->type();
|
||||
}
|
||||
|
@ -75,7 +75,11 @@ public:
|
||||
bool assigned() { return value_assigned; }
|
||||
void assigned(bool a) { value_assigned= a; }
|
||||
enum Type type() const;
|
||||
bool is_null() { return null_value; }
|
||||
bool is_null()
|
||||
{
|
||||
val_int();
|
||||
return null_value;
|
||||
}
|
||||
bool fix_fields(THD *thd, TABLE_LIST *tables, Item **ref);
|
||||
virtual void fix_length_and_dec();
|
||||
table_map used_tables() const;
|
||||
|
@ -1025,7 +1025,7 @@ void Item_date_add_interval::fix_length_and_dec()
|
||||
cached_field_type= MYSQL_TYPE_DATETIME;
|
||||
else if (arg0_field_type == MYSQL_TYPE_DATE)
|
||||
{
|
||||
if (int_type <= INTERVAL_MONTH || int_type == INTERVAL_YEAR_MONTH)
|
||||
if (int_type <= INTERVAL_DAY || int_type == INTERVAL_YEAR_MONTH)
|
||||
cached_field_type= arg0_field_type;
|
||||
else
|
||||
cached_field_type= MYSQL_TYPE_DATETIME;
|
||||
|
Loading…
x
Reference in New Issue
Block a user