Author: wyoung
Date: Fri Mar 17 07:45:44 2006
New Revision: 1257
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1257&view=rev
Log:
Clarified in the userman how SSQLSes cope when the number of fields in a
Row aren't equal to the number of fields in the SSQLS when assigning the
Row to the SSQLS.
Modified:
branches/v2.1-bakefile/Wishlist
branches/v2.1-bakefile/doc/userman/userman.xml
Modified: branches/v2.1-bakefile/Wishlist
URL:
http://svn.gna.org/viewcvs/mysqlpp/branches/v2.1-bakefile/Wishlist?rev=1257&r1=1256&r2=1257&view=diff
==============================================================================
--- branches/v2.1-bakefile/Wishlist (original)
+++ branches/v2.1-bakefile/Wishlist Fri Mar 17 07:45:44 2006
@@ -35,12 +35,6 @@
o Document restrictions on order of destruction. See this thread:
http://lists.mysql.com/plusplus/5084
-
- o Storing a subset row in an SSQLS defined to hold the entire
- row currently causes a segfault. To see this, use the stock.h
- SSQLS definition in custom6. This is arguably a bug; see if we
- can't make it just fill out the fields queried for, and leave
- the rest unchanged.
o Add a configure script option to allow the new lock
mechanism to use platform mutexes via the Boost.Threads
Modified: branches/v2.1-bakefile/doc/userman/userman.xml
URL:
http://svn.gna.org/viewcvs/mysqlpp/branches/v2.1-bakefile/doc/userman/userman.xml?rev=1257&r1=1256&r2=1257&view=diff
==============================================================================
--- branches/v2.1-bakefile/doc/userman/userman.xml (original)
+++ branches/v2.1-bakefile/doc/userman/userman.xml Fri Mar 17 07:45:44 2006
@@ -1441,6 +1441,21 @@
linkend="tutorial"/> for another way to accomplish
the same thing.)</para>
+ <para>This example illustrates an important point: you
+ could not use the 5-member <classname>stock</classname>
+ structure in this example. The reason is, when
+ you assign a <classname>Row</classname> object to
+ an SSQLS, the function that copies the row's data
+ into the structure expects to see as many fields
+ in the row as are in the SSQLS. Your program will
+ crash when the code tries to access fields beyond
+ those that exist in the <classname>Row</classname>
+ object. The converse is not true, however: if you
+ change the <computeroutput>SELECT</computeroutput>
+ statement above so that it retrieves more than one
+ column, the code will still work, because the extra
+ fields in each row will simply be ignored.</para>
+
<para>Realize that the second and third parameters
to <varname>sql_create_1</varname> can't be anything
other than 1 and 0, respectively. As discussed above,
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits