Skip to content

Commit 7c486b8

Browse files
gkodinovdahlerlend
authored andcommitted
Addendum to fixing bug #26173244:
Fix for a failing test udf_skip_grants Rased the flag for UDF initialiation at the right time to indicate if SQL UDF definition/removal is allowed. The flag is no longer used to indicate if the global structures are allocated or not (as they are always allocated).
1 parent caf70c9 commit 7c486b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/sql_udf.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
\ref mem and \ref THR_LOCK_udf are always initialized, even in
106106
--skip-grant-tables mode.
107107
*/
108-
static bool initialized = 0;
108+
static bool initialized= 0;
109109
static MEM_ROOT mem;
110110
static collation_unordered_map<std::string, udf_func*> *udf_hash;
111111
static mysql_rwlock_t THR_LOCK_udf;
@@ -225,11 +225,11 @@ void udf_read_functions_table()
225225

226226
if (initialized)
227227
{
228-
DBUG_ASSERT("wrong init order: trying to read the UDFs without initializaton");
228+
DBUG_ASSERT("wrong init order: reading UDFs from the table twice");
229229
DBUG_VOID_RETURN;
230230
}
231231

232-
initialized = 1;
232+
initialized= 1;
233233

234234
THD *new_thd = new(std::nothrow) THD;
235235
if (new_thd == nullptr)

0 commit comments

Comments
 (0)