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
5f5b7cc3
Commit
5f5b7cc3
authored
Oct 17, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B27099-5.1-opt
parents
ba03c12b
99927613
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
49 deletions
+45
-49
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+8
-32
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+4
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+8
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+6
-0
sql/item.cc
sql/item.cc
+9
-3
sql/item.h
sql/item.h
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+4
-3
sql/sql_yacc.yy
sql/sql_yacc.yy
+5
-10
No files found.
mysql-test/r/ctype_utf8.result
View file @
5f5b7cc3
...
...
@@ -1742,25 +1742,13 @@ NULL
Warnings:
Error 1300 Invalid utf8 character string: 'FF'
select hex(_utf8 0x616263FF);
hex(_utf8 0x616263FF)
NULL
Warnings:
Error 1300 Invalid utf8 character string: 'FF'
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 X'616263FF');
hex(_utf8 X'616263FF')
NULL
Warnings:
Error 1300 Invalid utf8 character string: 'FF'
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 B'001111111111');
hex(_utf8 B'001111111111')
NULL
Warnings:
Error 1300 Invalid utf8 character string: 'FF'
ERROR HY000: Invalid utf8 character string: 'FF'
select (_utf8 X'616263FF');
(_utf8 X'616263FF')
NULL
Warnings:
Error 1300 Invalid utf8 character string: 'FF'
ERROR HY000: Invalid utf8 character string: 'FF'
set sql_mode=default;
select hex(char(0xFF using utf8));
hex(char(0xFF using utf8))
...
...
@@ -1773,22 +1761,10 @@ hex(convert(0xFF using utf8))
Warnings:
Warning 1300 Invalid utf8 character string: 'FF'
select hex(_utf8 0x616263FF);
hex(_utf8 0x616263FF)
616263
Warnings:
Warning 1300 Invalid utf8 character string: 'FF'
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 X'616263FF');
hex(_utf8 X'616263FF')
616263
Warnings:
Warning 1300 Invalid utf8 character string: 'FF'
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 B'001111111111');
hex(_utf8 B'001111111111')
03
Warnings:
Warning 1300 Invalid utf8 character string: 'FF'
ERROR HY000: Invalid utf8 character string: 'FF'
select (_utf8 X'616263FF');
(_utf8 X'616263FF')
abc
Warnings:
Warning 1300 Invalid utf8 character string: 'FF'
ERROR HY000: Invalid utf8 character string: 'FF'
mysql-test/r/information_schema.result
View file @
5f5b7cc3
...
...
@@ -1560,4 +1560,8 @@ SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME ='information_schema';
SCHEMA_NAME
information_schema
SELECT TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db';
TABLE_COLLATION
utf8_bin
End of 5.1 tests.
mysql-test/t/ctype_utf8.test
View file @
5f5b7cc3
...
...
@@ -1412,14 +1412,22 @@ DROP TABLE t1, t2;
set
sql_mode
=
traditional
;
select
hex
(
char
(
0xFF
using
utf8
));
select
hex
(
convert
(
0xFF
using
utf8
));
--
error
ER_INVALID_CHARACTER_STRING
select
hex
(
_utf8
0x616263FF
);
--
error
ER_INVALID_CHARACTER_STRING
select
hex
(
_utf8
X
'616263FF'
);
--
error
ER_INVALID_CHARACTER_STRING
select
hex
(
_utf8
B
'001111111111'
);
--
error
ER_INVALID_CHARACTER_STRING
select
(
_utf8
X
'616263FF'
);
set
sql_mode
=
default
;
select
hex
(
char
(
0xFF
using
utf8
));
select
hex
(
convert
(
0xFF
using
utf8
));
--
error
ER_INVALID_CHARACTER_STRING
select
hex
(
_utf8
0x616263FF
);
--
error
ER_INVALID_CHARACTER_STRING
select
hex
(
_utf8
X
'616263FF'
);
--
error
ER_INVALID_CHARACTER_STRING
select
hex
(
_utf8
B
'001111111111'
);
--
error
ER_INVALID_CHARACTER_STRING
select
(
_utf8
X
'616263FF'
);
mysql-test/t/information_schema.test
View file @
5f5b7cc3
...
...
@@ -1201,5 +1201,11 @@ DROP VIEW v1;
#
SELECT
SCHEMA_NAME
FROM
INFORMATION_SCHEMA
.
SCHEMATA
WHERE
SCHEMA_NAME
=
'information_schema'
;
#
# Bug#31381 Error in retrieving Data from INFORMATION_SCHEMA
#
SELECT
TABLE_COLLATION
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
'mysql'
and
TABLE_NAME
=
'db'
;
--
echo
End
of
5.1
tests
.
sql/item.cc
View file @
5f5b7cc3
...
...
@@ -4313,7 +4313,7 @@ bool Item::is_datetime()
}
String
*
Item
::
check_well_formed_result
(
String
*
str
)
String
*
Item
::
check_well_formed_result
(
String
*
str
,
bool
send_error
)
{
/* Check whether we got a well-formed string */
CHARSET_INFO
*
cs
=
str
->
charset
();
...
...
@@ -4329,8 +4329,14 @@ String *Item::check_well_formed_result(String *str)
uint
diff
=
str
->
length
()
-
wlen
;
set_if_smaller
(
diff
,
3
);
octet2hex
(
hexbuf
,
str
->
ptr
()
+
wlen
,
diff
);
if
(
thd
->
variables
.
sql_mode
&
(
MODE_STRICT_TRANS_TABLES
|
MODE_STRICT_ALL_TABLES
))
if
(
send_error
)
{
my_error
(
ER_INVALID_CHARACTER_STRING
,
MYF
(
0
),
cs
->
csname
,
hexbuf
);
return
0
;
}
if
((
thd
->
variables
.
sql_mode
&
(
MODE_STRICT_TRANS_TABLES
|
MODE_STRICT_ALL_TABLES
)))
{
level
=
MYSQL_ERROR
::
WARN_LEVEL_ERROR
;
null_value
=
1
;
...
...
sql/item.h
View file @
5f5b7cc3
...
...
@@ -1003,7 +1003,7 @@ class Item {
bool
is_datetime
();
virtual
Field
::
geometry_type
get_geometry_type
()
const
{
return
Field
::
GEOM_GEOMETRY
;
};
String
*
check_well_formed_result
(
String
*
str
);
String
*
check_well_formed_result
(
String
*
str
,
bool
send_error
=
0
);
};
...
...
sql/sql_show.cc
View file @
5f5b7cc3
...
...
@@ -3487,6 +3487,10 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
(
ptr
==
option_buff
?
0
:
(
uint
)
(
ptr
-
option_buff
)
-
1
),
cs
);
tmp_buff
=
(
share
->
table_charset
?
share
->
table_charset
->
name
:
"default"
);
table
->
field
[
17
]
->
store
(
tmp_buff
,
strlen
(
tmp_buff
),
cs
);
if
(
share
->
comment
.
str
)
table
->
field
[
20
]
->
store
(
share
->
comment
.
str
,
share
->
comment
.
length
,
cs
);
...
...
@@ -3564,9 +3568,6 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
table
->
field
[
16
]
->
store_time
(
&
time
,
MYSQL_TIMESTAMP_DATETIME
);
table
->
field
[
16
]
->
set_notnull
();
}
tmp_buff
=
(
share
->
table_charset
?
share
->
table_charset
->
name
:
"default"
);
table
->
field
[
17
]
->
store
(
tmp_buff
,
strlen
(
tmp_buff
),
cs
);
if
(
file
->
ha_table_flags
()
&
(
ulong
)
HA_HAS_CHECKSUM
)
{
table
->
field
[
18
]
->
store
((
longlong
)
file
->
checksum
(),
TRUE
);
...
...
sql/sql_yacc.yy
View file @
5f5b7cc3
...
...
@@ -9935,15 +9935,11 @@ literal:
str ? str->ptr() : "",
str ? str->length() : 0,
$1);
if (
$$
)
if (
!$$ || !$$->check_well_formed_result(&$$->str_value, TRUE)
)
{
((Item_string *) $$)->set_repertoire_from_value();
if (!$$->check_well_formed_result(&$$->str_value))
{
$$= new Item_null();
$$->set_name(NULL, 0, system_charset_info);
}
MYSQL_YYABORT;
}
((Item_string *) $$)->set_repertoire_from_value();
}
| UNDERSCORE_CHARSET BIN_NUM
{
...
...
@@ -9959,10 +9955,9 @@ literal:
str ? str->ptr() : "",
str ? str->length() : 0,
$1);
if (
$$ && !$$->check_well_formed_result(&$$->str_value
))
if (
!$$ || !$$->check_well_formed_result(&$$->str_value, TRUE
))
{
$$= new Item_null();
$$->set_name(NULL, 0, system_charset_info);
MYSQL_YYABORT;
}
}
| DATE_SYM text_literal { $$ = $2; }
...
...
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