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
b44bb83a
Commit
b44bb83a
authored
Dec 04, 2006
by
petr/cps@outpost.site
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Bug #21328 mysqld issues warnings on ALTER CSV table to MyISAM
parent
b534ca4b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
5 deletions
+26
-5
mysql-test/r/csv.result
mysql-test/r/csv.result
+8
-0
mysql-test/r/log_tables.result
mysql-test/r/log_tables.result
+0
-3
mysql-test/t/csv.test
mysql-test/t/csv.test
+14
-0
storage/csv/ha_tina.cc
storage/csv/ha_tina.cc
+4
-2
No files found.
mysql-test/r/csv.result
View file @
b44bb83a
...
...
@@ -5223,3 +5223,11 @@ check table bug22080_3;
Table Op Msg_type Msg_text
test.bug22080_3 check error Corrupt
drop tables bug22080_1,bug22080_2,bug22080_3;
CREATE TABLE `bug21328` (
`col1` int(11) DEFAULT NULL,
`col2` int(11) DEFAULT NULL,
`col3` int(11) DEFAULT NULL
) ENGINE=CSV;
insert into bug21328 values (1,NULL,NULL);
alter table bug21328 engine=myisam;
drop table bug21328;
mysql-test/r/log_tables.result
View file @
b44bb83a
...
...
@@ -111,9 +111,6 @@ slow_log CREATE TABLE `slow_log` (
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
alter table mysql.general_log engine=myisam;
alter table mysql.slow_log engine=myisam;
Warnings:
Warning 1366 Incorrect integer value: '' for column 'last_insert_id' at row 0
Warning 1366 Incorrect integer value: '' for column 'insert_id' at row 0
show create table mysql.general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
...
...
mysql-test/t/csv.test
View file @
b44bb83a
...
...
@@ -1605,3 +1605,17 @@ check table bug22080_2;
check
table
bug22080_3
;
drop
tables
bug22080_1
,
bug22080_2
,
bug22080_3
;
#
# Bug #21328 mysqld issues warnings on ALTER CSV table to MyISAM
#
CREATE
TABLE
`bug21328`
(
`col1`
int
(
11
)
DEFAULT
NULL
,
`col2`
int
(
11
)
DEFAULT
NULL
,
`col3`
int
(
11
)
DEFAULT
NULL
)
ENGINE
=
CSV
;
insert
into
bug21328
values
(
1
,
NULL
,
NULL
);
alter
table
bug21328
engine
=
myisam
;
drop
table
bug21328
;
storage/csv/ha_tina.cc
View file @
b44bb83a
...
...
@@ -542,14 +542,16 @@ int ha_tina::encode_quote(byte *buf)
const
char
*
end_ptr
;
/*
Write an empty string to the buffer in case of a NULL value.
CSV does not support nulls. Write quoted 0 to the buffer. In fact,
(*field)->val_str(&attribute,&attribute) would usually return 0
in this case but we write it explicitly here.
Basically this is a safety check, as no one ensures that the
field content is cleaned up every time we use Field::set_null()
in the code.
*/
if
((
*
field
)
->
is_null
())
{
buffer
.
append
(
STRING_WITH_LEN
(
"
\"\"
,"
));
buffer
.
append
(
STRING_WITH_LEN
(
"
\"
0
\"
,"
));
continue
;
}
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