Skip to content

Commit d271fbd

Browse files
committed
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".
1 parent 8c169f5 commit d271fbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/sql_lex.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7906,18 +7906,18 @@ bool LEX::call_statement_start(THD *thd, const LEX_CSTRING &db,
79067906
if (check_db_name((LEX_STRING*) const_cast<LEX_CSTRING*>(&db)))
79077907
{
79087908
my_error(ER_WRONG_DB_NAME, MYF(0), db.str);
7909-
return NULL;
7909+
return true;
79107910
}
79117911
if (check_routine_name(&pkg) ||
79127912
check_routine_name(&proc))
7913-
return NULL;
7913+
return true;
79147914

79157915
// Concat `pkg` and `name` to `pkg.name`
79167916
LEX_CSTRING pkg_dot_proc;
79177917
if (q_pkg_proc.make_qname(thd->mem_root, &pkg_dot_proc) ||
79187918
check_ident_length(&pkg_dot_proc) ||
79197919
!(spname= new (thd->mem_root) sp_name(&db, &pkg_dot_proc, true)))
7920-
return NULL;
7920+
return true;
79217921

79227922
sp_handler_package_function.add_used_routine(thd->lex, thd, spname);
79237923
sp_handler_package_body.add_used_routine(thd->lex, thd, &q_db_pkg);

0 commit comments

Comments
 (0)