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
3ca77071
Commit
3ca77071
authored
Mar 22, 2005
by
unknown
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
21c31125
968410b0
Changes
3
Hide 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 @
3ca77071
...
...
@@ -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
1 SIMPLE t1 range v v 13 NULL 2 Using where; Using filesort
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 @
3ca77071
...
...
@@ -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
like
'S%'
order
by
v
;
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 @
3ca77071
...
...
@@ -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
char_length
=
length
/
field_charset
->
mbmaxlen
;
char
_length
=
my_charpos
(
field_charset
,
ptr
,
ptr
+
length_bytes
,
char_length
);
char
*
pos
=
ptr
+
length_bytes
;
char_length
=
my_charpos
(
field_charset
,
pos
,
pos
+
f_length
,
char_length
);
set_if_smaller
(
f_length
,
char_length
);
/* Key is always stored with 2 bytes */
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
)
{
/*
...
...
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