Bug #33401 | Select returns wrong number of records | ||
---|---|---|---|
Submitted: | 20 Dec 2007 13:21 | Modified: | 31 Dec 2007 12:50 |
Reporter: | kris Bekkers | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / NET | Severity: | S3 (Non-critical) |
Version: | 5.1.4 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | connector.net, falcon preview, SELECT |
[20 Dec 2007 13:21]
kris Bekkers
[31 Dec 2007 8:42]
Tonci Grgin
Hi Kris and thanks for your report. Can you please try the same test in mysql command line client and inform me of result? If my suspicion is right, you'll see the same error there.
[31 Dec 2007 9:08]
kris Bekkers
Tonci, Here are the results of the test: Mysql Falcon Preview (6..3 Alpha Community) Using the command line utility Here it acts correct returning no records for the query. Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 6.0.3-alpha-community MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use test_select; Database changed mysql> select * from app_messages -> where app_name <> 'FraClaDocMaint' -> and FrameWork = 'Y' -> and Language = 'NL'; Empty set (0.00 sec) I've tried the same with "Aqua Data Studio 4.7" and that is also correct: it returns no records. Hope this helps. Kris
[31 Dec 2007 10:44]
Tonci Grgin
Kris, if I understood correctly mysql cl client returns correct number of rows (0), right? I'm testing c/NET now.
[31 Dec 2007 10:52]
kris Bekkers
Tonci, That's correct. Returning 0 (correct) numbers of records: - Mysql Client Command line utility - Aqua Data studio Returning al (wrong) number of records: Connector.NET But only with the given configuration: falcon preview + Connector.NET With the GA version of the mysql server it works correct. Kris
[31 Dec 2007 12:50]
Tonci Grgin
Kris, I took 5.1.4 and 6.0.3 from our download pages and can't repeat reported behavior (i.e. datareader returns no records). Will attach test case from different machine in a while. As for your report, in the future you might consider: 1 Attaching mysqldump of data and table structure (you have line breaks so I had to edit insert lines manually) 2 Attach full C# test case What I *think* could be wrong is that you have old c/NET driver registered in assembly cache. Can you please check on this condition?
[31 Dec 2007 12:53]
Tonci Grgin
MySqlConnection conn = new MySqlConnection(); MySqlDataReader dr; conn.ConnectionString = "DataSource=localhost;Database=test;UserID=root;Password=*****;PORT=3306;Allow Zero Datetime=True;logging=True;"; conn.Open(); MySqlCommand command = new MySqlCommand(); command.Connection = conn; MySqlCommand cmdCreateTable = new MySqlCommand("select * from app_messages where app_name <> 'FraCladocMaint' and Framework = 'Y' and Language = 'NL'", conn); cmdCreateTable.CommandType = CommandType.Text; cmdCreateTable.CommandTimeout = 0; try { dr = cmdCreateTable.ExecuteReader(); MessageBox.Show("Before READ"); while (dr.Read()) { MessageBox.Show("After READ"); MessageBox.Show(dr.RecordsAffected.ToString()); } dr.Close(); cmdCreateTable.Dispose(); conn.Close(); MessageBox.Show("DONE"); } catch (Exception ex) { Assert.Fail(ex.Message); } Output are message boxes "Before READ" and "DONE" as expected.