summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2013-03-26 00:03:13 +0200
committerMichael Widenius <monty@askmonty.org>2013-03-26 00:03:13 +0200
commit068c61978e3a81836d52b8caf11e044290159ad1 (patch)
tree2cbca861ab2cebe3bd99379ca9668bb483ca0d2a /extra
parent35bc8f9f4353b64da215e52ff6f1612a8ce66f43 (diff)
downloadmariadb-git-068c61978e3a81836d52b8caf11e044290159ad1.tar.gz
Temporary commit of 10.0-merge
Diffstat (limited to 'extra')
-rw-r--r--extra/comp_err.c11
-rw-r--r--extra/my_print_defaults.c2
2 files changed, 8 insertions, 5 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 8a16e677cb9..5b661c0d04b 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -26,7 +26,7 @@
#include <my_sys.h>
#include <m_string.h>
#include <my_getopt.h>
-
+#include <my_default.h>
const char *config_file="my"; /* Default config file */
uint verbose= 0, opt_defaults_file_used= 0;