mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Merge bk-internal:/home/bk/mysql-5.0-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
This commit is contained in:
commit
984e9ce099
21 changed files with 255 additions and 34 deletions
|
@ -913,6 +913,7 @@ ndb/src/common/mgmcommon/printConfig/*.d
|
|||
ndb/src/common/portlib/libportlib.dsp
|
||||
ndb/src/common/transporter/libtransporter.dsp
|
||||
ndb/src/common/util/libgeneral.dsp
|
||||
ndb/src/common/util/testBitmask.cpp
|
||||
ndb/src/cw/cpcd/ndb_cpcd
|
||||
ndb/src/dummy.cpp
|
||||
ndb/src/kernel/blocks/backup/libbackup.dsp
|
||||
|
@ -1138,6 +1139,7 @@ sql/*.ds?
|
|||
sql/*.vcproj
|
||||
sql/.gdbinit
|
||||
sql/client.c
|
||||
sql/f.c
|
||||
sql/gen_lex_hash
|
||||
sql/gmon.out
|
||||
sql/lex_hash.h
|
||||
|
@ -1296,4 +1298,3 @@ vio/viotest-sslconnect.cpp
|
|||
vio/viotest.cpp
|
||||
zlib/*.ds?
|
||||
zlib/*.vcproj
|
||||
ndb/src/common/util/testBitmask.cpp
|
||||
|
|
|
@ -157,17 +157,29 @@ static int create_defaults_file(const char *path, const char *our_defaults_path)
|
|||
File our_defaults_file, defaults_file;
|
||||
char buffer[512];
|
||||
char *buffer_end;
|
||||
int failed_to_open_count= 0;
|
||||
int error;
|
||||
|
||||
/* check if the defaults file is needed at all */
|
||||
if (!opt_password)
|
||||
return 0;
|
||||
|
||||
defaults_file= my_open(path, O_BINARY | O_CREAT | O_WRONLY,
|
||||
retry_open:
|
||||
defaults_file= my_open(path, O_BINARY | O_CREAT | O_WRONLY | O_EXCL,
|
||||
MYF(MY_FAE | MY_WME));
|
||||
|
||||
if (defaults_file < 0)
|
||||
return 1;
|
||||
{
|
||||
if (failed_to_open_count == 0)
|
||||
{
|
||||
remove(path);
|
||||
failed_to_open_count+= 1;
|
||||
goto retry_open;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
upgrade_defaults_created= 1;
|
||||
if (our_defaults_path)
|
||||
{
|
||||
|
|
|
@ -101,6 +101,10 @@ extern "C" {
|
|||
/* On NetWare, to fix the problem with the deletion of open files */
|
||||
#define CANT_DELETE_OPEN_FILES 1
|
||||
|
||||
#define FN_LIBCHAR '\\'
|
||||
#define FN_ROOTDIR "\\"
|
||||
#define FN_DEVCHAR ':'
|
||||
|
||||
/* default directory information */
|
||||
#define DEFAULT_MYSQL_HOME "sys:/mysql"
|
||||
#define PACKAGE "mysql"
|
||||
|
|
|
@ -5000,3 +5000,13 @@ insert t1 values (1),(2),(3),(4),(5);
|
|||
truncate table t1;
|
||||
affected rows: 0
|
||||
drop table t1;
|
||||
create table bug15205 (val int(11) default null) engine=csv;
|
||||
create table bug15205_2 (val int(11) default null) engine=csv;
|
||||
select * from bug15205;
|
||||
ERROR HY000: Got error 1 from storage engine
|
||||
select * from bug15205_2;
|
||||
val
|
||||
select * from bug15205;
|
||||
val
|
||||
drop table bug15205;
|
||||
drop table bug15205_2;
|
||||
|
|
|
@ -730,6 +730,49 @@ id MIN(s)
|
|||
1 ZZZ
|
||||
2 ZZZ
|
||||
DROP TABLE t1;
|
||||
drop table if exists bug20536;
|
||||
set names latin1;
|
||||
create table bug20536 (id bigint not null auto_increment primary key, name
|
||||
varchar(255) character set ucs2 not null);
|
||||
insert into `bug20536` (`id`,`name`) values (1, _latin1 x'74657374311a'), (2, "'test\\_2'");
|
||||
select md5(name) from bug20536;
|
||||
md5(name)
|
||||
3417d830fe24ffb2f81a28e54df2d1b3
|
||||
48d95db0d8305c2fe11548a3635c9385
|
||||
select sha1(name) from bug20536;
|
||||
sha1(name)
|
||||
72228a6d56efb7a89a09543068d5d8fa4c330881
|
||||
677d4d505355eb5b0549b865fcae4b7f0c28aef5
|
||||
select make_set(3, name, upper(name)) from bug20536;
|
||||
make_set(3, name, upper(name))
|
||||
test1,TEST1
|
||||
'test\_2','TEST\_2'
|
||||
select export_set(5, name, upper(name)) from bug20536;
|
||||
export_set(5, name, upper(name))
|
||||
test1,TEST1,test1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1,TEST1
|
||||
'test\_2','TEST\_2','test\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2','TEST\_2'
|
||||
select export_set(5, name, upper(name), ",", 5) from bug20536;
|
||||
export_set(5, name, upper(name), ",", 5)
|
||||
test1,TEST1,test1,TEST1,TEST1
|
||||
'test\_2','TEST\_2','test\_2','TEST\_2','TEST\_2'
|
||||
select password(name) from bug20536;
|
||||
password(name)
|
||||
????????????????????
|
||||
????????????????????
|
||||
select old_password(name) from bug20536;
|
||||
old_password(name)
|
||||
????????
|
||||
????????
|
||||
select encrypt(name, 'SALT') from bug20536;
|
||||
encrypt(name, 'SALT')
|
||||
SA5pDi1UPZdys
|
||||
SA5pDi1UPZdys
|
||||
select quote(name) from bug20536;
|
||||
quote(name)
|
||||
??????????
|
||||
????????????????
|
||||
drop table bug20536;
|
||||
End of 4.1 tests
|
||||
CREATE TABLE t1 (a varchar(64) character set ucs2, b decimal(10,3));
|
||||
INSERT INTO t1 VALUES ("1.1", 0), ("2.1", 0);
|
||||
update t1 set b=a;
|
||||
|
@ -765,3 +808,4 @@ blob 65535 65535
|
|||
text 65535 65535
|
||||
text 65535 32767
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
|
|
@ -87,6 +87,10 @@ SELECT IS_USED_LOCK('bug16501');
|
|||
IS_USED_LOCK('bug16501')
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
select export_set(3, _latin1'foo', _utf8'bar', ',', 4);
|
||||
export_set(3, _latin1'foo', _utf8'bar', ',', 4)
|
||||
foo,foo,bar,bar
|
||||
End of 4.1 tests
|
||||
create table t1 as select uuid(), length(uuid());
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
|
@ -130,3 +134,4 @@ timediff(b, a) >= '00:00:03'
|
|||
drop table t2;
|
||||
drop table t1;
|
||||
set global query_cache_size=default;
|
||||
End of 5.0 tests
|
||||
|
|
|
@ -3,9 +3,12 @@ create table t1(f1 int);
|
|||
insert into t1 values (5);
|
||||
grant select on test.* to ssl_user1@localhost require SSL;
|
||||
grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
|
||||
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/emailAddress=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/emailAddress=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
|
||||
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
|
||||
grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
|
||||
flush privileges;
|
||||
connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET);
|
||||
ERROR 28000: Access denied for user 'ssl_user5'@'localhost' (using password: NO)
|
||||
SHOW STATUS LIKE 'Ssl_cipher';
|
||||
Variable_name Value
|
||||
Ssl_cipher DHE-RSA-AES256-SHA
|
||||
|
@ -39,7 +42,7 @@ f1
|
|||
delete from t1;
|
||||
ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 't1'
|
||||
drop user ssl_user1@localhost, ssl_user2@localhost,
|
||||
ssl_user3@localhost, ssl_user4@localhost;
|
||||
ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
|
||||
drop table t1;
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error
|
||||
|
|
|
@ -689,6 +689,12 @@ select @@log_queries_not_using_indexes;
|
|||
show variables like 'log_queries_not_using_indexes';
|
||||
Variable_name Value
|
||||
log_queries_not_using_indexes OFF
|
||||
select @@"";
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '""' at line 1
|
||||
select @@&;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '&' at line 1
|
||||
select @@@;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@' at line 1
|
||||
End of 5.0 tests
|
||||
set global binlog_cache_size =@my_binlog_cache_size;
|
||||
set global connect_timeout =@my_connect_timeout;
|
||||
|
|
|
@ -1384,3 +1384,27 @@ truncate table t1; -- truncate
|
|||
--disable_info
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #15205 Select from CSV table without the datafile causes crash
|
||||
#
|
||||
# NOTE: the bug is not deterministic
|
||||
|
||||
# The crash happens because the necessary cleanup after an error wasn't
|
||||
# performed. Namely, the table share, inserted in the hash during table
|
||||
# open, was not deleted from hash. At the same time the share was freed
|
||||
# when an error was encountered. Thus, subsequent access to the hash
|
||||
# resulted in scanning through deleted memory and we were geting a crash.
|
||||
# that's why we need two tables in the bugtest
|
||||
|
||||
create table bug15205 (val int(11) default null) engine=csv;
|
||||
create table bug15205_2 (val int(11) default null) engine=csv;
|
||||
--exec rm $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
|
||||
# system error (can't open the datafile)
|
||||
--error ER_GET_ERRNO
|
||||
select * from bug15205;
|
||||
select * from bug15205_2;
|
||||
--exec touch $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
|
||||
select * from bug15205;
|
||||
drop table bug15205;
|
||||
drop table bug15205_2;
|
||||
|
||||
|
|
|
@ -465,7 +465,46 @@ INSERT INTO t1 VALUES (1, 'ZZZZZ'), (1, 'ZZZ'), (2, 'ZZZ'), (2, 'ZZZZZ');
|
|||
SELECT id, MIN(s) FROM t1 GROUP BY id;
|
||||
|
||||
DROP TABLE t1;
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug #20536: md5() with GROUP BY and UCS2 return different results on myisam/innodb
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists bug20536;
|
||||
--enable_warnings
|
||||
|
||||
set names latin1;
|
||||
create table bug20536 (id bigint not null auto_increment primary key, name
|
||||
varchar(255) character set ucs2 not null);
|
||||
insert into `bug20536` (`id`,`name`) values (1, _latin1 x'74657374311a'), (2, "'test\\_2'");
|
||||
select md5(name) from bug20536;
|
||||
select sha1(name) from bug20536;
|
||||
select make_set(3, name, upper(name)) from bug20536;
|
||||
select export_set(5, name, upper(name)) from bug20536;
|
||||
select export_set(5, name, upper(name), ",", 5) from bug20536;
|
||||
|
||||
# Some broken functions: add these tests just to document current behavior.
|
||||
|
||||
# PASSWORD and OLD_PASSWORD don't work with UCS2 strings, but to fix it would
|
||||
# not be backwards compatible in all cases, so it's best to leave it alone
|
||||
select password(name) from bug20536;
|
||||
select old_password(name) from bug20536;
|
||||
|
||||
# ENCRYPT relies on OS function crypt() which takes a NUL-terminated string; it
|
||||
# doesn't return good results for strings with embedded 0 bytes. It won't be
|
||||
# fixed unless we choose to re-implement the crypt() function ourselves to take
|
||||
# an extra size_t string_length argument.
|
||||
select encrypt(name, 'SALT') from bug20536;
|
||||
|
||||
# QUOTE doesn't work with UCS2 data. It would require a total rewrite
|
||||
# of Item_func_quote::val_str(), which isn't worthwhile until UCS2 is
|
||||
# supported fully as a client character set.
|
||||
select quote(name) from bug20536;
|
||||
|
||||
drop table bug20536;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
#
|
||||
# Conversion from an UCS2 string to a decimal column
|
||||
|
@ -497,3 +536,5 @@ create table t1(a blob, b text charset utf8, c text charset ucs2);
|
|||
select data_type, character_octet_length, character_maximum_length
|
||||
from information_schema.columns where table_name='t1';
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
|
|
@ -78,7 +78,13 @@ connection default;
|
|||
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
#
|
||||
# Bug #21531: EXPORT_SET() doesn't accept args with coercible character sets
|
||||
#
|
||||
select export_set(3, _latin1'foo', _utf8'bar', ',', 4);
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
|
||||
#
|
||||
# Test for BUG#9535
|
||||
|
@ -87,7 +93,9 @@ create table t1 as select uuid(), length(uuid());
|
|||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #6760: Add SLEEP() function
|
||||
#
|
||||
create table t1 (a timestamp default '2005-05-05 01:01:01',
|
||||
b timestamp default '2005-05-05 01:01:01');
|
||||
insert into t1 set a = now();
|
||||
|
@ -117,4 +125,4 @@ drop table t2;
|
|||
drop table t1;
|
||||
set global query_cache_size=default;
|
||||
|
||||
# End of 5.0 tests
|
||||
--echo End of 5.0 tests
|
||||
|
|
|
@ -10,14 +10,18 @@ insert into t1 values (5);
|
|||
|
||||
grant select on test.* to ssl_user1@localhost require SSL;
|
||||
grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
|
||||
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/emailAddress=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/emailAddress=abstract.mysql.developer@mysql.com";
|
||||
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
|
||||
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
|
||||
grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
|
||||
flush privileges;
|
||||
|
||||
connect (con1,localhost,ssl_user1,,,,,SSL);
|
||||
connect (con2,localhost,ssl_user2,,,,,SSL);
|
||||
connect (con3,localhost,ssl_user3,,,,,SSL);
|
||||
connect (con4,localhost,ssl_user4,,,,,SSL);
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
--error 1045
|
||||
connect (con5,localhost,ssl_user5,,,,,SSL);
|
||||
|
||||
connection con1;
|
||||
# Check ssl turned on
|
||||
|
@ -49,7 +53,7 @@ delete from t1;
|
|||
|
||||
connection default;
|
||||
drop user ssl_user1@localhost, ssl_user2@localhost,
|
||||
ssl_user3@localhost, ssl_user4@localhost;
|
||||
ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
|
|
@ -585,6 +585,16 @@ show variables like 'ssl%';
|
|||
select @@log_queries_not_using_indexes;
|
||||
show variables like 'log_queries_not_using_indexes';
|
||||
|
||||
#
|
||||
# Bug#20908: Crash if select @@""
|
||||
#
|
||||
--error ER_PARSE_ERROR
|
||||
select @@"";
|
||||
--error ER_PARSE_ERROR
|
||||
select @@&;
|
||||
--error ER_PARSE_ERROR
|
||||
select @@@;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
# This is at the very after the versioned tests, since it involves doing
|
||||
|
@ -620,3 +630,4 @@ set global server_id =@my_server_id;
|
|||
set global slow_launch_time =@my_slow_launch_time;
|
||||
set global storage_engine =@my_storage_engine;
|
||||
set global thread_cache_size =@my_thread_cache_size;
|
||||
|
||||
|
|
|
@ -205,16 +205,18 @@ static TINA_SHARE *get_share(const char *table_name, TABLE *table)
|
|||
share->table_name_length=length;
|
||||
share->table_name=tmp_name;
|
||||
strmov(share->table_name,table_name);
|
||||
fn_format(data_file_name, table_name, "", ".CSV",MY_REPLACE_EXT|MY_UNPACK_FILENAME);
|
||||
fn_format(data_file_name, table_name, "", ".CSV",
|
||||
MY_REPLACE_EXT | MY_UNPACK_FILENAME);
|
||||
|
||||
if ((share->data_file= my_open(data_file_name, O_RDWR|O_APPEND,
|
||||
MYF(0))) == -1)
|
||||
goto error;
|
||||
|
||||
if (my_hash_insert(&tina_open_tables, (byte*) share))
|
||||
goto error;
|
||||
thr_lock_init(&share->lock);
|
||||
pthread_mutex_init(&share->mutex,MY_MUTEX_INIT_FAST);
|
||||
|
||||
if ((share->data_file= my_open(data_file_name, O_RDWR|O_APPEND,
|
||||
MYF(0))) == -1)
|
||||
goto error2;
|
||||
|
||||
/* We only use share->data_file for writing, so we scan to the end to append */
|
||||
if (my_seek(share->data_file, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR)
|
||||
goto error2;
|
||||
|
@ -233,6 +235,7 @@ error3:
|
|||
error2:
|
||||
thr_lock_delete(&share->lock);
|
||||
pthread_mutex_destroy(&share->mutex);
|
||||
hash_delete(&tina_open_tables, (byte*) share);
|
||||
error:
|
||||
pthread_mutex_unlock(&tina_mutex);
|
||||
my_free((gptr) share, MYF(0));
|
||||
|
|
|
@ -442,13 +442,17 @@ int main(int argc,char **argv)
|
|||
if (get_options(argc,(char **) argv))
|
||||
exit(1);
|
||||
|
||||
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
||||
printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
|
||||
|
||||
printf("/* Copyright (C) 2001-2004 MySQL AB\n\
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL license\n\
|
||||
\n*/\n\n");
|
||||
|
||||
printf("/* This code is generated by gen_lex_hash.cc that seeks for\
|
||||
a perfect\nhash function */\n\n");
|
||||
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
||||
printf("/* Do " "not " "edit " "this " "file! This is generated by "
|
||||
"gen_lex_hash.cc\nthat seeks for a perfect hash function */\n\n");
|
||||
printf("#include \"lex.h\"\n\n");
|
||||
|
||||
calc_length();
|
||||
|
@ -468,6 +472,14 @@ static inline SYMBOL *get_hash_symbol(const char *s,\n\
|
|||
{\n\
|
||||
register uchar *hash_map;\n\
|
||||
register const char *cur_str= s;\n\
|
||||
\n\
|
||||
if (len == 0) {\n\
|
||||
DBUG_PRINT(\"warning\", (\"get_hash_symbol() received a request for a zero-length symbol, which is probably a mistake.\"));\
|
||||
return(NULL);\n\
|
||||
}\n"
|
||||
);
|
||||
|
||||
printf("\
|
||||
if (function){\n\
|
||||
if (len>sql_functions_max_len) return 0;\n\
|
||||
hash_map= sql_functions_map;\n\
|
||||
|
@ -498,7 +510,10 @@ static inline SYMBOL *get_hash_symbol(const char *s,\n\
|
|||
cur_struct= uint4korr(hash_map+\n\
|
||||
(((uint16)cur_struct + cur_char - first_char)*4));\n\
|
||||
cur_str++;\n\
|
||||
}\n\
|
||||
}\n"
|
||||
);
|
||||
|
||||
printf("\
|
||||
}else{\n\
|
||||
if (len>symbols_max_len) return 0;\n\
|
||||
hash_map= symbols_map;\n\
|
||||
|
|
|
@ -124,6 +124,7 @@ String *Item_func_md5::val_str(String *str)
|
|||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
String * sptr= args[0]->val_str(str);
|
||||
str->set_charset(&my_charset_bin);
|
||||
if (sptr)
|
||||
{
|
||||
my_MD5_CTX context;
|
||||
|
@ -170,6 +171,7 @@ String *Item_func_sha::val_str(String *str)
|
|||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
String * sptr= args[0]->val_str(str);
|
||||
str->set_charset(&my_charset_bin);
|
||||
if (sptr) /* If we got value different from NULL */
|
||||
{
|
||||
SHA1_CONTEXT context; /* Context used to generate SHA1 hash */
|
||||
|
@ -1605,7 +1607,7 @@ String *Item_func_encrypt::val_str(String *str)
|
|||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
str->set(tmp,(uint) strlen(tmp),res->charset());
|
||||
str->set(tmp, (uint) strlen(tmp), &my_charset_bin);
|
||||
str->copy();
|
||||
pthread_mutex_unlock(&LOCK_crypt);
|
||||
return str;
|
||||
|
@ -2041,7 +2043,7 @@ String *Item_func_make_set::val_str(String *str)
|
|||
return &my_empty_string;
|
||||
result= &tmp_str;
|
||||
}
|
||||
if (tmp_str.append(',') || tmp_str.append(*res))
|
||||
if (tmp_str.append(STRING_WITH_LEN(","), &my_charset_bin) || tmp_str.append(*res))
|
||||
return &my_empty_string;
|
||||
}
|
||||
}
|
||||
|
@ -2699,8 +2701,12 @@ String* Item_func_export_set::val_str(String* str)
|
|||
}
|
||||
break;
|
||||
case 3:
|
||||
sep_buf.set(STRING_WITH_LEN(","), default_charset());
|
||||
sep = &sep_buf;
|
||||
{
|
||||
/* errors is not checked - assume "," can always be converted */
|
||||
uint errors;
|
||||
sep_buf.copy(STRING_WITH_LEN(","), &my_charset_bin, collation.collation, &errors);
|
||||
sep = &sep_buf;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
DBUG_ASSERT(0); // cannot happen
|
||||
|
|
|
@ -43,7 +43,10 @@ class Item_func_md5 :public Item_str_func
|
|||
{
|
||||
String tmp_value;
|
||||
public:
|
||||
Item_func_md5(Item *a) :Item_str_func(a) {}
|
||||
Item_func_md5(Item *a) :Item_str_func(a)
|
||||
{
|
||||
collation.set(&my_charset_bin);
|
||||
}
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "md5"; }
|
||||
|
@ -53,7 +56,10 @@ public:
|
|||
class Item_func_sha :public Item_str_func
|
||||
{
|
||||
public:
|
||||
Item_func_sha(Item *a) :Item_str_func(a) {}
|
||||
Item_func_sha(Item *a) :Item_str_func(a)
|
||||
{
|
||||
collation.set(&my_charset_bin);
|
||||
}
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "sha"; }
|
||||
|
@ -325,9 +331,21 @@ public:
|
|||
class Item_func_encrypt :public Item_str_func
|
||||
{
|
||||
String tmp_value;
|
||||
|
||||
/* Encapsulate common constructor actions */
|
||||
void constructor_helper()
|
||||
{
|
||||
collation.set(&my_charset_bin);
|
||||
}
|
||||
public:
|
||||
Item_func_encrypt(Item *a) :Item_str_func(a) {}
|
||||
Item_func_encrypt(Item *a, Item *b): Item_str_func(a,b) {}
|
||||
Item_func_encrypt(Item *a) :Item_str_func(a)
|
||||
{
|
||||
constructor_helper();
|
||||
}
|
||||
Item_func_encrypt(Item *a, Item *b): Item_str_func(a,b)
|
||||
{
|
||||
constructor_helper();
|
||||
}
|
||||
String *val_str(String *);
|
||||
void fix_length_and_dec() { maybe_null=1; max_length = 13; }
|
||||
const char *func_name() const { return "encrypt"; }
|
||||
|
|
|
@ -224,7 +224,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
|
|||
tmp= (char*) val + min(2, val_len);
|
||||
l_time->day= (int) my_strtoll10(val, &tmp, &error);
|
||||
/* Skip 'st, 'nd, 'th .. */
|
||||
val= tmp + min((int) (end-tmp), 2);
|
||||
val= tmp + min((int) (val_end-tmp), 2);
|
||||
break;
|
||||
|
||||
/* Hour */
|
||||
|
|
|
@ -874,6 +874,7 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh,
|
|||
sql_print_information("X509 issuer mismatch: should be '%s' "
|
||||
"but is '%s'", acl_user->x509_issuer, ptr);
|
||||
free(ptr);
|
||||
user_access=NO_ACCESS;
|
||||
break;
|
||||
}
|
||||
user_access= acl_user->access;
|
||||
|
@ -889,11 +890,13 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh,
|
|||
if (strcmp(acl_user->x509_subject,ptr))
|
||||
{
|
||||
if (global_system_variables.log_warnings)
|
||||
sql_print_information("X509 subject mismatch: '%s' vs '%s'",
|
||||
sql_print_information("X509 subject mismatch: should be '%s' but is '%s'",
|
||||
acl_user->x509_subject, ptr);
|
||||
free(ptr);
|
||||
user_access=NO_ACCESS;
|
||||
break;
|
||||
}
|
||||
else
|
||||
user_access= acl_user->access;
|
||||
user_access= acl_user->access;
|
||||
free(ptr);
|
||||
}
|
||||
break;
|
||||
|
@ -5462,8 +5465,6 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
|
|||
}
|
||||
if (!find_acl_user(lex_user->host.str, lex_user->user.str, TRUE))
|
||||
{
|
||||
sql_print_error("REVOKE ALL PRIVILEGES, GRANT: User '%s'@'%s' does not "
|
||||
"exists", lex_user->user.str, lex_user->host.str);
|
||||
result= -1;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1040,6 +1040,8 @@ int MYSQLlex(void *arg, void *yythd)
|
|||
if (c == '.')
|
||||
lex->next_state=MY_LEX_IDENT_SEP;
|
||||
length= (uint) (lex->ptr - lex->tok_start)-1;
|
||||
if (length == 0)
|
||||
return(ABORT_SYM); // Names must be nonempty.
|
||||
if ((tokval= find_keyword(lex,length,0)))
|
||||
{
|
||||
yyUnget(); // Put back 'c'
|
||||
|
|
|
@ -677,6 +677,9 @@ fi
|
|||
%attr(755, root, root) %{_bindir}/ndb_show_tables
|
||||
%attr(755, root, root) %{_bindir}/ndb_test_platform
|
||||
%attr(755, root, root) %{_bindir}/ndb_config
|
||||
%attr(755, root, root) %{_bindir}/ndb_error_reporter
|
||||
%attr(755, root, root) %{_bindir}/ndb_size.pl
|
||||
%attr(-, root, root) %{_datadir}/mysql/ndb_size.tmpl
|
||||
|
||||
%files ndb-extra
|
||||
%defattr(-,root,root,0755)
|
||||
|
|
Loading…
Reference in a new issue