Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Query insert() Seg Faulting using SSQLS, not sure why...

From: Graham Reitz <grahamreitz(at)mac.com>
Date: Fri Aug 10 2007 - 20:41:30 EDT


Thanks for the reply Warren,

If the sql_blob is there it seg faults, if not it's ok.

The following code will get it to crash: (Can you see anything?)

#include 
#include 
#include 

using namespace std;
using namespace mysqlpp;

sql_create_6(clients, 1, 6,
              unsigned int,     client_id,
              unsigned int,     billing_id,
              string,           client_first_name,
              string,           client_middle_initial,
              string,           client_last_name,
              sql_blob,         client_photo)

void populate_client_info(clients& client_info) {

     client_info.billing_id = 1;
     client_info.client_first_name = "Joe";
     client_info.client_middle_initial = "T";
     client_info.client_last_name = "Shmo";
}

int main (int argc, char* const argv[])
{

     Connection connection("db_name","ip_addres","user",
                           "pw",3306, false);

     Query client_query = connection.query();

     clients a_client;
     populate_client_info(a_client);

     client_query.insert(a_client);

     return 0;

}

On Aug 9, 2007, at 7:04 AM, Warren Young wrote:

> Graham Reitz wrote:
>> I was able to narrow it down to this:
>> In the sql_create_N macro I have a blob entry:
>> mysqlpp::sql_blob, my_blob
>> If the sql_blob type is in the sql_create call it seg. faults,
>> otherwise it succeeds.
>
> Can you modify examples/load_jpeg.cpp to exhibit the same problem?
> Providing an example of the problem in a way anyone can run will
> increase the chances that someone can help you.
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe: http://lists.mysql.com/plusplus?
> unsub=grahamreitz@mac.com
>
Received on Fri Aug 10 20:43:08 2007

Do you need help?X

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:02:56 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library