mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
d13c54351d
Don't use static link by default (in compile-pentium) as some new systems doesn't have all static libraries available Change type for functions in plugin.h:str_mysql_ftparser_param() to const unsigned char and string lengths to size_t. One effect of the above change is that one needs to include mysql_global.h or define size_t before including plugin.h This fixes a case where mysql_client_test failed with newer gcc that enables strict-aliasing by default BUILD/compile-pentium: Don't use static link by default as some new systems doesn't have all static libraries available client/mysql_upgrade.c: Remove not used variable cmd-line-utils/readline/config_readline.h: Define some constants to get rid of compiler warnings on Linux cmd-line-utils/readline/display.c: Get rid of compiler warnings cmd-line-utils/readline/history.c: Got rid of compiler warnings: - Defining some strings as const - Added cast cmd-line-utils/readline/rlmbutil.h: Added cast to get rid of compiler warnings cmd-line-utils/readline/text.c: Remove not needed initialization to get rid of compiler warnings cmd-line-utils/readline/xmalloc.c: Changed types to 'const char* to get rid of compiler warnings configure.in: Ensure that we use MariaDB as suffix include/mysql/plugin.h: Changed types to 'const unsigned char* to get rid of compiler warnings (in other parts of the code) Change length for not \0 terminated string to size_t include/mysql/plugin.h.pp: Update related to plugin.h libmysql/libmysql.c: Fixed bug that caused core dump with newer gcc when strict aliasing is not turned off mysql-test/t/information_schema.test: Test is depending on innodb mysql-test/t/not_partition.test: Fixed wrong directory name (Not noticed before as we don't ususally run this test) mysys/lf_hash.c: Got rid of compiler warnings from -Wstrict-aliasing mysys/my_redel.c: Removed not used variable regex/engine.c: Changed types to 'const char* to get rid of compiler warnings regex/engine.ih: Changed types to 'const char* to get rid of compiler warnings sql/sp_head.cc: Got rid of compiler warning from -Wstrict-aliasing sql/sql_base.cc: Got rid of compiler warnings from -Wstrict-aliasing (The original code was probably wrong as nj_col->table_field was sql/sql_builtin.cc.in: plugin.h needs to have size_t defined sql/sql_parse.cc: Remove used variable sql/sql_select.cc: Got rid of compiler warnings from -Wstrict-aliasing sql/sql_show.cc: Added #ifdef to get rid of compiler warning when not using partition engine sql/table.cc: Got rid of compiler warning from -Wstrict-aliasing storage/maria/ha_maria.cc: Got rid of compiler warnings from -Wstrict-aliasing: - Use the thd_killed() API function storage/maria/lockman.c: Got rid of compiler warnings from -Wstrict-aliasing storage/maria/ma_check.c: Got rid of compiler warnings from -Wstrict-aliasing Change to use new version of _ma_killed_ptr; Don't call it as often as before storage/maria/ma_check_standalone.h: Update to compatible _ma_killed_ptr() from ha_maria.cc storage/maria/ma_ft_boolean_search.c: Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts) storage/maria/ma_ft_nlq_search.c: Got rid of compiler warnings from -Wstrict-aliasing Ensure that 'subkeys' is 32 bit storage/maria/ma_ft_parser.c: Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts) storage/maria/ma_ftdefs.h: Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts) storage/maria/ma_sort.c: Change to use new version of _ma_killed_ptr; Don't call it as often as before storage/maria/ma_state.c: Got rid of compiler warnings from -Wstrict-aliasing storage/maria/maria_def.h: Redefine ma_killed_ptr() storage/maria/maria_ftdump.c: Got rid of compiler warnings from -Wstrict-aliasing storage/maria/trnman.c: Got rid of compiler warnings from -Wstrict-aliasing storage/myisam/ft_boolean_search.c: Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts) storage/myisam/ft_nlq_search.c: Got rid of compiler warnings from -Wstrict-aliasing storage/myisam/ft_parser.c: Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts) storage/myisam/ft_stopwords.c: Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts) storage/myisam/ftdefs.h: Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts) storage/myisam/ha_myisam.cc: Got rid of compiler warnings from -Wstrict-aliasing: - Use the thd_killed() API function storage/myisam/mi_check.c: Use new killed_ptr() function storage/myisam/myisam_ftdump.c: Got rid of compiler warnings from -Wstrict-aliasing storage/myisam/myisamchk.c: Update to compatible killed_ptr() from ha_myisam.cc storage/myisam/myisamdef.h: Redefine killed_ptr() storage/myisam/myisamlog.c: Got rid of compiler warnings from -Wstrict-aliasing storage/myisam/sort.c: Change to use new version of killed_ptr; Don't call it as often as before storage/xtradb/fil/fil0fil.c: Fixedc ompiler warning storage/xtradb/trx/trx0i_s.c: Include mysql_plugin.h later to ensure that size_t is defined
85 lines
2.4 KiB
Text
85 lines
2.4 KiB
Text
--disable_abort_on_error
|
|
# Run this test only when mysqld don't has 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;
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
--enable_warnings
|
|
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
|
|
|
#
|
|
# Bug#39893: Crash if select on a partitioned table,
|
|
# when partitioning is disabled
|
|
FLUSH TABLES;
|
|
--copy_file $MYSQLTEST_VARDIR/std_data/parts/t1.frm $MYSQLD_DATADIR/test/t1.frm
|
|
SELECT * FROM t1;
|
|
TRUNCATE TABLE t1;
|
|
ANALYZE TABLE t1;
|
|
CHECK TABLE t1;
|
|
OPTIMIZE TABLE t1;
|
|
REPAIR TABLE t1;
|
|
ALTER TABLE t1 REPAIR PARTITION ALL;
|
|
ALTER TABLE t1 CHECK PARTITION ALL;
|
|
ALTER TABLE t1 OPTIMIZE PARTITION ALL;
|
|
ALTER TABLE t1 ANALYZE PARTITION ALL;
|
|
ALTER TABLE t1 REBUILD PARTITION ALL;
|
|
ALTER TABLE t1 ENGINE Memory;
|
|
ALTER TABLE t1 ADD (new INT);
|
|
DROP TABLE t1;
|
|
|
|
--error ER_FEATURE_DISABLED
|
|
CREATE TABLE t1 (
|
|
firstname VARCHAR(25) NOT NULL,
|
|
lastname VARCHAR(25) NOT NULL,
|
|
username VARCHAR(16) NOT NULL,
|
|
email VARCHAR(35),
|
|
joined DATE NOT NULL
|
|
)
|
|
PARTITION BY KEY(joined)
|
|
PARTITIONS 6;
|
|
|
|
--error ER_FEATURE_DISABLED
|
|
ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
|
|
|
|
--error ER_BAD_TABLE_ERROR
|
|
drop table t1;
|
|
|
|
--error ER_FEATURE_DISABLED
|
|
CREATE TABLE t1 (
|
|
firstname VARCHAR(25) NOT NULL,
|
|
lastname VARCHAR(25) NOT NULL,
|
|
username VARCHAR(16) NOT NULL,
|
|
email VARCHAR(35),
|
|
joined DATE NOT NULL
|
|
)
|
|
PARTITION BY RANGE( YEAR(joined) ) (
|
|
PARTITION p0 VALUES LESS THAN (1960),
|
|
PARTITION p1 VALUES LESS THAN (1970),
|
|
PARTITION p2 VALUES LESS THAN (1980),
|
|
PARTITION p3 VALUES LESS THAN (1990),
|
|
PARTITION p4 VALUES LESS THAN MAXVALUE
|
|
);
|
|
--error ER_BAD_TABLE_ERROR
|
|
drop table t1;
|
|
|
|
--error ER_FEATURE_DISABLED
|
|
CREATE TABLE t1 (id INT, purchased DATE)
|
|
PARTITION BY RANGE( YEAR(purchased) )
|
|
SUBPARTITION BY HASH( TO_DAYS(purchased) )
|
|
SUBPARTITIONS 2 (
|
|
PARTITION p0 VALUES LESS THAN (1990),
|
|
PARTITION p1 VALUES LESS THAN (2000),
|
|
PARTITION p2 VALUES LESS THAN MAXVALUE
|
|
);
|
|
--error ER_BAD_TABLE_ERROR
|
|
drop table t1;
|
|
|
|
# Create a table without partitions to test "EXPLAIN PARTITIONS"
|
|
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';
|
|
drop table t1;
|