![]() |
|
|
|
|
|
|
2
14th November 04:42
External User
Posts: 1
|
MySQL 3 only supported transactions for the 3rd party InnoDB table type.
InnoDB is included in v4. So if you're using v3, I guess you have to use a newer version of the C API that has these calls. -- Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com |
|
|
3
14th November 04:42
External User
Posts: 1
|
Those functions are pure convenience functions. You can achive the same
using mysql_query() & friends. From $MYSQLSOURCE/libmysql/libmysql.c: my_bool STDCALL mysql_commit(MYSQL * mysql) { DBUG_ENTER("mysql_commit"); DBUG_RETURN((my_bool) mysql_real_query(mysql, "commit", 6)); } Got the idea? XL -- Axel Schwenke, Senior Software Developer, MySQL AB Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/ MySQL User Forums: http://forums.mysql.com/ |
|
|
5
14th November 04:42
External User
Posts: 1
|
It's not that easy. Please do yourself a favour and read this up in the
MySQL manual. In an nutshell: In all currently available MySQL versions, transaction support is limited to InnoDB tables. Transactions are controlled with the BEGIN, COMMIT and ROLLBACK SQL statements and the AUTOCOMMIT server variable. The C API calls you mentioned above are just convenient abbreviations for sending COMMIT, ROLLBACK and SET AUTOCOMMIT=0|1 statements to the server. You get the same effect by just sending those statements to the server via mysql_query(). Just like the implementation above shows. HTH, XL -- Axel Schwenke, Senior Software Developer, MySQL AB Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/ MySQL User Forums: http://forums.mysql.com/ |
|