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
0a913e20
Commit
0a913e20
authored
Oct 14, 2014
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Add Sergei fix to enable loading OEM table libs
modified: storage/connect/ha_connect.cc storage/connect/reldef.cpp
parent
b10fa87b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
storage/connect/ha_connect.cc
storage/connect/ha_connect.cc
+20
-2
storage/connect/reldef.cpp
storage/connect/reldef.cpp
+20
-0
No files found.
storage/connect/ha_connect.cc
View file @
0a913e20
...
...
@@ -170,8 +170,8 @@
#define SZWMIN 4194304 // Minimum work area size 4M
extern
"C"
{
char
version
[]
=
"Version 1.03.000
3 August 22
, 2014"
;
char
compver
[]
=
"Version 1.03.000
3
"
__DATE__
" "
__TIME__
;
char
version
[]
=
"Version 1.03.000
4 October 13
, 2014"
;
char
compver
[]
=
"Version 1.03.000
4
"
__DATE__
" "
__TIME__
;
#if defined(WIN32)
char
slash
=
'\\'
;
...
...
@@ -451,6 +451,24 @@ static int connect_init_func(void *p)
{
DBUG_ENTER
(
"connect_init_func"
);
// added from Sergei mail
#if 0 // (defined(LINUX))
Dl_info dl_info;
if (dladdr(&connect_hton, &dl_info))
{
if (dlopen(dl_info.dli_fname, RTLD_NOLOAD | RTLD_NOW | RTLD_GLOBAL) == 0)
{
sql_print_information("CONNECT: dlopen() failed, OEM table type is not supported");
sql_print_information("CONNECT: %s", dlerror());
}
}
else
{
sql_print_information("CONNECT: dladdr() failed, OEM table type is not supported");
sql_print_information("CONNECT: %s", dlerror());
}
#endif // 0 (LINUX)
sql_print_information
(
"CONNECT: %s"
,
compver
);
// xtrace is now a system variable
...
...
storage/connect/reldef.cpp
View file @
0a913e20
...
...
@@ -52,6 +52,10 @@
extern
"C"
int
trace
;
extern
"C"
USETEMP
Use_Temp
;
#if !defined(WIN32)
extern
handlerton
*
connect_hton
;
#endif // !WIN32
/* --------------------------- Class RELDEF -------------------------- */
/***********************************************************************/
...
...
@@ -455,6 +459,22 @@ PTABDEF OEMDEF::GetXdef(PGLOBAL g)
}
// endif getdef
#else // !WIN32
const
char
*
error
=
NULL
;
Dl_info
dl_info
;
// The OEM lib must retrieve exported CONNECT variables
if
(
dladdr
(
&
connect_hton
,
&
dl_info
))
{
if
(
dlopen
(
dl_info
.
dli_fname
,
RTLD_NOLOAD
|
RTLD_NOW
|
RTLD_GLOBAL
)
==
0
)
{
error
=
dlerror
();
sprintf
(
g
->
Message
,
"dlopen failed: %s, OEM not supported"
,
SVP
(
error
));
return
NULL
;
}
// endif dlopen
}
else
{
error
=
dlerror
();
sprintf
(
g
->
Message
,
"dladdr failed: %s, OEM not supported"
,
SVP
(
error
));
return
NULL
;
}
// endif dladdr
// Is the library already loaded?
// if (!Hdll && !(Hdll = ???))
// Load the desired shared library
...
...
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