fix: fix sslmode typo #609
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are trying to use SSL with MariaDB and ran into the issue with
ssl_mode(fixed by the recently merged #475). We tried installing the latest commit onmainand it produces the following error when building:running build_ext building 'MySQLdb._mysql' extension creating build/temp.linux-aarch64-cpython-310 creating build/temp.linux-aarch64-cpython-310/src creating build/temp.linux-aarch64-cpython-310/src/MySQLdb gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC "-Dversion_info=(2, 2, 0, 'dev', 0)" -D__version__=2.2.0.dev0 -I/usr/local/include/python3.10 -c src/MySQLdb/_mysql.c -o build/temp.linux-aarch64-cpython-310/src/MySQLdb/_mysql.o -I/usr/include/mariadb/ -std=c99 In file included from /usr/local/include/python3.10/Python.h:8, from src/MySQLdb/_mysql.c:46: /usr/local/include/python3.10/pyconfig.h:1643: warning: "_POSIX_C_SOURCE" redefined 1643 | #define _POSIX_C_SOURCE 200809L | In file included from /usr/include/aarch64-linux-gnu/sys/types.h:25, from /usr/include/mariadb/mysql.h:38, from src/MySQLdb/_mysql.c:29: /usr/include/features.h:310: note: this is the location of the previous definition 310 | # define _POSIX_C_SOURCE 199506L | src/MySQLdb/_mysql.c: In function ‘_mysql_ConnectionObject_Initialize’: src/MySQLdb/_mysql.c:534:13: error: ‘sslmode_num’ undeclared (first use in this function); did you mean ‘ssl_mode_num’? 534 | if (sslmode_num >= SSLMODE_REQUIRED) { | ^~~~~~~~~~~ | ssl_mode_num src/MySQLdb/_mysql.c:534:13: note: each undeclared identifier is reported only once for each function it appears in src/MySQLdb/_mysql.c:535:81: error: ‘enforce_tls’ undeclared (first use in this function) 535 | mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls); | ^~~~~~~~~~~ error: command '/usr/bin/gcc' failed with exit code 1 [end of output]This PR fixes the sslmode typo and replaces
enforce_tlswith1.