mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
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
10 changed files with 18 additions and 77 deletions
|
@ -1,4 +1,4 @@
|
|||
-- require r/have_partition.require
|
||||
disable_query_log;
|
||||
show variables like 'have_partitioning';
|
||||
enable_query_log;
|
||||
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'partition' AND PLUGIN_STATUS='ACTIVE'`)
|
||||
{
|
||||
--skip Test requires partitioning
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
ERROR HY000: The 'partitioning' feature is disabled; you need MariaDB built with '--with-plugin-partition' to have it working
|
||||
drop table t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
ERROR 42S02: Unknown table 'test.t1'
|
||||
CREATE TABLE t1 (
|
||||
firstname 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
|
||||
drop table t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
ERROR 42S02: Unknown table 'test.t1'
|
||||
CREATE TABLE t1 (id INT, purchased DATE)
|
||||
PARTITION BY RANGE( YEAR(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
|
||||
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);
|
||||
insert into t1 values (''),(' '),('a'),('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)
|
||||
# the statements are not expected to work, just check that we
|
||||
# can't crash the server
|
||||
-- require r/not_partition.require
|
||||
disable_query_log;
|
||||
show variables like "have_partitioning";
|
||||
enable_query_log;
|
||||
if (`SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'partition'`)
|
||||
{
|
||||
--skip Test requires no partitioning
|
||||
}
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
# Run this test only when mysqld has partitioning, but it is disabled.
|
||||
# The statements are not expected to work, just check that we
|
||||
# can't crash the server.
|
||||
--require r/disabled_partition.require
|
||||
--disable_query_log
|
||||
show variables like "have_partitioning";
|
||||
--enable_query_log
|
||||
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'partition' AND PLUGIN_STATUS='DISABLED'`)
|
||||
{
|
||||
--skip Test requires disabled partitioning
|
||||
}
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
#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... */
|
||||
my_error(ER_FEATURE_DISABLED, MYF(0), "partitioning",
|
||||
"--with-plugin-partition");
|
||||
|
|
Loading…
Reference in a new issue