1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1

into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
This commit is contained in:
jani@ua141d10.elisa.omakaista.fi
2007-04-10 16:28:47 +03:00
95 changed files with 1975 additions and 914 deletions

View File

@ -4559,14 +4559,35 @@ find_field_in_tables(THD *thd, Item_ident *item,
{
Field *cur_field= find_field_in_table_ref(thd, cur_table, name, length,
item->name, db, table_name, ref,
check_privileges, allow_rowid,
check_privileges,
allow_rowid,
&(item->cached_field_index),
register_tree_change,
&actual_table);
if (cur_field)
{
if (cur_field == WRONG_GRANT)
return (Field*) 0;
{
if (thd->lex->sql_command != SQLCOM_SHOW_FIELDS)
return (Field*) 0;
thd->clear_error();
cur_field= find_field_in_table_ref(thd, cur_table, name, length,
item->name, db, table_name, ref,
false,
allow_rowid,
&(item->cached_field_index),
register_tree_change,
&actual_table);
if (cur_field)
{
Field *nf=new Field_null(NULL,0,Field::NONE,
cur_field->field_name,
&my_charset_bin);
nf->init(cur_table->table);
cur_field= nf;
}
}
/*
Store the original table of the field, which may be different from
@ -4589,7 +4610,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
report_error == IGNORE_EXCEPT_NON_UNIQUE)
my_error(ER_NON_UNIQ_ERROR, MYF(0),
table_name ? item->full_name() : name, thd->where);
return (Field*) 0;
return (Field*) 0;
}
found= cur_field;
}
@ -6390,7 +6411,7 @@ fill_record(THD *thd, Field **ptr, List<Item> &values, bool ignore_errors)
table= field->table;
if (field == table->next_number_field)
table->auto_increment_field_not_null= TRUE;
if (value->save_in_field(field, 0) == -1)
if (value->save_in_field(field, 0) < 0)
goto err;
}
DBUG_RETURN(thd->net.report_error);