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
cc440db7
Commit
cc440db7
authored
Mar 22, 2005
by
serg@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/data0/mysqldev/my/mysql-5.0-build
into mysql.com:/data0/mysqldev/serg/m50b
parents
df015d61
f7cbe9a2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
mysql-test/r/type_varchar.result
mysql-test/r/type_varchar.result
+7
-0
mysql-test/t/type_varchar.test
mysql-test/t/type_varchar.test
+9
-0
sql/field.cc
sql/field.cc
+3
-3
No files found.
mysql-test/r/type_varchar.result
View file @
cc440db7
...
@@ -376,3 +376,10 @@ explain select * from t1 where v like 'S%' order by v;
...
@@ -376,3 +376,10 @@ explain select * from t1 where v like 'S%' order by v;
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 range v v 13 NULL 2 Using where; Using filesort
1 SIMPLE t1 range v v 13 NULL 2 Using where; Using filesort
drop table t1;
drop table t1;
create table t1 (pkcol varchar(16), othercol varchar(16), primary key (pkcol));
insert into t1 values ('test', 'something');
update t1 set othercol='somethingelse' where pkcol='test';
select * from t1;
pkcol othercol
test somethingelse
drop table t1;
mysql-test/t/type_varchar.test
View file @
cc440db7
...
@@ -97,3 +97,12 @@ explain select * from t1 where v like 'This is a test' order by v;
...
@@ -97,3 +97,12 @@ explain select * from t1 where v like 'This is a test' order by v;
explain
select
*
from
t1
where
v
=
'This is a test'
order
by
v
;
explain
select
*
from
t1
where
v
=
'This is a test'
order
by
v
;
explain
select
*
from
t1
where
v
like
'S%'
order
by
v
;
explain
select
*
from
t1
where
v
like
'S%'
order
by
v
;
drop
table
t1
;
drop
table
t1
;
#
# bug#9339 - meaningless Field_varstring::get_key_image
#
create
table
t1
(
pkcol
varchar
(
16
),
othercol
varchar
(
16
),
primary
key
(
pkcol
));
insert
into
t1
values
(
'test'
,
'something'
);
update
t1
set
othercol
=
'somethingelse'
where
pkcol
=
'test'
;
select
*
from
t1
;
drop
table
t1
;
sql/field.cc
View file @
cc440db7
...
@@ -5725,12 +5725,12 @@ void Field_varstring::get_key_image(char *buff, uint length, imagetype type)
...
@@ -5725,12 +5725,12 @@ void Field_varstring::get_key_image(char *buff, uint length, imagetype type)
{
{
uint
f_length
=
length_bytes
==
1
?
(
uint
)
(
uchar
)
*
ptr
:
uint2korr
(
ptr
);
uint
f_length
=
length_bytes
==
1
?
(
uint
)
(
uchar
)
*
ptr
:
uint2korr
(
ptr
);
uint
char_length
=
length
/
field_charset
->
mbmaxlen
;
uint
char_length
=
length
/
field_charset
->
mbmaxlen
;
char
_length
=
my_charpos
(
field_charset
,
ptr
,
ptr
+
length_bytes
,
char
*
pos
=
ptr
+
length_bytes
;
char_length
);
char_length
=
my_charpos
(
field_charset
,
pos
,
pos
+
f_length
,
char_length
);
set_if_smaller
(
f_length
,
char_length
);
set_if_smaller
(
f_length
,
char_length
);
/* Key is always stored with 2 bytes */
/* Key is always stored with 2 bytes */
int2store
(
buff
,
f_length
);
int2store
(
buff
,
f_length
);
memcpy
(
buff
+
HA_KEY_BLOB_LENGTH
,
p
tr
+
length_byte
s
,
f_length
);
memcpy
(
buff
+
HA_KEY_BLOB_LENGTH
,
p
o
s
,
f_length
);
if
(
f_length
<
length
)
if
(
f_length
<
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