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
1e80c3f3
Commit
1e80c3f3
authored
Apr 17, 2001
by
monty@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use ranges on HEAP tables with LIKE
Don't reconnect client on close
parent
561c18c1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
10 deletions
+13
-10
libmysql/libmysql.c
libmysql/libmysql.c
+1
-0
mysql-test/r/heap.result
mysql-test/r/heap.result
+1
-1
sql/field.cc
sql/field.cc
+1
-1
sql/ha_heap.h
sql/ha_heap.h
+0
-7
sql/mini_client.cc
sql/mini_client.cc
+5
-0
sql/opt_range.cc
sql/opt_range.cc
+5
-1
No files found.
libmysql/libmysql.c
View file @
1e80c3f3
...
...
@@ -1657,6 +1657,7 @@ mysql_close(MYSQL *mysql)
{
free_old_query
(
mysql
);
mysql
->
status
=
MYSQL_STATUS_READY
;
/* Force command */
mysql
->
reconnect
=
0
;
simple_command
(
mysql
,
COM_QUIT
,
NullS
,
0
,
1
);
end_server
(
mysql
);
}
...
...
mysql-test/r/heap.result
View file @
1e80c3f3
...
...
@@ -79,7 +79,7 @@ f1 f2
12 ted
12 ted
table type possible_keys key key_len ref rows Extra
t1
range btn btn 10 NULL 10
where used
t1
ALL btn NULL NULL NULL 14
where used
btn
table type possible_keys key key_len ref rows Extra
t1 ALL btn NULL NULL NULL 14 where used
...
...
sql/field.cc
View file @
1e80c3f3
...
...
@@ -363,7 +363,7 @@ void Field::store_time(TIME *ltime,timestamp_type type)
bool
Field
::
optimize_range
()
{
return
test
(
table
->
file
->
option_flag
()
&
HA_
ONLY_WHOLE_INDEX
);
return
test
(
table
->
file
->
option_flag
()
&
HA_
READ_NEXT
);
}
/****************************************************************************
...
...
sql/ha_heap.h
View file @
1e80c3f3
...
...
@@ -78,10 +78,3 @@ class ha_heap: public handler
enum
thr_lock_type
lock_type
);
};
sql/mini_client.cc
View file @
1e80c3f3
...
...
@@ -384,12 +384,16 @@ my_bool STDCALL mc_mysql_reconnect(MYSQL *mysql)
MYSQL
tmp_mysql
;
DBUG_ENTER
(
"mc_mysql_reconnect"
);
if
(
!
mysql
->
reconnect
)
DBUG_RETURN
(
1
);
mc_mysql_init
(
&
tmp_mysql
);
tmp_mysql
.
options
=
mysql
->
options
;
if
(
!
mc_mysql_connect
(
&
tmp_mysql
,
mysql
->
host
,
mysql
->
user
,
mysql
->
passwd
,
mysql
->
db
,
mysql
->
port
,
mysql
->
unix_socket
,
mysql
->
client_flag
))
{
tmp_mysql
.
reconnect
=
0
;
mc_mysql_close
(
&
tmp_mysql
);
DBUG_RETURN
(
1
);
}
...
...
@@ -793,6 +797,7 @@ mc_mysql_close(MYSQL *mysql)
{
mc_free_old_query
(
mysql
);
mysql
->
status
=
MYSQL_STATUS_READY
;
/* Force command */
mysql
->
reconnect
=
0
;
mc_simple_command
(
mysql
,
COM_QUIT
,
NullS
,
0
,
1
);
mc_end_server
(
mysql
);
}
...
...
sql/opt_range.cc
View file @
1e80c3f3
...
...
@@ -919,6 +919,9 @@ get_mm_leaf(Field *field,KEY_PART *key_part,
if
(
type
==
Item_func
::
LIKE_FUNC
)
{
if
(
!
field
->
optimize_range
())
DBUG_RETURN
(
0
);
// Can't optimize this
bool
like_error
;
char
buff1
[
MAX_FIELD_WIDTH
],
*
min_str
,
*
max_str
;
String
tmp
(
buff1
,
sizeof
(
buff1
)),
*
res
;
...
...
@@ -971,7 +974,8 @@ get_mm_leaf(Field *field,KEY_PART *key_part,
max_str
+
maybe_null
,
&
min_length
,
&
max_length
);
else
#endif
like_error
=
like_range
(
res
->
ptr
(),
res
->
length
(),
wild_prefix
,
field_length
,
like_error
=
like_range
(
res
->
ptr
(),
res
->
length
(),
wild_prefix
,
field_length
,
min_str
+
offset
,
max_str
+
offset
,
max_sort_char
,
&
min_length
,
&
max_length
);
}
...
...
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