summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormonty@donna.mysql.com <>2000-12-28 19:25:41 +0200
committermonty@donna.mysql.com <>2000-12-28 19:25:41 +0200
commit60677ffd2cceb0c8154ff73c8c17cc080f37bda4 (patch)
treee5a06533107ae2de5c6723f34705dd081f8c61bf /client
parent767e2ef6d1cc82ce699418f6a2814ab0823ec320 (diff)
downloadmariadb-git-60677ffd2cceb0c8154ff73c8c17cc080f37bda4.tar.gz
Cleanup of tests
Fixed bug with ALTER TABLE on HEAP tables
Diffstat (limited to 'client')
-rw-r--r--client/my_readline.h1
-rw-r--r--client/mysql.cc1
-rw-r--r--client/mysqladmin.c1
-rw-r--r--client/mysqldump.c13
-rw-r--r--client/mysqlimport.c2
-rw-r--r--client/mysqltest.c5
-rw-r--r--client/readline.cc9
7 files changed, 17 insertions, 15 deletions
diff --git a/client/my_readline.h b/client/my_readline.h
index c9a0e863870..547587bc19d 100644
--- a/client/my_readline.h
+++ b/client/my_readline.h
@@ -26,6 +26,7 @@ typedef struct st_line_buffer
uint bufread; /* Number of bytes to get with each read(). */
uint eof;
ulong max_size;
+ ulong read_length; /* Length of last read string */
} LINE_BUFFER;
extern LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file);
diff --git a/client/mysql.cc b/client/mysql.cc
index 30e7d75ecaa..e3cc17e23cd 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -903,7 +903,6 @@ static bool add_line(String &buffer,char *line,char *in_string)
continue;
#ifdef USE_MB
int l;
-/* if ((l = ismbchar(pos, pos+MBMAXLEN))) { Wei He: I think it's wrong! */
if (use_mb(default_charset_info) &&
(l = my_ismbchar(default_charset_info, pos, strend))) {
while (l--)
diff --git a/client/mysqladmin.c b/client/mysqladmin.c
index 6488d012c1a..35f7f341247 100644
--- a/client/mysqladmin.c
+++ b/client/mysqladmin.c
@@ -122,7 +122,6 @@ static struct option long_options[] = {
{"socket", required_argument, 0, 'S'},
{"sleep", required_argument, 0, 'i'},
#include "sslopt-longopts.h"
- {"connect-timeout", required_argument, 0, 't'},
#ifndef DONT_ALLOW_USER_CHANGE
{"user", required_argument, 0, 'u'},
#endif
diff --git a/client/mysqldump.c b/client/mysqldump.c
index f27f5c5e35b..9c5c4d34ca5 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -37,7 +37,7 @@
** Tõnu Samuel <tonu@please.do.not.remove.this.spam.ee>
**/
-#define DUMP_VERSION "8.11"
+#define DUMP_VERSION "8.12"
#include <global.h>
#include <my_sys.h>
@@ -863,9 +863,14 @@ static char *add_load_option(char *ptr,const char *object,
{
if (object)
{
- ptr= strxmov(ptr," ",statement," '",NullS);
- ptr= field_escape(ptr,object,(uint) strlen(object));
- *ptr++= '\'';
+ if (!strncasecmp(object,"0x",2)) /* hex constant; don't escape */
+ ptr= strxmov(ptr," ",statement," ",object,NullS);
+ else /* char constant; escape */
+ {
+ ptr= strxmov(ptr," ",statement," '",NullS);
+ ptr= field_escape(ptr,object,(uint) strlen(object));
+ *ptr++= '\'';
+ }
}
return ptr;
} /* add_load_option */
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index f85a1c128e2..4ca6edf21f2 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -25,7 +25,7 @@
** * *
** *************************
*/
-#define IMPORT_VERSION "2.6"
+#define IMPORT_VERSION "2.7"
#include <global.h>
#include <my_sys.h>
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 0c1efae62d6..5896c655d22 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -1096,10 +1096,7 @@ void str_to_file(const char* fname, char* str, int size)
void reject_dump(const char* record_file, char* buf, int size)
{
char reject_file[FN_REFLEN];
- if (strlen(record_file) >= FN_REFLEN-8)
- die("too long path name for reject");
- strmov(strmov(reject_file, record_file),".reject");
- str_to_file(reject_file, buf, size);
+ str_to_file(fn_format(reject_file, record_file,"",".reject",2), buf, size);
}
diff --git a/client/readline.cc b/client/readline.cc
index c14059d98c8..f0312b089e5 100644
--- a/client/readline.cc
+++ b/client/readline.cc
@@ -26,7 +26,7 @@ static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
ulong max_size);
static bool init_line_buffer_from_string(LINE_BUFFER *buffer,my_string str);
static uint fill_buffer(LINE_BUFFER *buffer);
-static char *intern_read_line(LINE_BUFFER *buffer,uint *out_length);
+static char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length);
LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
@@ -46,12 +46,13 @@ LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
char *batch_readline(LINE_BUFFER *line_buff)
{
char *pos;
- uint out_length;
+ ulong out_length;
if (!(pos=intern_read_line(line_buff,&out_length)))
return 0;
if (out_length && pos[out_length-1] == '\n')
out_length--; /* Remove '\n' */
+ line_buff->read_length=out_length;
pos[out_length]=0;
return pos;
}
@@ -187,7 +188,7 @@ static uint fill_buffer(LINE_BUFFER *buffer)
-char *intern_read_line(LINE_BUFFER *buffer,uint *out_length)
+char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length)
{
char *pos;
uint length;
@@ -210,7 +211,7 @@ char *intern_read_line(LINE_BUFFER *buffer,uint *out_length)
pos--; /* break line here */
}
buffer->end_of_line=pos+1;
- *out_length=(uint) (pos + 1 - buffer->eof - buffer->start_of_line);
+ *out_length=(ulong) (pos + 1 - buffer->eof - buffer->start_of_line);
DBUG_RETURN(buffer->start_of_line);
}
}