diff options
author | unknown <hf@deer.(none)> | 2004-02-10 19:33:04 +0400 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2004-02-10 19:33:04 +0400 |
commit | 86c161e6cb7eaa807505e153b9eac6beced40673 (patch) | |
tree | 151ae87c0aaa750b6bfa97da8c6ada55785499ab /sql | |
parent | 186ec6c78ccf4ca9dacb09037003da54bf2d041b (diff) | |
parent | b4fc7c7fbf643b39f3686bfe344b21cdd7233fb5 (diff) | |
download | mariadb-git-86c161e6cb7eaa807505e153b9eac6beced40673.tar.gz |
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.2208
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_class.h | 2 | ||||
-rw-r--r-- | sql/sql_parse.cc | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index b3135202ad6..5034007cd4d 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -565,6 +565,8 @@ public: struct st_mysql_bind *client_params; char *extra_data; ulong extra_length; + char *query_rest; + uint32 query_rest_length; #endif NET net; // client connection descriptor MEM_ROOT warn_root; // For warnings and errors diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 42ea6039b6c..51e1ebee4ad 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -48,6 +48,7 @@ extern "C" int gethostname(char *name, int namelen); #endif +char *memdup_mysql(struct st_mysql *mysql, const char*data, int length); static int check_for_max_user_connections(THD *thd, USER_CONN *uc); static void decrease_user_connections(USER_CONN *uc); static bool check_db_used(THD *thd,TABLE_LIST *tables); @@ -1397,11 +1398,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd, char *packet= thd->lex->found_colon; /* Multiple queries exits, execute them individually + in embedded server - just store them to be executed later */ +#ifndef EMBEDDED_LIBRARY if (thd->lock || thd->open_tables || thd->derived_tables) close_thread_tables(thd); - - ulong length= thd->query_length-(ulong)(thd->lex->found_colon-thd->query); +#endif + ulong length= thd->query_length-(ulong)(packet-thd->query); /* Remove garbage at start of query */ while (my_isspace(thd->charset(), *packet) && length > 0) @@ -1414,7 +1417,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd, VOID(pthread_mutex_lock(&LOCK_thread_count)); thd->query_id= query_id++; VOID(pthread_mutex_unlock(&LOCK_thread_count)); +#ifndef EMBEDDED_LIBRARY mysql_parse(thd, packet, length); +#else + thd->query_rest= (char*)memdup_mysql(thd->mysql, packet, length); + thd->query_rest_length= length; + break; +#endif /*EMBEDDED_LIBRARY*/ } if (!(specialflag & SPECIAL_NO_PRIOR)) |