~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to include/mysql_com.h

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
159
159
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
160
160
 
 
161
/* Gather all possible capabilites (flags) supported by the server */
 
162
#define CLIENT_ALL_FLAGS  (CLIENT_LONG_PASSWORD | \
 
163
                           CLIENT_FOUND_ROWS | \
 
164
                           CLIENT_LONG_FLAG | \
 
165
                           CLIENT_CONNECT_WITH_DB | \
 
166
                           CLIENT_NO_SCHEMA | \
 
167
                           CLIENT_COMPRESS | \
 
168
                           CLIENT_ODBC | \
 
169
                           CLIENT_LOCAL_FILES | \
 
170
                           CLIENT_IGNORE_SPACE | \
 
171
                           CLIENT_PROTOCOL_41 | \
 
172
                           CLIENT_INTERACTIVE | \
 
173
                           CLIENT_SSL | \
 
174
                           CLIENT_IGNORE_SIGPIPE | \
 
175
                           CLIENT_TRANSACTIONS | \
 
176
                           CLIENT_RESERVED | \
 
177
                           CLIENT_SECURE_CONNECTION | \
 
178
                           CLIENT_MULTI_STATEMENTS | \
 
179
                           CLIENT_MULTI_RESULTS | \
 
180
                           CLIENT_SSL_VERIFY_SERVER_CERT | \
 
181
                           CLIENT_REMEMBER_OPTIONS)
 
182
 
 
183
/*
 
184
  Switch off the flags that are optional and depending on build flags
 
185
  If any of the optional flags is supported by the build it will be switched
 
186
  on before sending to the client during the connection handshake.
 
187
*/
 
188
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
 
189
                                               & ~CLIENT_COMPRESS) \
 
190
                                               & ~CLIENT_SSL_VERIFY_SERVER_CERT)
 
191
 
161
192
#define SERVER_STATUS_IN_TRANS     1    /* Transaction has started */
162
193
#define SERVER_STATUS_AUTOCOMMIT   2    /* Server in auto_commit mode */
163
194
#define SERVER_MORE_RESULTS_EXISTS 8    /* Multi query - next query exists */
164
195
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
165
196
#define SERVER_QUERY_NO_INDEX_USED      32
166
 
/*
 
197
/**
167
198
  The server was able to fulfill the clients request and opened a
168
199
  read-only non-scrollable cursor for a query. This flag comes
169
200
  in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
170
201
*/
171
202
#define SERVER_STATUS_CURSOR_EXISTS 64
172
 
/*
 
203
/**
173
204
  This flag is sent when a read-only cursor is exhausted, in reply to
174
205
  COM_STMT_FETCH command.
175
206
*/
176
207
#define SERVER_STATUS_LAST_ROW_SENT 128
177
208
#define SERVER_STATUS_DB_DROPPED        256 /* A database was dropped */
178
209
#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
 
210
/**
 
211
  Sent to the client if after a prepared statement reprepare
 
212
  we discovered that the new statement returns a different 
 
213
  number of result set columns.
 
214
*/
 
215
#define SERVER_STATUS_METADATA_CHANGED 1024
179
216
/*
180
217
  Tell clients that this query was logged to the slow query log.
181
218
  Not yet set in the server, but interface is defined for applications
182
219
  to use.  See WorkLog 4098.
183
220
*/
184
 
#define SERVER_QUERY_WAS_SLOW           1024
 
221
#define SERVER_QUERY_WAS_SLOW           2048
 
222
 
 
223
/**
 
224
  Server status flags that must be cleared when starting
 
225
  execution of a new SQL statement.
 
226
  Flags from this set are only added to the
 
227
  current server status by the execution engine, but 
 
228
  never removed -- the execution engine expects them 
 
229
  to disappear automagically by the next command.
 
230
*/
 
231
#define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \
 
232
                                 SERVER_QUERY_NO_INDEX_USED|\
 
233
                                 SERVER_MORE_RESULTS_EXISTS|\
 
234
                                 SERVER_STATUS_METADATA_CHANGED)
185
235
 
186
236
#define MYSQL_ERRMSG_SIZE       512
187
237
#define NET_READ_TIMEOUT        30              /* Timeout on read */
190
240
 
191
241
#define ONLY_KILL_QUERY         1
192
242
 
 
243
 
193
244
struct st_vio;                                  /* Only C */
194
245
typedef struct st_vio Vio;
195
246
 
376
427
struct sockaddr;
377
428
int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
378
429
               unsigned int timeout);
379
 
 
380
 
struct rand_struct {
381
 
  unsigned long seed1,seed2,max_value;
382
 
  double max_value_dbl;
383
 
};
 
430
struct my_rnd_struct;
384
431
 
385
432
#ifdef __cplusplus
386
433
}
391
438
enum Item_result {STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT,
392
439
                  DECIMAL_RESULT,
393
440
                  MAX_NO_ITEM_RESULTS /* Should always be last */
 
441
#ifdef MYSQL_SERVER
 
442
  ,IMPOSSIBLE_RESULT  /* Yes, we know this is ugly, don't tell us */
 
443
#endif
394
444
};
395
445
 
396
446
typedef struct st_udf_args
436
486
  implemented in sql/password.c
437
487
*/
438
488
 
439
 
void randominit(struct rand_struct *, unsigned long seed1,
440
 
                unsigned long seed2);
441
 
double my_rnd(struct rand_struct *);
442
 
void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
 
489
void create_random_string(char *to, unsigned int length,
 
490
                          struct my_rnd_struct *rand_st);
443
491
 
444
492
void hash_password(unsigned long *to, const char *password, unsigned int password_len);
445
493
void make_scrambled_password_323(char *to, const char *password);
481
529
#define MYSQL_STMT_HEADER       4
482
530
#define MYSQL_LONG_DATA_HEADER  6
483
531
 
 
532
#define NOT_FIXED_DEC           31
484
533
#endif