473,498 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 v9 Win x64 crash

Hi,

Just FYI
The following (incorrect) embedded code is crashing DB2 v9 fixpack 2 and
below on Windows x64
Exactly, the statement
EXEC SQL SET CURRENT PACKAGESET :garbage
returns SQLCODE 0, but any statement after that makes DB2 to do segmentation
fault with a lot of dumps...

Regards,
Sergey

----------------------------------------------------------------------
#include <sqlenv.h>
#include <sqlutil.h>
#include <string.h>
#include <stdio.h>

EXEC SQL INCLUDE sqlca;
EXEC SQL BEGIN DECLARE SECTION;
static char user[16];
static char pass[32];
static char alias[16];
EXEC SQL END DECLARE SECTION;

int main(int ac, char ** av) {
EXEC SQL BEGIN DECLARE SECTION;
char garbage[30];
EXEC SQL END DECLARE SECTION;
strcpy(user, "ME");
strcpy(pass, "mypass");
strcpy(alias, "DBNAME");
memset(garbage, 0xC2, 29);
garbage[29] = 0;
EXEC SQL CONNECT TO :alias USER :user USING :pass;
if(sqlca.sqlcode != 0) {
printf("DB CONNECT errcode = %d, error: %.70s\n", sqlca.sqlcode,
sqlca.sqlerrmc);
return -1;
}
printf("setting pkg to '%s'\n", garbage);
EXEC SQL SET CURRENT PACKAGESET :garbage;
if(sqlca.sqlcode != 0) {
printf("SET CURRENT PACKAGESET schema errcode = %d, error: %.70s\n",
sqlca.sqlcode, sqlca.sqlerrmc);
}
EXEC SQL SET SCHEMA = :user;
if(sqlca.sqlcode != 0) {
printf("SET SCHEMA errcode = %d, error: %.70s\n",
sqlca.sqlcode, sqlca.sqlerrmc);
}
EXEC SQL ROLLBACK WORK;
if(sqlca.sqlcode != 0) {
printf("ROLLBACK errcode = %d, error: %.70s\n",
sqlca.sqlcode, sqlca.sqlerrmc);
return -1;
}
return 0;
}

---------------------------
The result is:

setting pkg to 'ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ'
SET SCHEMA errcode = -1224, error:

ROLLBACK errcode = -1024, error:
Mar 17 '07 #1
0 1588

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
8412
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential...
8
3193
by: Eric Brunel | last post by:
Hi all, I was creating a Tkinter widget in the style of the reversed tabs below Excel worksheets and I stepped in a serious problem: the code I made makes python crash with a seg fault, bus...
0
2228
by: roni | last post by:
hi. i have application written in vb.net + managed c++ dll that call also to unmanaged c++ function. the application crash. i open the dump file of the crash with WinDbg and that's is the...
10
9496
by: xixi | last post by:
i have db2 udb v8.1 on windows 64 bit 2003 server, after db2 server start , i found this in the db2diag.log, is this error? 2004-05-05-15.28.30.780000 Instance:DB2 Node:000...
8
6428
by: Adam Louis | last post by:
I would like help resolving this problem. I'm a novice who's been hired to query a hospital database and extract useful information, available to me only in a dynamically generated, downloadable...
14
5238
by: JK Peck | last post by:
I have a fairly large Access application that ran correctly in Access 2000. After upgrading to Access 2003 (and recompiling and updating references), it reliably crashes at a certain point. If I...
34
4423
by: NewToCPP | last post by:
Hi, Why does a C/C++ programs crash? When there is access to a null pointer or some thing like that programs crash, but why do they crash? Thanks.
12
5541
by: benjamin.krulewitch | last post by:
I'm debugging an issue with a C program that causes the computer to crash, and I'm attempting to log information immediately before the crash occurs. I us my BKprintLog function (see below) to...
110
10439
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
11
3009
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have run into a situation that if a page/tab that uses the Ajax toolkit (using .net version 3.5) is closed before the Ajax enable controls complete loading, then IE locks up. Does it in both IE7...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.