| Bug #1115 | Broken select when using prepared statements via C API | ||
|---|---|---|---|
| Submitted: | 21 Aug 2003 8:52 | Modified: | 8 Sep 2003 6:28 |
| Reporter: | Brian O'Kelley | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 4.1 | OS: | Linux (RedHat Linux 9) |
| Assigned to: | Oleksandr Byelkin | CPU Architecture: | Any |
[21 Aug 2003 18:26]
[ name withheld ]
I am seeing the exact same behavior on 4.0.14 running rh 9.
[1 Sep 2003 23:10]
Oleksandr Byelkin
Can you attach your code (just to be sure that I will fix exactly your bug)?
[2 Sep 2003 4:42]
Oleksandr Byelkin
ChangeSet 1.1602 03/09/02 14:37:06 bell@sanja.is.com.ua +2 -0 fixed string parameter assugnment (coping instead of asigning pointer to buffer) (BUG#1115) fixed test_field_misc (UTF variable value)
[8 Sep 2003 6:28]
Oleksandr Byelkin
Thank you for bugreport. Patch is pushed to internal repository and will be present in next release of 4.1.

Description: When I use the query "select cols from table where session = ?" I get no rows. If I use the query "select cols from table where 1 = 1 and session = ?" I get the right number of rows back. I pulled the latest from bitkeeper and I'm still seeing this issue. How to repeat: The table is: session_id char(9) NOT NULL, a int(8) unsigned NOT NULL, b int(5) NOT NULL, c int(5) NOT NULL, d datetime NOT NULL The exact query is: char query[] = "SELECT a, b, c FROM table " WHERE 1=1 AND session_id=?" ; My code is pretty much straight from the test cases, but I can attach if desired.