mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
759ea82ee1
Fixed problem with char > 128 in QUOTE() function. (Bug #1868) Disable creation of symlinks if my_disable_symlink is set Fixed searching of TEXT with end space. (Bug #1651) Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711) Fixed problem with UNIX_TIMESTAMP() for timestamps close to 0. (Bug #1998) Fixed timestamp.test include/my_base.h: Add HA_END_SPACE_KEY to mark keys that has VARCHAR/TEXT fields. myisam/mi_check.c: Delete not used variable myisam/mi_key.c: Fix autoincrement for signed columns (Bug #1366). Patch by Holyfoot myisam/mi_open.c: Bug fix for future (doesn't affect current code) myisam/mi_search.c: Ignore end space for VARCHAR/TEXT columns mysql-test/r/auto_increment.result: Test auto_increment with signed numbers mysql-test/r/binary.result: Update results (old result was wrong) mysql-test/r/func_str.result: Added test of QUOTE() mysql-test/r/func_time.result: Add test of unix_timestamp() mysql-test/r/have_met_timezone.require: Fixed test mysql-test/r/innodb.result: Add test for InnoDB behaviour with TRUNCATE mysql-test/r/multi_update.result: Test of multi-update bug mysql-test/r/symlink.result: Test of ALTER TABLE and symlinks mysql-test/r/timezone.result: Test of from_unixtime() mysql-test/r/truncate.result: Test of truncate and auto_increment mysql-test/r/type_blob.result: Test of key search on TEXT/VARCHAR column with end space mysql-test/t/auto_increment.test: Test auto_increment with signed numbers mysql-test/t/func_str.test: Added test of QUOTE() mysql-test/t/func_time.test: Add test of unix_timestamp() mysql-test/t/innodb.test: Add test for InnoDB behaviour with TRUNCATE mysql-test/t/multi_update.test: Test of multi-update bug mysql-test/t/symlink.test: Test of ALTER TABLE and symlinks mysql-test/t/timezone.test: Test of from_unixtime() mysql-test/t/truncate.test: Test of truncate and auto_increment mysql-test/t/type_blob.test: Test of key search on TEXT/VARCHAR column with end space mysys/my_symlink2.c: Disable creation of symlinks if my_disable_symlink is set sql/field.h: Indentation cleanup sql/ha_innodb.cc: HA_PART_KEY -> HA_PART_KEY_SEG sql/item_strfunc.cc: Fixed problem with char > 128 in QUOTE() function. (Bug #1868) sql/mysql_priv.h: Make check_dup() external sql/opt_range.cc: Fixed searching of TEXT with end space. (Bug #1651) sql/records.cc: Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711) sql/sql_acl.cc: Reset ip and ip_mask if hostname is NULL sql/sql_parse.cc: Make check_dup() global sql/sql_select.cc: Fixed searching of TEXT with end space. (Bug #1651) sql/sql_table.cc: Fixed searching of TEXT with end space. (Bug #1651) sql/sql_update.cc: Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711) sql/table.cc: Fixed searching of TEXT with end space. (Bug #1651) sql/table.h: Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711) sql/time.cc: Fixed problem with UNIX_TIMESTAMP() for timestamps close to 0. (Bug #1998)
114 lines
3.6 KiB
Text
114 lines
3.6 KiB
Text
-- require r/have_symlink.require
|
|
disable_query_log;
|
|
show variables like "have_symlink";
|
|
enable_query_log;
|
|
|
|
drop table if exists t1,t2,t7,t8,t9;
|
|
drop database if exists mysqltest;
|
|
|
|
#
|
|
# First create little data to play with
|
|
#
|
|
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a));
|
|
create table t2 (a int not null auto_increment, b char(16) not null, primary key (a));
|
|
insert into t1 (b) values ("test"),("test1"),("test2"),("test3");
|
|
insert into t2 (b) select b from t1;
|
|
insert into t1 (b) select b from t2;
|
|
insert into t2 (b) select b from t1;
|
|
insert into t1 (b) select b from t2;
|
|
insert into t2 (b) select b from t1;
|
|
insert into t1 (b) select b from t2;
|
|
insert into t2 (b) select b from t1;
|
|
insert into t1 (b) select b from t2;
|
|
insert into t2 (b) select b from t1;
|
|
insert into t1 (b) select b from t2;
|
|
insert into t2 (b) select b from t1;
|
|
insert into t1 (b) select b from t2;
|
|
insert into t2 (b) select b from t1;
|
|
insert into t1 (b) select b from t2;
|
|
insert into t2 (b) select b from t1;
|
|
insert into t1 (b) select b from t2;
|
|
insert into t2 (b) select b from t1;
|
|
insert into t1 (b) select b from t2;
|
|
drop table t2;
|
|
|
|
#
|
|
# Start the test
|
|
# We use t9 here to not crash with tables generated by the backup test
|
|
#
|
|
|
|
disable_query_log;
|
|
eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="$MYSQL_TEST_DIR/var/tmp" index directory="$MYSQL_TEST_DIR/var/run";
|
|
enable_query_log;
|
|
|
|
insert into t9 select * from t1;
|
|
check table t9;
|
|
optimize table t9;
|
|
repair table t9;
|
|
alter table t9 add column c int not null;
|
|
--replace_result $MYSQL_TEST_DIR TEST_DIR
|
|
show create table t9;
|
|
|
|
# Test renames
|
|
alter table t9 rename t8, add column d int not null;
|
|
alter table t8 rename t7;
|
|
rename table t7 to t9;
|
|
# Drop old t1 table, keep t9
|
|
drop table t1;
|
|
|
|
#
|
|
# Test error handling
|
|
# Note that we are using the above table t9 here!
|
|
#
|
|
|
|
disable_query_log;
|
|
--error 1103,1103
|
|
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="tmp";
|
|
|
|
# Check that we cannot link over a table from another database.
|
|
|
|
create database mysqltest;
|
|
|
|
--error 1,1
|
|
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="/this-dir-does-not-exist";
|
|
|
|
--error 1103,1103
|
|
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="not-hard-path";
|
|
|
|
--error 1,1
|
|
eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam index directory="$MYSQL_TEST_DIR/var/run";
|
|
|
|
--error 1,1
|
|
eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) type=myisam data directory="$MYSQL_TEST_DIR/var/tmp";
|
|
enable_query_log;
|
|
|
|
# Check moving table t9 from default database to mysqltest;
|
|
# In this case the symlinks should be removed.
|
|
|
|
alter table t9 rename mysqltest.t9;
|
|
select count(*) from mysqltest.t9;
|
|
--replace_result $MYSQL_TEST_DIR TEST_DIR
|
|
show create table mysqltest.t9;
|
|
drop database mysqltest;
|
|
|
|
#
|
|
# Test changing data dir (Bug #1662)
|
|
#
|
|
|
|
create table t1 (a int not null) type=myisam;
|
|
disable_query_log;
|
|
eval alter table t1 data directory="$MYSQL_TEST_DIR/var/tmp";
|
|
enable_query_log;
|
|
--replace_result $MYSQL_TEST_DIR TEST_DIR
|
|
show create table t1;
|
|
alter table t1 add b int;
|
|
disable_query_log;
|
|
eval alter table t1 data directory="$MYSQL_TEST_DIR/var/log";
|
|
enable_query_log;
|
|
--replace_result $MYSQL_TEST_DIR TEST_DIR
|
|
show create table t1;
|
|
disable_query_log;
|
|
eval alter table t1 index directory="$MYSQL_TEST_DIR/var/log";
|
|
enable_query_log;
|
|
show create table t1;
|
|
drop table t1;
|