diff options
author | Kent Boortz <kent.boortz@oracle.com> | 2011-07-03 17:47:37 +0200 |
---|---|---|
committer | Kent Boortz <kent.boortz@oracle.com> | 2011-07-03 17:47:37 +0200 |
commit | b6e6097c95eee4f453c117c298ee6a03fdcd499d (patch) | |
tree | 448d397ed328f719a29a8fbbd54df8d943ed7274 /client/mysqltest.cc | |
parent | 1400d7a2cc33fd158efcb3bd638c4ee4c8762207 (diff) | |
parent | 8e14d52610d747977bcbe2875cbe7d93724d8143 (diff) | |
download | mariadb-git-b6e6097c95eee4f453c117c298ee6a03fdcd499d.tar.gz |
Updated/added copyright headers
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r-- | client/mysqltest.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 4fac2f2b2d9..ed9172ddbf8 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -4463,13 +4463,14 @@ static int my_kill(int pid, int sig) command called command DESCRIPTION - shutdown [<timeout>] + shutdown_server [<timeout>] */ void do_shutdown_server(struct st_command *command) { - int timeout=60, pid; + long timeout=60; + int pid; DYNAMIC_STRING ds_pidfile_name; MYSQL* mysql = &cur_con->mysql; static DYNAMIC_STRING ds_timeout; @@ -4484,8 +4485,9 @@ void do_shutdown_server(struct st_command *command) if (ds_timeout.length) { - timeout= atoi(ds_timeout.str); - if (timeout == 0) + char* endptr; + timeout= strtol(ds_timeout.str, &endptr, 10); + if (*endptr != '\0') die("Illegal argument for timeout: '%s'", ds_timeout.str); } dynstr_free(&ds_timeout); @@ -4527,7 +4529,7 @@ void do_shutdown_server(struct st_command *command) DBUG_PRINT("info", ("Process %d does not exist anymore", pid)); DBUG_VOID_RETURN; } - DBUG_PRINT("info", ("Sleeping, timeout: %d", timeout)); + DBUG_PRINT("info", ("Sleeping, timeout: %ld", timeout)); my_sleep(1000000L); } @@ -8034,13 +8036,15 @@ int main(int argc, char **argv) cur_file->lineno= 1; } init_re(); + + /* Cursor protcol implies ps protocol */ + if (cursor_protocol) + ps_protocol= 1; + ps_protocol_enabled= ps_protocol; sp_protocol_enabled= sp_protocol; view_protocol_enabled= view_protocol; cursor_protocol_enabled= cursor_protocol; - /* Cursor protcol implies ps protocol */ - if (cursor_protocol_enabled) - ps_protocol_enabled= 1; st_connection *con= connections; if (!( mysql_init(&con->mysql))) @@ -9737,7 +9741,7 @@ int find_set(REP_SETS *sets,REP_SET *find) return i; } } - return i; /* return new postion */ + return i; /* return new position */ } /* find if there is a found_set with same table_offset & found_offset @@ -9757,7 +9761,7 @@ int find_found(FOUND_SET *found_set,uint table_offset, int found_offset) found_set[i].table_offset=table_offset; found_set[i].found_offset=found_offset; found_sets++; - return -i-2; /* return new postion */ + return -i-2; /* return new position */ } /* Return 1 if regexp starts with \b or ends with \b*/ |