1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge abotchkov@work.mysql.com:/home/bk/mysql-4.1

into bisonxp.(none):/home/hf/work/mysql-4.1
This commit is contained in:
hf@bisonxp.(none)
2002-08-03 20:26:44 +05:00
21 changed files with 675 additions and 324 deletions

View File

@ -958,8 +958,7 @@ static int send_check_errmsg(THD* thd, TABLE_LIST* table,
net_store_data(packet, "error");
net_store_data(packet, errmsg);
thd->net.last_error[0]=0;
if (my_net_write(&thd->net, (char*) thd->packet.ptr(),
packet->length()))
if (SEND_ROW(thd, &thd->net, 4, (char*) thd->packet.ptr(), packet->length()))
return -1;
return 1;
}
@ -1101,6 +1100,9 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
thd->open_options|= extra_open_options;
table->table = open_ltable(thd, table, lock_type);
#ifdef EMBEDDED_LIBRARY
thd->net.last_errno= 0; // these errors shouldn't get client
#endif
thd->open_options&= ~extra_open_options;
packet->length(0);
if (prepare_func)
@ -1122,7 +1124,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
err_msg=ER(ER_CHECK_NO_SUCH_TABLE);
net_store_data(packet, err_msg);
thd->net.last_error[0]=0;
if (my_net_write(&thd->net, (char*) thd->packet.ptr(),
if (SEND_ROW(thd, &thd->net, field_list.elements, (char*) thd->packet.ptr(),
packet->length()))
goto err;
continue;
@ -1137,7 +1139,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
net_store_data(packet, buff);
close_thread_tables(thd);
table->table=0; // For query cache
if (my_net_write(&thd->net, (char*) thd->packet.ptr(),
if (SEND_ROW(thd, &thd->net, field_list.elements, (char*) thd->packet.ptr(),
packet->length()))
goto err;
continue;
@ -1166,6 +1168,9 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
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);
net_store_data(packet, table_name);
net_store_data(packet, operator_name);
@ -1219,8 +1224,8 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
close_thread_tables(thd);
table->table=0; // For query cache
if (my_net_write(&thd->net, (char*) packet->ptr(),
packet->length()))
if (SEND_ROW(thd, &thd->net, field_list.elements,
(char *)thd->packet.ptr(), thd->packet.length()))
goto err;
}