mysql_prepare problem in 4.1

mysql_prepare problem in 4.1

am 22.11.2002 10:58:30 von Georg Richter

Hello,

maybe something is going wrong with mysql_prepare api function:

How-To-Repeat:

Here is a code snippet:


if (!(mysql_real_connect(mysql, "127.0.0.1", "test", "",
"test", 3306, NULL, 0))) {
printf("connection error\n");
exit(0);
}
strcpy (query, "INSERT INTO b VALUES(?)");
stmt = mysql_prepare(mysql, query, strlen(query));




When I start the program it hangs after calling mysql_prepare :(
If it's helpful I can send you the client and server trace files.

Regards

Georg

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13075@lists.mysql.com
To unsubscribe, e-mail

Re: mysql_prepare problem in 4.1

am 22.11.2002 14:55:29 von Georg Richter

On Friday 22 November 2002 10:58, Georg Richter wrote:
> Hello,
>
> maybe something is going wrong with mysql_prepare api function:
>
> How-To-Repeat:
>
> Here is a code snippet:
>
>
> if (!(mysql_real_connect(mysql, "127.0.0.1", "test", "",
> "test", 3306, NULL, 0))) {
> printf("connection error\n");
> exit(0);
> }
> strcpy (query, "INSERT INTO b VALUES(?)");
> stmt = mysql_prepare(mysql, query, strlen(query));
>

>

Looks like the Problem is the INSERT Statement. A select works fine.

Regards

Georg

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13081@lists.mysql.com
To unsubscribe, e-mail

Re: mysql_prepare problem in 4.1

am 22.11.2002 19:57:41 von Venu

On Fri, 2002-11-22 at 01:58, Georg Richter wrote:
> Hello,

Hi !!

>
> maybe something is going wrong with mysql_prepare api function:
>
> How-To-Repeat:
>
> Here is a code snippet:
>
>
> if (!(mysql_real_connect(mysql, "127.0.0.1", "test", "",
> "test", 3306, NULL, 0))) {
> printf("connection error\n");
> exit(0);
> }
> strcpy (query, "INSERT INTO b VALUES(?)");
> stmt = mysql_prepare(mysql, query, strlen(query));
>

>
>
>
> When I start the program it hangs after calling mysql_prepare :(
> If it's helpful I can send you the client and server trace files.


You need to use the latest BK source in order to work on prepares.
Please do a pull on the current code.

Here is the list of new APIs that are supported from current code base:


mysql_warning_count
mysql_warnings
mysql_prepare
mysql_execute
mysql_param_count
mysql_bind_param
mysql_stmt_close
mysql_stmt_error
mysql_stmt_errno
mysql_commit
mysql_rollback
mysql_autocommit

Unsuppoted/supported in a week or so:

mysql_bind_result
mysql_prepare_result
mysql_fetch
mysql_send_long_data
mysql_multi_query
mysql_next_result

--
Regards, Venu
For technical support contracts, go to https://order.mysql.com
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Venu
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/ /_/\_, /___/\___\_\___/ California, USA
<___/ www.mysql.com



------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13084@lists.mysql.com
To unsubscribe, e-mail

Re: mysql_prepare problem in 4.1

am 23.11.2002 09:17:03 von Georg Richter

On Friday 22 November 2002 19:57, Venu wrote:

Hello venu,

> You need to use the latest BK source in order to work on prepares.
> Please do a pull on the current code.

Thx it works now, but I found another problem:

how-to-repeat:

This prepare statement segfaults:

strcpy(query, "INSERT INTO B VALUES (?,?)");
stmt = mysql_prepare_stimt (mysql, query, strlen(query));

if I use the correct tablename (lowercase)

strcpy(query, "INSERT INTO b VALUES (?,?)");

everything is ok.


Regards

Georg




------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13086@lists.mysql.com
To unsubscribe, e-mail

Re: mysql_prepare problem in 4.1

am 23.11.2002 10:20:17 von Georg Richter

On Saturday 23 November 2002 09:17, Georg Richter wrote:
> On Friday 22 November 2002 19:57, Venu wrote:
>
> Hello venu,
>
> > You need to use the latest BK source in order to work on prepares.
> > Please do a pull on the current code.
>
> Thx it works now, but I found another problem:
>
> how-to-repeat:
>
> This prepare statement segfaults:
>
> strcpy(query, "INSERT INTO B VALUES (?,?)");
> stmt = mysql_prepare_stimt (mysql, query, strlen(query));
>
> if I use the correct tablename (lowercase)
>
> strcpy(query, "INSERT INTO b VALUES (?,?)");
>
> everything is ok.
>
>

Problem is solved...
After pulling again, it runs now.


Regards

Georg

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13087@lists.mysql.com
To unsubscribe, e-mail