fix tests that were relying on @@have_partitioning
sql/sql_partition_admin.cc: compilation failures w/o partitioning
This commit is contained in:
parent
18fc51f5a4
commit
3462b6d3d2
@ -1,4 +1,4 @@
|
|||||||
-- require r/have_partition.require
|
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'partition' AND PLUGIN_STATUS='ACTIVE'`)
|
||||||
disable_query_log;
|
{
|
||||||
show variables like 'have_partitioning';
|
--skip Test requires partitioning
|
||||||
enable_query_log;
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
--enable-partition
|
--loose-enable-partition
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
Variable_name Value
|
|
||||||
have_partitioning DISABLED
|
|
@ -1,2 +0,0 @@
|
|||||||
Variable_name Value
|
|
||||||
have_partitioning YES
|
|
@ -1,2 +0,0 @@
|
|||||||
Variable_name Value
|
|
||||||
have_partitioning NO
|
|
@ -50,7 +50,7 @@ ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with
|
|||||||
ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
|
ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
|
||||||
ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working
|
ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working
|
||||||
drop table t1;
|
drop table t1;
|
||||||
ERROR 42S02: Unknown table 't1'
|
ERROR 42S02: Unknown table 'test.t1'
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
firstname VARCHAR(25) NOT NULL,
|
firstname VARCHAR(25) NOT NULL,
|
||||||
lastname VARCHAR(25) NOT NULL,
|
lastname VARCHAR(25) NOT NULL,
|
||||||
@ -67,7 +67,7 @@ PARTITION p4 VALUES LESS THAN MAXVALUE
|
|||||||
);
|
);
|
||||||
ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working
|
ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working
|
||||||
drop table t1;
|
drop table t1;
|
||||||
ERROR 42S02: Unknown table 't1'
|
ERROR 42S02: Unknown table 'test.t1'
|
||||||
CREATE TABLE t1 (id INT, purchased DATE)
|
CREATE TABLE t1 (id INT, purchased DATE)
|
||||||
PARTITION BY RANGE( YEAR(purchased) )
|
PARTITION BY RANGE( YEAR(purchased) )
|
||||||
SUBPARTITION BY HASH( TO_DAYS(purchased) )
|
SUBPARTITION BY HASH( TO_DAYS(purchased) )
|
||||||
@ -78,7 +78,7 @@ PARTITION p2 VALUES LESS THAN MAXVALUE
|
|||||||
);
|
);
|
||||||
ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working
|
ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working
|
||||||
drop table t1;
|
drop table t1;
|
||||||
ERROR 42S02: Unknown table 't1'
|
ERROR 42S02: Unknown table 'test.t1'
|
||||||
create table t1 (a varchar(10) charset latin1 collate latin1_bin);
|
create table t1 (a varchar(10) charset latin1 collate latin1_bin);
|
||||||
insert into t1 values (''),(' '),('a'),('a '),('a ');
|
insert into t1 values (''),(' '),('a'),('a '),('a ');
|
||||||
explain partitions select * from t1 where a='a ' OR a='a';
|
explain partitions select * from t1 where a='a ' OR a='a';
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
'#---------------------BS_STVARS_014_01----------------------#'
|
|
||||||
SELECT COUNT(@@GLOBAL.have_partitioning);
|
|
||||||
COUNT(@@GLOBAL.have_partitioning)
|
|
||||||
1
|
|
||||||
1 Expected
|
|
||||||
'#---------------------BS_STVARS_014_02----------------------#'
|
|
||||||
SET @@GLOBAL.have_partitioning=1;
|
|
||||||
ERROR HY000: Variable 'have_partitioning' is a read only variable
|
|
||||||
Expected error 'Read only variable'
|
|
||||||
SELECT COUNT(@@GLOBAL.have_partitioning);
|
|
||||||
COUNT(@@GLOBAL.have_partitioning)
|
|
||||||
1
|
|
||||||
1 Expected
|
|
||||||
'#---------------------BS_STVARS_014_03----------------------#'
|
|
||||||
SELECT @@GLOBAL.have_partitioning = VARIABLE_VALUE
|
|
||||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
|
||||||
WHERE VARIABLE_NAME='have_partitioning';
|
|
||||||
@@GLOBAL.have_partitioning = VARIABLE_VALUE
|
|
||||||
1
|
|
||||||
1 Expected
|
|
||||||
SELECT COUNT(@@GLOBAL.have_partitioning);
|
|
||||||
COUNT(@@GLOBAL.have_partitioning)
|
|
||||||
1
|
|
||||||
1 Expected
|
|
||||||
SELECT COUNT(VARIABLE_VALUE)
|
|
||||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
|
||||||
WHERE VARIABLE_NAME='have_partitioning';
|
|
||||||
COUNT(VARIABLE_VALUE)
|
|
||||||
1
|
|
||||||
1 Expected
|
|
||||||
'#---------------------BS_STVARS_014_04----------------------#'
|
|
||||||
SELECT @@have_partitioning = @@GLOBAL.have_partitioning;
|
|
||||||
@@have_partitioning = @@GLOBAL.have_partitioning
|
|
||||||
1
|
|
||||||
1 Expected
|
|
||||||
'#---------------------BS_STVARS_014_05----------------------#'
|
|
||||||
SELECT COUNT(@@have_partitioning);
|
|
||||||
COUNT(@@have_partitioning)
|
|
||||||
1
|
|
||||||
1 Expected
|
|
||||||
SELECT COUNT(@@local.have_partitioning);
|
|
||||||
ERROR HY000: Variable 'have_partitioning' is a GLOBAL variable
|
|
||||||
Expected error 'Variable is a GLOBAL variable'
|
|
||||||
SELECT COUNT(@@SESSION.have_partitioning);
|
|
||||||
ERROR HY000: Variable 'have_partitioning' is a GLOBAL variable
|
|
||||||
Expected error 'Variable is a GLOBAL variable'
|
|
||||||
SELECT COUNT(@@GLOBAL.have_partitioning);
|
|
||||||
COUNT(@@GLOBAL.have_partitioning)
|
|
||||||
1
|
|
||||||
1 Expected
|
|
||||||
SELECT have_partitioning = @@SESSION.have_partitioning;
|
|
||||||
ERROR 42S22: Unknown column 'have_partitioning' in 'field list'
|
|
||||||
Expected error 'Readonly variable'
|
|
@ -2,10 +2,10 @@
|
|||||||
# Run this test only when mysqld doesn't have partitioning (not compiled with)
|
# Run this test only when mysqld doesn't have partitioning (not compiled with)
|
||||||
# the statements are not expected to work, just check that we
|
# the statements are not expected to work, just check that we
|
||||||
# can't crash the server
|
# can't crash the server
|
||||||
-- require r/not_partition.require
|
if (`SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'partition'`)
|
||||||
disable_query_log;
|
{
|
||||||
show variables like "have_partitioning";
|
--skip Test requires no partitioning
|
||||||
enable_query_log;
|
}
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# Run this test only when mysqld has partitioning, but it is disabled.
|
# Run this test only when mysqld has partitioning, but it is disabled.
|
||||||
# The statements are not expected to work, just check that we
|
# The statements are not expected to work, just check that we
|
||||||
# can't crash the server.
|
# can't crash the server.
|
||||||
--require r/disabled_partition.require
|
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'partition' AND PLUGIN_STATUS='DISABLED'`)
|
||||||
--disable_query_log
|
{
|
||||||
show variables like "have_partitioning";
|
--skip Test requires disabled partitioning
|
||||||
--enable_query_log
|
}
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
|
|
||||||
#ifndef WITH_PARTITION_STORAGE_ENGINE
|
#ifndef WITH_PARTITION_STORAGE_ENGINE
|
||||||
|
|
||||||
bool Partition_statement_unsupported::execute(THD *)
|
bool Sql_cmd_partition_unsupported::execute(THD *)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Partition_statement_unsupported::execute");
|
DBUG_ENTER("Sql_cmd_partition_unsupported::execute");
|
||||||
/* error, partitioning support not compiled in... */
|
/* error, partitioning support not compiled in... */
|
||||||
my_error(ER_FEATURE_DISABLED, MYF(0), "partitioning",
|
my_error(ER_FEATURE_DISABLED, MYF(0), "partitioning",
|
||||||
"--with-plugin-partition");
|
"--with-plugin-partition");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user