Commit 01b3173e authored by unknown's avatar unknown

Merge stella.local:/home2/mydev/mysql-5.0-amain

into  stella.local:/home2/mydev/mysql-5.0-axmrg
parents 9ddded56 711be53b
...@@ -3059,6 +3059,7 @@ sub install_db ($$) { ...@@ -3059,6 +3059,7 @@ sub install_db ($$) {
mtr_appendfile_to_file("$path_sql_dir/fill_help_tables.sql", mtr_appendfile_to_file("$path_sql_dir/fill_help_tables.sql",
$bootstrap_sql_file); $bootstrap_sql_file);
# Remove anonymous users
mtr_tofile($bootstrap_sql_file, mtr_tofile($bootstrap_sql_file,
"DELETE FROM mysql.user where user= '';"); "DELETE FROM mysql.user where user= '';");
......
...@@ -59,11 +59,25 @@ File create_temp_file(char *to, const char *dir, const char *prefix, ...@@ -59,11 +59,25 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
myf MyFlags __attribute__((unused))) myf MyFlags __attribute__((unused)))
{ {
File file= -1; File file= -1;
#ifdef __WIN__
TCHAR path_buf[MAX_PATH-14];
#endif
DBUG_ENTER("create_temp_file"); DBUG_ENTER("create_temp_file");
DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix)); DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix));
#if defined (__WIN__) #if defined (__WIN__)
/*
Use GetTempPath to determine path for temporary files.
This is because the documentation for GetTempFileName
has the following to say about this parameter:
"If this parameter is NULL, the function fails."
*/
if (!dir)
{
if(GetTempPath(sizeof(path_buf), path_buf) > 0)
dir = path_buf;
}
/* /*
Use GetTempFileName to generate a unique filename, create Use GetTempFileName to generate a unique filename, create
the file and release it's handle the file and release it's handle
......
...@@ -772,18 +772,20 @@ void ndbapi_tuples(Ndb *ndb, char *str, bool *res) ...@@ -772,18 +772,20 @@ void ndbapi_tuples(Ndb *ndb, char *str, bool *res)
* str: a random string of scan opearation and condition * str: a random string of scan opearation and condition
* return: true stands for ndbapi ok, false stands for ndbapi failed * return: true stands for ndbapi ok, false stands for ndbapi failed
*/ */
template class Vector<bool>;
bool compare_cal_ndb(char *str, Ndb *ndb) bool compare_cal_ndb(char *str, Ndb *ndb)
{ {
bool res_cal[TUPLE_NUM], res_ndb[TUPLE_NUM]; Vector<bool> res_cal;
Vector<bool> res_ndb;
for(int i = 0; i < TUPLE_NUM; i++) for(int i = 0; i < TUPLE_NUM; i++)
{ {
res_cal[i] = false; res_cal.push_back(false);
res_ndb[i] = false; res_ndb.push_back(false);
} }
check_all_tuples(str, res_cal); check_all_tuples(str, res_cal.getBase());
ndbapi_tuples(ndb, str, res_ndb); ndbapi_tuples(ndb, str, res_ndb.getBase());
for(int i = 0; i < TUPLE_NUM; i++) for(int i = 0; i < TUPLE_NUM; i++)
{ {
......
...@@ -371,7 +371,16 @@ then ...@@ -371,7 +371,16 @@ then
echo "To do so, start the server, then issue the following commands:" echo "To do so, start the server, then issue the following commands:"
echo "$bindir/mysqladmin -u root password 'new-password'" echo "$bindir/mysqladmin -u root password 'new-password'"
echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'" echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
echo
echo "Alternatively you can run:"
echo "$bindir/mysql_secure_installation"
echo
echo "which will also give you the option of removing the test"
echo "databases and anonymous user created by default. This is"
echo "strongly recommended for production servers."
echo
echo "See the manual for more instructions." echo "See the manual for more instructions."
echo
if test "$in_rpm" -eq 0 if test "$in_rpm" -eq 0
then then
......
...@@ -17,5 +17,7 @@ CREATE TEMPORARY TABLE tmp_user LIKE user; ...@@ -17,5 +17,7 @@ CREATE TEMPORARY TABLE tmp_user LIKE user;
INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
REPLACE INTO tmp_user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); REPLACE INTO tmp_user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
INSERT INTO tmp_user (host,user) VALUES (@@hostname,'');
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
DROP TABLE tmp_user; DROP TABLE tmp_user;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment