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
ecb00f3c
Commit
ecb00f3c
authored
Nov 05, 2020
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix failing tests
parent
a13642a8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
23 deletions
+21
-23
storage/connect/block.h
storage/connect/block.h
+2
-6
storage/connect/ha_connect.cc
storage/connect/ha_connect.cc
+15
-14
storage/connect/json.cpp
storage/connect/json.cpp
+4
-3
No files found.
storage/connect/block.h
View file @
ecb00f3c
...
...
@@ -30,8 +30,6 @@
#define DllExport
#endif // !__WIN__
typedef
class
JSON
*
PJSON
;
/***********************************************************************/
/* Definition of class BLOCK with its method function new. */
/***********************************************************************/
...
...
@@ -52,14 +50,12 @@ class DllExport BLOCK {
virtual
void
Printf
(
PGLOBAL
,
FILE
*
,
uint
)
{}
// Produce file desc
virtual
void
Prints
(
PGLOBAL
,
char
*
,
uint
)
{}
// Produce string desc
#if !defined(__BORLANDC__)
// Avoid warning C4291 by defining a matching dummy delete operator
// Avoid gcc errors by defining matching dummy delete operators
void
operator
delete
(
void
*
,
PGLOBAL
,
void
*
)
{}
void
operator
delete
(
void
*
,
long
long
)
{}
void
operator
delete
(
void
*
)
{}
#endif
virtual
~
BLOCK
()
{}
virtual
~
BLOCK
()
{}
};
// end of class BLOCK
#endif // !BLOCK_DEFINED
storage/connect/ha_connect.cc
View file @
ecb00f3c
...
...
@@ -170,7 +170,7 @@
#define JSONMAX 10 // JSON Default max grp size
extern
"C"
{
char
version
[]
=
"Version 1.07.0002
October 18
, 2020"
;
char
version
[]
=
"Version 1.07.0002
November 05
, 2020"
;
#if defined(__WIN__)
char
compver
[]
=
"Version 1.07.0002 "
__DATE__
" "
__TIME__
;
char
slash
=
'\\'
;
...
...
@@ -398,7 +398,7 @@ static MYSQL_THDVAR_ENUM(
// Adding JPATH to all Json table columns
static
MYSQL_THDVAR_BOOL
(
json_all_path
,
PLUGIN_VAR_RQCMDARG
,
"Adding JPATH to all Json table columns"
,
NULL
,
NULL
,
0
);
// NO
by default
NULL
,
NULL
,
1
);
// YES
by default
// Null representation for JSON values
static
MYSQL_THDVAR_STR
(
json_null
,
...
...
@@ -411,7 +411,7 @@ static MYSQL_THDVAR_STR(json_null,
static
MYSQL_THDVAR_INT
(
default_depth
,
PLUGIN_VAR_RQCMDARG
,
"Default depth used by Json, XML and Mongo discovery"
,
NULL
,
NULL
,
0
,
-
1
,
16
,
1
);
NULL
,
NULL
,
5
,
-
1
,
16
,
1
);
// Defaults to 5
// Estimate max number of rows for JSON aggregate functions
static
MYSQL_THDVAR_UINT
(
json_grp_size
,
...
...
@@ -4543,14 +4543,12 @@ bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn, bool quick)
case
TAB_DIR
:
case
TAB_ZIP
:
case
TAB_OEM
:
if
(
table
&&
table
->
pos_in_table_list
)
// if SELECT
{
if
(
table
&&
table
->
pos_in_table_list
)
{
// if SELECT
#if MYSQL_VERSION_ID > 100200
Switch_to_definer_security_ctx
backup_ctx
(
thd
,
table
->
pos_in_table_list
);
#endif // VERSION_ID > 100200
return
check_global_access
(
thd
,
FILE_ACL
);
}
else
}
else
return
check_global_access
(
thd
,
FILE_ACL
);
case
TAB_ODBC
:
case
TAB_JDBC
:
...
...
@@ -5360,7 +5358,8 @@ static char *encode(PGLOBAL g, const char *cnm)
*/
static
bool
add_field
(
String
*
sql
,
TABTYPE
ttp
,
const
char
*
field_name
,
int
typ
,
int
len
,
int
dec
,
char
*
key
,
uint
tm
,
const
char
*
rem
,
char
*
dft
,
char
*
xtra
,
char
*
fmt
,
int
flag
,
bool
dbf
,
char
v
)
{
char
*
dft
,
char
*
xtra
,
char
*
fmt
,
int
flag
,
bool
dbf
,
char
v
)
{
#if defined(DEVELOPMENT)
// Some client programs regard CHAR(36) as GUID
char
var
=
(
len
>
255
||
len
==
36
)
?
'V'
:
v
;
...
...
@@ -5604,8 +5603,8 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
String
sql
(
buf
,
sizeof
(
buf
),
system_charset_info
);
sql
.
copy
(
STRING_WITH_LEN
(
"CREATE TABLE whatever ("
),
system_charset_info
);
user
=
host
=
pwd
=
tbl
=
src
=
col
=
ocl
=
pic
=
fcl
=
skc
=
rnk
=
zfn
=
NULL
;
dsn
=
url
=
NULL
;
user
=
host
=
pwd
=
tbl
=
src
=
col
=
ocl
=
pic
=
fcl
=
skc
=
rnk
=
zfn
=
NULL
;
dsn
=
url
=
NULL
;
// Get the useful create options
ttp
=
GetTypeID
(
topt
->
type
);
...
...
@@ -6767,8 +6766,8 @@ int ha_connect::create(const char *name, TABLE *table_arg,
if
(
trace
(
1
))
htrc
(
"xchk=%p createas=%d
\n
"
,
g
->
Xchk
,
g
->
Createas
);
#if defined(ZIP_SUPPORT)
if
(
options
->
zipped
)
{
#if defined(ZIP_SUPPORT)
// Check whether the zip entry must be made from a file
PCSZ
fn
=
GetListOption
(
g
,
"Load"
,
options
->
oplist
,
NULL
);
...
...
@@ -6790,9 +6789,11 @@ int ha_connect::create(const char *name, TABLE *table_arg,
}
// endif LoadFile
}
// endif fn
#else // !ZIP_SUPPORT
my_message
(
ER_UNKNOWN_ERROR
,
"Option ZIP not supported"
,
MYF
(
0
));
DBUG_RETURN
(
HA_ERR_INTERNAL_ERROR
);
#endif // !ZIP_SUPPORT
}
// endif zipped
#endif // ZIP_SUPPORT
// To check whether indexes have to be made or remade
if
(
!
g
->
Xchk
)
{
...
...
storage/connect/json.cpp
View file @
ecb00f3c
...
...
@@ -1533,10 +1533,11 @@ PSZ JVALUE::GetString(PGLOBAL g)
sprintf
(
buf
,
"%.*lf"
,
Val
->
Nd
,
Val
->
F
);
break
;
case
TYPE_BOOL
:
p
=
(
Val
->
B
)
?
"true"
:
"false"
;
p
=
(
char
*
)
PlugDup
(
g
,
(
Val
->
B
)
?
"true"
:
"false"
)
;
break
;
case
TYPE_NULL
:
p
=
"null"
;
p
=
(
char
*
)
PlugDup
(
g
,
"null"
)
;
break
;
default:
p
=
NULL
;
...
...
@@ -1545,7 +1546,7 @@ PSZ JVALUE::GetString(PGLOBAL g)
}
else
p
=
NULL
;
return
p
;
return
(
p
==
buf
)
?
(
char
*
)
PlugDup
(
g
,
buf
)
:
p
;
}
// end of GetString
/***********************************************************************/
...
...
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