Author: wyoung
Date: Tue Mar 18 05:57:57 2008
New Revision: 2243
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2243&view=rev
Log:
Fixed a bug that left SSQLS::table_override_ uninitted if you used
certain of the generated ctors or set() member functions instead of
others used by the examples. This could cause a crash any time you
caused SSQLS.table() to be called, such as when passing the SSQLS to
Query::insert().
Modified:
trunk/lib/ssqls.pl
Modified: trunk/lib/ssqls.pl
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/ssqls.pl?rev=2243&r1=2242&r2=2243&view=diff
==============================================================================
--- trunk/lib/ssqls.pl (original)
+++ trunk/lib/ssqls.pl Tue Mar 18 05:57:57 2008
@@ -238,14 +238,16 @@
// ---------------------------------------------------
#define sql_compare_define_$i(NAME, $parm0) \\
- NAME($parm2) : $define {} \\
- void set ($parm2) { \\
+ NAME($parm2) : $define, table_override_(0) {} \\
+ void set($parm2) { \\
+ table_override_ = 0; \\
$set \\
} \\
sql_compare_define(NAME)
#define sql_construct_define_$i(NAME, $parm0) \\
- void set ($parm2) { \\
+ void set($parm2) { \\
+ table_override_ = 0; \\
$set \\
} \\
NAME($parm2) : $define, table_override_(0) {}
@@ -882,6 +884,7 @@
}
inline void NAME::set(const mysqlpp::Row& row)
{
+ table_override_ = 0;
populate_##NAME<mysqlpp::sql_dummy>(this, row);
}
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits