diff options
author | unknown <kaa@polly.(none)> | 2007-10-11 08:25:49 +0400 |
---|---|---|
committer | unknown <kaa@polly.(none)> | 2007-10-11 08:25:49 +0400 |
commit | bdd5b62399c7043240bac24a8d8fccb9205021a5 (patch) | |
tree | f6768e14c6b33469e5461e1d148265be515118fe | |
parent | 4e4dccb9aabff2ccbded926257a8c59b869adeea (diff) | |
parent | c7ca2283a97b3ff8df693b02cec682e24b86dc61 (diff) | |
download | mariadb-git-bdd5b62399c7043240bac24a8d8fccb9205021a5.tar.gz |
Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-maint
into polly.(none):/home/kaa/src/maint/mysql-5.0-maint
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 1 | ||||
-rw-r--r-- | mysys/mf_tempfile.c | 14 | ||||
-rw-r--r-- | ndb/test/ndbapi/testScanFilter.cpp | 12 | ||||
-rw-r--r-- | scripts/mysql_install_db.sh | 9 | ||||
-rw-r--r-- | scripts/mysql_system_tables_data.sql | 2 | ||||
-rw-r--r-- | sql/sql_class.cc | 7 |
6 files changed, 38 insertions, 7 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 29d3265a462..1ec91d200a5 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3060,6 +3060,7 @@ sub install_db ($$) { mtr_appendfile_to_file("$path_sql_dir/fill_help_tables.sql", $bootstrap_sql_file); + # Remove anonymous users mtr_tofile($bootstrap_sql_file, "DELETE FROM mysql.user where user= '';"); diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c index c1108f85054..9460f27b104 100644 --- a/mysys/mf_tempfile.c +++ b/mysys/mf_tempfile.c @@ -59,12 +59,26 @@ File create_temp_file(char *to, const char *dir, const char *prefix, myf MyFlags __attribute__((unused))) { File file= -1; +#ifdef __WIN__ + TCHAR path_buf[MAX_PATH-14]; +#endif DBUG_ENTER("create_temp_file"); DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix)); #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 the file and release it's handle - uses up to the first three letters from prefix diff --git a/ndb/test/ndbapi/testScanFilter.cpp b/ndb/test/ndbapi/testScanFilter.cpp index 81aa6b82fa0..48a7027eb66 100644 --- a/ndb/test/ndbapi/testScanFilter.cpp +++ b/ndb/test/ndbapi/testScanFilter.cpp @@ -772,18 +772,20 @@ void ndbapi_tuples(Ndb *ndb, char *str, bool *res) * str: a random string of scan opearation and condition * return: true stands for ndbapi ok, false stands for ndbapi failed */ +template class Vector<bool>; 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++) { - res_cal[i] = false; - res_ndb[i] = false; + res_cal.push_back(false); + res_ndb.push_back(false); } - check_all_tuples(str, res_cal); - ndbapi_tuples(ndb, str, res_ndb); + check_all_tuples(str, res_cal.getBase()); + ndbapi_tuples(ndb, str, res_ndb.getBase()); for(int i = 0; i < TUPLE_NUM; i++) { diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index a66129af1d3..5716d4f51c0 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -371,7 +371,16 @@ then 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 -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 if test "$in_rpm" -eq 0 then diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql index 8399ae796ef..47d4ea5d950 100644 --- a/scripts/mysql_system_tables_data.sql +++ b/scripts/mysql_system_tables_data.sql @@ -18,5 +18,7 @@ INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y',' set @hostname= @@hostname; 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); +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; DROP TABLE tmp_user; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index b67f63778dc..4a98a044e25 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2241,8 +2241,11 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup) void mark_transaction_to_rollback(THD *thd, bool all) { - thd->is_fatal_sub_stmt_error= TRUE; - thd->transaction_rollback_request= all; + if (thd) + { + thd->is_fatal_sub_stmt_error= TRUE; + thd->transaction_rollback_request= all; + } } /*************************************************************************** Handling of XA id cacheing |