diff options
author | unknown <monty@hundin.mysql.fi> | 2002-10-16 22:48:51 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-10-16 22:48:51 +0300 |
commit | f64428be11b4cf2006c8998b251195dfac565a36 (patch) | |
tree | c01f497a0c15a2b3784103967b170a7625654462 | |
parent | 2cbb3b229f05e6ec7324ddc11adf117974a8211a (diff) | |
download | mariadb-git-f64428be11b4cf2006c8998b251195dfac565a36.tar.gz |
Fix after merge
-rw-r--r-- | sql/item.cc | 22 | ||||
-rw-r--r-- | sql/item.h | 4 | ||||
-rw-r--r-- | sql/mysqld.cc | 1 | ||||
-rw-r--r-- | sql/sql_select.cc | 4 |
4 files changed, 26 insertions, 5 deletions
diff --git a/sql/item.cc b/sql/item.cc index f08696da715..05185a24f45 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -626,6 +626,28 @@ int Item_field::save_in_field(Field *to) Store null in field SYNOPSIS + save_in_field() + field Field where we want to store NULL + + DESCRIPTION + This is used on INSERT. + Allow NULL to be inserted in timestamp and auto_increment values + + RETURN VALUES + 0 ok + 1 Field doesn't support NULL values and can't handle 'field = NULL' +*/ + +int Item_null::save_in_field(Field *field) +{ + return set_field_to_null_with_conversions(field); +} + + +/* + Store null in field + + SYNOPSIS save_safe_in_field() field Field where we want to store NULL diff --git a/sql/item.h b/sql/item.h index 0a46974f2e3..115e9426691 100644 --- a/sql/item.h +++ b/sql/item.h @@ -56,7 +56,7 @@ public: virtual int save_in_field(Field *field); virtual void save_org_in_field(Field *field) { (void) save_in_field(field); } - virtual bool save_safe_in_field(Field *field) + virtual int save_safe_in_field(Field *field) { return save_in_field(field); } virtual bool send(THD *thd, String *str); virtual bool eq(const Item *, bool binary_cmp) const; @@ -155,7 +155,7 @@ public: longlong val_int(); String *val_str(String *str); void make_field(Send_field *field); - int save_in_field(Field *field); + int save_in_field(Field *field); int save_safe_in_field(Field *field); enum Item_result result_type () const { return STRING_RESULT; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 76d19f50f96..e6c2c198722 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3323,7 +3323,6 @@ struct my_option my_long_options[] = {"transaction-isolation", OPT_TX_ISOLATION, "Default transaction isolation level", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - 0, 0, 0, 0, 0}, {"external-locking", OPT_USE_LOCKING, "Use system (external) locking. With this option enabled you can run myisamchk to test (not repair) tables while the MySQL server is running", (gptr*) &opt_external_locking, (gptr*) &opt_external_locking, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 6c51b6bf9a8..84f8f7d180a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -976,8 +976,8 @@ JOIN::exec() We can abort sorting after thd->select_limit rows if we there is no WHERE clause for any tables after the sorted one. */ - JOIN_TAB *table= &join_tab[join.const_tables+1]; - JOIN_TAB *end_table= &join_tab[join.tables]; + JOIN_TAB *table= &join_tab[const_tables+1]; + JOIN_TAB *end_table= &join_tab[tables]; for (; table < end_table ; table++) { if (table->select_cond) |