mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '5.5' into 10.0
This commit is contained in:
@ -650,50 +650,59 @@ sub run_test_server ($$$) {
|
|||||||
my $worker_savename= basename($worker_savedir);
|
my $worker_savename= basename($worker_savedir);
|
||||||
my $savedir= "$opt_vardir/log/$worker_savename";
|
my $savedir= "$opt_vardir/log/$worker_savename";
|
||||||
|
|
||||||
|
# Move any core files from e.g. mysqltest
|
||||||
|
foreach my $coref (glob("core*"), glob("*.dmp"))
|
||||||
|
{
|
||||||
|
mtr_report(" - found '$coref', moving it to '$worker_savedir'");
|
||||||
|
move($coref, $worker_savedir);
|
||||||
|
}
|
||||||
|
|
||||||
|
find(
|
||||||
|
{
|
||||||
|
no_chdir => 1,
|
||||||
|
wanted => sub
|
||||||
|
{
|
||||||
|
my $core_file= $File::Find::name;
|
||||||
|
my $core_name= basename($core_file);
|
||||||
|
|
||||||
|
# Name beginning with core, not ending in .gz
|
||||||
|
if (($core_name =~ /^core/ and $core_name !~ /\.gz$/)
|
||||||
|
or (IS_WINDOWS and $core_name =~ /\.dmp$/))
|
||||||
|
{
|
||||||
|
# Ending with .dmp
|
||||||
|
mtr_report(" - found '$core_name'",
|
||||||
|
"($num_saved_cores/$opt_max_save_core)");
|
||||||
|
|
||||||
|
My::CoreDump->show($core_file, $exe_mysqld, $opt_parallel);
|
||||||
|
|
||||||
|
# Limit number of core files saved
|
||||||
|
if ($opt_max_save_core > 0 &&
|
||||||
|
$num_saved_cores >= $opt_max_save_core)
|
||||||
|
{
|
||||||
|
mtr_report(" - deleting it, already saved",
|
||||||
|
"$opt_max_save_core");
|
||||||
|
unlink("$core_file");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mtr_compress_file($core_file) unless @opt_cases;
|
||||||
|
++$num_saved_cores;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
$worker_savedir);
|
||||||
|
|
||||||
if ($opt_max_save_datadir > 0 &&
|
if ($opt_max_save_datadir > 0 &&
|
||||||
$num_saved_datadir >= $opt_max_save_datadir)
|
$num_saved_datadir >= $opt_max_save_datadir)
|
||||||
{
|
{
|
||||||
mtr_report(" - skipping '$worker_savedir/'");
|
mtr_report(" - skipping '$worker_savedir/'");
|
||||||
rmtree($worker_savedir);
|
rmtree($worker_savedir);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
mtr_report(" - saving '$worker_savedir/' to '$savedir/'");
|
mtr_report(" - saving '$worker_savedir/' to '$savedir/'");
|
||||||
rename($worker_savedir, $savedir);
|
rename($worker_savedir, $savedir);
|
||||||
# Move any core files from e.g. mysqltest
|
|
||||||
foreach my $coref (glob("core*"), glob("*.dmp"))
|
|
||||||
{
|
|
||||||
mtr_report(" - found '$coref', moving it to '$savedir'");
|
|
||||||
move($coref, $savedir);
|
|
||||||
}
|
|
||||||
if ($opt_max_save_core > 0) {
|
|
||||||
# Limit number of core files saved
|
|
||||||
find({ no_chdir => 1,
|
|
||||||
wanted => sub {
|
|
||||||
my $core_file= $File::Find::name;
|
|
||||||
my $core_name= basename($core_file);
|
|
||||||
|
|
||||||
# Name beginning with core, not ending in .gz
|
|
||||||
if (($core_name =~ /^core/ and $core_name !~ /\.gz$/)
|
|
||||||
or (IS_WINDOWS and $core_name =~ /\.dmp$/)){
|
|
||||||
# Ending with .dmp
|
|
||||||
mtr_report(" - found '$core_name'",
|
|
||||||
"($num_saved_cores/$opt_max_save_core)");
|
|
||||||
|
|
||||||
My::CoreDump->show($core_file, $exe_mysqld, $opt_parallel);
|
|
||||||
|
|
||||||
if ($num_saved_cores >= $opt_max_save_core) {
|
|
||||||
mtr_report(" - deleting it, already saved",
|
|
||||||
"$opt_max_save_core");
|
|
||||||
unlink("$core_file");
|
|
||||||
} else {
|
|
||||||
mtr_compress_file($core_file) unless @opt_cases;
|
|
||||||
}
|
|
||||||
++$num_saved_cores;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
$savedir);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
resfile_print_test();
|
resfile_print_test();
|
||||||
$num_saved_datadir++;
|
$num_saved_datadir++;
|
||||||
|
@ -1636,11 +1636,6 @@ drop user mysqluser11@localhost;
|
|||||||
drop database mysqltest1;
|
drop database mysqltest1;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
set names utf8;
|
set names utf8;
|
||||||
grant select on test.* to юзер_юзер@localhost;
|
|
||||||
user()
|
|
||||||
юзер_юзер@localhost
|
|
||||||
revoke all on test.* from юзер_юзер@localhost;
|
|
||||||
drop user юзер_юзер@localhost;
|
|
||||||
grant select on test.* to очень_длинный_юзер890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890@localhost;
|
grant select on test.* to очень_длинный_юзер890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890@localhost;
|
||||||
ERROR HY000: String 'очень_длинный_юзер890123456789012345678901234567890123' is too long for user name (should be no longer than 80)
|
ERROR HY000: String 'очень_длинный_юзер890123456789012345678901234567890123' is too long for user name (should be no longer than 80)
|
||||||
set names default;
|
set names default;
|
||||||
|
7
mysql-test/r/grant_not_windows.result
Normal file
7
mysql-test/r/grant_not_windows.result
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
set names utf8;
|
||||||
|
grant select on test.* to юзер_юзер@localhost;
|
||||||
|
user()
|
||||||
|
юзер_юзер@localhost
|
||||||
|
revoke all on test.* from юзер_юзер@localhost;
|
||||||
|
drop user юзер_юзер@localhost;
|
||||||
|
set names default;
|
@ -854,3 +854,12 @@ INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
|
|||||||
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
|
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
create table t1 (i int);
|
||||||
|
create table t2 as select values(i) as a from t1;
|
||||||
|
show create table t2;
|
||||||
|
Table Create Table
|
||||||
|
t2 CREATE TABLE `t2` (
|
||||||
|
`a` binary(0) DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
drop table t1, t2;
|
||||||
|
End of 5.5 tests
|
||||||
|
@ -16,9 +16,3 @@ tmp CREATE TABLE `tmp` (
|
|||||||
`NULL` binary(0) DEFAULT NULL
|
`NULL` binary(0) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
DROP TABLE tmp;
|
DROP TABLE tmp;
|
||||||
CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 VALUES ('foo'),('bar');
|
|
||||||
FLUSH TABLES;
|
|
||||||
CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT VALUES(a) FROM t1;
|
|
||||||
ERROR HY000: Can't create table `test`.`tmp` (errno: -1 "Internal error < 0 (Not system error)")
|
|
||||||
DROP TABLE t1;
|
|
||||||
|
@ -16,13 +16,3 @@ CREATE TABLE tmp ENGINE = INNODB
|
|||||||
AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
|
AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
|
||||||
SHOW CREATE TABLE tmp;
|
SHOW CREATE TABLE tmp;
|
||||||
DROP TABLE tmp;
|
DROP TABLE tmp;
|
||||||
|
|
||||||
# These 'create table' operations should fail because of
|
|
||||||
# using NULL datatype
|
|
||||||
|
|
||||||
CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 VALUES ('foo'),('bar');
|
|
||||||
FLUSH TABLES;
|
|
||||||
--error 1005
|
|
||||||
CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT VALUES(a) FROM t1;
|
|
||||||
DROP TABLE t1;
|
|
||||||
|
@ -1566,15 +1566,7 @@ drop database mysqltest1;
|
|||||||
|
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
|
||||||
#
|
|
||||||
# Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
|
|
||||||
#
|
|
||||||
set names utf8;
|
set names utf8;
|
||||||
grant select on test.* to юзер_юзер@localhost;
|
|
||||||
--exec $MYSQL --default-character-set=utf8 --user=юзер_юзер -e "select user()"
|
|
||||||
revoke all on test.* from юзер_юзер@localhost;
|
|
||||||
drop user юзер_юзер@localhost;
|
|
||||||
--error ER_WRONG_STRING_LENGTH
|
--error ER_WRONG_STRING_LENGTH
|
||||||
grant select on test.* to очень_длинный_юзер890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890@localhost;
|
grant select on test.* to очень_длинный_юзер890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890@localhost;
|
||||||
set names default;
|
set names default;
|
||||||
|
13
mysql-test/t/grant_not_windows.test
Normal file
13
mysql-test/t/grant_not_windows.test
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# UTF8 parameters to mysql client do not work on Windows
|
||||||
|
--source include/not_windows.inc
|
||||||
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
|
||||||
|
#
|
||||||
|
set names utf8;
|
||||||
|
grant select on test.* to юзер_юзер@localhost;
|
||||||
|
--exec $MYSQL --default-character-set=utf8 --user=юзер_юзер -e "select user()"
|
||||||
|
revoke all on test.* from юзер_юзер@localhost;
|
||||||
|
drop user юзер_юзер@localhost;
|
||||||
|
set names default;
|
@ -423,3 +423,13 @@ SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-15318 CREATE .. SELECT VALUES produces invalid table structure
|
||||||
|
#
|
||||||
|
create table t1 (i int);
|
||||||
|
create table t2 as select values(i) as a from t1;
|
||||||
|
show create table t2;
|
||||||
|
drop table t1, t2;
|
||||||
|
|
||||||
|
--echo End of 5.5 tests
|
||||||
|
@ -51,14 +51,22 @@ drop table t1;
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Bug#17939 Wrong table format when using UTF8 strings
|
# Bug#17939 Wrong table format when using UTF8 strings
|
||||||
#
|
write_file $MYSQL_TMP_DIR/mysql_in;
|
||||||
--exec $MYSQL --default-character-set=utf8 --table -e "SELECT 'John Doe' as '__tañgè Ñãmé'" 2>&1
|
SELECT 'John Doe' as '__tañgè Ñãmé';
|
||||||
--exec $MYSQL --default-character-set=utf8 --table -e "SELECT '__tañgè Ñãmé' as 'John Doe'" 2>&1
|
SELECT '__tañgè Ñãmé' as 'John Doe';
|
||||||
|
EOF
|
||||||
|
--exec $MYSQL --default-character-set=utf8 --table < $MYSQL_TMP_DIR/mysql_in 2>&1
|
||||||
|
remove_file $MYSQL_TMP_DIR/mysql_in;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#18265 -- mysql client: No longer right-justifies numeric columns
|
# Bug#18265 -- mysql client: No longer right-justifies numeric columns
|
||||||
#
|
#
|
||||||
--exec $MYSQL -t --default-character-set utf8 test -e "create table t1 (i int, j int, k char(25) charset utf8); insert into t1 (i) values (1); insert into t1 (k) values ('<----------------------->'); insert into t1 (k) values ('<-----'); insert into t1 (k) values ('Τη γλώσσα'); insert into t1 (k) values ('ᛖᚴ ᚷᛖᛏ'); select * from t1; DROP TABLE t1;"
|
write_file $MYSQL_TMP_DIR/mysql_in;
|
||||||
|
create table t1 (i int, j int, k char(25) charset utf8); insert into t1 (i) values (1); insert into t1 (k) values ('<----------------------->'); insert into t1 (k) values ('<-----'); insert into t1 (k) values ('Τη γλώσσα'); insert into t1 (k) values ('ᛖᚴ ᚷᛖᛏ'); select * from t1; DROP TABLE t1;
|
||||||
|
EOF
|
||||||
|
--exec $MYSQL -t --default-character-set utf8 test < $MYSQL_TMP_DIR/mysql_in
|
||||||
|
remove_file $MYSQL_TMP_DIR/mysql_in;
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# "DESCRIBE" commands may return strange NULLness flags.
|
# "DESCRIBE" commands may return strange NULLness flags.
|
||||||
|
@ -10,13 +10,43 @@
|
|||||||
# BUG#16217 - MySQL client misinterprets multi-byte char as escape `\'
|
# BUG#16217 - MySQL client misinterprets multi-byte char as escape `\'
|
||||||
#
|
#
|
||||||
|
|
||||||
|
let $mysql_in= $MYSQL_TMP_DIR/mysql_in;
|
||||||
|
|
||||||
# new command \C or charset
|
# new command \C or charset
|
||||||
--exec $MYSQL --default-character-set=utf8 test -e "\C cp932 \g"
|
write_file $mysql_in;
|
||||||
--exec $MYSQL --default-character-set=cp932 test -e "charset utf8;"
|
\C cp932 \g
|
||||||
|
EOF
|
||||||
|
--exec $MYSQL --default-character-set=utf8 test < $mysql_in
|
||||||
|
remove_file $mysql_in;
|
||||||
|
|
||||||
|
write_file $mysql_in;
|
||||||
|
charset utf8;
|
||||||
|
EOF
|
||||||
|
--exec $MYSQL --default-character-set=cp932 test < $mysql_in
|
||||||
|
remove_file $mysql_in;
|
||||||
|
|
||||||
# its usage to switch internally in mysql to requested charset
|
# its usage to switch internally in mysql to requested charset
|
||||||
--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '<27>\'; create table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('<27>\'); select * from t1; drop table t1;"
|
write_file $mysql_in;
|
||||||
--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '<27>\'"
|
charset cp932; select '<27>\'; create table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('<27>\'); select * from t1; drop table t1;
|
||||||
--exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set character_set_client= cp932; select '<27>\'"
|
EOF
|
||||||
--exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set character_set_client= cp932; select '<27>\'"
|
--exec $MYSQL --default-character-set=utf8 test < $mysql_in
|
||||||
|
remove_file $mysql_in;
|
||||||
|
|
||||||
|
write_file $mysql_in;
|
||||||
|
charset cp932; select '<27>\'
|
||||||
|
EOF
|
||||||
|
--exec $MYSQL --default-character-set=utf8 test < $mysql_in
|
||||||
|
remove_file $mysql_in;
|
||||||
|
|
||||||
|
write_file $mysql_in;
|
||||||
|
/*charset cp932 */; set character_set_client= cp932; select '<27>\'
|
||||||
|
EOF
|
||||||
|
--exec $MYSQL --default-character-set=utf8 test < $mysql_in
|
||||||
|
remove_file $mysql_in;
|
||||||
|
|
||||||
|
write_file $mysql_in;
|
||||||
|
/*!\C cp932 */; set character_set_client= cp932; select '<27>\'
|
||||||
|
EOF
|
||||||
|
--exec $MYSQL --default-character-set=utf8 test < $mysql_in
|
||||||
|
remove_file $mysql_in;
|
||||||
|
|
||||||
|
@ -8529,10 +8529,10 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Field *tmp_field= field_arg->field;
|
static uchar null_bit=1;
|
||||||
/* charset doesn't matter here, it's to avoid sigsegv only */
|
/* charset doesn't matter here */
|
||||||
tmp_field= new Field_null(0, 0, Field::NONE, field_arg->field->field_name,
|
Field *tmp_field= new Field_string(0, 0, &null_bit, 1, Field::NONE,
|
||||||
&my_charset_bin);
|
field_arg->field->field_name, &my_charset_bin);
|
||||||
if (tmp_field)
|
if (tmp_field)
|
||||||
{
|
{
|
||||||
tmp_field->init(field_arg->field->table);
|
tmp_field->init(field_arg->field->table);
|
||||||
|
@ -1325,6 +1325,7 @@ int ha_maria::check(THD * thd, HA_CHECK_OPT * check_opt)
|
|||||||
old_proc_info= thd_proc_info(thd, "Checking status");
|
old_proc_info= thd_proc_info(thd, "Checking status");
|
||||||
thd_progress_init(thd, 3);
|
thd_progress_init(thd, 3);
|
||||||
error= maria_chk_status(param, file); // Not fatal
|
error= maria_chk_status(param, file); // Not fatal
|
||||||
|
/* maria_chk_size() will flush the page cache for this file */
|
||||||
if (maria_chk_size(param, file))
|
if (maria_chk_size(param, file))
|
||||||
error= 1;
|
error= 1;
|
||||||
if (!error)
|
if (!error)
|
||||||
|
@ -3520,6 +3520,14 @@ void _ma_tmp_disable_logging_for_table(MARIA_HA *info,
|
|||||||
{
|
{
|
||||||
MARIA_SHARE *share= info->s;
|
MARIA_SHARE *share= info->s;
|
||||||
DBUG_ENTER("_ma_tmp_disable_logging_for_table");
|
DBUG_ENTER("_ma_tmp_disable_logging_for_table");
|
||||||
|
|
||||||
|
/*
|
||||||
|
We have to ensure that bitmap is flushed, as it's checking
|
||||||
|
that share->now_transactional is set
|
||||||
|
*/
|
||||||
|
if (share->now_transactional && share->data_file_type == BLOCK_RECORD)
|
||||||
|
_ma_bitmap_flush_all(share);
|
||||||
|
|
||||||
if (log_incomplete)
|
if (log_incomplete)
|
||||||
{
|
{
|
||||||
uchar log_data[FILEID_STORE_SIZE];
|
uchar log_data[FILEID_STORE_SIZE];
|
||||||
|
Reference in New Issue
Block a user