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
a443c77a
Commit
a443c77a
authored
Feb 11, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rurik.mysql.com:/home/igor/mysql-4.0
into rurik.mysql.com:/home/igor/dev/mysql-4.0-0
parents
88880c0a
aa3727d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
mysql-test/r/select.result
mysql-test/r/select.result
+1
-1
sql/table.cc
sql/table.cc
+6
-7
No files found.
mysql-test/r/select.result
View file @
a443c77a
...
...
@@ -2371,7 +2371,7 @@ INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five');
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 5
t2
ref a a 23 t1.a 5
t2
ALL a NULL NULL NULL 4
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 5
...
...
sql/table.cc
View file @
a443c77a
...
...
@@ -143,7 +143,6 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
goto
err_not_open
;
/* purecov: inspected */
bzero
((
char
*
)
keyinfo
,
n_length
);
outparam
->
key_info
=
keyinfo
;
outparam
->
max_key_length
=
outparam
->
total_key_length
=
0
;
key_part
=
my_reinterpret_cast
(
KEY_PART_INFO
*
)
(
keyinfo
+
keys
);
strpos
=
disk_buff
+
6
;
...
...
@@ -199,11 +198,6 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
}
key_part
->
store_length
=
key_part
->
length
;
}
set_if_bigger
(
outparam
->
max_key_length
,
keyinfo
->
key_length
+
keyinfo
->
key_parts
);
outparam
->
total_key_length
+=
keyinfo
->
key_length
;
if
(
keyinfo
->
flags
&
HA_NOSAME
)
set_if_bigger
(
outparam
->
max_unique_length
,
keyinfo
->
key_length
);
}
keynames
=
(
char
*
)
key_part
;
strpos
+=
(
strmov
(
keynames
,
(
char
*
)
strpos
)
-
keynames
)
+
1
;
...
...
@@ -486,7 +480,6 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
if
(
!
(
field
->
flags
&
BINARY_FLAG
))
keyinfo
->
flags
|=
HA_END_SPACE_KEY
;
}
set_if_bigger
(
outparam
->
max_key_length
,
keyinfo
->
key_length
);
if
(
i
==
0
&&
key
!=
primary_key
)
field
->
flags
|=
((
keyinfo
->
flags
&
HA_NOSAME
)
&&
...
...
@@ -547,6 +540,12 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
}
}
keyinfo
->
usable_key_parts
=
usable_parts
;
// Filesort
set_if_bigger
(
outparam
->
max_key_length
,
keyinfo
->
key_length
+
keyinfo
->
key_parts
);
outparam
->
total_key_length
+=
keyinfo
->
key_length
;
if
(
keyinfo
->
flags
&
HA_NOSAME
)
set_if_bigger
(
outparam
->
max_unique_length
,
keyinfo
->
key_length
);
}
if
(
primary_key
<
MAX_KEY
&&
(
outparam
->
keys_in_use
&
((
key_map
)
1
<<
primary_key
)))
...
...
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