Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
nexedi
MariaDB
Commits
82f2be67
Commit
82f2be67
authored
Feb 02, 2015
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix a bug causing Insert into ODBC to fail when the column name is
UTF8 encoded. modified: storage/connect/tabodbc.cpp
parent
6a783719
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
storage/connect/tabodbc.cpp
storage/connect/tabodbc.cpp
+7
-4
No files found.
storage/connect/tabodbc.cpp
View file @
82f2be67
...
@@ -379,7 +379,7 @@ int TDBODBC::Decode(char *txt, char *buf, size_t n)
...
@@ -379,7 +379,7 @@ int TDBODBC::Decode(char *txt, char *buf, size_t n)
/***********************************************************************/
/***********************************************************************/
char
*
TDBODBC
::
MakeSQL
(
PGLOBAL
g
,
bool
cnt
)
char
*
TDBODBC
::
MakeSQL
(
PGLOBAL
g
,
bool
cnt
)
{
{
char
*
colist
,
*
tabname
,
*
sql
,
buf
[
64
];
char
*
colist
,
*
tabname
,
*
sql
,
buf
[
NAM_LEN
*
3
];
LPCSTR
schmp
=
NULL
,
catp
=
NULL
;
LPCSTR
schmp
=
NULL
,
catp
=
NULL
;
int
len
,
ncol
=
0
;
int
len
,
ncol
=
0
;
bool
first
=
true
;
bool
first
=
true
;
...
@@ -492,7 +492,7 @@ char *TDBODBC::MakeSQL(PGLOBAL g, bool cnt)
...
@@ -492,7 +492,7 @@ char *TDBODBC::MakeSQL(PGLOBAL g, bool cnt)
/***********************************************************************/
/***********************************************************************/
char
*
TDBODBC
::
MakeInsert
(
PGLOBAL
g
)
char
*
TDBODBC
::
MakeInsert
(
PGLOBAL
g
)
{
{
char
*
stmt
,
*
colist
,
*
valist
;
char
*
stmt
,
*
colist
,
*
valist
,
buf
[
NAM_LEN
*
3
]
;
// char *tk = "`";
// char *tk = "`";
int
len
=
0
;
int
len
=
0
;
bool
b
=
FALSE
;
bool
b
=
FALSE
;
...
@@ -519,10 +519,13 @@ char *TDBODBC::MakeInsert(PGLOBAL g)
...
@@ -519,10 +519,13 @@ char *TDBODBC::MakeInsert(PGLOBAL g)
}
else
}
else
b
=
true
;
b
=
true
;
// Column name can be in UTF-8 encoding
Decode
(
colp
->
GetName
(),
buf
,
sizeof
(
buf
));
if
(
Quote
)
if
(
Quote
)
strcat
(
strcat
(
strcat
(
colist
,
Quote
),
colp
->
GetName
()
),
Quote
);
strcat
(
strcat
(
strcat
(
colist
,
Quote
),
buf
),
Quote
);
else
else
strcat
(
colist
,
colp
->
GetName
()
);
strcat
(
colist
,
buf
);
strcat
(
valist
,
"?"
);
// Parameter marker
strcat
(
valist
,
"?"
);
// Parameter marker
}
// endfor colp
}
// endfor colp
...
...
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