summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@deer.(none)>2006-11-08 19:09:39 +0400
committerunknown <holyfoot/hf@deer.(none)>2006-11-08 19:09:39 +0400
commit90d14d50a99508a4ac459f510eb717d596976da2 (patch)
tree533737794921f247b2bb1a19b363f96a1c6b22c6 /sql/sql_select.h
parent7b126a91c00d7c2bca321da0de13f47220da1972 (diff)
parent3e0139d95750aa79d96f185c81aebd375fdc571e (diff)
downloadmariadb-git-90d14d50a99508a4ac459f510eb717d596976da2.tar.gz
Merge mysql.com:/home/hf/work/mysql-5.0.clean
into mysql.com:/home/hf/work/mysql-5.1.clean include/my_time.h: Auto merged mysql-test/r/func_group.result: Auto merged mysql-test/r/gis-rtree.result: Auto merged mysql-test/r/order_by.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/type_datetime.result: Auto merged mysql-test/r/udf.result: Auto merged mysql-test/t/func_group.test: Auto merged mysql-test/t/gis-rtree.test: Auto merged mysql-test/t/type_datetime.test: Auto merged mysql-test/t/udf.test: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/filesort.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_subselect.h: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/item_timefunc.cc: Auto merged sql/my_decimal.cc: Auto merged sql/my_decimal.h: Auto merged sql/mysql_priv.h: Auto merged sql/records.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged sql-common/my_time.c: Auto merged sql/table.cc: Auto merged sql/table.h: Auto merged mysql-test/r/type_newdecimal.result: SCCS merged mysql-test/t/type_newdecimal.test: merging sql/item.cc: merging sql/item_subselect.cc: SCCS merged sql/item_timefunc.h: merging sql/sql_lex.cc: SCCS merged sql/sql_select.h: merging
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index a66529a6459..323df568271 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -36,6 +36,8 @@ typedef struct keyuse_t {
satisfied if val has NULL 'value'.
*/
bool null_rejecting;
+ /* TRUE<=> This ref access is an outer subquery reference access */
+ bool outer_ref;
} KEYUSE;
class store_key;
@@ -494,10 +496,11 @@ class store_key :public Sql_alloc
Field *to_field; // Store data here
char *null_ptr;
char err;
- public:
+public:
+ bool null_key; /* TRUE <=> the value of the key has a null part */
enum store_key_result { STORE_KEY_OK, STORE_KEY_FATAL, STORE_KEY_CONV };
store_key(THD *thd, Field *field_arg, char *ptr, char *null, uint length)
- :null_ptr(null),err(0)
+ :null_ptr(null), err(0), null_key(0)
{
if (field_arg->type() == FIELD_TYPE_BLOB)
{
@@ -540,6 +543,7 @@ class store_key_field: public store_key
table->write_set);
copy_field.do_copy(&copy_field);
dbug_tmp_restore_column_map(table->write_set, old_map);
+ null_key= to_field->is_null();
return err != 0 ? STORE_KEY_FATAL : STORE_KEY_OK;
}
const char *name() const { return field_name; }
@@ -564,8 +568,8 @@ public:
table->write_set);
int res= item->save_in_field(to_field, 1);
dbug_tmp_restore_column_map(table->write_set, old_map);
+ null_key= to_field->is_null() || item->null_value;
return (err != 0 || res > 2 ? STORE_KEY_FATAL : (store_key_result) res);
-
}
const char *name() const { return "func"; }
};
@@ -595,6 +599,7 @@ public:
err= res;
}
}
+ null_key= to_field->is_null() || item->null_value;
return (err > 2 ? STORE_KEY_FATAL : (store_key_result) err);
}
const char *name() const { return "const"; }