Skip to Content
0
Mar 17, 2009 at 08:23 AM

An error with the 7.7 ODBC on the Linux

51 Views

Dear Gentlmen,

I have some problems with a new version (7.7.06.09) of the MaxDB database.

My application is a web application on the ExtJSApachePHPZendFrameWorkMaxDB platform.

The MaxDB and other parts are installed on the Fedora Core Linux server.

The PHP is connecting to the MaxDB via ADO+unixODBC interfaces (unixODBC 2.2.14).

I had no problems with the 7.6 version of the database.

But, the problems are appear then I was install the 7.7 version.

A sample query for selecting all children for the current parent have an error now.

In my PHP application I have no answer from the database. If I execute this query

via isql program (DSN with 7.7 ODBC) (from unixODBC) then I see a segmentation fault error.

But, if I connect to the MaxDB 7.7 via ODBC 7.6 driver (from Version = 7.6.06 Build 003-121-202-135)

I have no problem in my PHP application and isql too.

If I execute this query from another computer with Database Studio and Winodws, I have no error too.

-


Install info:

INSTALLER_INFO: Version = 7.7.06 Build 009-121-202-944

INSTALLER_INFO: Changelist = 202944

INSTALLER_INFO: MakeId = 360684

INSTALLER_INFO: Type = kit

SYS_INFO: Host name = myhost.com

SYS_INFO: System = Linux

SYS_INFO: Architecture = I386

SYS_INFO: Version = 2.6.15

SYS_INFO: Subversion = 1.2054_FC5smp

SYS_INFO: C Runtime = GLIBC 2.4

-


/root/.odbc.ini

[DSN6]

ServerDB=NTL

ServerNode=127.0.0.1

Driver=/opt/sdb/interfaces/odbc/lib/libsqlod.so

[DSN7]

ServerDB=NTL

ServerNode=127.0.0.1

Driver=/opt/sdb/programs/lib/libsdbodbc.so

-


table fr_form

create table "NADMIN"."FR_FORM"(

"ID" FIXED (10) not null default SERIAL (1),

"ID_TYPE" INTEGER not null,

"ID_GROUP" INTEGER,

"ID_USER" INTEGER not null,

"ID_PARENT" INTEGER,

"SORTORDER" INTEGER default 10,

"PNAME" VARCHAR (36) ASCII,

"NAME" VARCHAR (512) ASCII,

"REMARK" VARCHAR (1024) ASCII,

"RVALUE" VARCHAR (1024) ASCII,

"ISARCH" INTEGER default 0,

"ISCPAQ" INTEGER,

"RCOUNT" INTEGER,

"ISSUBACCESS" INTEGER,

"SUBTYPE" INTEGER default 0,

"ISNUMBER" INTEGER default 0,

"IS_HAVE_CHILD" SMALLINT default 0,

constraint SYSPRIMARYKEY primary key ("ID"),

foreign key "SYS_USER_FR_FORM" ("ID_USER") references "NADMIN"."SYS_USER" ("ID") on delete restrict,

foreign key "FR_FORM_FR_FORM" ("ID_PARENT") references "NADMIN"."FR_FORM" ("ID") on delete restrict,

foreign key "FR_GROUP_FR_FORM" ("ID_GROUP") references "NADMIN"."FR_GROUP" ("ID") on delete restrict,

foreign key "FR_TYPE_FR_FORM" ("ID_TYPE") references "NADMIN"."FR_TYPE" ("ID") on delete restrict)

-


The query for selecting all children for the current parent with id = 1244

declare c cursor for with recursive tree (node_name, node_id, node_id_parent, node_level)

as ( select name, id, id_parent, 0

from fr_form where id = 1244

union all select name, id, id_parent, node_level+1

from fr_form, tree where tree.node_id = fr_form.id_parent)

select node_id from tree order by node_level desc

-


The ODBC trace file

SQLGetFunctions 2009-03-17 13:35:55.322085

ConnectionHandle [in] : 0x92b8e7a

FunctionId [in] : unknown function id: 23

SupportedPtr [out] : 1

SQLRETURN : SQL_SUCCESS

SQLGetFunctions 2009-03-17 13:35:55.322111

ConnectionHandle [in] : 0x92b8e7a

FunctionId [in] : SQL_API_SQLGETDIAGREC

SupportedPtr [out] : 0

SQLRETURN : SQL_SUCCESS

SQLGetInfo 2009-03-17 13:35:55.322147

ConnectionHandle [in] : 0x92b8e7a

InfoType [in] : SQL_DRIVER_ODBC_VER

BufferLength [in] : 20

enc : ASCII

InfoValuePtr [out] : 03.51

StringLengthPtr [out] : (null)

SQLRETURN : SQL_SUCCESS

SQLGetDiagRec 2009-03-17 13:35:55.322215

HandleType [in] : SQL_HANDLE_DBC

Handle [in] : 0x92b8e7a

RecNumber [in] : 1

BufferLength [in] : 512

enc : ASCII

SQLRETURN : SQL_NO_DATA

SQLRETURN : SQL_NO_DATA

SQLAllocHandle 2009-03-17 13:36:09.768751

HandleType [in] : SQL_HANDLE_STMT

InputHandle [in] : 0x92b8e7a

OutputHandlePtr [out] : &(0x92c0290)

SQLRETURN : SQL_SUCCESS

SQLPrepare 2009-03-17 13:36:09.768863

StatementHandle [in] : 0x92c0290

StatementText [in] : 'declare c cursor for with recursive tree (node_name, node_id, node_id_parent, node_level) as ( select na

m fr_form where id = 1244 union all select name, id, id_parent, node_level+1 from fr_form, tree where tree.node_id = fr_form.id_\

parent) select node_id from tree order by node_level desc '

TextLength [in] : SQL_NTS

enc : ASCII

::PARSE 'SQLCURS_2' 2009-03-17 13:36:09.769094 [0x0x92da5f8]

SQL COMMAND:'declare c cursor for with recursive tree (node_name, node_id, node_id_parent, node_level) as ( select name, id, id_pare

m fr_form where id = 1244 union all select name, id, id_parent, node_level+1 from fr_form, tree where tree.node_id = fr_form.id_\

parent) select node_id from tree order by node_level desc '

^

<CURRENT WRITE POSITION>.

Pavel