Commit 9ecc5783 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Fix after merge

parent 3476dc8f
...@@ -622,6 +622,28 @@ int Item_field::save_in_field(Field *to) ...@@ -622,6 +622,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 Store null in field
......
...@@ -56,7 +56,7 @@ class Item { ...@@ -56,7 +56,7 @@ class Item {
virtual int save_in_field(Field *field); virtual int save_in_field(Field *field);
virtual void save_org_in_field(Field *field) virtual void save_org_in_field(Field *field)
{ (void) save_in_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); } { return save_in_field(field); }
virtual bool send(THD *thd, String *str); virtual bool send(THD *thd, String *str);
virtual bool eq(const Item *, bool binary_cmp) const; virtual bool eq(const Item *, bool binary_cmp) const;
...@@ -155,7 +155,7 @@ class Item_null :public Item ...@@ -155,7 +155,7 @@ class Item_null :public Item
longlong val_int(); longlong val_int();
String *val_str(String *str); String *val_str(String *str);
void make_field(Send_field *field); 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); int save_safe_in_field(Field *field);
enum Item_result result_type () const enum Item_result result_type () const
{ return STRING_RESULT; } { return STRING_RESULT; }
......
...@@ -3323,7 +3323,6 @@ struct my_option my_long_options[] = ...@@ -3323,7 +3323,6 @@ struct my_option my_long_options[] =
{"transaction-isolation", OPT_TX_ISOLATION, {"transaction-isolation", OPT_TX_ISOLATION,
"Default transaction isolation level", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, "Default transaction isolation level", 0, 0, 0, GET_STR, REQUIRED_ARG, 0,
0, 0, 0, 0, 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", {"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, (gptr*) &opt_external_locking, (gptr*) &opt_external_locking,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
......
...@@ -976,8 +976,8 @@ JOIN::exec() ...@@ -976,8 +976,8 @@ JOIN::exec()
We can abort sorting after thd->select_limit rows if we there is no We can abort sorting after thd->select_limit rows if we there is no
WHERE clause for any tables after the sorted one. WHERE clause for any tables after the sorted one.
*/ */
JOIN_TAB *table= &join_tab[join.const_tables+1]; JOIN_TAB *table= &join_tab[const_tables+1];
JOIN_TAB *end_table= &join_tab[join.tables]; JOIN_TAB *end_table= &join_tab[tables];
for (; table < end_table ; table++) for (; table < end_table ; table++)
{ {
if (table->select_cond) if (table->select_cond)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment