diff options
author | unknown <monty@mysql.com> | 2004-10-22 19:21:55 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-10-22 19:21:55 +0300 |
commit | f94128716c7660fb6fee55c02a425b6f9a6f4c4a (patch) | |
tree | 642ce40b3c80b5b960f06ce7d193fd73efd53b61 /client | |
parent | 4edadc7949ef9098db02e7d8f897989719d55c8e (diff) | |
parent | 1c67dea5ae1ee35e3318434c394f5dbc53a9ab03 (diff) | |
download | mariadb-git-f94128716c7660fb6fee55c02a425b6f9a6f4c4a.tar.gz |
merge
client/mysqltest.c:
Auto merged
ndb/include/mgmapi/mgmapi.h:
merge (use new code)
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 5 | ||||
-rw-r--r-- | client/mysqltest.c | 11 |
2 files changed, 9 insertions, 7 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 05d5d1355ad..358b13e652b 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1971,7 +1971,7 @@ print_field_types(MYSQL_RES *result) MYSQL_FIELD *field; while ((field = mysql_fetch_field(result))) { - tee_fprintf(PAGER,"Catalog: '%s'\nDatabase: '%s'\nTable: '%s'\nName: '%s'\nType: %d\nLength: %d\nMax length: %d\nIs_null: %d\nFlags: %d\nDecimals: %d\n\n", + tee_fprintf(PAGER,"Catalog: '%s'\nDatabase: '%s'\nTable: '%s'\nName: '%s'\nType: %d\nLength: %ld\nMax length: %ld\nIs_null: %d\nFlags: %u\nDecimals: %u\n\n", field->catalog, field->db, field->table, field->name, (int) field->type, field->length, field->max_length, @@ -2017,7 +2017,8 @@ print_table_data(MYSQL_RES *result) (void) tee_fputs("|", PAGER); for (uint off=0; (field = mysql_fetch_field(result)) ; off++) { - tee_fprintf(PAGER, " %-*s|",min(field->max_length,MAX_COLUMN_LENGTH), + tee_fprintf(PAGER, " %-*s|",(int) min(field->max_length, + MAX_COLUMN_LENGTH), field->name); num_flag[off]= IS_NUM(field->type); } diff --git a/client/mysqltest.c b/client/mysqltest.c index 7a42cd54ca6..7623b9bde73 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -362,8 +362,7 @@ DYNAMIC_STRING ds_res; static void die(const char *fmt, ...); static void init_var_hash(); static VAR* var_from_env(const char *, const char *); -static byte* get_var_key(const byte* rec, uint* len, - my_bool __attribute__((unused)) t); +static byte* get_var_key(const byte* rec, uint* len, my_bool t); static VAR* var_init(VAR* v, const char *name, int name_len, const char *val, int val_len); @@ -1807,6 +1806,10 @@ int read_line(char* buf, int size) continue; } + /* Line counting is independent of state */ + if (c == '\n') + (*lineno)++; + switch(state) { case R_NORMAL: /* Only accept '{' in the beginning of a line */ @@ -1822,14 +1825,12 @@ int read_line(char* buf, int size) else if (c == '\n') { state = R_LINE_START; - (*lineno)++; } break; case R_COMMENT: if (c == '\n') { *p= 0; - (*lineno)++; DBUG_RETURN(0); } break; @@ -1841,7 +1842,7 @@ int read_line(char* buf, int size) else if (my_isspace(charset_info, c)) { if (c == '\n') - start_lineno= ++*lineno; /* Query hasn't started yet */ + start_lineno= *lineno; /* Query hasn't started yet */ no_save= 1; } else if (c == '}') |