mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed issues with partitions and create temporary table SELECT ...
Merged all ddl_logging code. Merged sql_partition.cc innodb_mysql_lock2.test and partition_cache.test now works. Changed interface to strconvert() to make it easier to use with not \0 terminated strings. sql/sql_partition.cc: Full merge with 5.6 sql/sql_table.cc: Merged all ddl_logging code sql/strfunc.cc: Added from_length argument to strconvert() to make it possible to use without end terminated strings. sql/strfunc.h: Added from_length argument to strconvert() to make it possible to use without end terminated strings.
This commit is contained in:
@ -76,18 +76,18 @@ t1.par
|
||||
SET innodb_strict_mode = OFF;
|
||||
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
|
||||
Warnings:
|
||||
Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
t1.frm
|
||||
t1.par
|
||||
ALTER TABLE t1 REBUILD PARTITION p0;
|
||||
Warnings:
|
||||
Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
UNLOCK TABLES;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
|
@ -1,5 +1,25 @@
|
||||
drop table if exists t1,t2;
|
||||
drop view if exists v1;
|
||||
#
|
||||
# test basic creation of temporary tables together with normal table
|
||||
#
|
||||
create table t1 (a int);
|
||||
create temporary table t1 AS SELECT 1;
|
||||
create temporary table t1 AS SELECT 1;
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
create temporary table t1 (a int);
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
drop temporary table t1;
|
||||
drop table t1;
|
||||
create temporary table t1 AS SELECT 1;
|
||||
create temporary table t1 AS SELECT 1;
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
create temporary table t1 (a int);
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
drop temporary table t1;
|
||||
#
|
||||
# Test with rename
|
||||
#
|
||||
CREATE TABLE t1 (c int not null, d char (10) not null);
|
||||
insert into t1 values(1,""),(2,"a"),(3,"b");
|
||||
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
|
||||
@ -145,7 +165,7 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (i INT);
|
||||
CREATE TEMPORARY TABLE t2 (i INT);
|
||||
DROP TEMPORARY TABLE t2, t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
ERROR 42S02: Unknown table 'test.t1'
|
||||
SELECT * FROM t2;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
SELECT * FROM t1;
|
||||
|
@ -1,5 +1,6 @@
|
||||
# mysqltest should be fixed
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# Test of temporary tables
|
||||
#
|
||||
@ -9,6 +10,30 @@ drop table if exists t1,t2;
|
||||
drop view if exists v1;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo # test basic creation of temporary tables together with normal table
|
||||
--echo #
|
||||
|
||||
create table t1 (a int);
|
||||
create temporary table t1 AS SELECT 1;
|
||||
--error 1050
|
||||
create temporary table t1 AS SELECT 1;
|
||||
--error 1050
|
||||
create temporary table t1 (a int);
|
||||
drop temporary table t1;
|
||||
drop table t1;
|
||||
|
||||
create temporary table t1 AS SELECT 1;
|
||||
--error 1050
|
||||
create temporary table t1 AS SELECT 1;
|
||||
--error 1050
|
||||
create temporary table t1 (a int);
|
||||
drop temporary table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Test with rename
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (c int not null, d char (10) not null);
|
||||
insert into t1 values(1,""),(2,"a"),(3,"b");
|
||||
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
|
||||
|
Reference in New Issue
Block a user