diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-21 16:39:19 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-21 16:39:19 +0200 |
commit | b7b5f6f1ab49948b0e15b762266d4640b3d6b7fb (patch) | |
tree | 7c302c2025184dbd053aa6135f0ff28c8ce6f359 /extra | |
parent | 5f6380adde2dac3f32b40339b9b702c0135eb7d6 (diff) | |
parent | c1d6a2d7e194225ccc19a68ea5d0f368632620d0 (diff) | |
download | mariadb-git-b7b5f6f1ab49948b0e15b762266d4640b3d6b7fb.tar.gz |
10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
Diffstat (limited to 'extra')
-rw-r--r-- | extra/comp_err.c | 11 | ||||
-rw-r--r-- | extra/my_print_defaults.c | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c index fb51377ddc5..bf757122957 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -33,8 +33,9 @@ #include <assert.h> #include <my_dir.h> -#define MAX_ROWS 1000 +#define MAX_ROWS 2000 #define HEADER_LENGTH 32 /* Length of header in errmsg.sys */ +#define ERRMSG_VERSION 3 /* Version number of errmsg.sys */ #define DEFAULT_CHARSET_DIR "../sql/share/charsets" #define ER_PREFIX "ER_" #define ER_PREFIX2 "MARIA_ER_" @@ -50,9 +51,9 @@ static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace"; #endif /* Header for errmsg.sys files */ -uchar file_head[]= { 254, 254, 2, 2 }; +uchar file_head[]= { 254, 254, 2, ERRMSG_VERSION }; /* Store positions to each error message row to store in errmsg.sys header */ -uint file_pos[MAX_ROWS]; +uint file_pos[MAX_ROWS+1]; const char *empty_string= ""; /* For empty states */ /* @@ -379,9 +380,11 @@ static int create_sys_files(struct languages *lang_head, if (my_fwrite(to, (uchar*) head, HEADER_LENGTH, MYF(MY_WME | MY_FNABP))) goto err; + file_pos[row_count]= (ftell(to) - start_pos); for (i= 0; i < row_count; i++) { - int2store(head, file_pos[i]); + /* Store length of each string */ + int2store(head, file_pos[i+1] - file_pos[i]); if (my_fwrite(to, (uchar*) head, 2, MYF(MY_WME | MY_FNABP))) goto err; } diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index 7558d6d00ae..e91163dde1c 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -26,6 +26,7 @@ #include <my_sys.h> #include <m_string.h> #include <my_getopt.h> +#include <my_default.h> #include <mysql_version.h> #define load_default_groups mysqld_groups @@ -33,6 +34,7 @@ #undef load_default_groups my_bool opt_mysqld; + const char *config_file="my"; /* Default config file */ uint verbose= 0, opt_defaults_file_used= 0; const char *default_dbug_option="d:t:o,/tmp/my_print_defaults.trace"; |