mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 01:34:17 +01:00
MDEV-28224 error: cannot initialize return object of type 'bool' with an rvalue of type 'nullptr_t'
Fixing a typo in the fix for MDEV-19804, wrong return value in a bool function: < return NULL; > return true; The problem was found because it did not compile on some platforms. Strangley, it did not have visible problems on other platforms, which did not fail to compile, although "return NULL" should compile to "return false" rather than "return true".
This commit is contained in:
parent
8c169f5e03
commit
d271fbd392
1 changed files with 3 additions and 3 deletions
|
@ -7906,18 +7906,18 @@ bool LEX::call_statement_start(THD *thd, const LEX_CSTRING &db,
|
|||
if (check_db_name((LEX_STRING*) const_cast<LEX_CSTRING*>(&db)))
|
||||
{
|
||||
my_error(ER_WRONG_DB_NAME, MYF(0), db.str);
|
||||
return NULL;
|
||||
return true;
|
||||
}
|
||||
if (check_routine_name(&pkg) ||
|
||||
check_routine_name(&proc))
|
||||
return NULL;
|
||||
return true;
|
||||
|
||||
// Concat `pkg` and `name` to `pkg.name`
|
||||
LEX_CSTRING pkg_dot_proc;
|
||||
if (q_pkg_proc.make_qname(thd->mem_root, &pkg_dot_proc) ||
|
||||
check_ident_length(&pkg_dot_proc) ||
|
||||
!(spname= new (thd->mem_root) sp_name(&db, &pkg_dot_proc, true)))
|
||||
return NULL;
|
||||
return true;
|
||||
|
||||
sp_handler_package_function.add_used_routine(thd->lex, thd, spname);
|
||||
sp_handler_package_body.add_used_routine(thd->lex, thd, &q_db_pkg);
|
||||
|
|
Loading…
Add table
Reference in a new issue