C API Function Descriptions
2147
Return Values
None.
Errors
None.
20.6.6.6.
mysql_commit()
my_bool mysql_commit(MYSQL *mysql)
Description
Commits the current transaction.
As of MySQL 5.0.3, the action of this function is subject to the value of the
completion_type
[444]
system variable. In particular, if the value of
completion_type
[444]
is 2, the server performs a
release after terminating a transaction and closes the client connection. The client program should call
mysql_close()
to close the connection from the client side.
Return Values
Zero if successful. Nonzero if an error occurred.
Errors
None.
20.6.6.7.
mysql_connect()
MYSQL *mysql_connect(MYSQL *mysql, const char *host, const char *user, const
char *passwd)
Description
This function is deprecated. Use
mysql_real_connect()
instead.
mysql_connect()
attempts to establish a connection to a MySQL database engine running on
host
.
mysql_connect()
must complete successfully before you can execute any of the other API
functions, with the exception of
mysql_get_client_info()
.
The meanings of the parameters are the same as for the corresponding parameters for
mysql_real_connect()
with the difference that the connection parameter may be
NULL
. In this
case, the C API allocates memory for the connection structure automatically and frees it when you call
mysql_close()
. The disadvantage of this approach is that you can't retrieve an error message if
the connection fails. (To get error information from
mysql_errno()
or
mysql_error()
, you must
provide a valid
MYSQL
pointer.)
Return Values
Same as for
mysql_real_connect()
.
Errors
Same as for
mysql_real_connect()
.
20.6.6.8.
mysql_create_db()
int mysql_create_db(MYSQL *mysql, const char *db)
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...