1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.1

into eagle.mysql.r18.ru:/home/vva/work/mysql.orig/test/mysql-4.1
This commit is contained in:
unknown
2004-08-27 20:48:16 +05:00

View File

@ -661,12 +661,6 @@ history_load(History *h, const char *fname)
if ((fp = fopen(fname, "r")) == NULL) if ((fp = fopen(fname, "r")) == NULL)
return (i); return (i);
if ((line = fgetln(fp, &sz)) == NULL)
goto done;
if (strncmp(line, hist_cookie, sz) != 0)
goto done;
ptr = h_malloc(max_size = 1024); ptr = h_malloc(max_size = 1024);
if (ptr == NULL) if (ptr == NULL)
goto done; goto done;
@ -720,8 +714,6 @@ history_save(History *h, const char *fname)
if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1) if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1)
goto done; goto done;
if (fputs(hist_cookie, fp) == EOF)
goto done;
ptr = h_malloc(max_size = 1024); ptr = h_malloc(max_size = 1024);
if (ptr == NULL) if (ptr == NULL)
goto done; goto done;
@ -740,7 +732,7 @@ history_save(History *h, const char *fname)
ptr = nptr; ptr = nptr;
} }
(void) strvis(ptr, ev.str, VIS_WHITE); (void) strvis(ptr, ev.str, VIS_WHITE);
(void) fprintf(fp, "%s\n", ptr); (void) fprintf(fp, "%s\n", ev.str);
} }
oomem: oomem:
h_free((ptr_t)ptr); h_free((ptr_t)ptr);