Comments (7)
Apparently it doesn't affect all compilers, or none of my tests would work, and it does build on Travis. But I'll fix it. (well actually I probably wasn't hitting the case in question on my system)
from mysqldb1.
I think it would depend on your version of MySQL whether HAVE_MYSQL_OPT_READ_TIMEOUT was defined or not (otherwise, why bother having a test at all?). Anyway it breaks on mine.
I'd be very surprised if any decent C compiler (especially any recent version of gcc) did not abort on this error in one way or another.
from mysqldb1.
Hi, qris, can you tell me which compitator you are using ? And the error you have please.
#include <stdio.h>
static char *kwlist[] = { "host", "user", "passwd", "db", "port",
"unix_socket", "conv",
"connect_timeout", "compress",
"named_pipe", "init_command",
"read_default_file", "read_default_group",
"client_flag", "ssl", "local_infile",
};
int main(void) {
printf("%d\n", (int)(sizeof(kwlist)/sizeof(*kwlist)));
return 0;
}
/* cc -o plop plop.c -Wall -ansi -pedantic
./plop
16 */
from mysqldb1.
jeansch: I fixed this in fc0c03a
from mysqldb1.
Fix is in 1.2.4b5
from mysqldb1.
[chris@fen-vz-atamis mysql-python]$ gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info="(1,2,4,'beta',4)" -D__version__=1.2.4b4 -I/usr/include/mysql -I/usr/include/python2.6 -c _mysql.c -o build/temp.linux-i686-2.6/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
_mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
_mysql.c:602: error: expected expression before ‘)’ token
[chris@fen-vz-atamis ~]$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
from mysqldb1.
@jeansch, you are testing something different. Trailing commas are allowed in array initialisers, to allow us to reduce noise in diffs. They are not allowed in function arguments.
from mysqldb1.
Related Issues (20)
- add full support to MySQL 8 HOT 1
- python2.7 install this module error HOT 4
- LookupError: unknown encoding: koi8r. Is possible to add that encoding? HOT 1
- install of MySQLdb1 fails on centos 7 HOT 2
- SSL options ignored when using read_default_file option
- Issue installing the package on python 3.7.2 HOT 1
- complie error with Mariadb 10.2 and up HOT 1
- Does it support mysql 5.7 HOT 1
- Upgrade OpenSSL version HOT 1
- Does it support python3.7 HOT 1
- This project is dead. Use mysqlclient. HOT 1
- line 2005 error fixed HOT 1
- Error installing on linux HOT 2
- raise ImproperlyConfigured HOT 1
- when pip install mysqlclient HOT 2
- centos7 pip3 install mysqlclient error: command '/usr/bin/gcc' failed with exit code 1 HOT 1
- localhost+port = default port
- Proposing a PR to fix a few small typos
- Issue with pip install MySQL-python on Windows
- Is there any way to get this library to set the SNI field when establishing a TLS connection?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysqldb1.