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
cbe35113
Commit
cbe35113
authored
Mar 19, 2016
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ob-10.0' into 10.0
parents
433c8a82
c1efc4a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
storage/connect/tabmysql.cpp
storage/connect/tabmysql.cpp
+1
-1
storage/connect/value.cpp
storage/connect/value.cpp
+14
-15
No files found.
storage/connect/tabmysql.cpp
View file @
cbe35113
...
...
@@ -334,7 +334,7 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int)
Delayed
=
!!
GetIntCatInfo
(
"Delayed"
,
0
);
}
else
{
// MYSQL access from a PROXY table
Database
=
GetStringCatInfo
(
g
,
"Database"
,
Schema
?
Schema
:
(
PSZ
)
"*"
);
Database
=
GetStringCatInfo
(
g
,
"Database"
,
Schema
?
Schema
:
PlugDup
(
g
,
"*"
)
);
Isview
=
GetBoolCatInfo
(
"View"
,
false
);
// We must get other connection parms from the calling table
...
...
storage/connect/value.cpp
View file @
cbe35113
...
...
@@ -1344,10 +1344,13 @@ bool TYPVAL<PSZ>::SetValue_pval(PVAL valp, bool chktype)
/***********************************************************************/
bool
TYPVAL
<
PSZ
>::
SetValue_char
(
char
*
p
,
int
n
)
{
bool
rc
;
bool
rc
=
false
;
if
(
p
&&
n
>
0
)
{
rc
=
n
>
Len
;
if
(
!
p
||
n
==
0
)
{
Reset
();
Null
=
Nullable
;
}
else
if
(
p
!=
Strp
)
{
rc
=
n
>
Len
;
if
((
n
=
MY_MIN
(
n
,
Len
)))
{
strncpy
(
Strp
,
p
,
n
);
...
...
@@ -1366,10 +1369,6 @@ bool TYPVAL<PSZ>::SetValue_char(char *p, int n)
Reset
();
Null
=
false
;
}
else
{
rc
=
false
;
Reset
();
Null
=
Nullable
;
}
// endif p
return
rc
;
...
...
@@ -1380,12 +1379,12 @@ bool TYPVAL<PSZ>::SetValue_char(char *p, int n)
/***********************************************************************/
void
TYPVAL
<
PSZ
>::
SetValue_psz
(
PSZ
s
)
{
if
(
s
)
{
strncpy
(
Strp
,
s
,
Len
);
if
(
!
s
)
{
Reset
();
Null
=
Nullable
;
}
else
if
(
s
!=
Strp
)
{
strncpy
(
Strp
,
s
,
Len
);
Null
=
false
;
}
else
{
Reset
();
Null
=
Nullable
;
}
// endif s
}
// end of SetValue_psz
...
...
@@ -1643,7 +1642,7 @@ bool TYPVAL<PSZ>::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op)
assert
(
np
==
1
||
np
==
2
);
if
(
np
==
2
)
strncpy
(
Strp
,
p
[
0
],
Len
);
SetValue_psz
(
p
[
0
]
);
if
((
i
=
Len
-
(
signed
)
strlen
(
Strp
))
>
0
)
strncat
(
Strp
,
p
[
np
-
1
],
i
);
...
...
@@ -1651,11 +1650,11 @@ bool TYPVAL<PSZ>::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op)
break
;
case
OP_MIN
:
assert
(
np
==
2
);
strcpy
(
Strp
,
(
strcmp
(
p
[
0
],
p
[
1
])
<
0
)
?
p
[
0
]
:
p
[
1
]);
SetValue_psz
(
(
strcmp
(
p
[
0
],
p
[
1
])
<
0
)
?
p
[
0
]
:
p
[
1
]);
break
;
case
OP_MAX
:
assert
(
np
==
2
);
strcpy
(
Strp
,
(
strcmp
(
p
[
0
],
p
[
1
])
>
0
)
?
p
[
0
]
:
p
[
1
]);
SetValue_psz
(
(
strcmp
(
p
[
0
],
p
[
1
])
>
0
)
?
p
[
0
]
:
p
[
1
]);
break
;
default:
// sprintf(g->Message, MSG(BAD_EXP_OPER), op);
...
...
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