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
a697e5da
Commit
a697e5da
authored
Feb 10, 2005
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
parents
29af4dff
4ef431ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
mysql-test/r/select.result
mysql-test/r/select.result
+13
-0
mysql-test/t/select.test
mysql-test/t/select.test
+15
-0
sql/table.cc
sql/table.cc
+1
-0
No files found.
mysql-test/r/select.result
View file @
a697e5da
...
@@ -2387,3 +2387,16 @@ EXPLAIN SELECT i FROM t1 WHERE i=1;
...
@@ -2387,3 +2387,16 @@ EXPLAIN SELECT i FROM t1 WHERE i=1;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 ( a BLOB, INDEX (a(20)) );
CREATE TABLE t2 ( a BLOB, INDEX (a(20)) );
INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five');
INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five');
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ref a a 23 test.t1.a 2
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ref a a 23 test.t1.a 2
DROP TABLE t1, t2;
mysql-test/t/select.test
View file @
a697e5da
...
@@ -1930,3 +1930,18 @@ INSERT INTO t1 VALUES (3,'c');
...
@@ -1930,3 +1930,18 @@ INSERT INTO t1 VALUES (3,'c');
EXPLAIN
SELECT
i
FROM
t1
WHERE
i
=
1
;
EXPLAIN
SELECT
i
FROM
t1
WHERE
i
=
1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Test case for bug 7520: a wrong cost of the index for a BLOB field
#
CREATE
TABLE
t1
(
a
BLOB
,
INDEX
(
a
(
20
))
);
CREATE
TABLE
t2
(
a
BLOB
,
INDEX
(
a
(
20
))
);
INSERT
INTO
t1
VALUES
(
'one'
),(
'two'
),(
'three'
),(
'four'
),(
'five'
);
INSERT
INTO
t2
VALUES
(
'one'
),(
'two'
),(
'three'
),(
'four'
),(
'five'
);
EXPLAIN
SELECT
*
FROM
t1
LEFT
JOIN
t2
USE
INDEX
(a) ON t1.a=t2.a
;
EXPLAIN
SELECT
*
FROM
t1
LEFT
JOIN
t2
FORCE
INDEX
(
a
)
ON
t1
.
a
=
t2
.
a
;
DROP
TABLE
t1
,
t2
;
sql/table.cc
View file @
a697e5da
...
@@ -627,6 +627,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
...
@@ -627,6 +627,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
if
(
!
(
field
->
flags
&
BINARY_FLAG
))
if
(
!
(
field
->
flags
&
BINARY_FLAG
))
keyinfo
->
flags
|=
HA_END_SPACE_KEY
;
keyinfo
->
flags
|=
HA_END_SPACE_KEY
;
}
}
set_if_bigger
(
outparam
->
max_key_length
,
keyinfo
->
key_length
);
if
(
i
==
0
&&
key
!=
primary_key
)
if
(
i
==
0
&&
key
!=
primary_key
)
field
->
flags
|=
field
->
flags
|=
((
keyinfo
->
flags
&
HA_NOSAME
)
&&
((
keyinfo
->
flags
&
HA_NOSAME
)
&&
...
...
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