Skip to content

Commit 070dc3f

Browse files
author
tsmith@ramayana.hindu.god
committed
Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2 parents ced64f8 + 82767a0 commit 070dc3f

File tree

5 files changed

+33
-5
lines changed

5 files changed

+33
-5
lines changed

mysql-test/mysql-test-run.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3060,6 +3060,7 @@ ($$)
30603060
mtr_appendfile_to_file("$path_sql_dir/fill_help_tables.sql",
30613061
$bootstrap_sql_file);
30623062

3063+
# Remove anonymous users
30633064
mtr_tofile($bootstrap_sql_file,
30643065
"DELETE FROM mysql.user where user= '';");
30653066

mysys/mf_tempfile.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,25 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
5959
myf MyFlags __attribute__((unused)))
6060
{
6161
File file= -1;
62+
#ifdef __WIN__
63+
TCHAR path_buf[MAX_PATH-14];
64+
#endif
6265

6366
DBUG_ENTER("create_temp_file");
6467
DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix));
6568
#if defined (__WIN__)
6669

70+
/*
71+
Use GetTempPath to determine path for temporary files.
72+
This is because the documentation for GetTempFileName
73+
has the following to say about this parameter:
74+
"If this parameter is NULL, the function fails."
75+
*/
76+
if (!dir)
77+
{
78+
if(GetTempPath(sizeof(path_buf), path_buf) > 0)
79+
dir = path_buf;
80+
}
6781
/*
6882
Use GetTempFileName to generate a unique filename, create
6983
the file and release it's handle

ndb/test/ndbapi/testScanFilter.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -772,18 +772,20 @@ void ndbapi_tuples(Ndb *ndb, char *str, bool *res)
772772
* str: a random string of scan opearation and condition
773773
* return: true stands for ndbapi ok, false stands for ndbapi failed
774774
*/
775+
template class Vector<bool>;
775776
bool compare_cal_ndb(char *str, Ndb *ndb)
776777
{
777-
bool res_cal[TUPLE_NUM], res_ndb[TUPLE_NUM];
778+
Vector<bool> res_cal;
779+
Vector<bool> res_ndb;
778780

779781
for(int i = 0; i < TUPLE_NUM; i++)
780782
{
781-
res_cal[i] = false;
782-
res_ndb[i] = false;
783+
res_cal.push_back(false);
784+
res_ndb.push_back(false);
783785
}
784786

785-
check_all_tuples(str, res_cal);
786-
ndbapi_tuples(ndb, str, res_ndb);
787+
check_all_tuples(str, res_cal.getBase());
788+
ndbapi_tuples(ndb, str, res_ndb.getBase());
787789

788790
for(int i = 0; i < TUPLE_NUM; i++)
789791
{

scripts/mysql_install_db.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,16 @@ then
371371
echo "To do so, start the server, then issue the following commands:"
372372
echo "$bindir/mysqladmin -u root password 'new-password'"
373373
echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
374+
echo
375+
echo "Alternatively you can run:"
376+
echo "$bindir/mysql_secure_installation"
377+
echo
378+
echo "which will also give you the option of removing the test"
379+
echo "databases and anonymous user created by default. This is"
380+
echo "strongly recommended for production servers."
381+
echo
374382
echo "See the manual for more instructions."
383+
echo
375384

376385
if test "$in_rpm" -eq 0
377386
then

scripts/mysql_system_tables_data.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','
1818
set @hostname= @@hostname;
1919
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);
2020
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);
21+
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
22+
INSERT INTO tmp_user (host,user) VALUES (@@hostname,'');
2123
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
2224
DROP TABLE tmp_user;

0 commit comments

Comments
 (0)