Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
e666422e
Commit
e666422e
authored
Mar 10, 2001
by
Hiroshi Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1)Allow the access to indexes with up to 16 keys.
2)Fix some memory leaks. 3)Change some bogus error messages.
parent
5490195f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
9 deletions
+15
-9
src/interfaces/odbc/convert.c
src/interfaces/odbc/convert.c
+6
-3
src/interfaces/odbc/info.c
src/interfaces/odbc/info.c
+3
-3
src/interfaces/odbc/qresult.c
src/interfaces/odbc/qresult.c
+2
-0
src/interfaces/odbc/results.c
src/interfaces/odbc/results.c
+2
-2
src/interfaces/odbc/statement.c
src/interfaces/odbc/statement.c
+2
-1
No files found.
src/interfaces/odbc/convert.c
View file @
e666422e
...
...
@@ -273,14 +273,16 @@ copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2
/* this is an array of eight integers */
short
*
short_array
=
(
short
*
)
(
(
char
*
)
rgbValue
+
rgbValueOffset
);
len
=
16
;
len
=
32
;
vp
=
value
;
nval
=
0
;
for
(
i
=
0
;
i
<
8
;
i
++
)
mylog
(
"index=("
);
for
(
i
=
0
;
i
<
16
;
i
++
)
{
if
(
sscanf
(
vp
,
"%hd"
,
&
short_array
[
i
])
!=
1
)
break
;
mylog
(
" %d"
,
short_array
[
i
]);
nval
++
;
/* skip the current token */
...
...
@@ -290,8 +292,9 @@ copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2
if
(
*
vp
==
'\0'
)
break
;
}
mylog
(
") nval = %d
\n
"
,
nval
);
for
(
i
=
nval
;
i
<
8
;
i
++
)
for
(
i
=
nval
;
i
<
16
;
i
++
)
{
short_array
[
i
]
=
0
;
}
...
...
src/interfaces/odbc/info.c
View file @
e666422e
...
...
@@ -1761,7 +1761,7 @@ HSTMT hindx_stmt;
RETCODE
result
;
char
*
table_name
;
char
index_name
[
MAX_INFO_STRING
];
short
fields_vector
[
8
];
short
fields_vector
[
16
];
char
isunique
[
10
],
isclustered
[
10
];
SDWORD
index_name_len
,
fields_vector_len
;
TupleNode
*
row
;
...
...
@@ -1924,7 +1924,7 @@ mylog("%s: entering...stmt=%u\n", func, stmt);
}
/* bind the vector column */
result
=
SQLBindCol
(
hindx_stmt
,
2
,
SQL_C_DEFAULT
,
fields_vector
,
16
,
&
fields_vector_len
);
fields_vector
,
32
,
&
fields_vector_len
);
if
((
result
!=
SQL_SUCCESS
)
&&
(
result
!=
SQL_SUCCESS_WITH_INFO
))
{
stmt
->
errormsg
=
indx_stmt
->
errormsg
;
/* "Couldn't bind column in SQLStatistics."; */
stmt
->
errornumber
=
indx_stmt
->
errornumber
;
...
...
@@ -2003,7 +2003,7 @@ mylog("%s: entering...stmt=%u\n", func, stmt);
(
fUnique
==
SQL_INDEX_UNIQUE
&&
atoi
(
isunique
)))
{
i
=
0
;
/* add a row in this table for each field in the index */
while
(
i
<
8
&&
fields_vector
[
i
]
!=
0
)
{
while
(
i
<
16
&&
fields_vector
[
i
]
!=
0
)
{
row
=
(
TupleNode
*
)
malloc
(
sizeof
(
TupleNode
)
+
(
13
-
1
)
*
sizeof
(
TupleField
));
...
...
src/interfaces/odbc/qresult.c
View file @
e666422e
...
...
@@ -311,6 +311,7 @@ QResultClass *res;
QR_set_message
(
self
,
"Error closing cursor."
);
return
FALSE
;
}
QR_Destructor
(
res
);
/* End the transaction if there are no cursors left on this conn */
if
(
CC_cursor_count
(
self
->
conn
)
==
0
)
{
...
...
@@ -325,6 +326,7 @@ QResultClass *res;
QR_set_message
(
self
,
"Error ending transaction."
);
return
FALSE
;
}
QR_Destructor
(
res
);
}
}
...
...
src/interfaces/odbc/results.c
View file @
e666422e
...
...
@@ -405,7 +405,7 @@ int len = 0, value = 0;
if
(
icol
>=
cols
)
{
stmt
->
errornumber
=
STMT_INVALID_COLUMN_NUMBER_ERROR
;
stmt
->
errormsg
=
"Invalid column number in
DescribeCol
."
;
stmt
->
errormsg
=
"Invalid column number in
ColAttributes
."
;
SC_log_error
(
func
,
""
,
stmt
);
return
SQL_ERROR
;
}
...
...
@@ -442,7 +442,7 @@ int len = 0, value = 0;
if
(
icol
>=
cols
)
{
stmt
->
errornumber
=
STMT_INVALID_COLUMN_NUMBER_ERROR
;
stmt
->
errormsg
=
"Invalid column number in
DescribeCol
."
;
stmt
->
errormsg
=
"Invalid column number in
ColAttributes
."
;
SC_log_error
(
func
,
""
,
stmt
);
return
SQL_ERROR
;
}
...
...
src/interfaces/odbc/statement.c
View file @
e666422e
...
...
@@ -404,7 +404,8 @@ mylog("recycle statement: self= %u\n", self);
conn
=
SC_get_conn
(
self
);
if
(
!
CC_is_in_autocommit
(
conn
)
&&
CC_is_in_trans
(
conn
))
{
CC_send_query
(
conn
,
"ABORT"
,
NULL
);
QResultClass
*
res
=
CC_send_query
(
conn
,
"ABORT"
,
NULL
);
QR_Destructor
(
res
);
CC_set_no_trans
(
conn
);
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment