~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/oldlibdrizzle/oldlibdrizzle.cc

Merge Nathan

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "errmsg.h"
27
27
#include "oldlibdrizzle.h"
28
28
 
 
29
#include <algorithm>
 
30
 
 
31
using namespace std;
 
32
 
29
33
#define PROTOCOL_VERSION 10
30
34
 
31
35
extern uint32_t drizzled_tcp_port;
165
169
    pos=drizzleclient_net_store_length(pos, session->main_da.last_insert_id());
166
170
    int2store(pos, session->main_da.server_status());
167
171
    pos+=2;
168
 
    tmp= cmin(session->main_da.total_warn_count(), (uint32_t)65535);
 
172
    tmp= min(session->main_da.total_warn_count(), (uint32_t)65535);
169
173
    message= session->main_da.message();
170
174
  }
171
175
  else
174
178
    pos=drizzleclient_net_store_length(pos, 0);
175
179
    int2store(pos, session->server_status);
176
180
    pos+=2;
177
 
    tmp= cmin(session->total_warn_count, (uint32_t)65535);
 
181
    tmp= min(session->total_warn_count, (uint32_t)65535);
178
182
  }
179
183
 
180
184
  /* We can only return up to 65535 warnings in two bytes */
239
243
    Don't send warn count during SP execution, as the warn_list
240
244
    is cleared between substatements, and mysqltest gets confused
241
245
  */
242
 
  uint32_t tmp= cmin(total_warn_count, (uint32_t)65535);
 
246
  uint32_t tmp= min(total_warn_count, (uint32_t)65535);
243
247
  buff[0]= DRIZZLE_PROTOCOL_NO_MORE_DATA;
244
248
  int2store(buff+1, tmp);
245
249
  /*