mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
Merge branch 'master' into releases/tokudb-7.5
This commit is contained in:
commit
ce96369805
5 changed files with 27 additions and 1 deletions
11
mysql-test/suite/tokudb.bugs/r/db771.result
Normal file
11
mysql-test/suite/tokudb.bugs/r/db771.result
Normal 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;
|
13
mysql-test/suite/tokudb.bugs/t/db771.test
Normal file
13
mysql-test/suite/tokudb.bugs/t/db771.test
Normal 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;
|
|
@ -6,6 +6,7 @@ Table Create Table
|
||||||
t CREATE TABLE `t` (
|
t CREATE TABLE `t` (
|
||||||
`a` varchar(1) DEFAULT NULL
|
`a` varchar(1) DEFAULT NULL
|
||||||
) ENGINE=TokuDB DEFAULT CHARSET=latin1
|
) 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(2);
|
ALTER TABLE t CHANGE COLUMN a a VARCHAR(2);
|
||||||
ALTER TABLE t CHANGE COLUMN a a VARCHAR(3);
|
ALTER TABLE t CHANGE COLUMN a a VARCHAR(3);
|
||||||
|
|
|
@ -9,6 +9,7 @@ SET SESSION TOKUDB_DISABLE_SLOW_ALTER=ON;
|
||||||
|
|
||||||
CREATE TABLE t (a VARCHAR(1)) ENGINE=TokuDB;
|
CREATE TABLE t (a VARCHAR(1)) ENGINE=TokuDB;
|
||||||
SHOW CREATE TABLE t;
|
SHOW CREATE TABLE t;
|
||||||
|
INSERT INTO t VALUES (null);
|
||||||
|
|
||||||
# 1->1
|
# 1->1
|
||||||
let $i=1
|
let $i=1
|
||||||
|
|
|
@ -851,7 +851,7 @@ static int tokudb_expand_variable_offsets(
|
||||||
DBT new_val; memset(&new_val, 0, sizeof new_val);
|
DBT new_val; memset(&new_val, 0, sizeof new_val);
|
||||||
|
|
||||||
if (old_val != NULL) {
|
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
|
// compute the new val from the old val
|
||||||
uchar *old_val_ptr = (uchar *)old_val->data;
|
uchar *old_val_ptr = (uchar *)old_val->data;
|
||||||
|
|
Loading…
Add table
Reference in a new issue