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
92545cb3
Commit
92545cb3
authored
Jan 19, 2005
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ER_WARN_DATA_TRUNCATED replaced with WARN_DATA_TRUNCATED.
parent
1b106c1f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
36 deletions
+34
-36
extra/comp_err.c
extra/comp_err.c
+2
-1
sql/field.cc
sql/field.cc
+26
-28
sql/field_conv.cc
sql/field_conv.cc
+5
-6
sql/share/errmsg.txt
sql/share/errmsg.txt
+1
-1
No files found.
extra/comp_err.c
View file @
92545cb3
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#define HEADER_LENGTH 32
/* Length of header in errmsg.sys */
#define HEADER_LENGTH 32
/* Length of header in errmsg.sys */
#define DEFAULT_CHARSET_DIR "../sql/share/charsets"
#define DEFAULT_CHARSET_DIR "../sql/share/charsets"
#define ER_PREFIX "ER_"
#define ER_PREFIX "ER_"
#define WARN_PREFIX "WARN_"
static
char
*
OUTFILE
=
(
char
*
)
"errmsg.sys"
;
static
char
*
OUTFILE
=
(
char
*
)
"errmsg.sys"
;
static
char
*
HEADERFILE
=
(
char
*
)
"mysqld_error.h"
;
static
char
*
HEADERFILE
=
(
char
*
)
"mysqld_error.h"
;
static
char
*
NAMEFILE
=
(
char
*
)
"mysqld_ername.h"
;
static
char
*
NAMEFILE
=
(
char
*
)
"mysqld_ername.h"
;
...
@@ -453,7 +454,7 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
...
@@ -453,7 +454,7 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
continue
;
continue
;
}
}
if
(
is_prefix
(
str
,
ER_PREFIX
))
if
(
is_prefix
(
str
,
ER_PREFIX
)
||
is_prefix
(
str
,
WARN_PREFIX
)
)
{
{
if
(
!
(
current_error
=
parse_error_string
(
str
,
rcount
)))
if
(
!
(
current_error
=
parse_error_string
(
str
,
rcount
)))
{
{
...
...
sql/field.cc
View file @
92545cb3
...
@@ -117,7 +117,7 @@ bool Field::check_int(const char *str, int length, const char *int_end,
...
@@ -117,7 +117,7 @@ bool Field::check_int(const char *str, int length, const char *int_end,
{
{
if
(
!
my_isspace
(
cs
,
*
str
))
if
(
!
my_isspace
(
cs
,
*
str
))
{
{
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
return
1
;
return
1
;
}
}
}
}
...
@@ -662,7 +662,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
...
@@ -662,7 +662,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
from
++
;
from
++
;
if
(
from
==
end
)
if
(
from
==
end
)
{
{
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
is_cuted_fields_incr
=
1
;
is_cuted_fields_incr
=
1
;
}
}
else
if
(
*
from
==
'+'
||
*
from
==
'-'
)
// Found some sign ?
else
if
(
*
from
==
'+'
||
*
from
==
'-'
)
// Found some sign ?
...
@@ -738,7 +738,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
...
@@ -738,7 +738,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
for
(;
from
!=
end
&&
my_isspace
(
&
my_charset_bin
,
*
from
);
from
++
)
;
for
(;
from
!=
end
&&
my_isspace
(
&
my_charset_bin
,
*
from
);
from
++
)
;
if
(
from
!=
end
)
// If still something left, warn
if
(
from
!=
end
)
// If still something left, warn
{
{
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
is_cuted_fields_incr
=
1
;
is_cuted_fields_incr
=
1
;
}
}
}
}
...
@@ -917,7 +917,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
...
@@ -917,7 +917,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
{
{
if
(
!
is_cuted_fields_incr
)
if
(
!
is_cuted_fields_incr
)
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
WARN_DATA_TRUNCATED
,
1
);
return
0
;
return
0
;
}
}
continue
;
continue
;
...
@@ -939,7 +939,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
...
@@ -939,7 +939,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
This is a note, not a warning, as we don't want to abort
This is a note, not a warning, as we don't want to abort
when we cut decimals in strict mode
when we cut decimals in strict mode
*/
*/
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
WARN_DATA_TRUNCATED
,
1
);
}
}
return
0
;
return
0
;
}
}
...
@@ -2367,8 +2367,7 @@ int Field_float::store(const char *from,uint len,CHARSET_INFO *cs)
...
@@ -2367,8 +2367,7 @@ int Field_float::store(const char *from,uint len,CHARSET_INFO *cs)
table
->
in_use
->
count_cuted_fields
))
table
->
in_use
->
count_cuted_fields
))
{
{
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
(
error
?
ER_WARN_DATA_OUT_OF_RANGE
:
ER_WARN_DATA_TRUNCATED
),
(
error
?
ER_WARN_DATA_OUT_OF_RANGE
:
WARN_DATA_TRUNCATED
),
1
);
1
);
error
=
1
;
error
=
1
;
}
}
Field_float
::
store
(
nr
);
Field_float
::
store
(
nr
);
...
@@ -2656,8 +2655,7 @@ int Field_double::store(const char *from,uint len,CHARSET_INFO *cs)
...
@@ -2656,8 +2655,7 @@ int Field_double::store(const char *from,uint len,CHARSET_INFO *cs)
table
->
in_use
->
count_cuted_fields
))
table
->
in_use
->
count_cuted_fields
))
{
{
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
(
error
?
ER_WARN_DATA_OUT_OF_RANGE
:
ER_WARN_DATA_TRUNCATED
),
(
error
?
ER_WARN_DATA_OUT_OF_RANGE
:
WARN_DATA_TRUNCATED
),
1
);
1
);
error
=
1
;
error
=
1
;
}
}
Field_double
::
store
(
nr
);
Field_double
::
store
(
nr
);
...
@@ -3024,7 +3022,7 @@ int Field_timestamp::store(const char *from,uint len,CHARSET_INFO *cs)
...
@@ -3024,7 +3022,7 @@ int Field_timestamp::store(const char *from,uint len,CHARSET_INFO *cs)
if
(
error
||
!
have_smth_to_conv
)
if
(
error
||
!
have_smth_to_conv
)
{
{
error
=
1
;
error
=
1
;
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
from
,
len
,
MYSQL_TIMESTAMP_DATETIME
,
1
);
from
,
len
,
MYSQL_TIMESTAMP_DATETIME
,
1
);
}
}
...
@@ -3104,7 +3102,7 @@ int Field_timestamp::store(longlong nr)
...
@@ -3104,7 +3102,7 @@ int Field_timestamp::store(longlong nr)
}
}
else
if
(
error
)
else
if
(
error
)
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
WARN_DATA_TRUNCATED
,
nr
,
MYSQL_TIMESTAMP_DATETIME
,
1
);
nr
,
MYSQL_TIMESTAMP_DATETIME
,
1
);
#ifdef WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
...
@@ -3337,14 +3335,14 @@ int Field_time::store(const char *from,uint len,CHARSET_INFO *cs)
...
@@ -3337,14 +3335,14 @@ int Field_time::store(const char *from,uint len,CHARSET_INFO *cs)
{
{
tmp
=
0L
;
tmp
=
0L
;
error
=
1
;
error
=
1
;
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
from
,
len
,
MYSQL_TIMESTAMP_TIME
,
1
);
from
,
len
,
MYSQL_TIMESTAMP_TIME
,
1
);
}
}
else
else
{
{
if
(
error
)
if
(
error
)
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
WARN_DATA_TRUNCATED
,
from
,
len
,
MYSQL_TIMESTAMP_TIME
,
1
);
from
,
len
,
MYSQL_TIMESTAMP_TIME
,
1
);
if
(
ltime
.
month
)
if
(
ltime
.
month
)
...
@@ -3700,7 +3698,7 @@ int Field_date::store(const char *from, uint len,CHARSET_INFO *cs)
...
@@ -3700,7 +3698,7 @@ int Field_date::store(const char *from, uint len,CHARSET_INFO *cs)
tmp
=
(
uint32
)
l_time
.
year
*
10000L
+
(
uint32
)
(
l_time
.
month
*
100
+
l_time
.
day
);
tmp
=
(
uint32
)
l_time
.
year
*
10000L
+
(
uint32
)
(
l_time
.
month
*
100
+
l_time
.
day
);
if
(
error
)
if
(
error
)
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
from
,
len
,
MYSQL_TIMESTAMP_DATE
,
1
);
from
,
len
,
MYSQL_TIMESTAMP_DATE
,
1
);
#ifdef WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
...
@@ -3896,7 +3894,7 @@ int Field_newdate::store(const char *from,uint len,CHARSET_INFO *cs)
...
@@ -3896,7 +3894,7 @@ int Field_newdate::store(const char *from,uint len,CHARSET_INFO *cs)
tmp
=
l_time
.
day
+
l_time
.
month
*
32
+
l_time
.
year
*
16
*
32
;
tmp
=
l_time
.
day
+
l_time
.
month
*
32
+
l_time
.
year
*
16
*
32
;
if
(
error
)
if
(
error
)
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
from
,
len
,
MYSQL_TIMESTAMP_DATE
,
1
);
from
,
len
,
MYSQL_TIMESTAMP_DATE
,
1
);
int3store
(
ptr
,
tmp
);
int3store
(
ptr
,
tmp
);
...
@@ -3909,7 +3907,7 @@ int Field_newdate::store(double nr)
...
@@ -3909,7 +3907,7 @@ int Field_newdate::store(double nr)
{
{
(
void
)
Field_newdate
::
store
((
longlong
)
-
1
);
(
void
)
Field_newdate
::
store
((
longlong
)
-
1
);
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
nr
,
MYSQL_TIMESTAMP_DATE
);
WARN_DATA_TRUNCATED
,
nr
,
MYSQL_TIMESTAMP_DATE
);
return
1
;
return
1
;
}
}
else
else
...
@@ -3968,7 +3966,7 @@ int Field_newdate::store_time(TIME *ltime,timestamp_type type)
...
@@ -3968,7 +3966,7 @@ int Field_newdate::store_time(TIME *ltime,timestamp_type type)
{
{
tmp
=
0
;
tmp
=
0
;
error
=
1
;
error
=
1
;
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
}
}
int3store
(
ptr
,
tmp
);
int3store
(
ptr
,
tmp
);
return
error
;
return
error
;
...
@@ -4124,7 +4122,7 @@ int Field_datetime::store(longlong nr)
...
@@ -4124,7 +4122,7 @@ int Field_datetime::store(longlong nr)
if
(
error
)
if
(
error
)
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
initial_nr
,
WARN_DATA_TRUNCATED
,
initial_nr
,
MYSQL_TIMESTAMP_DATETIME
,
1
);
MYSQL_TIMESTAMP_DATETIME
,
1
);
#ifdef WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
...
@@ -4154,7 +4152,7 @@ int Field_datetime::store_time(TIME *ltime,timestamp_type type)
...
@@ -4154,7 +4152,7 @@ int Field_datetime::store_time(TIME *ltime,timestamp_type type)
{
{
tmp
=
0
;
tmp
=
0
;
error
=
1
;
error
=
1
;
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
}
}
#ifdef WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
if
(
table
->
s
->
db_low_byte_first
)
if
(
table
->
s
->
db_low_byte_first
)
...
@@ -4374,7 +4372,7 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs)
...
@@ -4374,7 +4372,7 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs)
if
(
table
->
in_use
->
abort_on_warning
)
if
(
table
->
in_use
->
abort_on_warning
)
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_DATA_TOO_LONG
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_DATA_TOO_LONG
,
1
);
else
else
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
}
}
return
error
;
return
error
;
}
}
...
@@ -4728,7 +4726,7 @@ int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs)
...
@@ -4728,7 +4726,7 @@ int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs)
error
=
1
;
error
=
1
;
}
}
if
(
error
)
if
(
error
)
set_warning
(
level
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
level
,
WARN_DATA_TRUNCATED
,
1
);
return
error
;
return
error
;
}
}
...
@@ -5329,7 +5327,7 @@ int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs)
...
@@ -5329,7 +5327,7 @@ int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs)
bmove
(
ptr
+
packlength
,(
char
*
)
&
from
,
sizeof
(
char
*
));
bmove
(
ptr
+
packlength
,(
char
*
)
&
from
,
sizeof
(
char
*
));
}
}
if
(
error
)
if
(
error
)
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
return
0
;
return
0
;
}
}
...
@@ -5915,11 +5913,11 @@ int Field_enum::store(const char *from,uint length,CHARSET_INFO *cs)
...
@@ -5915,11 +5913,11 @@ int Field_enum::store(const char *from,uint length,CHARSET_INFO *cs)
if
(
err
||
end
!=
from
+
length
||
tmp
>
typelib
->
count
)
if
(
err
||
end
!=
from
+
length
||
tmp
>
typelib
->
count
)
{
{
tmp
=
0
;
tmp
=
0
;
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
}
}
}
}
else
else
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
}
}
store_type
((
ulonglong
)
tmp
);
store_type
((
ulonglong
)
tmp
);
return
err
;
return
err
;
...
@@ -5937,7 +5935,7 @@ int Field_enum::store(longlong nr)
...
@@ -5937,7 +5935,7 @@ int Field_enum::store(longlong nr)
int
error
=
0
;
int
error
=
0
;
if
((
uint
)
nr
>
typelib
->
count
||
nr
==
0
)
if
((
uint
)
nr
>
typelib
->
count
||
nr
==
0
)
{
{
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
nr
=
0
;
nr
=
0
;
error
=
1
;
error
=
1
;
}
}
...
@@ -6096,11 +6094,11 @@ int Field_set::store(const char *from,uint length,CHARSET_INFO *cs)
...
@@ -6096,11 +6094,11 @@ int Field_set::store(const char *from,uint length,CHARSET_INFO *cs)
tmp
>
(
ulonglong
)
(((
longlong
)
1
<<
typelib
->
count
)
-
(
longlong
)
1
))
tmp
>
(
ulonglong
)
(((
longlong
)
1
<<
typelib
->
count
)
-
(
longlong
)
1
))
{
{
tmp
=
0
;
tmp
=
0
;
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
}
}
}
}
else
if
(
got_warning
)
else
if
(
got_warning
)
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
store_type
(
tmp
);
store_type
(
tmp
);
return
err
;
return
err
;
}
}
...
@@ -6113,7 +6111,7 @@ int Field_set::store(longlong nr)
...
@@ -6113,7 +6111,7 @@ int Field_set::store(longlong nr)
(
longlong
)
1
))
(
longlong
)
1
))
{
{
nr
&=
(
longlong
)
(((
longlong
)
1
<<
typelib
->
count
)
-
(
longlong
)
1
);
nr
&=
(
longlong
)
(((
longlong
)
1
<<
typelib
->
count
)
-
(
longlong
)
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
error
=
1
;
error
=
1
;
}
}
store_type
((
ulonglong
)
nr
);
store_type
((
ulonglong
)
nr
);
...
...
sql/field_conv.cc
View file @
92545cb3
...
@@ -121,8 +121,7 @@ set_field_to_null(Field *field)
...
@@ -121,8 +121,7 @@ set_field_to_null(Field *field)
field
->
reset
();
field
->
reset
();
if
(
current_thd
->
count_cuted_fields
==
CHECK_FIELD_WARN
)
if
(
current_thd
->
count_cuted_fields
==
CHECK_FIELD_WARN
)
{
{
field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
ER_WARN_DATA_TRUNCATED
,
1
);
return
0
;
return
0
;
}
}
if
(
!
current_thd
->
no_errors
)
if
(
!
current_thd
->
no_errors
)
...
@@ -230,7 +229,7 @@ static void do_copy_not_null(Copy_field *copy)
...
@@ -230,7 +229,7 @@ static void do_copy_not_null(Copy_field *copy)
if
(
*
copy
->
from_null_ptr
&
copy
->
from_bit
)
if
(
*
copy
->
from_null_ptr
&
copy
->
from_bit
)
{
{
copy
->
to_field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
copy
->
to_field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
WARN_DATA_TRUNCATED
,
1
);
copy
->
to_field
->
reset
();
copy
->
to_field
->
reset
();
}
}
else
else
...
@@ -336,7 +335,7 @@ static void do_cut_string(Copy_field *copy)
...
@@ -336,7 +335,7 @@ static void do_cut_string(Copy_field *copy)
if
(
!
my_isspace
(
system_charset_info
,
*
ptr
))
// QQ: ucs incompatible
if
(
!
my_isspace
(
system_charset_info
,
*
ptr
))
// QQ: ucs incompatible
{
{
copy
->
to_field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
copy
->
to_field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
WARN_DATA_TRUNCATED
,
1
);
break
;
break
;
}
}
}
}
...
@@ -360,7 +359,7 @@ static void do_varstring1(Copy_field *copy)
...
@@ -360,7 +359,7 @@ static void do_varstring1(Copy_field *copy)
length
=
copy
->
to_length
-
1
;
length
=
copy
->
to_length
-
1
;
if
(
current_thd
->
count_cuted_fields
)
if
(
current_thd
->
count_cuted_fields
)
copy
->
to_field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
copy
->
to_field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
WARN_DATA_TRUNCATED
,
1
);
}
}
*
(
uchar
*
)
copy
->
to_ptr
=
(
uchar
)
length
;
*
(
uchar
*
)
copy
->
to_ptr
=
(
uchar
)
length
;
memcpy
(
copy
->
to_ptr
+
1
,
copy
->
from_ptr
+
1
,
length
);
memcpy
(
copy
->
to_ptr
+
1
,
copy
->
from_ptr
+
1
,
length
);
...
@@ -375,7 +374,7 @@ static void do_varstring2(Copy_field *copy)
...
@@ -375,7 +374,7 @@ static void do_varstring2(Copy_field *copy)
length
=
copy
->
to_length
-
HA_KEY_BLOB_LENGTH
;
length
=
copy
->
to_length
-
HA_KEY_BLOB_LENGTH
;
if
(
current_thd
->
count_cuted_fields
)
if
(
current_thd
->
count_cuted_fields
)
copy
->
to_field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
copy
->
to_field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_
WARN_DATA_TRUNCATED
,
1
);
WARN_DATA_TRUNCATED
,
1
);
}
}
int2store
(
copy
->
to_ptr
,
length
);
int2store
(
copy
->
to_ptr
,
length
);
memcpy
(
copy
->
to_ptr
+
HA_KEY_BLOB_LENGTH
,
copy
->
from_ptr
+
HA_KEY_BLOB_LENGTH
,
memcpy
(
copy
->
to_ptr
+
HA_KEY_BLOB_LENGTH
,
copy
->
from_ptr
+
HA_KEY_BLOB_LENGTH
,
...
...
sql/share/errmsg.txt
View file @
92545cb3
...
@@ -4798,7 +4798,7 @@ ER_WARN_DATA_OUT_OF_RANGE 22003
...
@@ -4798,7 +4798,7 @@ ER_WARN_DATA_OUT_OF_RANGE 22003
ger "Daten abgeschnitten, auerhalb des Wertebereichs fr Spalte '%s' in Zeile %ld"
ger "Daten abgeschnitten, auerhalb des Wertebereichs fr Spalte '%s' in Zeile %ld"
por "Dado truncado, fora de alcance para coluna '%s' na linha %ld"
por "Dado truncado, fora de alcance para coluna '%s' na linha %ld"
spa "Datos truncados, fuera de gama para columna '%s' en la lnea %ld"
spa "Datos truncados, fuera de gama para columna '%s' en la lnea %ld"
ER_
WARN_DATA_TRUNCATED 01000
WARN_DATA_TRUNCATED 01000
eng "Data truncated for column '%s' at row %ld"
eng "Data truncated for column '%s' at row %ld"
ger "Daten abgeschnitten fr Spalte '%s' in Zeile %ld"
ger "Daten abgeschnitten fr Spalte '%s' in Zeile %ld"
por "Dado truncado para coluna '%s' na linha %ld"
por "Dado truncado para coluna '%s' na linha %ld"
...
...
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