Subject: | DBD::mysql compilation error due to mismatched braces |
Originally reported by Richard Smith at
http://bugs.mysql.com/bug.php?id=65629
Description:
If the #ifdef on dbdimp.c:3448 doesn't evaluate to true, then the else
statement and open brace on line 3461 is compiled out, but the close
brace on line 3479 remains compiled in.
How to repeat:
See above
Suggested fix:
[root@sphinx DBD-mysql-4.021]# tar xfz ../DBD-mysql-4.021.tar.gz -O
DBD-mysql-4.021/dbdimp.c | diff -u - dbdimp.c
--- - 2012-06-15 17:58:32.100389000 +0100
+++ dbdimp.c 2012-06-15 17:56:22.000000000 +0100
@@ -3458,8 +3458,9 @@
&imp_sth->has_been_bound
);
}
- else {
+ else
#endif
+ {
imp_sth->row_num= mysql_st_internal_execute(
sth,
*statement,
The offending lines are these two:
richard@hourn:~$ sed '3461{n;p};d' dbdimp.c
else {
#endif
The open brace needs to be *after* the #endif so that it can be closed
on line 3479:
richard@hourn:~$ sed '3479p;d' dbdimp.c
}
The patch I gave previously fixes this.