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
74ce197b
Commit
74ce197b
authored
Oct 10, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/maint/bug28878/my41-bug28878
into polly.(none):/home/kaa/src/maint/mysql-4.1-maint
parents
b055562b
4d0ef0cc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
1 deletion
+70
-1
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+36
-0
mysql-test/t/innodb_mysql.test
mysql-test/t/innodb_mysql.test
+32
-0
sql/field.cc
sql/field.cc
+2
-1
No files found.
mysql-test/r/innodb_mysql.result
View file @
74ce197b
...
...
@@ -182,4 +182,40 @@ t1.a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(2), KEY (a)) ENGINE = InnoDB DEFAULT CHARSET=UTF8;
INSERT INTO t1 VALUES ('uk'),('bg');
SELECT * FROM t1 WHERE a = 'uk';
a
uk
DELETE FROM t1 WHERE a = 'uk';
SELECT * FROM t1 WHERE a = 'uk';
a
UPDATE t1 SET a = 'us' WHERE a = 'uk';
SELECT * FROM t1 WHERE a = 'uk';
a
CREATE TABLE t2 (a CHAR(2), KEY (a)) ENGINE = InnoDB;
INSERT INTO t2 VALUES ('uk'),('bg');
SELECT * FROM t2 WHERE a = 'uk';
a
uk
DELETE FROM t2 WHERE a = 'uk';
SELECT * FROM t2 WHERE a = 'uk';
a
INSERT INTO t2 VALUES ('uk');
UPDATE t2 SET a = 'us' WHERE a = 'uk';
SELECT * FROM t2 WHERE a = 'uk';
a
CREATE TABLE t3 (a CHAR(2), KEY (a)) ENGINE = MyISAM;
INSERT INTO t3 VALUES ('uk'),('bg');
SELECT * FROM t3 WHERE a = 'uk';
a
uk
DELETE FROM t3 WHERE a = 'uk';
SELECT * FROM t3 WHERE a = 'uk';
a
INSERT INTO t3 VALUES ('uk');
UPDATE t3 SET a = 'us' WHERE a = 'uk';
SELECT * FROM t3 WHERE a = 'uk';
a
DROP TABLE t1,t2,t3;
End of 4.1 tests
mysql-test/t/innodb_mysql.test
View file @
74ce197b
...
...
@@ -216,4 +216,36 @@ t1.a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
DROP
TABLE
t1
;
#
# Bug #28878: InnoDB tables with UTF8 character set and indexes cause wrong result for DML
#
CREATE
TABLE
t1
(
a
CHAR
(
2
),
KEY
(
a
))
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
UTF8
;
INSERT
INTO
t1
VALUES
(
'uk'
),(
'bg'
);
SELECT
*
FROM
t1
WHERE
a
=
'uk'
;
DELETE
FROM
t1
WHERE
a
=
'uk'
;
SELECT
*
FROM
t1
WHERE
a
=
'uk'
;
UPDATE
t1
SET
a
=
'us'
WHERE
a
=
'uk'
;
SELECT
*
FROM
t1
WHERE
a
=
'uk'
;
CREATE
TABLE
t2
(
a
CHAR
(
2
),
KEY
(
a
))
ENGINE
=
InnoDB
;
INSERT
INTO
t2
VALUES
(
'uk'
),(
'bg'
);
SELECT
*
FROM
t2
WHERE
a
=
'uk'
;
DELETE
FROM
t2
WHERE
a
=
'uk'
;
SELECT
*
FROM
t2
WHERE
a
=
'uk'
;
INSERT
INTO
t2
VALUES
(
'uk'
);
UPDATE
t2
SET
a
=
'us'
WHERE
a
=
'uk'
;
SELECT
*
FROM
t2
WHERE
a
=
'uk'
;
CREATE
TABLE
t3
(
a
CHAR
(
2
),
KEY
(
a
))
ENGINE
=
MyISAM
;
INSERT
INTO
t3
VALUES
(
'uk'
),(
'bg'
);
SELECT
*
FROM
t3
WHERE
a
=
'uk'
;
DELETE
FROM
t3
WHERE
a
=
'uk'
;
SELECT
*
FROM
t3
WHERE
a
=
'uk'
;
INSERT
INTO
t3
VALUES
(
'uk'
);
UPDATE
t3
SET
a
=
'us'
WHERE
a
=
'uk'
;
SELECT
*
FROM
t3
WHERE
a
=
'uk'
;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
End
of
4.1
tests
sql/field.cc
View file @
74ce197b
...
...
@@ -5211,7 +5211,8 @@ uint Field_string::get_key_image(char *buff, uint length, CHARSET_INFO *cs,
length
/
field_charset
->
mbmaxlen
);
memcpy
(
buff
,
ptr
,
bytes
);
if
(
bytes
<
length
)
bzero
(
buff
+
bytes
,
length
-
bytes
);
field_charset
->
cset
->
fill
(
field_charset
,
buff
+
bytes
,
length
-
bytes
,
' '
);
return
bytes
;
}
...
...
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