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
eb304bd4
Commit
eb304bd4
authored
Nov 26, 2004
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes while reviewing code
(Cleanups and better bug fixes)
parent
f1e86036
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
26 deletions
+25
-26
mysql-test/r/select.result
mysql-test/r/select.result
+16
-16
mysql-test/t/select.test
mysql-test/t/select.test
+1
-1
scripts/mysql_fix_privilege_tables.sh
scripts/mysql_fix_privilege_tables.sh
+1
-1
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+4
-3
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+0
-3
sql/item_func.h
sql/item_func.h
+1
-1
sql/slave.cc
sql/slave.cc
+2
-1
No files found.
mysql-test/r/select.result
View file @
eb304bd4
...
@@ -2327,22 +2327,6 @@ select * from t2,t3 where t2.s = t3.s;
...
@@ -2327,22 +2327,6 @@ select * from t2,t3 where t2.s = t3.s;
s s
s s
two two
two two
drop table t1, t2, t3;
drop table t1, t2, t3;
CREATE TABLE t1 (
i int(11) NOT NULL default '0',
c char(10) NOT NULL default '',
PRIMARY KEY (i),
UNIQUE KEY c (c)
) TYPE=MyISAM;
INSERT INTO t1 VALUES (1,'a');
INSERT INTO t1 VALUES (2,'b');
INSERT INTO t1 VALUES (3,'c');
EXPLAIN SELECT i FROM t1 WHERE i=1;
table type possible_keys key key_len ref rows Extra
t1 const PRIMARY PRIMARY 4 const 1 Using index
EXPLAIN SELECT i FROM t1 WHERE i=1;
table type possible_keys key key_len ref rows Extra
t1 const PRIMARY PRIMARY 4 const 1 Using index
DROP TABLE t1;
create table t1 (a integer, b integer, index(a), index(b));
create table t1 (a integer, b integer, index(a), index(b));
create table t2 (c integer, d integer, index(c), index(d));
create table t2 (c integer, d integer, index(c), index(d));
insert into t1 values (1,2), (2,2), (3,2), (4,2);
insert into t1 values (1,2), (2,2), (3,2), (4,2);
...
@@ -2364,3 +2348,19 @@ a b c d
...
@@ -2364,3 +2348,19 @@ a b c d
3 2 3 4
3 2 3 4
4 2 4 4
4 2 4 4
drop table t1, t2;
drop table t1, t2;
CREATE TABLE t1 (
i int(11) NOT NULL default '0',
c char(10) NOT NULL default '',
PRIMARY KEY (i),
UNIQUE KEY c (c)
) TYPE=MyISAM;
INSERT INTO t1 VALUES (1,'a');
INSERT INTO t1 VALUES (2,'b');
INSERT INTO t1 VALUES (3,'c');
EXPLAIN SELECT i FROM t1 WHERE i=1;
table type possible_keys key key_len ref rows Extra
t1 const PRIMARY PRIMARY 4 const 1 Using index
EXPLAIN SELECT i FROM t1 WHERE i=1;
table type possible_keys key key_len ref rows Extra
t1 const PRIMARY PRIMARY 4 const 1 Using index
DROP TABLE t1;
mysql-test/t/select.test
View file @
eb304bd4
...
@@ -1887,7 +1887,7 @@ explain select * from t1 left join t2 on a=c where d in (4);
...
@@ -1887,7 +1887,7 @@ explain select * from t1 left join t2 on a=c where d in (4);
select
*
from
t1
left
join
t2
on
a
=
c
where
d
in
(
4
);
select
*
from
t1
left
join
t2
on
a
=
c
where
d
in
(
4
);
explain
select
*
from
t1
left
join
t2
on
a
=
c
where
d
=
4
;
explain
select
*
from
t1
left
join
t2
on
a
=
c
where
d
=
4
;
select
*
from
t1
left
join
t2
on
a
=
c
where
d
=
4
;
select
*
from
t1
left
join
t2
on
a
=
c
where
d
=
4
;
drop
table
t1
,
t2
;
R
drop
table
t1
,
t2
;
#
#
# Covering index is mentioned in EXPLAIN output for const tables (bug #5333)
# Covering index is mentioned in EXPLAIN output for const tables (bug #5333)
...
...
scripts/mysql_fix_privilege_tables.sh
View file @
eb304bd4
...
@@ -74,7 +74,7 @@ parse_arguments()
...
@@ -74,7 +74,7 @@ parse_arguments()
parse_arguments
"
$@
"
parse_arguments
"
$@
"
if
test
-z
"
$cmd
"
;
then
if
test
-z
"
$cmd
"
;
then
cmd
=
"
$bindir
/mysql -
f
--user=
$user
--host=
$host
"
cmd
=
"
$bindir
/mysql -
-no-defaults --force
--user=
$user
--host=
$host
"
if
test
!
-z
"
$root_password
"
;
then
if
test
!
-z
"
$root_password
"
;
then
cmd
=
"
$cmd
--password=
$root_password
"
cmd
=
"
$cmd
--password=
$root_password
"
fi
fi
...
...
sql/item_cmpfunc.cc
View file @
eb304bd4
...
@@ -293,9 +293,9 @@ void Item_func_interval::fix_length_and_dec()
...
@@ -293,9 +293,9 @@ void Item_func_interval::fix_length_and_dec()
}
}
maybe_null
=
0
;
max_length
=
2
;
maybe_null
=
0
;
max_length
=
2
;
used_tables_cache
|=
item
->
used_tables
();
used_tables_cache
|=
item
->
used_tables
();
not_null_tables_cache
&=
item
->
not_null_tables
();
not_null_tables_cache
=
item
->
not_null_tables
();
with_sum_func
=
with_sum_func
||
item
->
with_sum_func
;
with_sum_func
=
with_sum_func
||
item
->
with_sum_func
;
const_item_cache
&=
item
->
const_item
();
const_item_cache
&=
item
->
const_item
();
}
}
...
@@ -1087,7 +1087,8 @@ void Item_func_in::fix_length_and_dec()
...
@@ -1087,7 +1087,8 @@ void Item_func_in::fix_length_and_dec()
maybe_null
=
item
->
maybe_null
;
maybe_null
=
item
->
maybe_null
;
max_length
=
2
;
max_length
=
2
;
used_tables_cache
|=
item
->
used_tables
();
used_tables_cache
|=
item
->
used_tables
();
not_null_tables_cache
&=
item
->
not_null_tables
();
/* not_null_tables_cache is only dependent on the argument to in */
not_null_tables_cache
=
item
->
not_null_tables
();
const_item_cache
&=
item
->
const_item
();
const_item_cache
&=
item
->
const_item
();
}
}
...
...
sql/item_cmpfunc.h
View file @
eb304bd4
...
@@ -432,9 +432,6 @@ class Item_func_in :public Item_int_func
...
@@ -432,9 +432,6 @@ class Item_func_in :public Item_int_func
{
{
bool
res
=
(
item
->
fix_fields
(
thd
,
tlist
)
||
Item_func
::
fix_fields
(
thd
,
tlist
));
bool
res
=
(
item
->
fix_fields
(
thd
,
tlist
)
||
Item_func
::
fix_fields
(
thd
,
tlist
));
with_sum_func
=
with_sum_func
||
item
->
with_sum_func
;
with_sum_func
=
with_sum_func
||
item
->
with_sum_func
;
used_tables_cache
|=
item
->
used_tables
();
not_null_tables_cache
|=
item
->
not_null_tables
();
const_item_cache
&=
item
->
const_item
();
return
res
;
return
res
;
}
}
void
fix_length_and_dec
();
void
fix_length_and_dec
();
...
...
sql/item_func.h
View file @
eb304bd4
...
@@ -600,7 +600,7 @@ public:
...
@@ -600,7 +600,7 @@ public:
{
{
maybe_null
=
0
;
max_length
=
3
;
maybe_null
=
0
;
max_length
=
3
;
used_tables_cache
|=
item
->
used_tables
();
used_tables_cache
|=
item
->
used_tables
();
not_null_tables_cache
&
=
item
->
not_null_tables
();
not_null_tables_cache
=
item
->
not_null_tables
();
const_item_cache
&=
item
->
const_item
();
const_item_cache
&=
item
->
const_item
();
with_sum_func
=
with_sum_func
||
item
->
with_sum_func
;
with_sum_func
=
with_sum_func
||
item
->
with_sum_func
;
}
}
...
...
sql/slave.cc
View file @
eb304bd4
...
@@ -1637,7 +1637,8 @@ int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
...
@@ -1637,7 +1637,8 @@ int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
position is at the beginning of the file, and will read the
position is at the beginning of the file, and will read the
"signature" and then fast-forward to the last position read.
"signature" and then fast-forward to the last position read.
*/
*/
if
(
thread_mask
&
SLAVE_SQL
)
{
if
(
thread_mask
&
SLAVE_SQL
)
{
my_b_seek
(
mi
->
rli
.
cur_log
,
(
my_off_t
)
0
);
my_b_seek
(
mi
->
rli
.
cur_log
,
(
my_off_t
)
0
);
}
}
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
...
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