ClosestStorm / v8cgi

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

MySQL:fetchObjects() crashes on XP running select query on more than 6 fields. #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
mysql>
drop table if exists t1;
create table t1 (f1 int,f2 int,f3 int,f4 int,f5 int,f6 int, f7 int, f8 
int);
insert into t1 values (1,2,3,4,5,6,7,8);

test.js
var MySQL = require("mysql").MySQL
var db = new MySQL().connect("localhost", "root", "", "test")
var result = db.query("select * from t1")
var rows=result.fetchObjects()

I am running from v8cgi-0.7.5-win32

-habib.

Original issue reported on code.google.com by habi...@gmail.com on 27 Dec 2009 at 12:12

GoogleCodeExporter commented 9 years ago
This certainly does not happen with Linux builds. I will try on Windows soon. 
By the
way, what "crashes" actually means?

Original comment by ondrej.zara on 27 Dec 2009 at 1:53

GoogleCodeExporter commented 9 years ago
The os shows crash window, "This application 
has performed an illigal operation." Running the 
debugger shows the memory location and 
instruction set, which I have not noted 
down...but was trying to load a value from 
invalid memory address.

Original comment by habi...@gmail.com on 27 Dec 2009 at 2:17

GoogleCodeExporter commented 9 years ago
The problem seems to be related with fetchNames() too, which crashes. I guess 
fetchObjects internally calls fetchNames.

If no one else if looking at it I shall try to fix it myself.

Original comment by habi...@gmail.com on 30 Dec 2009 at 6:39

GoogleCodeExporter commented 9 years ago
Found the problem. I was using libmysql.dll from my version 5.0. Just 
downloaded 
mysql community release 5.1 from mysql site and copied libmysql.dll into v8's 
folder 
and it is working.

There the fix is to use libmysql.dll from v 5.1. I shall request v8cgi windows 
build 
to distribute libmysql.dll with the zip, just like how PHP does. The program 
doesn't 
run otherwise.

Original comment by habi...@gmail.com on 30 Dec 2009 at 7:12

GoogleCodeExporter commented 9 years ago
Okay, libmysql.dll will be included in further v8cgi windows releases.

Original comment by ondrej.zara on 3 Jan 2010 at 7:12

GoogleCodeExporter commented 9 years ago
The libmysql.dll is located in dlls/mysql. Copy it to system/v8cgi folder as 
necessary.

Original comment by ondrej.zara on 5 Jan 2010 at 9:35