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
c0c369f0
Commit
c0c369f0
authored
Oct 31, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-merge fixes
parent
c926bdc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
myisam/ft_update.c
myisam/ft_update.c
+2
-2
sql/ha_myisam.cc
sql/ha_myisam.cc
+14
-13
No files found.
myisam/ft_update.c
View file @
c0c369f0
...
@@ -324,8 +324,8 @@ uint _mi_ft_convert_to_ft2(MI_INFO *info, uint keynr, uchar *key)
...
@@ -324,8 +324,8 @@ uint _mi_ft_convert_to_ft2(MI_INFO *info, uint keynr, uchar *key)
mi_putint
(
info
->
buff
,
length
+
2
,
0
);
mi_putint
(
info
->
buff
,
length
+
2
,
0
);
memcpy
(
info
->
buff
+
2
,
key_ptr
,
length
);
memcpy
(
info
->
buff
+
2
,
key_ptr
,
length
);
info
->
buff_used
=
info
->
page_changed
=
1
;
/* info->buff is used */
info
->
buff_used
=
info
->
page_changed
=
1
;
/* info->buff is used */
if
((
root
=
_mi_new
(
info
,
keyinfo
))
==
HA_OFFSET_ERROR
||
if
((
root
=
_mi_new
(
info
,
keyinfo
,
DFLT_INIT_HITS
))
==
HA_OFFSET_ERROR
||
_mi_write_keypage
(
info
,
keyinfo
,
root
,
info
->
buff
))
_mi_write_keypage
(
info
,
keyinfo
,
root
,
DFLT_INIT_HITS
,
info
->
buff
))
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
/* inserting the rest of key values */
/* inserting the rest of key values */
...
...
sql/ha_myisam.cc
View file @
c0c369f0
...
@@ -705,7 +705,7 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt)
...
@@ -705,7 +705,7 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt)
{
{
uint
len
;
uint
len
;
KEY_CACHE_VAR
*
old_key_cache
;
KEY_CACHE_VAR
*
old_key_cache
;
KEY_CACHE_VAR
*
new_key_cache
;
KEY_CACHE_VAR
*
new_key_cache
;
const
char
*
errmsg
=
0
;
const
char
*
errmsg
=
0
;
int
error
=
HA_ADMIN_OK
;
int
error
=
HA_ADMIN_OK
;
ulonglong
map
=
~
(
ulonglong
)
0
;
ulonglong
map
=
~
(
ulonglong
)
0
;
...
@@ -714,26 +714,27 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt)
...
@@ -714,26 +714,27 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt)
(
const
char
*
)
table_list
->
option
:
(
const
char
*
)
table_list
->
option
:
DEFAULT_KEY_CACHE_NAME
;
DEFAULT_KEY_CACHE_NAME
;
KEY_CACHE_ASMT
*
key_cache_asmt
=
table
->
key_cache_asmt
;
KEY_CACHE_ASMT
*
key_cache_asmt
=
table
->
key_cache_asmt
;
bool
triggered
=
key_cache_asmt
->
triggered
;
bool
triggered
=
key_cache_asmt
->
triggered
;
DBUG_ENTER
(
"ha_myisam::assign_to_keycache"
);
DBUG_ENTER
(
"ha_myisam::assign_to_keycache"
);
VOID
(
pthread_mutex_lock
(
&
LOCK_assign
));
VOID
(
pthread_mutex_lock
(
&
LOCK_assign
));
old_key_cache
=
key_cache_asmt
->
key_cache
;
old_key_cache
=
key_cache_asmt
->
key_cache
;
/* Check validity of the index references */
/* Check validity of the index references */
if
(
!
triggered
&&
table_list
->
use_index
)
if
(
!
triggered
&&
table_list
->
use_index
)
{
{
key_map
kmap
=
get_key_map_from_key_list
(
table
,
table_list
->
use_index
);
key_map
kmap
;
if
(
kmap
==
~
(
key_map
)
0
)
get_key_map_from_key_list
(
&
kmap
,
table
,
table_list
->
use_index
);
if
(
kmap
.
is_set_all
())
{
{
errmsg
=
thd
->
net
.
last_error
;
errmsg
=
thd
->
net
.
last_error
;
error
=
HA_ADMIN_FAILED
;
error
=
HA_ADMIN_FAILED
;
goto
err
;
goto
err
;
}
}
if
(
kmap
)
if
(
!
kmap
.
is_clear_all
()
)
map
=
kmap
;
map
=
kmap
.
to_ulonglong
()
;
}
}
len
=
strlen
(
new_key_cache_name
);
len
=
strlen
(
new_key_cache_name
);
...
@@ -743,14 +744,14 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt)
...
@@ -743,14 +744,14 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt)
/* Nothing to do: table is assigned to the same key cache */
/* Nothing to do: table is assigned to the same key cache */
goto
ok
;
goto
ok
;
}
}
if
(
!
new_key_cache
||
if
(
!
new_key_cache
||
(
!
new_key_cache
->
cache
&&
ha_key_cache
(
new_key_cache
)))
(
!
new_key_cache
->
cache
&&
ha_key_cache
(
new_key_cache
)))
{
{
if
(
key_cache_asmt
->
triggered
)
if
(
key_cache_asmt
->
triggered
)
error
=
HA_ERR_OUT_OF_MEM
;
error
=
HA_ERR_OUT_OF_MEM
;
else
else
{
{
char
buf
[
ERRMSGSIZE
];
char
buf
[
ERRMSGSIZE
];
my_snprintf
(
buf
,
ERRMSGSIZE
,
my_snprintf
(
buf
,
ERRMSGSIZE
,
"Failed to create key cache %s"
,
new_key_cache_name
);
"Failed to create key cache %s"
,
new_key_cache_name
);
...
@@ -761,7 +762,7 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt)
...
@@ -761,7 +762,7 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt)
}
}
reassign_key_cache
(
key_cache_asmt
,
new_key_cache
);
reassign_key_cache
(
key_cache_asmt
,
new_key_cache
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_assign
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_assign
));
error
=
mi_assign_to_keycache
(
file
,
map
,
new_key_cache
,
&
LOCK_assign
);
error
=
mi_assign_to_keycache
(
file
,
map
,
new_key_cache
,
&
LOCK_assign
);
VOID
(
pthread_mutex_lock
(
&
LOCK_assign
));
VOID
(
pthread_mutex_lock
(
&
LOCK_assign
));
...
...
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