From bc7e8b09159ba6cf2554c1e5a735167b3c3d373d Mon Sep 17 00:00:00 2001 From: "hf@bisonxp.(none)" <> Date: Tue, 9 Jul 2002 10:39:22 +0500 Subject: [PATCH] Minor fixes --- BitKeeper/etc/logging_ok | 1 + libmysqld/lib_sql.cc | 6 ++++++ sql/sql_handler.cc | 2 +- sql/sql_select.cc | 2 +- sql/sql_table.cc | 4 ++-- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 2b3a77e5d3e..77fb78694c2 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -69,3 +69,4 @@ venu@work.mysql.com worm@altair.is.lan zak@balfor.local zak@linux.local +hf@bisonxp.(none) diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index ac330919d0c..610d3d66ec9 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -813,6 +813,12 @@ bool select_send::send_data(List &items) DBUG_ENTER("send_data"); + if (unit->offset_limit_cnt) + { // using limit offset,count + unit->offset_limit_cnt--; + DBUG_RETURN(0); + } + thd->packet.length(0); while ((item=li++)) { diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 4ecd5dbca36..1b7b181a26f 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -232,7 +232,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables, goto err; } } - my_net_write(&thd->net, (char*)packet->ptr(), packet->length()); + SEND_ROW(thd, &thd->net, list.elements, (char*)packet->ptr(), packet->length()); } } num_rows++; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 4737e068d3e..4a2a792bc75 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -7309,6 +7309,6 @@ static void describe_info(THD *thd, const char *info) return; /* purecov: inspected */ packet->length(0); net_store_data(packet,info); - if (!my_net_write(&thd->net,(char*) packet->ptr(),packet->length())) + if (!SEND_ROW(thd, &thd->net, field_list.elements, (char*) packet->ptr(),packet->length())) send_eof(&thd->net); } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 96ec86e3129..04069e1081e 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1101,7 +1101,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; @@ -1116,7 +1116,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;