Bug #1213 mysql_prepare fails in embedded mysql
Submitted: 6 Sep 2003 3:53 Modified: 18 Sep 2003 6:49
Reporter: Georg Richter Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S3 (Non-critical)
Version:4.1.1 OS:Linux (Linux)
Assigned to: Alexey Botchkov CPU Architecture:Any

[6 Sep 2003 3:53] Georg Richter
Description:
mysql_prepare in embedded mysql 4.1 fails with "Lost connection to MySQL server during query".

How to repeat:
int test_prepare() {
	int rc = 0;
#if MYSQL_VERSION_ID >= 40100
	MYSQL_STMT *stmt;
	mysql_query(mysql, "CREATE TABLE IF NOT EXISTS test_prepare (a int)");
	if (stmt = mysql_prepare(mysql, "INSERT INTO test_prepare VALUES (?)", 100)) {
		mysql_stmt_close(stmt);
	}
	else {
		rc = mysql_errno(mysql);
		printf("\t%s\n", mysql_error(mysql));
	}
#endif
	return rc;
}
[8 Sep 2003 3:05] Alexey Botchkov
Prepared statements will work in embedded server shortly
[18 Sep 2003 6:49] Alexey Botchkov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Changesets about prepared statements in embedded library