mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-3816 init-file stops getting executed if a long enough line is encountered; on a debug version, assertion `! is_set() || can_overwrite_status' fails
backport improved bootstrap error handling from 5.6 Was: revno: 3768.1.1 committer: Christopher Powers <chris.powers@oracle.com> timestamp: Wed 2012-05-02 22:16:40 -0500 message: Bug#11766342 INITIAL DB CREATION FAILS ON WINDOWS WITH AN ASSERT IN SQL_ERROR.CC Improved bootstrap error handling: - Detect and report file i/o errors - Report query size errors with nearest query text
This commit is contained in:
@ -29,15 +29,18 @@
|
||||
Do not increase this size, use the multiline syntax instead.
|
||||
*/
|
||||
#define MAX_BOOTSTRAP_LINE_SIZE 20000
|
||||
#define MAX_BOOTSTRAP_ERROR_LEN 256
|
||||
|
||||
#define READ_BOOTSTRAP_EOF 1
|
||||
#define READ_BOOTSTRAP_ERROR 2
|
||||
#define READ_BOOTSTRAP_SUCCESS 0
|
||||
#define READ_BOOTSTRAP_EOF 1
|
||||
#define READ_BOOTSTRAP_ERROR 2
|
||||
#define READ_BOOTSTRAP_QUERY_SIZE 3
|
||||
|
||||
typedef void *fgets_input_t;
|
||||
typedef char * (*fgets_fn_t)(char *, size_t, fgets_input_t);
|
||||
typedef char * (*fgets_fn_t)(char *, size_t, fgets_input_t, int *error);
|
||||
|
||||
int read_bootstrap_query(char *query, int *query_length,
|
||||
fgets_input_t input, fgets_fn_t fgets_fn);
|
||||
fgets_input_t input, fgets_fn_t fgets_fn, int *error);
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user