mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
10.0-base merge
This commit is contained in:
@ -6,8 +6,8 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 421
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
Variable_name Value
|
||||
binlog_snapshot_file master-bin.000001
|
||||
binlog_snapshot_position 421
|
||||
Binlog_snapshot_file master-bin.000001
|
||||
Binlog_snapshot_position 421
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (0, "");
|
||||
# Connection con1
|
||||
@ -37,8 +37,8 @@ a b
|
||||
0
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
Variable_name Value
|
||||
binlog_snapshot_file master-bin.000001
|
||||
binlog_snapshot_position 945
|
||||
Binlog_snapshot_file master-bin.000001
|
||||
Binlog_snapshot_position 945
|
||||
SHOW MASTER STATUS;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 1357
|
||||
@ -59,16 +59,16 @@ a b
|
||||
0
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
Variable_name Value
|
||||
binlog_snapshot_file master-bin.000001
|
||||
binlog_snapshot_position 945
|
||||
Binlog_snapshot_file master-bin.000001
|
||||
Binlog_snapshot_position 945
|
||||
SHOW MASTER STATUS;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 326
|
||||
COMMIT;
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
Variable_name Value
|
||||
binlog_snapshot_file master-bin.000002
|
||||
binlog_snapshot_position 326
|
||||
Binlog_snapshot_file master-bin.000002
|
||||
Binlog_snapshot_position 326
|
||||
SHOW MASTER STATUS;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 326
|
||||
|
@ -1269,3 +1269,43 @@ SELECT * FROM t1;
|
||||
c1 c2
|
||||
1 NULL
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (2147483648, 'a');
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`c2` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2147483649 DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
2147483648 a
|
||||
ALTER TABLE t1 CHANGE c1 c1 INT;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL DEFAULT '0',
|
||||
`c2` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1(c2) VALUES('b');
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
0 b
|
||||
2147483647 a
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL DEFAULT '0',
|
||||
`c2` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
@ -136,12 +136,12 @@ CREATE TABLE t1(
|
||||
c TEXT NOT NULL, d TEXT NOT NULL,
|
||||
PRIMARY KEY (c(767),d(767)))
|
||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
|
||||
CREATE TABLE t1(
|
||||
c TEXT NOT NULL, d TEXT NOT NULL,
|
||||
PRIMARY KEY (c(767),d(767)))
|
||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
|
||||
CREATE TABLE t1(
|
||||
c TEXT NOT NULL, d TEXT NOT NULL,
|
||||
PRIMARY KEY (c(767),d(767)))
|
||||
@ -149,7 +149,7 @@ ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
|
||||
drop table t1;
|
||||
CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440)))
|
||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
|
||||
CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438)))
|
||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|
||||
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
|
||||
|
@ -3026,7 +3026,7 @@ c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
|
||||
c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
|
||||
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
|
||||
) ENGINE = InnoDB;
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
|
53
mysql-test/suite/innodb/r/innodb_bug14704286.result
Normal file
53
mysql-test/suite/innodb/r/innodb_bug14704286.result
Normal file
@ -0,0 +1,53 @@
|
||||
use test;
|
||||
drop table if exists t1;
|
||||
create table t1 (id int primary key, value int, value2 int,
|
||||
value3 int, index(value,value2)) engine=innodb;
|
||||
insert into t1 values
|
||||
(10,10,10,10),(11,11,11,11),(12,12,12,12),(13,13,13,13),(14,14,14,14),
|
||||
(15,15,15,15),(16,16,16,16),(17,17,17,17),(18,18,18,18),(19,19,19,19),
|
||||
(20,20,20,20);
|
||||
use test;
|
||||
start transaction with consistent snapshot;
|
||||
use test;
|
||||
CREATE PROCEDURE update_t1()
|
||||
BEGIN
|
||||
DECLARE i INT DEFAULT 1;
|
||||
while (i <= 5000) DO
|
||||
update test.t1 set value2=value2+1, value3=value3+1 where id=12;
|
||||
SET i = i + 1;
|
||||
END WHILE;
|
||||
END|
|
||||
set autocommit=0;
|
||||
CALL update_t1();
|
||||
select * from t1;
|
||||
id value value2 value3
|
||||
10 10 10 10
|
||||
11 11 11 11
|
||||
12 12 5012 5012
|
||||
13 13 13 13
|
||||
14 14 14 14
|
||||
15 15 15 15
|
||||
16 16 16 16
|
||||
17 17 17 17
|
||||
18 18 18 18
|
||||
19 19 19 19
|
||||
20 20 20 20
|
||||
set autocommit=1;
|
||||
select * from t1;
|
||||
id value value2 value3
|
||||
10 10 10 10
|
||||
11 11 11 11
|
||||
12 12 5012 5012
|
||||
13 13 13 13
|
||||
14 14 14 14
|
||||
15 15 15 15
|
||||
16 16 16 16
|
||||
17 17 17 17
|
||||
18 18 18 18
|
||||
19 19 19 19
|
||||
20 20 20 20
|
||||
select * from t1 force index(value) where value=12;
|
||||
kill query @id;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
drop procedure if exists update_t1;
|
||||
drop table if exists t1;
|
@ -8,7 +8,7 @@ ERROR HY000: Too big row
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 139 Too big row
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
Error 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
|
||||
DROP TABLE bug53591;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
SET GLOBAL innodb_file_per_table=0;
|
||||
|
@ -649,7 +649,7 @@ CREATE TABLE worklog5743 (col_1_varchar VARCHAR (4000) CHARACTER SET 'utf8',
|
||||
col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8' ,
|
||||
PRIMARY KEY (col_1_varchar(1024))
|
||||
) ROW_FORMAT=DYNAMIC, engine = innodb;
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
|
||||
CREATE TABLE worklog5743 (
|
||||
col_1_varbinary VARBINARY (4000) ,
|
||||
col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8',
|
||||
|
@ -139,7 +139,7 @@ DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (NULL, 1);
|
||||
DELETE FROM t1 WHERE c1 = 1;
|
||||
INSERT INTO t1 VALUES (2,1);
|
||||
INSERT INTO t1 VALUES (2,1);
|
||||
INSERT INTO t1 VALUES (NULL,8);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
@ -639,7 +639,7 @@ SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
# Check if we handl offset > column max value properly
|
||||
# Check if we handle offset > column max value properly
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=256;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
# TINYINT
|
||||
@ -648,3 +648,21 @@ INSERT INTO t1 VALUES (1, NULL);
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Check if we handle the case where a current value is greater than the max
|
||||
# of the column. IMO, this should not be allowed and the assertion that fails
|
||||
# is actually an invariant.
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
# TINYINT
|
||||
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (2147483648, 'a');
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
ALTER TABLE t1 CHANGE c1 c1 INT;
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1(c2) VALUES('b');
|
||||
SELECT * FROM t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
if (`select plugin_auth_version <= "1.1.8-29.3" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB 1.1.8-29.3 or earlier
|
||||
}
|
||||
|
||||
let $per_table=`select @@innodb_file_per_table`;
|
||||
let $format=`select @@innodb_file_format`;
|
||||
let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
|
||||
|
@ -4,6 +4,11 @@
|
||||
# .\sync\sync0sync.c line 324
|
||||
# is fixed
|
||||
|
||||
if (`select plugin_auth_version <= "1.1.8-29.3" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB 1.1.8-29.3 or earlier
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
# #
|
||||
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
|
||||
|
95
mysql-test/suite/innodb/t/innodb_bug14704286.test
Normal file
95
mysql-test/suite/innodb/t/innodb_bug14704286.test
Normal file
@ -0,0 +1,95 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
#
|
||||
# create test-bed to run test
|
||||
#
|
||||
use test;
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
create table t1 (id int primary key, value int, value2 int,
|
||||
value3 int, index(value,value2)) engine=innodb;
|
||||
|
||||
insert into t1 values
|
||||
(10,10,10,10),(11,11,11,11),(12,12,12,12),(13,13,13,13),(14,14,14,14),
|
||||
(15,15,15,15),(16,16,16,16),(17,17,17,17),(18,18,18,18),(19,19,19,19),
|
||||
(20,20,20,20);
|
||||
let $ID= `SELECT @id := CONNECTION_ID()`;
|
||||
|
||||
#
|
||||
# we need multiple connections as we need to keep one connection
|
||||
# active with trx requesting consistent read.
|
||||
#
|
||||
connect (conn1, localhost, root,,);
|
||||
connect (conn2, localhost, root,,);
|
||||
connect (conn3, localhost, root,,);
|
||||
|
||||
#
|
||||
# start trx with consistent read
|
||||
#
|
||||
connection conn1;
|
||||
use test;
|
||||
|
||||
start transaction with consistent snapshot;
|
||||
|
||||
#
|
||||
# update table such that secondary index is updated.
|
||||
#
|
||||
connection conn2;
|
||||
use test;
|
||||
delimiter |;
|
||||
CREATE PROCEDURE update_t1()
|
||||
BEGIN
|
||||
DECLARE i INT DEFAULT 1;
|
||||
while (i <= 5000) DO
|
||||
update test.t1 set value2=value2+1, value3=value3+1 where id=12;
|
||||
SET i = i + 1;
|
||||
END WHILE;
|
||||
END|
|
||||
|
||||
delimiter ;|
|
||||
set autocommit=0;
|
||||
CALL update_t1();
|
||||
select * from t1;
|
||||
set autocommit=1;
|
||||
select * from t1;
|
||||
|
||||
#
|
||||
# Now try to fire select query from connection-1 enforcing
|
||||
# use of secondary index.
|
||||
#
|
||||
connection conn1;
|
||||
let $ID= `SELECT @id := CONNECTION_ID()`;
|
||||
#--error ER_QUERY_INTERRUPTED
|
||||
--send
|
||||
select * from t1 force index(value) where value=12;
|
||||
|
||||
#
|
||||
# select is going to take good time so let's kill query.
|
||||
#
|
||||
connection conn3;
|
||||
let $wait_condition=
|
||||
select * from information_schema.processlist where state = 'Sending data' and
|
||||
info = 'select * from t1 force index(value) where value=12';
|
||||
--source include/wait_condition.inc
|
||||
let $ignore= `SELECT @id := $ID`;
|
||||
kill query @id;
|
||||
|
||||
#
|
||||
# reap the value of connection-1
|
||||
#
|
||||
connection conn1;
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
reap;
|
||||
|
||||
#
|
||||
# clean test-bed.
|
||||
#
|
||||
connection default;
|
||||
disconnect conn1;
|
||||
disconnect conn2;
|
||||
disconnect conn3;
|
||||
drop procedure if exists update_t1;
|
||||
drop table if exists t1;
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
if (`select plugin_auth_version <= "1.1.8-29.3" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB 1.1.8-29.3 or earlier
|
||||
}
|
||||
let $file_format=`select @@innodb_file_format`;
|
||||
let $file_per_table=`select @@innodb_file_per_table`;
|
||||
|
||||
|
@ -14,6 +14,10 @@
|
||||
# #
|
||||
######################################################################
|
||||
|
||||
if (`select plugin_auth_version <= "1.1.8-29.3" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB 1.1.8-29.3 or earlier
|
||||
}
|
||||
|
||||
# Save innodb variables
|
||||
let $innodb_file_format_orig=`select @@innodb_file_format`;
|
||||
@ -601,6 +605,7 @@ DROP TABLE worklog5743;
|
||||
# Prefix index with utf8 charset + varchar.
|
||||
# For varchar we also log the column itself as oppose of TEXT so it error
|
||||
# with limit 1024 due to overhead.
|
||||
--replace_regex /> [0-9]*/> max_row_size/
|
||||
-- error 1118
|
||||
CREATE TABLE worklog5743 (col_1_varchar VARCHAR (4000) CHARACTER SET 'utf8',
|
||||
col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8' ,
|
||||
|
Reference in New Issue
Block a user