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
cdd0428a
Commit
cdd0428a
authored
Apr 23, 2008
by
gshchepa/uchum@host.loc
Browse files
Options
Browse Files
Download
Plain Diff
Merge host.loc:/home/uchum/work/5.0-bugteam
into host.loc:/home/uchum/work/5.1-bugteam
parents
45c80435
686d6578
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
4 deletions
+52
-4
mysql-test/r/ctype_gbk.result
mysql-test/r/ctype_gbk.result
+7
-0
mysql-test/r/subselect3.result
mysql-test/r/subselect3.result
+9
-0
mysql-test/t/ctype_gbk.test
mysql-test/t/ctype_gbk.test
+14
-0
mysql-test/t/subselect3.test
mysql-test/t/subselect3.test
+13
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-0
strings/ctype-big5.c
strings/ctype-big5.c
+4
-2
strings/ctype-gbk.c
strings/ctype-gbk.c
+4
-2
No files found.
mysql-test/r/ctype_gbk.result
View file @
cdd0428a
...
...
@@ -247,4 +247,11 @@ t1 CREATE TABLE `t1` (
`c2` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=gbk
drop table t1;
CREATE TABLE t1(a MEDIUMTEXT CHARACTER SET gbk,
b MEDIUMTEXT CHARACTER SET big5);
INSERT INTO t1 VALUES
(REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', '');
SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll;
SELECT b FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll;
DROP TABLES t1;
End of 5.0 tests
mysql-test/r/subselect3.result
View file @
cdd0428a
...
...
@@ -770,4 +770,13 @@ SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a;
ROW(1, 2) IN (SELECT t1.a, 2 FROM t2)
1
DROP TABLE t1, t2;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
CREATE TABLE t2 SELECT * FROM t1;
SELECT 1 FROM t1 WHERE t1.a NOT IN (SELECT 1 FROM t1, t2 WHERE 0);
1
1
1
1
DROP TABLE t1, t2;
End of 5.0 tests
mysql-test/t/ctype_gbk.test
View file @
cdd0428a
...
...
@@ -53,4 +53,18 @@ alter table t1 change c1 c1 mediumtext character set gbk not null;
show
create
table
t1
;
drop
table
t1
;
#
# Bug#35993: severe memory corruption and crash with multibyte conversion
#
CREATE
TABLE
t1
(
a
MEDIUMTEXT
CHARACTER
SET
gbk
,
b
MEDIUMTEXT
CHARACTER
SET
big5
);
INSERT
INTO
t1
VALUES
(
REPEAT
(
0x1125
,
200000
),
REPEAT
(
0x1125
,
200000
)),
(
''
,
''
),
(
''
,
''
);
SELECT
a
FROM
t1
GROUP
BY
1
LIMIT
1
INTO
@
nullll
;
SELECT
b
FROM
t1
GROUP
BY
1
LIMIT
1
INTO
@
nullll
;
DROP
TABLES
t1
;
--
echo
End
of
5.0
tests
mysql-test/t/subselect3.test
View file @
cdd0428a
...
...
@@ -605,4 +605,17 @@ SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a;
DROP
TABLE
t1
,
t2
;
#
# Bug #36005: crash in subselect with single row
# (subselect_single_select_engine::exec)
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
);
CREATE
TABLE
t2
SELECT
*
FROM
t1
;
SELECT
1
FROM
t1
WHERE
t1
.
a
NOT
IN
(
SELECT
1
FROM
t1
,
t2
WHERE
0
);
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.0
tests
sql/sql_select.cc
View file @
cdd0428a
...
...
@@ -846,6 +846,7 @@ JOIN::optimize()
"Impossible HAVING"
:
"Impossible WHERE"
));
zero_result_cause
=
having_value
==
Item
::
COND_FALSE
?
"Impossible HAVING"
:
"Impossible WHERE"
;
tables
=
0
;
error
=
0
;
DBUG_RETURN
(
0
);
}
...
...
strings/ctype-big5.c
View file @
cdd0428a
...
...
@@ -307,15 +307,17 @@ static size_t my_strnxfrm_big5(CHARSET_INFO *cs __attribute__((unused)),
{
uint16
e
;
size_t
dstlen
=
len
;
uchar
*
dest_end
=
dest
+
dstlen
;
len
=
srclen
;
while
(
len
--
)
while
(
len
--
&&
dest
<
dest_end
)
{
if
((
len
>
0
)
&&
isbig5code
(
*
src
,
*
(
src
+
1
)))
{
e
=
big5strokexfrm
((
uint16
)
big5code
(
*
src
,
*
(
src
+
1
)));
*
dest
++
=
big5head
(
e
);
*
dest
++
=
big5tail
(
e
);
if
(
dest
<
dest_end
)
*
dest
++
=
big5tail
(
e
);
src
+=
2
;
len
--
;
}
else
...
...
strings/ctype-gbk.c
View file @
cdd0428a
...
...
@@ -2668,15 +2668,17 @@ static size_t my_strnxfrm_gbk(CHARSET_INFO *cs __attribute__((unused)),
{
uint16
e
;
size_t
dstlen
=
len
;
uchar
*
dest_end
=
dest
+
dstlen
;
len
=
srclen
;
while
(
len
--
)
while
(
len
--
&&
dest
<
dest_end
)
{
if
((
len
>
0
)
&&
isgbkcode
(
*
src
,
*
(
src
+
1
)))
{
e
=
gbksortorder
((
uint16
)
gbkcode
(
*
src
,
*
(
src
+
1
)));
*
dest
++
=
gbkhead
(
e
);
*
dest
++
=
gbktail
(
e
);
if
(
dest
<
dest_end
)
*
dest
++
=
gbktail
(
e
);
src
+=
2
;
len
--
;
}
else
...
...
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