Comments (6)
thanks for letting me know. Yes, looks like driver is trying to run two queries at the same time on the same statement, which is not good news. It may take me a few days to track down, I will report back when I dig into it further.
from node-sqlserver-v8.
if you are in a position to do so, could you explain the code a little i.e. what is the stored procedure doing, is it a simple select ....
im msnodesqlv8.driverMgr.js, could you run your test with a trace on
what I am passing in for queryId with your test running. In theory, each queryId should be managed entirely independently to all others on their own statements. My first guess is that I am not doing that correctly. Any additional information would be much appreciated.
function procedure_internal(queryId, procedure, params, callback) {
function onProc(err, results, params) {
if (callback) {
callback(err, results, params);
}
}
//noinspection JSUnresolvedFunction
return native.callProcedure(queryId, procedure, params, onProc);
}
from node-sqlserver-v8.
@TimelordUK I tried with multiple procedures, and the only requirement was for it to raise an error.
For instance,
create procedure test
as begin
RAISERROR ('error', 16, 1);
end
would make it. However, the bug is there even when the stored procedure does not exist at all. So the query needs to fail.
I'll do some testing in msnodesqlv8.driverMgr.js
later today. Thanks!
from node-sqlserver-v8.
so far I have tried to implement the same sort of test directly over msnodesqlv8
I have run many times on a single connection and it seems to run fine
I of course am not saying therefore it is not msnodesqlv8, I just want to try and isolate the test case else I will have to run yours via mssql to reproduce it.
[96] {
"error": {
"sqlstate": "42000",
"code": 50000
}
}
[97] {
"error": {
"sqlstate": "42000",
"code": 50000
}
}
[98] {
"error": {
"sqlstate": "42000",
"code": 50000
}
}
[99] {
"error": {
"sqlstate": "42000",
"code": 50000
}
}
private storedProcedureStress(procedureDef:StoredProcedureDef, params:any) : Promise<any> {
let inst = this;
return new Promise((resolve, reject) => {
ASQ().runner(function*() {
let connection = yield inst.sqlWrapper.open();
let array:any = [];
yield inst.createProcedureDef(procedureDef);
let count = 100;
for (let i=0; i<count; i++){
array.push(i);
}
let raised = 0;
let promises = array.map((i:any)=> {
let command = connection.getCommand().procedure(procedureDef.name).params(params);
// test should raise an error, or just don't exist at all
return command.execute().catch((err: any) => {
console.log(`[${raised}] ${JSON.stringify(err, null, 2)}`);
++raised;
});
});
Promise.all(promises).then( ()=> {
resolve();
}).catch((e:any)=> {
reject(e);
});
});
});
}
from node-sqlserver-v8.
This issue should now be resolved in 0.2.16 available on npm. The statement was not terminated correctly after raiseerror.
from node-sqlserver-v8.
It worked for me as well. Thanks.
from node-sqlserver-v8.
Related Issues (20)
- Can I do a PR to remove prebuild-install as dependency HOT 2
- msnodesqlv8 implementation using TypeOrm HOT 19
- Install msnodesqlv8 offline system HOT 2
- ERROR: queryObj.pause is not a function HOT 4
- Parameters defaulting to invalid sizes for Always on Encryption HOT 11
- Package not working on Node 16 HOT 5
- Module did not self-register in Visual Studio Code HOT 1
- SIGSEGV (Address boundary error) while atempting to open connection HOT 18
- Segmentation fault on node:16-alpine HOT 1
- Kerberos Auth: Not Using Instance Name While Looking For SPN HOT 2
- Not catching results generated after PRINT or warning from stored procedures with NOCOUNT on HOT 3
- Error: Module did not self-register HOT 9
- More code samples for Multiple Result Sets (like issue 113) HOT 1
- Change node-gyp path to download nodejs headers from msnodesqlv8 installation HOT 2
- Why are database field names garbled when using Chinese fields? HOT 3
- msnodesqlv8 can't find sqltypes.h HOT 2
- install msnodesqlv8 through npm failed HOT 2
- Keep saying Module not found of sqlserverv8 HOT 6
- Question: Using prepared query with Pool
- unable to build on CentOS7 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-sqlserver-v8.