Merge branch 'master' into releases/tokudb-7.5

This commit is contained in:
Rich Prohaska 2014-11-21 16:30:53 -05:00
commit ce96369805
5 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,11 @@
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;

View file

@ -0,0 +1,13 @@
# 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;

View file

@ -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);

View file

@ -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

View file

@ -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;