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
eb13e2b4
Commit
eb13e2b4
authored
Nov 21, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DB-771 fix incorrect assert in update callback for varchar expansion
parent
412be21f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
1 deletion
+27
-1
mysql-test/suite/tokudb.bugs/r/db771.result
mysql-test/suite/tokudb.bugs/r/db771.result
+11
-0
mysql-test/suite/tokudb.bugs/t/db771.test
mysql-test/suite/tokudb.bugs/t/db771.test
+13
-0
mysql-test/suite/tokudb/r/change_column_varchar.result
mysql-test/suite/tokudb/r/change_column_varchar.result
+1
-0
mysql-test/suite/tokudb/t/change_column_varchar.test
mysql-test/suite/tokudb/t/change_column_varchar.test
+1
-0
storage/tokudb/tokudb_update_fun.cc
storage/tokudb/tokudb_update_fun.cc
+1
-1
No files found.
mysql-test/suite/tokudb.bugs/r/db771.result
0 → 100644
View file @
eb13e2b4
set default_storage_engine=tokudb;
drop table if exists t1;
CREATE TABLE t1 (a int key, b varchar(32), c varchar(32));
REPLACE t1 SET a = 4;
ALTER TABLE t1 CHANGE COLUMN c c VARCHAR(500);
update t1 set b='hi';
update t1 set c='there';
select * from t1;
a b c
4 hi there
drop table t1;
mysql-test/suite/tokudb.bugs/t/db771.test
0 → 100644
View file @
eb13e2b4
# test case for DB-771
source
include
/
have_tokudb
.
inc
;
set
default_storage_engine
=
tokudb
;
disable_warnings
;
drop
table
if
exists
t1
;
enable_warnings
;
CREATE
TABLE
t1
(
a
int
key
,
b
varchar
(
32
),
c
varchar
(
32
));
REPLACE
t1
SET
a
=
4
;
ALTER
TABLE
t1
CHANGE
COLUMN
c
c
VARCHAR
(
500
);
update
t1
set
b
=
'hi'
;
update
t1
set
c
=
'there'
;
select
*
from
t1
;
drop
table
t1
;
mysql-test/suite/tokudb/r/change_column_varchar.result
View file @
eb13e2b4
...
...
@@ -6,6 +6,7 @@ Table Create Table
t CREATE TABLE `t` (
`a` varchar(1) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
INSERT INTO t VALUES (null);
ALTER TABLE t CHANGE COLUMN a a VARCHAR(2);
ALTER TABLE t CHANGE COLUMN a a VARCHAR(2);
ALTER TABLE t CHANGE COLUMN a a VARCHAR(3);
...
...
mysql-test/suite/tokudb/t/change_column_varchar.test
View file @
eb13e2b4
...
...
@@ -9,6 +9,7 @@ SET SESSION TOKUDB_DISABLE_SLOW_ALTER=ON;
CREATE
TABLE
t
(
a
VARCHAR
(
1
))
ENGINE
=
TokuDB
;
SHOW
CREATE
TABLE
t
;
INSERT
INTO
t
VALUES
(
null
);
# 1->1
let
$i
=
1
...
...
storage/tokudb/tokudb_update_fun.cc
View file @
eb13e2b4
...
...
@@ -851,7 +851,7 @@ static int tokudb_expand_variable_offsets(
DBT
new_val
;
memset
(
&
new_val
,
0
,
sizeof
new_val
);
if
(
old_val
!=
NULL
)
{
assert
(
offset_start
+
number_of_offsets
<
old_val
->
size
);
assert
(
offset_start
+
number_of_offsets
<
=
old_val
->
size
);
// compute the new val from the old val
uchar
*
old_val_ptr
=
(
uchar
*
)
old_val
->
data
;
...
...
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