joshua655 / v8cgi

Automatically exported from code.google.com/p/v8cgi
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

API_MySQL fetchNames returns only first 2 field names #112

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. visit http://testbed.nicon.nl/v8test/testjson.html
2. check the column names 

What is the expected output? What do you see instead?
Column names should be id, col1, col2 ... col5

What version of the product are you using? On what operating system?
v8cgi Latest version. Windows2003, in IIS6 environment.

Please provide any additional information below.
n/a

Original issue reported on code.google.com by Renzo.Kooi on 8 Apr 2012 at 9:34

GoogleCodeExporter commented 9 years ago
This is pretty interesting, mostly because I cannot reproduce it on my setup. 
Please:

1) what version of MySQL server is used?
2) can the MySQL server be made publicly accessible?
3) can you attach the libmysql.dll from your system / v8cgi distribution?

Original comment by ondrej.zara on 10 Apr 2012 at 6:12

GoogleCodeExporter commented 9 years ago
Hi Ondrej, thanks for your answer. I have added server version information to 
the page @http://testbed.nicon.nl/v8test/testjson.html. The server is behind a 
firewall. I'm reluctant to make it publicly accessible, it's used for 
production things. I have attached libmysql.dll

Regards/Renzo Kooi

Original comment by Renzo.Kooi on 11 Apr 2012 at 6:20

Attachments:

GoogleCodeExporter commented 9 years ago
Okay, the libmysql.dll is the same I have. Please double-check that there is no 
other version of this file anywhere in your system.

I will try to install the 5.0.27-community-nt-log version on my box in order to 
reproduce your bug.

Original comment by ondrej.zara on 11 Apr 2012 at 6:54

GoogleCodeExporter commented 9 years ago
Tried with 5.0.96 on WinXP - works as expected, issue not encountered...

Original comment by ondrej.zara on 12 Apr 2012 at 10:15

GoogleCodeExporter commented 9 years ago
Strange. Maybe I should update mysql server.

Original comment by Renzo.Kooi on 13 Apr 2012 at 9:21

GoogleCodeExporter commented 9 years ago
Update the serverware. Still the same error, strange ...

Original comment by Renzo.Kooi on 13 Apr 2012 at 1:44

GoogleCodeExporter commented 9 years ago
1) check whether there are other variants of libmysql.dll anywhere in the 
system;

2) try to connect from a different machine;

3) the "fake" reported column names seem to be related to the connection (e.g. 
username, db, pass...). Can you please try again with a new table with a lot 
(~20) columns, so that we can see more fake reported names?

4) the table in question seems to use InnoDB; can you try with MyISAM table as 
well?

Original comment by ondrej.zara on 13 Apr 2012 at 8:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Ondrej,
Got it! It was libmysql after all. Copied libmysql.dll (from additional dlls in 
the v8cgi director) into the servers windows directory. Still strange, because 
as far as I could see, libmysql.dll was not in any path of the environment 
V8CGI runs in. Anyway, it may be advised to windows users to put libmysql.dll 
into the windows directory I suppose?
The example @http://testbed.nicon.nl/v8test/testjson.html now uses an MyISAM 
table with 21 colums

Original comment by Renzo.Kooi on 14 Apr 2012 at 9:28

GoogleCodeExporter commented 9 years ago
Hi Renzo,

I am happy to hear this issue has been solved!

It is caused by the strange way how windows DLLs work. Under normal 
circumstances, the "mysql" v8cgi module needs libmysql.dll *somewhere* in 
Windows path and will not work without it.
However, if you happen to already have this file in your system (and there 
might be thousand different reasons for this to happen), Windows will happily 
use that library instead of the one shipped with v8cgi.
This is not inherently bad: in some cases, the libmysql.dll might work just 
fine. But in your case, it was necessary to use v8cgi's version instead.

Original comment by ondrej.zara on 14 Apr 2012 at 2:49

GoogleCodeExporter commented 9 years ago
Hi Ondrej, I might add that putting libmysql in the v8cgi executable directory 
also works. And I finally found the faulty libmysql: it was in my php-directory.

Thanks for your efforts. V8Cgi rocks!

Original comment by Renzo.Kooi on 15 Apr 2012 at 7:53