158
158
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
159
159
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
161
/* Gather all possible capabilites (flags) supported by the server */
162
#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \
163
CLIENT_FOUND_ROWS | \
165
CLIENT_CONNECT_WITH_DB | \
169
CLIENT_LOCAL_FILES | \
170
CLIENT_IGNORE_SPACE | \
171
CLIENT_PROTOCOL_41 | \
172
CLIENT_INTERACTIVE | \
174
CLIENT_IGNORE_SIGPIPE | \
175
CLIENT_TRANSACTIONS | \
177
CLIENT_SECURE_CONNECTION | \
178
CLIENT_MULTI_STATEMENTS | \
179
CLIENT_MULTI_RESULTS | \
180
CLIENT_SSL_VERIFY_SERVER_CERT | \
181
CLIENT_REMEMBER_OPTIONS)
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.
188
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
189
& ~CLIENT_COMPRESS) \
190
& ~CLIENT_SSL_VERIFY_SERVER_CERT)
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
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.
171
202
#define SERVER_STATUS_CURSOR_EXISTS 64
173
204
This flag is sent when a read-only cursor is exhausted, in reply to
174
205
COM_STMT_FETCH command.
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
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.
215
#define SERVER_STATUS_METADATA_CHANGED 1024
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.
184
#define SERVER_QUERY_WAS_SLOW 1024
221
#define SERVER_QUERY_WAS_SLOW 2048
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.
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)
186
236
#define MYSQL_ERRMSG_SIZE 512
187
237
#define NET_READ_TIMEOUT 30 /* Timeout on read */
391
438
enum Item_result {STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT,
393
440
MAX_NO_ITEM_RESULTS /* Should always be last */
442
,IMPOSSIBLE_RESULT /* Yes, we know this is ugly, don't tell us */
396
446
typedef struct st_udf_args
436
486
implemented in sql/password.c
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);
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);