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
fccc852e
Commit
fccc852e
authored
Apr 18, 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
parents
f6b222dd
3a0d2806
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
mysys/hash.c
mysys/hash.c
+6
-3
sql/handler.cc
sql/handler.cc
+1
-0
sql/sql_plugin.cc
sql/sql_plugin.cc
+14
-1
No files found.
mysys/hash.c
View file @
fccc852e
...
@@ -315,9 +315,12 @@ my_bool my_hash_insert(HASH *info,const byte *record)
...
@@ -315,9 +315,12 @@ my_bool my_hash_insert(HASH *info,const byte *record)
LINT_INIT
(
gpos
);
LINT_INIT
(
gpos2
);
LINT_INIT
(
gpos
);
LINT_INIT
(
gpos2
);
LINT_INIT
(
ptr_to_rec
);
LINT_INIT
(
ptr_to_rec2
);
LINT_INIT
(
ptr_to_rec
);
LINT_INIT
(
ptr_to_rec2
);
if
(
HASH_UNIQUE
&
info
->
flags
&&
if
(
HASH_UNIQUE
&
info
->
flags
)
hash_search
(
info
,
hash_key
(
info
,
record
,
&
idx
,
1
),
idx
))
{
return
(
TRUE
);
/* Duplicate entry */
byte
*
key
=
(
byte
*
)
hash_key
(
info
,
record
,
&
idx
,
1
);
if
(
hash_search
(
info
,
key
,
idx
))
return
(
TRUE
);
/* Duplicate entry */
}
flag
=
0
;
flag
=
0
;
if
(
!
(
empty
=
(
HASH_LINK
*
)
alloc_dynamic
(
&
info
->
array
)))
if
(
!
(
empty
=
(
HASH_LINK
*
)
alloc_dynamic
(
&
info
->
array
)))
...
...
sql/handler.cc
View file @
fccc852e
...
@@ -416,6 +416,7 @@ int ha_initialize_handlerton(st_plugin_int *plugin)
...
@@ -416,6 +416,7 @@ int ha_initialize_handlerton(st_plugin_int *plugin)
{
{
handlerton
*
hton
;
handlerton
*
hton
;
DBUG_ENTER
(
"ha_initialize_handlerton"
);
DBUG_ENTER
(
"ha_initialize_handlerton"
);
DBUG_PRINT
(
"plugin"
,
(
"initialize plugin: '%s'"
,
plugin
->
name
.
str
));
hton
=
(
handlerton
*
)
my_malloc
(
sizeof
(
handlerton
),
hton
=
(
handlerton
*
)
my_malloc
(
sizeof
(
handlerton
),
MYF
(
MY_WME
|
MY_ZEROFILL
));
MYF
(
MY_WME
|
MY_ZEROFILL
));
...
...
sql/sql_plugin.cc
View file @
fccc852e
...
@@ -649,7 +649,7 @@ plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name, int type
...
@@ -649,7 +649,7 @@ plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name, int type
LEX
*
lex
=
thd
?
thd
->
lex
:
0
;
LEX
*
lex
=
thd
?
thd
->
lex
:
0
;
plugin_ref
rc
=
NULL
;
plugin_ref
rc
=
NULL
;
st_plugin_int
*
plugin
;
st_plugin_int
*
plugin
;
DBUG_ENTER
(
"plugin_lock"
);
DBUG_ENTER
(
"plugin_lock
_by_name
"
);
pthread_mutex_lock
(
&
LOCK_plugin
);
pthread_mutex_lock
(
&
LOCK_plugin
);
if
((
plugin
=
plugin_find_internal
(
name
,
type
)))
if
((
plugin
=
plugin_find_internal
(
name
,
type
)))
rc
=
my_intern_plugin_lock_ci
(
lex
,
plugin_int_to_ref
(
plugin
));
rc
=
my_intern_plugin_lock_ci
(
lex
,
plugin_int_to_ref
(
plugin
));
...
@@ -2679,11 +2679,14 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
...
@@ -2679,11 +2679,14 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
st_mysql_sys_var
*
opt
,
**
plugin_option
;
st_mysql_sys_var
*
opt
,
**
plugin_option
;
st_bookmark
*
v
;
st_bookmark
*
v
;
DBUG_ENTER
(
"construct_options"
);
DBUG_ENTER
(
"construct_options"
);
DBUG_PRINT
(
"plugin"
,
(
"plugin: '%s' enabled: %d can_disable: %d"
,
tmp
->
plugin
->
name
,
**
enabled
,
can_disable
));
/* support --skip-plugin-foo syntax */
/* support --skip-plugin-foo syntax */
memcpy
(
name
,
plugin_name
,
namelen
+
1
);
memcpy
(
name
,
plugin_name
,
namelen
+
1
);
my_casedn_str
(
&
my_charset_latin1
,
name
);
my_casedn_str
(
&
my_charset_latin1
,
name
);
strxmov
(
name
+
namelen
+
1
,
"plugin-"
,
name
,
NullS
);
strxmov
(
name
+
namelen
+
1
,
"plugin-"
,
name
,
NullS
);
/* Now we have namelen + 1 + 7 + namelen + 1 == namelen * 2 + 9. */
for
(
p
=
name
+
namelen
*
2
+
8
;
p
>
name
;
p
--
)
for
(
p
=
name
+
namelen
*
2
+
8
;
p
>
name
;
p
--
)
if
(
*
p
==
'_'
)
if
(
*
p
==
'_'
)
...
@@ -2693,10 +2696,18 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
...
@@ -2693,10 +2696,18 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
{
{
strxmov
(
name
+
namelen
*
2
+
10
,
"Enable "
,
plugin_name
,
" plugin. "
strxmov
(
name
+
namelen
*
2
+
10
,
"Enable "
,
plugin_name
,
" plugin. "
"Disable with --skip-"
,
name
,
" (will save memory)."
,
NullS
);
"Disable with --skip-"
,
name
,
" (will save memory)."
,
NullS
);
/*
Now we have namelen * 2 + 10 (one char unused) + 7 + namelen + 9 +
20 + namelen + 20 + 1 == namelen * 4 + 67.
*/
options
[
0
].
comment
=
name
+
namelen
*
2
+
10
;
options
[
0
].
comment
=
name
+
namelen
*
2
+
10
;
}
}
/*
NOTE: 'name' is one char above the allocated buffer!
NOTE: This code assumes that 'my_bool' and 'char' are of same size.
*/
*
((
my_bool
*
)(
name
-
1
))
=
**
enabled
;
*
((
my_bool
*
)(
name
-
1
))
=
**
enabled
;
*
enabled
=
(
my_bool
*
)(
name
-
1
);
*
enabled
=
(
my_bool
*
)(
name
-
1
);
...
@@ -2880,6 +2891,8 @@ static my_option *construct_help_options(MEM_ROOT *mem_root,
...
@@ -2880,6 +2891,8 @@ static my_option *construct_help_options(MEM_ROOT *mem_root,
bzero
(
opts
,
sizeof
(
my_option
)
*
count
);
bzero
(
opts
,
sizeof
(
my_option
)
*
count
);
dummy
=
TRUE
;
/* plugin is enabled. */
can_disable
=
can_disable
=
my_strcasecmp
(
&
my_charset_latin1
,
p
->
name
.
str
,
"MyISAM"
)
&&
my_strcasecmp
(
&
my_charset_latin1
,
p
->
name
.
str
,
"MyISAM"
)
&&
my_strcasecmp
(
&
my_charset_latin1
,
p
->
name
.
str
,
"MEMORY"
);
my_strcasecmp
(
&
my_charset_latin1
,
p
->
name
.
str
,
"MEMORY"
);
...
...
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