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
f17ff0bc
Commit
f17ff0bc
authored
Oct 01, 2003
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Many files:
Fix after manual merge
parent
f12cbd4b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
19 deletions
+28
-19
mysql-test/r/range.result
mysql-test/r/range.result
+11
-11
sql/handler.cc
sql/handler.cc
+2
-1
sql/mysql_priv.h
sql/mysql_priv.h
+1
-2
sql/opt_range.cc
sql/opt_range.cc
+7
-1
sql/set_var.cc
sql/set_var.cc
+2
-1
sql/sql_base.cc
sql/sql_base.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+4
-2
No files found.
mysql-test/r/range.result
View file @
f17ff0bc
...
...
@@ -215,17 +215,6 @@ select count(*) from t1 where art = 'J';
count(*)
213
drop table t1;
create table t1 ( id1 int not null, id2 int not null, idnull int null, c char(20), primary key (id1,id2));
insert into t1 values (0,1,NULL,"aaa"), (1,1,NULL,"aaa"), (2,1,NULL,"aaa"),
(3,1,NULL,"aaa"), (4,1,NULL,"aaa"), (5,1,NULL,"aaa"),
(6,1,NULL,"aaa"), (7,1,NULL,"aaa"), (8,1,NULL,"aaa"),
(9,1,NULL,"aaa"), (10,1,NULL,"aaa"), (11,1,NULL,"aaa"),
(12,1,NULL,"aaa"), (13,1,NULL,"aaa"), (14,1,NULL,"aaa"),
(15,1,NULL,"aaa"), (16,1,NULL,"aaa"), (17,1,NULL,"aaa"),
(18,1,NULL,"aaa"), (19,1,NULL,"aaa"), (20,1,NULL,"aaa");
select a.id1, b.idnull from t1 as a, t1 as b where a.id2=1 and a.id1=1 and b.id1=a.idnull order by b.id2 desc limit 1;
id1 idnull
drop table t1;
create table t1 (x int, y int, index(x), index(y));
insert into t1 (x) values (1),(2),(3),(4),(5),(6),(7),(8),(9);
update t1 set y=x;
...
...
@@ -286,6 +275,17 @@ id
5
9
drop table t1;
create table t1 ( id1 int not null, id2 int not null, idnull int null, c char(20), primary key (id1,id2));
insert into t1 values (0,1,NULL,"aaa"), (1,1,NULL,"aaa"), (2,1,NULL,"aaa"),
(3,1,NULL,"aaa"), (4,1,NULL,"aaa"), (5,1,NULL,"aaa"),
(6,1,NULL,"aaa"), (7,1,NULL,"aaa"), (8,1,NULL,"aaa"),
(9,1,NULL,"aaa"), (10,1,NULL,"aaa"), (11,1,NULL,"aaa"),
(12,1,NULL,"aaa"), (13,1,NULL,"aaa"), (14,1,NULL,"aaa"),
(15,1,NULL,"aaa"), (16,1,NULL,"aaa"), (17,1,NULL,"aaa"),
(18,1,NULL,"aaa"), (19,1,NULL,"aaa"), (20,1,NULL,"aaa");
select a.id1, b.idnull from t1 as a, t1 as b where a.id2=1 and a.id1=1 and b.id1=a.idnull order by b.id2 desc limit 1;
id1 idnull
drop table t1;
create table t1 (
id int not null auto_increment,
name char(1) not null,
...
...
sql/handler.cc
View file @
f17ff0bc
...
...
@@ -1135,7 +1135,8 @@ int ha_key_cache(KEY_CACHE_VAR *key_cache)
return
0
;
}
int
ha_resize_key_cache
(
KEY_CACHE_VAR
*
key_cache
)
{
if
(
key_cache
->
cache
)
{
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
...
...
sql/mysql_priv.h
View file @
f17ff0bc
...
...
@@ -803,8 +803,7 @@ extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open,
LOCK_error_log
,
LOCK_delayed_insert
,
LOCK_delayed_status
,
LOCK_delayed_create
,
LOCK_crypt
,
LOCK_timezone
,
LOCK_slave_list
,
LOCK_active_mi
,
LOCK_manager
,
LOCK_global_system_variables
,
LOCK_user_conn
;
LOCK_global_system_variables
,
LOCK_assign
;
LOCK_global_system_variables
,
LOCK_user_conn
,
LOCK_assign
;
extern
rw_lock_t
LOCK_grant
;
extern
pthread_cond_t
COND_refresh
,
COND_thread_count
,
COND_manager
;
extern
pthread_attr_t
connection_attrib
;
...
...
sql/opt_range.cc
View file @
f17ff0bc
...
...
@@ -895,6 +895,12 @@ get_mm_parts(PARAM *param, Field *field, Item_func::Functype type,
if
(
field
->
table
!=
param
->
table
)
DBUG_RETURN
(
0
);
if
(
type
==
Item_func
::
NE_FUNC
)
{
ne_func
=
TRUE
;
type
=
Item_func
::
LT_FUNC
;
}
KEY_PART
*
key_part
=
param
->
key_parts
;
KEY_PART
*
end
=
param
->
key_parts_end
;
SEL_TREE
*
tree
=
0
;
...
...
@@ -934,7 +940,7 @@ get_mm_parts(PARAM *param, Field *field, Item_func::Functype type,
SEL_TREE
*
tree2
=
get_mm_parts
(
param
,
field
,
Item_func
::
GT_FUNC
,
value
,
cmp_type
);
if
(
tree2
)
tree
=
tree
=
tree
_or
(
param
,
tree
,
tree2
);
tree
=
tree_or
(
param
,
tree
,
tree2
);
}
DBUG_RETURN
(
tree
);
}
...
...
sql/set_var.cc
View file @
f17ff0bc
...
...
@@ -1597,7 +1597,8 @@ void sys_var_collation_server::set_default(THD *thd, enum_var_type type)
static
LEX_STRING
default_key_cache_base
=
{(
char
*
)
DEFAULT_KEY_CACHE_NAME
,
7
};
static
KEY_CACHE_VAR
zero_key_cache
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
static
KEY_CACHE_VAR
zero_key_cache
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
static
KEY_CACHE_VAR
*
get_key_cache
(
LEX_STRING
*
cache_name
)
{
...
...
sql/sql_base.cc
View file @
f17ff0bc
...
...
@@ -867,7 +867,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name,
}
key_cache_asmt
->
key_length
=
key_length
;
key_cache_asmt
->
key_cache
=
&
dflt_key_cache_var
;
VOID
(
hash_insert
(
&
assign_cache
,
(
byte
*
)
key_cache_asmt
));
VOID
(
my_
hash_insert
(
&
assign_cache
,
(
byte
*
)
key_cache_asmt
));
key_cache_asmt
->
requests
++
;
}
key_cache_asmt
->
to_reassign
=
0
;
...
...
sql/sql_parse.cc
View file @
f17ff0bc
...
...
@@ -1906,7 +1906,8 @@ mysql_execute_command(THD *thd)
case
SQLCOM_ASSIGN_TO_KEYCACHE
:
{
if
(
check_db_used
(
thd
,
tables
)
||
check_access
(
thd
,
INDEX_ACL
,
tables
->
db
,
&
tables
->
grant
.
privilege
))
check_access
(
thd
,
INDEX_ACL
,
tables
->
db
,
&
tables
->
grant
.
privilege
,
0
,
0
))
goto
error
;
res
=
mysql_assign_to_keycache
(
thd
,
tables
);
break
;
...
...
@@ -1914,7 +1915,8 @@ mysql_execute_command(THD *thd)
case
SQLCOM_PRELOAD_KEYS
:
{
if
(
check_db_used
(
thd
,
tables
)
||
check_access
(
thd
,
INDEX_ACL
,
tables
->
db
,
&
tables
->
grant
.
privilege
,
0
,
0
))
check_access
(
thd
,
INDEX_ACL
,
tables
->
db
,
&
tables
->
grant
.
privilege
,
0
,
0
))
goto
error
;
res
=
mysql_preload_keys
(
thd
,
tables
);
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