[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql
Subject: Insert fails with C api
From: John Griffin <jpg () cvs ! agilent ! com>
Date: 2003-04-30 21:21:29
[Download RAW message or body]
Hello,
Am writing some initial C test code on Linux install of MySQL max 4.0.12.
After successfully executing:
mysql_init(NULL);
mysql_real_connect(<appropriate args>);
Both with no errors.
I set up a character scaler with the Insert command like:
"insert into <tablename> (column_name1, column_name2, ...)
values ('column1_value', 'column2_value', ...)"
Then I execute:
mysql_real_query(db_conn,char_scaler,(long)strlen(char_scaler));
I get mysql error:
Insert into <tablename> failed.
Error 2006 (MySQL server has gone away)
However I can take the char_scaler value (which is the actual 'insert'
statement) from gdb and execute it manually with a terminal version of mysql
running against the appropriate database and all is well and the row gets
inserted.
I don't have a clue as to what 'MySQL server has gone away' error means, nor
what I am doing wrong in the C code.
Any clues??
Thanks,
jpg
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=mysql@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic