diff options
author | unknown <pem@mysql.com> | 2005-11-24 19:13:13 +0100 |
---|---|---|
committer | unknown <pem@mysql.com> | 2005-11-24 19:13:13 +0100 |
commit | 0b262a6213a85ce3512facb23950145d051dca46 (patch) | |
tree | bddfb76f3d2664bd556555b5970577cccced397d | |
parent | 07198336830a5d0e4a20223431ad16126275bd03 (diff) | |
download | mariadb-git-0b262a6213a85ce3512facb23950145d051dca46.tar.gz |
Some post-merge cleaning, and made assert THD::store_globals() work at all times.
mysql-test/t/sp.test:
Tidying up after merge.
sql/mysqld.cc:
Make sure we have thd->thread_stack set before calling store_globals().
(And fixed compiler warning.)
sql/sql_class.cc:
Init THD::tread_stack in constructor.
-rw-r--r-- | mysql-test/t/sp.test | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 5 | ||||
-rw-r--r-- | sql/sql_class.cc | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 56b64532ab8..fba3cfcbfbc 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -4773,6 +4773,8 @@ drop procedure bug10100pv| drop procedure bug10100pd| drop procedure bug10100pc| drop view v1| + +# # BUG#13729: Stored procedures: packet error after exception handled # --disable_warnings diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b5b95e48889..8792d2560ae 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1589,6 +1589,7 @@ void end_thread(THD *thd, bool put_in_cache) wake_thread--; thd=thread_cache.get(); thd->real_id=pthread_self(); + thd->thread_stack= (char *) &thd; (void) thd->store_globals(); thd->thr_create_time= time(NULL); threads.append(thd); @@ -6912,8 +6913,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case OPT_MYISAM_STATS_METHOD: { ulong method_conv; - myisam_stats_method_str= argument; int method; + LINT_INIT(method_conv); + + myisam_stats_method_str= argument; if ((method=find_type(argument, &myisam_stats_method_typelib, 2)) <= 0) { fprintf(stderr, "Invalid value of myisam_stats_method: %s.\n", argument); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index b65f353e492..70dfaca53d3 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -183,6 +183,7 @@ THD::THD() spcont(NULL) { stmt_arena= this; + thread_stack= 0; db= 0; catalog= (char*)"std"; // the only catalog we have for now main_security_ctx.init(); |