diff options
author | unknown <monty@hundin.mysql.fi> | 2001-10-08 23:20:19 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-10-08 23:20:19 +0300 |
commit | 9417dc5c17bc0c35d04e20e600ce7804ec20e736 (patch) | |
tree | e7d13849a1d92edeaacd31753856f5a8cb389781 /sql/sql_parse.cc | |
parent | 4c52928bc84a503fed81ebd7cf934a7857491aa5 (diff) | |
download | mariadb-git-9417dc5c17bc0c35d04e20e600ce7804ec20e736.tar.gz |
Portability fixes + a couple of bug fixes introduced by last push.
Docs/manual.texi:
Removed wrong web links
include/mysql_com.h:
Portability fix
libmysqld/Makefile.am:
Fix 'make dist'
mysys/mf_dirname.c:
Bugfix for last push
scripts/explain_log.sh:
Nicer output
scripts/mysql_install_db.sh:
Removed warnings when using 'mysql_install_db'
sql/sql_parse.cc:
Ensure that thd->query_length is always set
sql/sql_show.cc:
cleanup
sql/sql_yacc.yy:
Fix bug in last push
vio/vio.c:
Merge with violite.cc
vio/viosocket.c:
Merge with violite.cc
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 35f32d50f46..cdf6cb8e7f1 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -633,6 +633,7 @@ pthread_handler_decl(handle_bootstrap,arg) length--; buff[length]=0; thd->current_tablenr=0; + thd->query_length=length; thd->query= thd->memdup(buff,length+1); thd->query_id=query_id++; mysql_parse(thd,thd->query,length); @@ -692,19 +693,18 @@ int mysql_table_dump(THD* thd, char* db, char* tbl_name, int fd) thd->free_list = 0; thd->query = tbl_name; - if((error = mysqld_dump_create_info(thd, table, -1))) - { - my_error(ER_GET_ERRNO, MYF(0)); - goto err; - } + thd->query_length=strlen(tbl_name); + if ((error = mysqld_dump_create_info(thd, table, -1))) + { + my_error(ER_GET_ERRNO, MYF(0)); + goto err; + } net_flush(&thd->net); if ((error = table->file->dump(thd,fd))) my_error(ER_GET_ERRNO, MYF(0)); err: - close_thread_tables(thd); - DBUG_RETURN(error); } @@ -872,6 +872,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, thd->free_list=0; table_list.name=table_list.real_name=thd->strdup(packet); thd->query=fields=thd->strdup(strend(packet)+1); + thd->query_length=strlen(thd->query); mysql_log.write(thd,command,"%s %s",table_list.real_name,fields); remove_escape(table_list.real_name); // This can't have wildcards @@ -2052,9 +2053,9 @@ mysql_execute_command(void) goto error; res = mysql_table_grant(thd,tables,lex->users_list, lex->columns, lex->grant, lex->sql_command == SQLCOM_REVOKE); - if(!res) + if (!res) { - mysql_update_log.write(thd, thd->query,thd->query_length); + mysql_update_log.write(thd, thd->query, thd->query_length); if (mysql_bin_log.is_open()) { Query_log_event qinfo(thd, thd->query); @@ -2074,7 +2075,7 @@ mysql_execute_command(void) lex->sql_command == SQLCOM_REVOKE); if (!res) { - mysql_update_log.write(thd, thd->query,thd->query_length); + mysql_update_log.write(thd, thd->query, thd->query_length); if (mysql_bin_log.is_open()) { Query_log_event qinfo(thd, thd->query); |