У меня проблема, можете ли вы помочь этому lib_mysqludf_sys.so с MariaDB в Debian.
Пытаюсь заставить триггер работать. Это работало нормально до обновления MariaDB.
MariaDB - последняя версия 10.5.
Триггер будет запускать некоторый код php, мне нужно запустить php с триггером кода в качестве основного код является коммерческим кодом и не имеет доступа к изменению.
/usr/include/mysql/m_string.h:92:42: error: unknown type name ‘pchar’; did you mean ‘char’?
extern void strappend(char *s,size_t len,pchar fill);
^~~~~
char
/usr/include/mysql/m_string.h:94:37: error: unknown type name ‘pchar’; did you mean ‘char’?
extern char *strcend(const char *, pchar);
^~~~~
char
/usr/include/mysql/m_string.h:95:42: error: unknown type name ‘pchar’; did you mean ‘char’?
extern char *strfill(char * s,size_t len,pchar fill);
^~~~~
char
/usr/include/mysql/m_string.h:159:20: error: unknown type name ‘longlong’; did you mean ‘long int’?
extern char *llstr(longlong value,char *buff);
^~~~~~~~
long int
/usr/include/mysql/m_string.h:160:21: error: unknown type name ‘longlong’; did you mean ‘long int’?
extern char *ullstr(longlong value,char *buff);
^~~~~~~~
long int
/usr/include/mysql/m_string.h:170:1: error: unknown type name ‘longlong’; did you mean ‘long int’?
longlong my_strtoll10(const char *nptr, char **endptr, int *error);
^~~~~~~~
long int
/usr/include/mysql/m_string.h:175:31: error: expected declaration specifiers or ‘...’ before ‘(’ token
#define strtoll(A,B,C) strtol((A),(B),(C))
^
/usr/include/mysql/m_string.h:175:35: error: expected declaration specifiers or ‘...’ before ‘(’ token
#define strtoll(A,B,C) strtol((A),(B),(C))
^
/usr/include/mysql/m_string.h:175:39: error: expected declaration specifiers or ‘...’ before ‘(’ token
#define strtoll(A,B,C) strtol((A),(B),(C))
^
/usr/include/mysql/m_string.h:176:33: error: expected declaration specifiers or ‘...’ before ‘(’ token
#define strtoull(A,B,C) strtoul((A),(B),(C))
^
/usr/include/mysql/m_string.h:176:37: error: expected declaration specifiers or ‘...’ before ‘(’ token
#define strtoull(A,B,C) strtoul((A),(B),(C))
^
/usr/include/mysql/m_string.h:176:41: error: expected declaration specifiers or ‘...’ before ‘(’ token
#define strtoull(A,B,C) strtoul((A),(B),(C))
^
In file included from /usr/include/mysql/service_thd_timezone.h:41,
from /usr/include/mysql/services.h:40,
from /usr/include/mysql/plugin.h:51,
from /usr/include/mysql/m_string.h:199,
from lib_mysqludf_sys.c:45:
/usr/include/mysql/mysql_time.h:40:6: error: nested redefinition of ‘enum enum_mysql_timestamp_type’
enum enum_mysql_timestamp_type
^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mysql/mysql_time.h:40:6: error: redeclaration of ‘enum enum_mysql_timestamp_type’
In file included from lib_mysqludf_sys.c:43:
/usr/include/mysql/mysql.h:409:6: note: originally defined here
enum enum_mysql_timestamp_type
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mysql/service_thd_timezone.h:41,
from /usr/include/mysql/services.h:40,
from /usr/include/mysql/plugin.h:51,
from /usr/include/mysql/m_string.h:199,
from lib_mysqludf_sys.c:45:
/usr/include/mysql/mysql_time.h:42:3: error: redeclaration of enumerator ‘MYSQL_TIMESTAMP_NONE’
MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
^~~~~~~~~~~~~~~~~~~~
In file included from lib_mysqludf_sys.c:43:
/usr/include/mysql/mysql.h:411:3: note: previous definition of ‘MYSQL_TIMESTAMP_NONE’ was here
MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mysql/service_thd_timezone.h:41,
from /usr/include/mysql/services.h:40,
from /usr/include/mysql/plugin.h:51,
from /usr/include/mysql/m_string.h:199,
from lib_mysqludf_sys.c:45:
/usr/include/mysql/mysql_time.h:42:29: error: redeclaration of enumerator ‘MYSQL_TIMESTAMP_ERROR’
MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
^~~~~~~~~~~~~~~~~~~~~
In file included from lib_mysqludf_sys.c:43:
/usr/include/mysql/mysql.h:411:29: note: previous definition of ‘MYSQL_TIMESTAMP_ERROR’ was here
MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mysql/service_thd_timezone.h:41,
from /usr/include/mysql/services.h:40,
from /usr/include/mysql/plugin.h:51,
from /usr/include/mysql/m_string.h:199,
from lib_mysqludf_sys.c:45:
/usr/include/mysql/mysql_time.h:43:3: error: redeclaration of enumerator ‘MYSQL_TIMESTAMP_DATE’
MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
^~~~~~~~~~~~~~~~~~~~
In file included from lib_mysqludf_sys.c:43:
/usr/include/mysql/mysql.h:412:3: note: previous definition of ‘MYSQL_TIMESTAMP_DATE’ was here
MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mysql/service_thd_timezone.h:41,
from /usr/include/mysql/services.h:40,
from /usr/include/mysql/plugin.h:51,
from /usr/include/mysql/m_string.h:199,
from lib_mysqludf_sys.c:45:
/usr/include/mysql/mysql_time.h:43:28: error: redeclaration of enumerator ‘MYSQL_TIMESTAMP_DATETIME’
MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from lib_mysqludf_sys.c:43:
/usr/include/mysql/mysql.h:412:28: note: previous definition of ‘MYSQL_TIMESTAMP_DATETIME’ was here
MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mysql/service_thd_timezone.h:41,
from /usr/include/mysql/services.h:40,
from /usr/include/mysql/plugin.h:51,
from /usr/include/mysql/m_string.h:199,
from lib_mysqludf_sys.c:45:
/usr/include/mysql/mysql_time.h:43:57: error: redeclaration of enumerator ‘MYSQL_TIMESTAMP_TIME’
MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
^~~~~~~~~~~~~~~~~~~~
In file included from lib_mysqludf_sys.c:43:
/usr/include/mysql/mysql.h:412:57: note: previous definition of ‘MYSQL_TIMESTAMP_TIME’ was here
MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mysql/service_thd_timezone.h:41,
from /usr/include/mysql/services.h:40,
from /usr/include/mysql/plugin.h:51,
from /usr/include/mysql/m_string.h:199,
from lib_mysqludf_sys.c:45:
/usr/include/mysql/mysql_time.h:59:16: error: redefinition of ‘struct st_mysql_time’
typedef struct st_mysql_time
^~~~~~~~~~~~~
In file included from lib_mysqludf_sys.c:43:
/usr/include/mysql/mysql.h:415:16: note: originally defined here
typedef struct st_mysql_time
^~~~~~~~~~~~~
In file included from /usr/include/mysql/service_thd_timezone.h:41,
from /usr/include/mysql/services.h:40,
from /usr/include/mysql/plugin.h:51,
from /usr/include/mysql/m_string.h:199,
from lib_mysqludf_sys.c:45:
/usr/include/mysql/mysql_time.h:65:3: error: conflicting types for ‘MYSQL_TIME’
} MYSQL_TIME;
^~~~~~~~~~
In file included from lib_mysqludf_sys.c:43:
/usr/include/mysql/mysql.h:421:3: note: previous declaration of ‘MYSQL_TIME’ was here
} MYSQL_TIME;
^~~~~~~~~~
In file included from lib_mysqludf_sys.c:45:
/usr/include/mysql/m_string.h:211:9: error: unknown type name ‘uchar’
const uchar *str;
^~~~~
make: *** [Makefile:4: install] Error 1
Если не удается исправить, это способ сохранить в файл: Пробовал полученные ошибки;
DELIMITER $$
CREATE TRIGGER `QSL_Trigger` AFTER UPDATE ON `TABLE_HRD_CONTACTS_V01`
FOR EACH ROW BEGIN
IF new.COL_EQSL_QSL_RCVD <> old.COL_EQSL_QSL_RCVD THEN
INSERT into HRD_Web.tb_Cards
(COL_PRIMARY_KEY,COL_File_Path_E,COL_File_Path_F,COL_File_Path_B)VALUES (old.COL_PRIMARY_KEY, CONCAT('E-' , old.COL_PRIMARY_KEY, '-', replace(old.Col_Call,'/','-'), '.jpg'),'','');
'old.COL_PRIMARY_KEY' INTO OUTFILE '/var/www/run/old.COL_PRIMARY_KEY.txt';
END IF;
END
END $$
DELIMITER ;
Хотел бы он сохраняет в один файл и добавляет или собственный файл с old.COL_PRIMARY_KEY в качестве имени / значения.