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
a90109dd
Commit
a90109dd
authored
Apr 24, 2007
by
istruewing@chilla.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-wl2936
into chilla.local:/home/mydev/mysql-5.1-wl2936-two
parents
3e87e65b
98ff6f0a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
4 deletions
+36
-4
mysys/my_getopt.c
mysys/my_getopt.c
+3
-0
plugin/fulltext/plugin_example.c
plugin/fulltext/plugin_example.c
+25
-2
sql/sql_plugin.cc
sql/sql_plugin.cc
+8
-2
No files found.
mysys/my_getopt.c
View file @
a90109dd
...
...
@@ -111,6 +111,9 @@ int handle_options(int *argc, char ***argv,
int
error
,
i
;
LINT_INIT
(
opt_found
);
/* handle_options() assumes arg0 (program name) always exists */
DBUG_ASSERT
(
argc
&&
*
argc
>=
1
);
DBUG_ASSERT
(
argv
&&
*
argv
);
(
*
argc
)
--
;
/* Skip the program name */
(
*
argv
)
++
;
/* --- || ---- */
init_variables
(
longopts
);
...
...
plugin/fulltext/plugin_example.c
View file @
a90109dd
...
...
@@ -215,6 +215,29 @@ static struct st_mysql_show_var simple_status[]=
{
0
,
0
,
0
}
};
/*
Plugin system variables.
*/
static
long
sysvar_one_value
;
static
char
*
sysvar_two_value
;
static
MYSQL_SYSVAR_LONG
(
simple_sysvar_one
,
sysvar_one_value
,
PLUGIN_VAR_RQCMDARG
,
"Simple fulltext parser example system variable number one. Give a number."
,
NULL
,
NULL
,
100L
,
10L
,
~
0L
,
0
);
static
MYSQL_SYSVAR_STR
(
simple_sysvar_two
,
sysvar_two_value
,
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_MEMALLOC
,
"Simple fulltext parser example system variable number two. Give a string."
,
NULL
,
NULL
,
NULL
);
static
struct
st_mysql_sys_var
*
simple_system_variables
[]
=
{
MYSQL_SYSVAR
(
simple_sysvar_one
),
MYSQL_SYSVAR
(
simple_sysvar_two
),
NULL
};
/*
Plugin library descriptor
*/
...
...
@@ -231,8 +254,8 @@ mysql_declare_plugin(ftexample)
simple_parser_plugin_deinit
,
/* deinit function (when unloaded) */
0x0001
,
/* version */
simple_status
,
/* status variables */
NULL
,
/* system variables */
NULL
/* config options */
simple_system_variables
,
/* system variables */
NULL
}
mysql_declare_plugin_end
;
sql/sql_plugin.cc
View file @
a90109dd
...
...
@@ -701,6 +701,8 @@ static bool plugin_add(MEM_ROOT *tmp_root,
sql_print_error
(
ER
(
ER_UDF_EXISTS
),
name
->
str
);
DBUG_RETURN
(
TRUE
);
}
/* Clear the whole struct to catch future extensions. */
bzero
((
char
*
)
&
tmp
,
sizeof
(
tmp
));
if
(
!
(
tmp
.
plugin_dl
=
plugin_dl_add
(
dl
,
report
)))
DBUG_RETURN
(
TRUE
);
/* Find plugin by name */
...
...
@@ -1569,7 +1571,8 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl
{
TABLE_LIST
tables
;
TABLE
*
table
;
int
error
,
argc
=
0
;
int
error
,
argc
;
char
*
argv
[
2
];
struct
st_plugin_int
*
tmp
;
DBUG_ENTER
(
"mysql_install_plugin"
);
...
...
@@ -1585,7 +1588,10 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl
pthread_mutex_lock
(
&
LOCK_plugin
);
rw_wrlock
(
&
LOCK_system_variables_hash
);
error
=
plugin_add
(
thd
->
mem_root
,
name
,
dl
,
&
argc
,
NULL
,
REPORT_TO_USER
);
argv
[
0
]
=
""
;
/* handle_options() assumes arg0 (program name) always exists */
argv
[
1
]
=
NULL
;
argc
=
1
;
error
=
plugin_add
(
thd
->
mem_root
,
name
,
dl
,
&
argc
,
argv
,
REPORT_TO_USER
);
rw_unlock
(
&
LOCK_system_variables_hash
);
if
(
error
||
!
(
tmp
=
plugin_find_internal
(
name
,
MYSQL_ANY_PLUGIN
)))
...
...
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