mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Found bugs fixed
This commit is contained in:
@ -793,6 +793,7 @@ net_field_length(uchar **packet)
|
|||||||
return (ulong) uint4korr(pos+1);
|
return (ulong) uint4korr(pos+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool select_send::send_data(List<Item> &items)
|
bool select_send::send_data(List<Item> &items)
|
||||||
{
|
{
|
||||||
List_iterator_fast<Item> li(items);
|
List_iterator_fast<Item> li(items);
|
||||||
@ -956,7 +957,7 @@ int embedded_send_row(THD *thd, int n_fields, char *data, int data_len)
|
|||||||
result->prev_ptr= &cur->next;
|
result->prev_ptr= &cur->next;
|
||||||
to= (char*) (cur->data+n_fields+1);
|
to= (char*) (cur->data+n_fields+1);
|
||||||
cp= (uchar *)data;
|
cp= (uchar *)data;
|
||||||
end_field= cur->data + n_fields + 1;
|
end_field= cur->data + n_fields;
|
||||||
|
|
||||||
for (cur_field=cur->data; cur_field<end_field; ++cur_field, ++mysql_fields)
|
for (cur_field=cur->data; cur_field<end_field; ++cur_field, ++mysql_fields)
|
||||||
{
|
{
|
||||||
@ -975,6 +976,9 @@ int embedded_send_row(THD *thd, int n_fields, char *data, int data_len)
|
|||||||
mysql_fields->max_length=len;
|
mysql_fields->max_length=len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*cur_field= to;
|
||||||
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,6 +469,9 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
|
|||||||
cause error ER_NON_UNIQ_ERROR in find_field_in_tables.
|
cause error ER_NON_UNIQ_ERROR in find_field_in_tables.
|
||||||
*/
|
*/
|
||||||
SELECT_LEX *last= 0;
|
SELECT_LEX *last= 0;
|
||||||
|
#ifdef EMBEDDED_LIBRARY
|
||||||
|
thd->net.last_errno= 0;
|
||||||
|
#endif
|
||||||
for (SELECT_LEX *sl= thd->lex.select->outer_select();
|
for (SELECT_LEX *sl= thd->lex.select->outer_select();
|
||||||
sl && !tmp;
|
sl && !tmp;
|
||||||
sl= sl->outer_select())
|
sl= sl->outer_select())
|
||||||
|
@ -1248,10 +1248,15 @@ String *Item_func_database::val_str(String *str)
|
|||||||
String *Item_func_user::val_str(String *str)
|
String *Item_func_user::val_str(String *str)
|
||||||
{
|
{
|
||||||
THD *thd=current_thd;
|
THD *thd=current_thd;
|
||||||
|
#ifdef EMBEDDED_LIBRARY
|
||||||
|
if (str->copy("localuser@localhost", (uint)strlen("localuser@localhost")))
|
||||||
|
return &empty_string;
|
||||||
|
#else
|
||||||
if (str->copy((const char*) thd->user,(uint) strlen(thd->user)) ||
|
if (str->copy((const char*) thd->user,(uint) strlen(thd->user)) ||
|
||||||
str->append('@') ||
|
str->append('@') ||
|
||||||
str->append(thd->host ? thd->host : thd->ip ? thd->ip : ""))
|
str->append(thd->host ? thd->host : thd->ip ? thd->ip : ""))
|
||||||
return &empty_string;
|
return &empty_string;
|
||||||
|
#endif
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5249,6 +5249,9 @@ end_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
|||||||
{
|
{
|
||||||
Item *item= *group->item;
|
Item *item= *group->item;
|
||||||
item->save_org_in_field(group->field);
|
item->save_org_in_field(group->field);
|
||||||
|
#ifdef EMBEDDED_LIBRARY
|
||||||
|
join->thd->net.last_errno= 0;
|
||||||
|
#endif
|
||||||
/* Store in the used key if the field was 0 */
|
/* Store in the used key if the field was 0 */
|
||||||
if (item->maybe_null)
|
if (item->maybe_null)
|
||||||
group->buff[-1]=item->null_value ? 1 : 0;
|
group->buff[-1]=item->null_value ? 1 : 0;
|
||||||
|
@ -939,8 +939,7 @@ static int send_check_errmsg(THD* thd, TABLE_LIST* table,
|
|||||||
net_store_data(packet, "error");
|
net_store_data(packet, "error");
|
||||||
net_store_data(packet, errmsg);
|
net_store_data(packet, errmsg);
|
||||||
thd->net.last_error[0]=0;
|
thd->net.last_error[0]=0;
|
||||||
if (my_net_write(&thd->net, (char*) thd->packet.ptr(),
|
if (SEND_ROW(thd, &thd->net, 4, (char*) thd->packet.ptr(), packet->length()))
|
||||||
packet->length()))
|
|
||||||
return -1;
|
return -1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1150,6 +1149,9 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int result_code = (table->table->file->*operator_func)(thd, check_opt);
|
int result_code = (table->table->file->*operator_func)(thd, check_opt);
|
||||||
|
#ifdef EMBEDDED_LIBRARY
|
||||||
|
thd->net.last_errno= 0; // these errors shouldn't get client
|
||||||
|
#endif
|
||||||
packet->length(0);
|
packet->length(0);
|
||||||
net_store_data(packet, table_name);
|
net_store_data(packet, table_name);
|
||||||
net_store_data(packet, operator_name);
|
net_store_data(packet, operator_name);
|
||||||
|
Reference in New Issue
Block a user