diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-05-04 22:00:24 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-05-04 22:00:24 +0200 |
commit | 49c853fb948aeaeb5c7e3f02da3f14da51ee4100 (patch) | |
tree | 8c3d487a02209cc0c6f126144f1340fc5897d527 /sql/sp.cc | |
parent | ae18a28500974351cf42fa3cac67c83e0647d510 (diff) | |
parent | 4c87f727734955f9e4a0ffde25aae4d43ec0b2a5 (diff) | |
download | mariadb-git-49c853fb948aeaeb5c7e3f02da3f14da51ee4100.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 35155cf031a..334b5e12ba3 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -1,5 +1,6 @@ /* - Copyright (c) 2002, 2011, Oracle and/or its affiliates. + Copyright (c) 2002, 2015, Oracle and/or its affiliates. + Copyright (c) 2009, 2015, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1476,6 +1477,9 @@ bool lock_db_routines(THD *thd, char *db) { char *sp_name= get_field(thd->mem_root, table->field[MYSQL_PROC_FIELD_NAME]); + if (sp_name == NULL) // skip invalid sp names (hand-edited mysql.proc?) + continue; + longlong sp_type= table->field[MYSQL_PROC_MYSQL_TYPE]->val_int(); MDL_request *mdl_request= new (thd->mem_root) MDL_request; mdl_request->init(sp_type == TYPE_ENUM_FUNCTION ? |