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
f131e5a9
Commit
f131e5a9
authored
Jan 19, 2005
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into gw.mysql.r18.ru:/usr/home/ram/work/5.0.b6999
parents
18bd4a25
c24c023e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
mysql-test/r/strict.result
mysql-test/r/strict.result
+2
-2
mysql-test/t/strict.test
mysql-test/t/strict.test
+2
-2
sql/field.cc
sql/field.cc
+6
-2
sql/share/errmsg.txt
sql/share/errmsg.txt
+2
-0
No files found.
mysql-test/r/strict.result
View file @
f131e5a9
...
@@ -814,14 +814,14 @@ DROP TABLE t1;
...
@@ -814,14 +814,14 @@ DROP TABLE t1;
CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello ', 'hello ');
INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello ', 'hello ');
INSERT INTO t1 (col1) VALUES ('hellobob');
INSERT INTO t1 (col1) VALUES ('hellobob');
ERROR
01000: Data truncated
for column 'col1' at row 1
ERROR
22001: Data too long
for column 'col1' at row 1
INSERT INTO t1 (col2) VALUES ('hellobob');
INSERT INTO t1 (col2) VALUES ('hellobob');
ERROR 01000: Data truncated for column 'col2' at row 1
ERROR 01000: Data truncated for column 'col2' at row 1
INSERT INTO t1 (col2) VALUES ('hello ');
INSERT INTO t1 (col2) VALUES ('hello ');
Warnings:
Warnings:
Note 1265 Data truncated for column 'col2' at row 1
Note 1265 Data truncated for column 'col2' at row 1
UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he';
UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he';
ERROR
01000: Data truncated
for column 'col1' at row 2
ERROR
22001: Data too long
for column 'col1' at row 2
UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he';
UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he';
ERROR 01000: Data truncated for column 'col2' at row 2
ERROR 01000: Data truncated for column 'col2' at row 2
INSERT IGNORE INTO t1 VALUES ('hellobob', 'hellobob');
INSERT IGNORE INTO t1 VALUES ('hellobob', 'hellobob');
...
...
mysql-test/t/strict.test
View file @
f131e5a9
...
@@ -565,12 +565,12 @@ DROP TABLE t1;
...
@@ -565,12 +565,12 @@ DROP TABLE t1;
CREATE
TABLE
t1
(
col1
CHAR
(
5
),
col2
VARCHAR
(
6
));
CREATE
TABLE
t1
(
col1
CHAR
(
5
),
col2
VARCHAR
(
6
));
INSERT
INTO
t1
VALUES
(
'hello'
,
'hello'
),(
'he'
,
'he'
),(
'hello '
,
'hello '
);
INSERT
INTO
t1
VALUES
(
'hello'
,
'hello'
),(
'he'
,
'he'
),(
'hello '
,
'hello '
);
--
error
1
265
--
error
1
400
INSERT
INTO
t1
(
col1
)
VALUES
(
'hellobob'
);
INSERT
INTO
t1
(
col1
)
VALUES
(
'hellobob'
);
--
error
1265
--
error
1265
INSERT
INTO
t1
(
col2
)
VALUES
(
'hellobob'
);
INSERT
INTO
t1
(
col2
)
VALUES
(
'hellobob'
);
INSERT
INTO
t1
(
col2
)
VALUES
(
'hello '
);
INSERT
INTO
t1
(
col2
)
VALUES
(
'hello '
);
--
error
1
265
--
error
1
400
UPDATE
t1
SET
col1
=
'hellobob'
WHERE
col1
=
'he'
;
UPDATE
t1
SET
col1
=
'hellobob'
WHERE
col1
=
'he'
;
--
error
1265
--
error
1265
UPDATE
t1
SET
col2
=
'hellobob'
WHERE
col2
=
'he'
;
UPDATE
t1
SET
col2
=
'hellobob'
WHERE
col2
=
'he'
;
...
...
sql/field.cc
View file @
f131e5a9
...
@@ -4370,8 +4370,12 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs)
...
@@ -4370,8 +4370,12 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs)
error
=
1
;
error
=
1
;
}
}
if
(
error
)
if
(
error
)
{
if
(
table
->
in_use
->
abort_on_warning
)
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_DATA_TOO_LONG
,
1
);
else
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_WARN_DATA_TRUNCATED
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_WARN_DATA_TRUNCATED
,
1
);
}
return
error
;
return
error
;
}
}
...
...
sql/share/errmsg.txt
View file @
f131e5a9
...
@@ -5210,3 +5210,5 @@ ER_PROC_AUTO_GRANT_FAIL
...
@@ -5210,3 +5210,5 @@ ER_PROC_AUTO_GRANT_FAIL
eng "Failed to grant EXECUTE and ALTER ROUTINE privileges"
eng "Failed to grant EXECUTE and ALTER ROUTINE privileges"
ER_PROC_AUTO_REVOKE_FAIL
ER_PROC_AUTO_REVOKE_FAIL
eng "Failed to revoke all privileges to dropped routine"
eng "Failed to revoke all privileges to dropped routine"
ER_DATA_TOO_LONG 22001
eng "Data too long for column '%s' at row %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