-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL-python-1.2.5 will not compile against MariaDB 10.2 (libmariadb-dev) #407
Comments
typedef struct st_mysql {
NET net; /* Communication parameters */
void *unused_0;
char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
char *info,*db;
const struct ma_charset_info_st *charset; /* character set */
MYSQL_FIELD *fields;
MA_MEM_ROOT field_alloc;
unsigned long long affected_rows;
unsigned long long insert_id; /* id if insert on table with NEXTNR */
unsigned long long extra_info; /* Used by mysqlshow */
unsigned long thread_id; /* Id for connection in server */
unsigned long packet_length;
unsigned int port;
unsigned long client_flag;
unsigned long server_capabilities;
unsigned int protocol_version;
unsigned int field_count;
unsigned int server_status;
unsigned int server_language;
unsigned int warning_count; /* warning count, added in 4.1 protocol */
unsigned int reconnect; /* matt hacking mysql */
struct st_mysql_options options;
enum mysql_status status;
my_bool free_me; /* If free in mysql_close */
my_bool unused_1;
char scramble_buff[20+ 1];
/* madded after 3.23.58 */
my_bool unused_2;
void *unused_3, *unused_4, *unused_5, *unused_6;
LIST *stmts;
const struct st_mariadb_methods *methods;
void *thd;
my_bool *unbuffered_fetch_owner;
char *info_buffer;
struct st_mariadb_extension *extension;
} MYSQL; See line 22 (matt hacking line) allow's me to compile |
This not work on MacoS and homebrew, there is no libmariadb-dev package :/ |
in case someone comes across this comment, this is caused by a change in mariadb, in particular how reconnect is being used, for more info see: https://lists.launchpad.net/maria-developers/msg10744.html as stated in the email linked above, it might be fixed by submitting patches to python/perl connectors in the future. In my case, I couldn't downgrade mysql, was using pip 9.0.1, python 2.7 and had to install MySQL-python. morissette's workaround worked for me (adding that line to /usr/include/mysql/mysql.h ) it's far from ideal, but allowed the installation to finish |
Hi all, we recently switched mysql libraries. Is anyone able to easily retest? |
@morissette Thank you. This fixed it for me. In alpine you easily execute his work around with or in your docker file obviously |
@Warfront1 solution solved my problem! Thanks and Cheers! |
For documentation sake: The file I needed to edit in my MariaDB installation was: |
@Warfront1 your solution solved my problem. Thanks |
@Warfront1 thanks man!!! Your solution solved my problem. Its magic! |
Thanks.. |
Hello all dear Thanks[root@rancids ~]# pip2 install mysql-connector-python MySQL-Python
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-zMIYIU/MySQL-Python/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-QdpCRW-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-zMIYIU/MySQL-Python/ |
Check out the MySQL-python codebase manually and apply the following patch:
Then run |
@Kungergely Heads up that MySQL will shortly no longer be a supported RDMS for DefectDojo see #9690 |
Is there any way we can get defectdojo to work with MariaDB
MySQL-python-1.2.5 will not compile against MariaDB 10.2.10 and libmariadb-dev 10.2.10 installed
The text was updated successfully, but these errors were encountered: