From 9bc5135f81f1ab34175b4c70f660c2ad15fa4711 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 18:56:39 +0400 Subject: [PATCH 1/2] Polishing: add comments. sql/parse_file.cc: Add comments. --- sql/parse_file.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sql/parse_file.cc b/sql/parse_file.cc index 1351cf66161..aa352433141 100644 --- a/sql/parse_file.cc +++ b/sql/parse_file.cc @@ -719,14 +719,18 @@ nlist_err: /* parse parameters - + SYNOPSIS File_parser::parse() base base address for parameter writing (structure like TABLE) mem_root MEM_ROOT for parameters allocation parameters parameters description - required number of required parameters in above list + required number of parameters in the above list. If the file + contains more parameters than "required", they will + be ignored. If the file contains less parameters + then "required", non-existing parameters will + remain their values. hook hook called for unknown keys hook_data some data specific for the hook @@ -909,6 +913,13 @@ list_err: } } } + + /* + NOTE: if we read less than "required" parameters, it is still Ok. + Probably, we've just read the file of the previous version, which + contains less parameters. + */ + DBUG_RETURN(FALSE); } From 52b86a6e0a9be6f3c41f24b9c30d2b6f885ad94f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 20:21:30 +0400 Subject: [PATCH 2/2] Polishing: note added. --- sql/sp_head.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 1f44fa6639c..21225d82188 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -954,6 +954,12 @@ sp_head::execute(THD *thd) m_first_instance->m_last_cached_sp == this) || (m_recursion_level + 1 == m_next_cached_sp->m_recursion_level)); + /* + NOTE: The SQL Standard does not specify the context that should be + preserved for stored routines. However, at SAP/Walldorf meeting it was + decided that current database should be preserved. + */ + if (m_db.length && (err_status= sp_use_new_db(thd, m_db, &old_db, 0, &dbchanged))) goto done;