query_cache_wlock_invalidate
(boolean) parameter to the my.cnf file and forgot to give it some value.You won't believe what happened next... MySQL did not woke up after the restart... FML
According to The Directive 2009/24/EC of the European Parliament and of the Council, and Sec.103(f) of the DMCA (17 U.S.C. § 1201 (f)), the reverse engineering act committed to creating these blog posts is considered legal, as this is an original attempt to improve interoperability, and cannot be waived by license agreements.
The views expressed on this blog are my own and do not necessarily reflect the views of my past and present employers.
query_cache_wlock_invalidate
(boolean) parameter to the my.cnf file and forgot to give it some value.#include <stdio.h> #include <string.h> #include <mysql/my_global.h> #include <mysql/my_sys.h> #include <mysql/mysql.h> #include <mysql/m_ctype.h> #include <mysql/m_string.h> #define UUID_LEN 36 #define FMASK "%36s" #define UUID "/proc/sys/kernel/random/uuid" my_bool newid_init(UDF_INIT *initid, UDF_ARGS *args, char *message); void new_deinit(UDF_INIT *initid); char *newid(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error); my_bool newid_init(UDF_INIT *initid, UDF_ARGS *args, char *message) { if (args->arg_count != 0 || args->arg_type[0] != STRING_RESULT) { strcpy(message, "Wrong arguments to newid; Use the source"); return 1; } initid->max_length=UUID_LEN; return 0; } void newid_deinit(UDF_INIT *initid) { // } char *newid(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error) { FILE *fp; char id[UUID_LEN]; if ((fp = fopen(UUID, "r")) != NULL) { fscanf(fp, FMASK, id); memcpy(result, id, initid->max_length); // UUID_LEN *length = initid->max_length; // UUID_LEN *error = 0; *is_null = 0; return result; } *is_null = 1; *error = 1; free(result); return NULL; }