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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ad916ef3
Commit
ad916ef3
authored
Nov 08, 2015
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ob-10.1' into 10.1
parents
e7fa7e08
0a852591
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
storage/connect/tabxml.cpp
storage/connect/tabxml.cpp
+10
-8
No files found.
storage/connect/tabxml.cpp
View file @
ad916ef3
...
@@ -60,6 +60,7 @@ extern "C" char version[];
...
@@ -60,6 +60,7 @@ extern "C" char version[];
#endif // !__WIN__
#endif // !__WIN__
#define TYPE_UNKNOWN 12
/* Must be greater than other types */
#define TYPE_UNKNOWN 12
/* Must be greater than other types */
#define XSTR(M) sizeof(M) - strlen(M) - 1
/* To avoid overflow*/
/***********************************************************************/
/***********************************************************************/
/* Class and structure used by XMLColumns. */
/* Class and structure used by XMLColumns. */
...
@@ -225,30 +226,30 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
...
@@ -225,30 +226,30 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
more:
more:
if
(
vp
->
atp
)
{
if
(
vp
->
atp
)
{
strncpy
(
colname
,
vp
->
atp
->
GetName
(
g
),
sizeof
(
colname
));
strncpy
(
colname
,
vp
->
atp
->
GetName
(
g
),
sizeof
(
colname
));
strncat
(
xcol
->
Name
,
colname
,
64
);
strncat
(
xcol
->
Name
,
colname
,
XSTR
(
xcol
->
Name
)
);
switch
(
vp
->
atp
->
GetText
(
g
,
buf
,
sizeof
(
buf
)))
{
switch
(
vp
->
atp
->
GetText
(
g
,
buf
,
sizeof
(
buf
)))
{
case
RC_INFO
:
case
RC_INFO
:
PushWarning
(
g
,
txmp
);
PushWarning
(
g
,
txmp
);
case
RC_OK
:
case
RC_OK
:
strncat
(
fmt
,
"@"
,
sizeof
(
fmt
));
strncat
(
fmt
,
"@"
,
XSTR
(
fmt
));
break
;
break
;
default:
default:
goto
err
;
goto
err
;
}
// enswitch rc
}
// enswitch rc
if
(
j
)
if
(
j
)
strncat
(
fmt
,
colname
,
sizeof
(
fmt
));
strncat
(
fmt
,
colname
,
XSTR
(
fmt
));
}
else
{
}
else
{
if
(
tdp
->
Usedom
&&
node
->
GetType
()
!=
1
)
if
(
tdp
->
Usedom
&&
node
->
GetType
()
!=
1
)
continue
;
continue
;
strncpy
(
colname
,
node
->
GetName
(
g
),
sizeof
(
colname
));
strncpy
(
colname
,
node
->
GetName
(
g
),
sizeof
(
colname
));
strncat
(
xcol
->
Name
,
colname
,
64
);
strncat
(
xcol
->
Name
,
colname
,
XSTR
(
xcol
->
Name
)
);
if
(
j
)
if
(
j
)
strncat
(
fmt
,
colname
,
sizeof
(
fmt
));
strncat
(
fmt
,
colname
,
XSTR
(
fmt
));
if
(
j
<
lvl
&&
ok
)
{
if
(
j
<
lvl
&&
ok
)
{
vp
=
lvlp
[
j
+
1
];
vp
=
lvlp
[
j
+
1
];
...
@@ -266,9 +267,10 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
...
@@ -266,9 +267,10 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
if
(
!
vp
->
atp
)
if
(
!
vp
->
atp
)
node
=
vp
->
nl
->
GetItem
(
g
,
vp
->
k
++
,
node
);
node
=
vp
->
nl
->
GetItem
(
g
,
vp
->
k
++
,
node
);
strncat
(
strncat
(
fmt
,
colname
,
125
),
"/"
,
125
);
strncat
(
fmt
,
colname
,
XSTR
(
fmt
));
strncat
(
xcol
->
Name
,
"_"
,
64
);
strncat
(
fmt
,
"/"
,
XSTR
(
fmt
));
j
++
;
strncat
(
xcol
->
Name
,
"_"
,
XSTR
(
xcol
->
Name
));
j
++
;
vp
->
n
=
(
int
)
strlen
(
xcol
->
Name
);
vp
->
n
=
(
int
)
strlen
(
xcol
->
Name
);
vp
->
m
=
(
int
)
strlen
(
fmt
);
vp
->
m
=
(
int
)
strlen
(
fmt
);
goto
more
;
goto
more
;
...
...
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