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
92c91e95
Commit
92c91e95
authored
May 24, 2001
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0
parents
aec1ed03
c3039e80
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
12 deletions
+35
-12
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+1
-1
myisam/mi_extra.c
myisam/mi_extra.c
+11
-3
myisam/myisamlog.c
myisam/myisamlog.c
+1
-1
sql/ha_myisam.cc
sql/ha_myisam.cc
+16
-3
sql/ha_myisam.h
sql/ha_myisam.h
+2
-2
sql/sql_table.cc
sql/sql_table.cc
+4
-2
No files found.
myisam/ft_boolean_search.c
View file @
92c91e95
...
@@ -198,7 +198,7 @@ FT_DOCLIST *ft_boolean_search(MI_INFO *info, uint keynr, byte *query,
...
@@ -198,7 +198,7 @@ FT_DOCLIST *ft_boolean_search(MI_INFO *info, uint keynr, byte *query,
aio
.
end
=
query
+
query_len
;
aio
.
end
=
query
+
query_len
;
aio
.
total_yes
=
aio
.
total_no
=
0
;
aio
.
total_yes
=
aio
.
total_no
=
0
;
init_tree
(
&
aio
.
dtree
,
0
,
sizeof
(
FT_SUPERDOC
),(
qsort_cmp
)
&
FT_SUPERDOC_cmp
,
0
,
init_tree
(
&
aio
.
dtree
,
0
,
sizeof
(
FT_SUPERDOC
),(
qsort_cmp
2
)
&
FT_SUPERDOC_cmp
,
0
,
NULL
);
NULL
);
if
(
do_boolean
(
&
aio
,
0
,
0
,
0
,
0
))
if
(
do_boolean
(
&
aio
,
0
,
0
,
0
,
0
))
...
...
myisam/mi_extra.c
View file @
92c91e95
...
@@ -219,9 +219,17 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function)
...
@@ -219,9 +219,17 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function)
}
}
if
(
share
->
state
.
key_map
)
if
(
share
->
state
.
key_map
)
{
{
share
->
state
.
key_map
=
0
;
MI_KEYDEF
*
key
=
share
->
keyinfo
;
info
->
state
->
key_file_length
=
share
->
state
.
state
.
key_file_length
=
uint
i
;
share
->
base
.
keystart
;
for
(
i
=
0
;
i
<
share
->
base
.
keys
;
i
++
,
key
++
)
{
if
(
!
(
key
->
flag
&
HA_NOSAME
)
&&
info
->
s
->
base
.
auto_key
!=
i
+
1
)
{
share
->
state
.
key_map
&=
~
((
ulonglong
)
1
<<
i
);
info
->
update
|=
HA_STATE_CHANGED
;
}
}
if
(
!
share
->
changed
)
if
(
!
share
->
changed
)
{
{
share
->
state
.
changed
|=
STATE_CHANGED
|
STATE_NOT_ANALYZED
;
share
->
state
.
changed
|=
STATE_CHANGED
|
STATE_NOT_ANALYZED
;
...
...
myisam/myisamlog.c
View file @
92c91e95
...
@@ -331,7 +331,7 @@ static int examine_log(my_string file_name, char **table_names)
...
@@ -331,7 +331,7 @@ static int examine_log(my_string file_name, char **table_names)
init_io_cache
(
&
cache
,
file
,
0
,
READ_CACHE
,
start_offset
,
0
,
MYF
(
0
));
init_io_cache
(
&
cache
,
file
,
0
,
READ_CACHE
,
start_offset
,
0
,
MYF
(
0
));
bzero
((
gptr
)
com_count
,
sizeof
(
com_count
));
bzero
((
gptr
)
com_count
,
sizeof
(
com_count
));
init_tree
(
&
tree
,
0
,
sizeof
(
file_info
),(
qsort_cmp
)
file_info_compare
,
1
,
init_tree
(
&
tree
,
0
,
sizeof
(
file_info
),(
qsort_cmp
2
)
file_info_compare
,
1
,
(
void
(
*
)(
void
*
))
file_info_free
);
(
void
(
*
)(
void
*
))
file_info_free
);
VOID
(
init_key_cache
(
KEY_CACHE_SIZE
,(
uint
)
(
10
*
4
*
(
IO_SIZE
+
MALLOC_OVERHEAD
))));
VOID
(
init_key_cache
(
KEY_CACHE_SIZE
,(
uint
)
(
10
*
4
*
(
IO_SIZE
+
MALLOC_OVERHEAD
))));
...
...
sql/ha_myisam.cc
View file @
92c91e95
...
@@ -637,8 +637,18 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize)
...
@@ -637,8 +637,18 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize)
void
ha_myisam
::
deactivate_non_unique_index
(
ha_rows
rows
)
void
ha_myisam
::
deactivate_non_unique_index
(
ha_rows
rows
)
{
{
if
(
!
(
specialflag
&
SPECIAL_SAFE_MODE
))
MYISAM_SHARE
*
share
=
file
->
s
;
mi_disable_non_unique_index
(
file
,
rows
);
if
(
share
->
state
.
key_map
==
((
ulonglong
)
1L
<<
share
->
base
.
keys
)
-
1
)
{
if
(
!
(
specialflag
&
SPECIAL_SAFE_MODE
))
if
(
rows
==
HA_POS_ERROR
)
mi_extra
(
file
,
HA_EXTRA_NO_KEYS
);
else
mi_disable_non_unique_index
(
file
,
rows
);
enable_activate_all_index
=
1
;
}
else
enable_activate_all_index
=
0
;
}
}
...
@@ -648,7 +658,8 @@ bool ha_myisam::activate_all_index(THD *thd)
...
@@ -648,7 +658,8 @@ bool ha_myisam::activate_all_index(THD *thd)
MI_CHECK
param
;
MI_CHECK
param
;
MYISAM_SHARE
*
share
=
file
->
s
;
MYISAM_SHARE
*
share
=
file
->
s
;
DBUG_ENTER
(
"activate_all_index"
);
DBUG_ENTER
(
"activate_all_index"
);
if
(
share
->
state
.
key_map
!=
((
ulonglong
)
1L
<<
share
->
base
.
keys
)
-
1
)
if
(
enable_activate_all_index
&&
share
->
state
.
key_map
!=
((
ulonglong
)
1L
<<
share
->
base
.
keys
)
-
1
)
{
{
const
char
*
save_proc_info
=
thd
->
proc_info
;
const
char
*
save_proc_info
=
thd
->
proc_info
;
thd
->
proc_info
=
"Creating index"
;
thd
->
proc_info
=
"Creating index"
;
...
@@ -663,6 +674,8 @@ bool ha_myisam::activate_all_index(THD *thd)
...
@@ -663,6 +674,8 @@ bool ha_myisam::activate_all_index(THD *thd)
error
=
repair
(
thd
,
param
,
0
)
!=
HA_ADMIN_OK
;
error
=
repair
(
thd
,
param
,
0
)
!=
HA_ADMIN_OK
;
thd
->
proc_info
=
save_proc_info
;
thd
->
proc_info
=
save_proc_info
;
}
}
else
enable_activate_all_index
=
1
;
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
...
...
sql/ha_myisam.h
View file @
92c91e95
...
@@ -37,11 +37,11 @@ extern ulong myisam_recover_options;
...
@@ -37,11 +37,11 @@ extern ulong myisam_recover_options;
class
ha_myisam
:
public
handler
class
ha_myisam
:
public
handler
{
{
MI_INFO
*
file
;
MI_INFO
*
file
;
uint
int_option_flag
;
uint
int_option_flag
,
enable_activate_all_index
;
int
repair
(
THD
*
thd
,
MI_CHECK
&
param
,
bool
optimize
);
int
repair
(
THD
*
thd
,
MI_CHECK
&
param
,
bool
optimize
);
public:
public:
ha_myisam
(
TABLE
*
table
)
:
handler
(
table
),
file
(
0
),
ha_myisam
(
TABLE
*
table
)
:
handler
(
table
),
file
(
0
),
enable_activate_all_index
(
1
),
int_option_flag
(
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_RND_SAME
|
int_option_flag
(
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_RND_SAME
|
HA_KEYPOS_TO_RNDPOS
|
HA_READ_ORDER
|
HA_LASTKEY_ORDER
|
HA_KEYPOS_TO_RNDPOS
|
HA_READ_ORDER
|
HA_LASTKEY_ORDER
|
HA_HAVE_KEY_READ_ONLY
|
HA_READ_NOT_EXACT_KEY
|
HA_HAVE_KEY_READ_ONLY
|
HA_READ_NOT_EXACT_KEY
|
...
...
sql/sql_table.cc
View file @
92c91e95
...
@@ -1189,9 +1189,11 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
...
@@ -1189,9 +1189,11 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
switch
(
keys_onoff
)
switch
(
keys_onoff
)
{
{
case
LEAVE_AS_IS
:
break
;
case
LEAVE_AS_IS
:
break
;
case
ENABLE
:
error
=
table
->
file
->
activate_all_index
(
thd
);
break
;
case
ENABLE
:
error
=
table
->
file
->
activate_all_index
(
thd
);
break
;
case
DISABLE
:
case
DISABLE
:
table
->
file
->
deactivate_non_unique_index
(
table
->
file
->
records
);
table
->
file
->
deactivate_non_unique_index
(
HA_POS_ERROR
);
break
;
break
;
}
}
}
}
...
...
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