Commit dcc1d822 authored by evgen@moonbone.local's avatar evgen@moonbone.local

item_cmpfunc.cc, field.cc, sql_insert.cc, sql_class.h, sql_yacc.yy:

  Post merge fix.
parent a52c981d
...@@ -6426,8 +6426,8 @@ uint Field_string::get_key_image(uchar *buff, uint length, imagetype type_arg) ...@@ -6426,8 +6426,8 @@ uint Field_string::get_key_image(uchar *buff, uint length, imagetype type_arg)
length / field_charset->mbmaxlen); length / field_charset->mbmaxlen);
memcpy(buff, ptr, bytes); memcpy(buff, ptr, bytes);
if (bytes < length) if (bytes < length)
field_charset->cset->fill(field_charset, buff + bytes, length - bytes, field_charset->cset->fill(field_charset, (char*) buff + bytes,
field_charset->pad_char); length - bytes, field_charset->pad_char);
return bytes; return bytes;
} }
......
...@@ -1772,6 +1772,7 @@ void Item_func_between::fix_length_and_dec() ...@@ -1772,6 +1772,7 @@ void Item_func_between::fix_length_and_dec()
int i; int i;
bool datetime_found= FALSE; bool datetime_found= FALSE;
compare_as_dates= TRUE; compare_as_dates= TRUE;
THD *thd= current_thd;
/* /*
As some compare functions are generated after sql_yacc, As some compare functions are generated after sql_yacc,
......
...@@ -73,6 +73,7 @@ typedef struct st_copy_info { ...@@ -73,6 +73,7 @@ typedef struct st_copy_info {
ha_rows updated; ha_rows updated;
ha_rows copied; ha_rows copied;
ha_rows error_count; ha_rows error_count;
ha_rows touched; /* Number of touched records */
enum enum_duplicates handle_duplicates; enum enum_duplicates handle_duplicates;
int escape_char, last_errno; int escape_char, last_errno;
bool ignore; bool ignore;
......
...@@ -1429,6 +1429,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) ...@@ -1429,6 +1429,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
} }
goto err; goto err;
} }
info->touched++;
if ((table->file->ha_table_flags() & HA_PARTIAL_COLUMN_READ) || if ((table->file->ha_table_flags() & HA_PARTIAL_COLUMN_READ) ||
compare_record(table)) compare_record(table))
{ {
......
...@@ -7509,7 +7509,8 @@ select_derived2: ...@@ -7509,7 +7509,8 @@ select_derived2:
{ {
LEX *lex= Lex; LEX *lex= Lex;
lex->derived_tables|= DERIVED_SUBQUERY; lex->derived_tables|= DERIVED_SUBQUERY;
if (!lex->expr_allows_subselect) if (!lex->expr_allows_subselect ||
lex->sql_command == (int)SQLCOM_PURGE)
{ {
my_parse_error(ER(ER_SYNTAX_ERROR)); my_parse_error(ER(ER_SYNTAX_ERROR));
MYSQL_YYABORT; MYSQL_YYABORT;
...@@ -11231,7 +11232,8 @@ subselect_init: ...@@ -11231,7 +11232,8 @@ subselect_init:
subselect_start: subselect_start:
{ {
LEX *lex=Lex; LEX *lex=Lex;
if (!lex->expr_allows_subselect) if (!lex->expr_allows_subselect ||
lex->sql_command == (int)SQLCOM_PURGE)
{ {
my_parse_error(ER(ER_SYNTAX_ERROR)); my_parse_error(ER(ER_SYNTAX_ERROR));
MYSQL_YYABORT; MYSQL_YYABORT;
......
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