Below is the list of changes that have just been committed into a local
5.1 repository of thek. When thek does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-01-02 17:08:48+01:00, thek@adventure.(none) +4 -0
Fixed merge errors.
include/mysql_com.h@stripped, 2008-01-02 17:08:46+01:00, thek@adventure.(none) +4 -4
Fixed merge errors causing name space collisions.
sql/mysqld.cc@stripped, 2008-01-02 17:08:46+01:00, thek@adventure.(none) +1 -1
Fixed merge error.
sql/sql_cache.cc@stripped, 2008-01-02 17:08:46+01:00, thek@adventure.(none) +6 -8
Fixed merge errors
tests/mysql_client_test.c@stripped, 2008-01-02 17:08:46+01:00, thek@adventure.(none) +0 -195
Fixed merge errors.
diff -Nrup a/include/mysql_com.h b/include/mysql_com.h
--- a/include/mysql_com.h 2008-01-02 14:31:02 +01:00
+++ b/include/mysql_com.h 2008-01-02 17:08:46 +01:00
@@ -203,10 +203,10 @@ typedef struct st_net {
unsigned int *return_status;
unsigned char reading_or_writing;
char save_char;
- my_bool unused0; /* Please remove with the next incompatible ABI change. */
- my_bool unused; /* Please remove with the next incompatible ABI change */
- my_bool compress;
my_bool unused1; /* Please remove with the next incompatible ABI change. */
+ my_bool unused2; /* Please remove with the next incompatible ABI change */
+ my_bool compress;
+ my_bool unused3; /* Please remove with the next incompatible ABI change. */
/*
Pointer to query object in query cache, do not equal NULL (0) for
queries in cache that have not stored its results yet
@@ -218,7 +218,7 @@ typedef struct st_net {
unsigned char *unused;
unsigned int client_last_errno;
unsigned char error;
- my_bool unused2; /* Please remove with the next incompatible ABI change. */
+ my_bool unused4; /* Please remove with the next incompatible ABI change. */
my_bool return_errno;
/** Client library error message buffer. Actually belongs to struct MYSQL. */
char client_last_error[MYSQL_ERRMSG_SIZE];
diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc
--- a/sql/mysqld.cc 2008-01-02 14:54:17 +01:00
+++ b/sql/mysqld.cc 2008-01-02 17:08:46 +01:00
@@ -2632,7 +2632,7 @@ int my_message_sql(uint error, const cha
str= ER(error);
thd->main_da.set_error_status(thd, error, str);
}
- query_cache_abort(&thd->net);
+ query_cache_abort(&thd->query_cache_tls);
}
/*
If a continue handler is found, the error message will be cleared
diff -Nrup a/sql/sql_cache.cc b/sql/sql_cache.cc
--- a/sql/sql_cache.cc 2008-01-02 14:54:18 +01:00
+++ b/sql/sql_cache.cc 2008-01-02 17:08:46 +01:00
@@ -661,16 +661,14 @@ Query_cache::insert(Query_cache_tls *que
return;
}
- if (query_cache_size == 0 || flush_in_progress)
- {
- STRUCT_UNLOCK(&structure_guard_mutex);
- DBUG_VOID_RETURN;
- }
-
Query_cache_block *query_block = query_cache_tls->first_query_block;
if (query_block == NULL)
{
- STRUCT_UNLOCK(&structure_guard_progress);
+ /*
+ The writer has been dropped; nothing left to do.
+ */
+ STRUCT_UNLOCK(&structure_guard_mutex);
+ DBUG_VOID_RETURN;
}
Query_cache_query *header= query_block->query();
Query_cache_block *result= header->result();
@@ -758,7 +756,7 @@ void Query_cache::end_of_result(THD *thd
if (thd->killed)
{
- query_cache_abort(&thd->net);
+ query_cache_abort(&thd->query_cache_tls);
DBUG_VOID_RETURN;
}
diff -Nrup a/tests/mysql_client_test.c b/tests/mysql_client_test.c
--- a/tests/mysql_client_test.c 2008-01-02 14:54:18 +01:00
+++ b/tests/mysql_client_test.c 2008-01-02 17:08:46 +01:00
@@ -17227,201 +17227,6 @@ static void test_bug31669()
myquery(rc);
DIE_UNLESS(mysql_affected_rows(mysql) == 1);
#endif
-/*
- Test mysql_change_user() C API and COM_CHANGE_USER
-*/
-
-static void test_change_user()
-{
- char buff[256];
- const char *user_pw= "mysqltest_pw";
- const char *user_no_pw= "mysqltest_no_pw";
- const char *pw= "password";
- const char *db= "mysqltest_user_test_database";
- int rc;
-
- DBUG_ENTER("test_change_user");
- myheader("test_change_user");
-
- /* Prepare environment */
- sprintf(buff, "drop database if exists %s", db);
- rc= mysql_query(mysql, buff);
- myquery(rc);
-
- sprintf(buff, "create database %s", db);
- rc= mysql_query(mysql, buff);
- myquery(rc);
-
- sprintf(buff,
- "grant select on %s.* to %s@'%%' identified by '%s'",
- db,
- user_pw,
- pw);
- rc= mysql_query(mysql, buff);
- myquery(rc);
-
- sprintf(buff,
- "grant select on %s.* to %s@'%%'",
- db,
- user_no_pw);
- rc= mysql_query(mysql, buff);
- myquery(rc);
-
-
- /* Try some combinations */
- rc= mysql_change_user(mysql, NULL, NULL, NULL);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
-
- rc= mysql_change_user(mysql, "", NULL, NULL);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, "", "", NULL);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, "", "", "");
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, NULL, "", "");
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
-
- rc= mysql_change_user(mysql, NULL, NULL, "");
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, "", NULL, "");
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_pw, NULL, "");
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_pw, "", "");
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_pw, "", NULL);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_pw, NULL, NULL);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_pw, "", db);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_pw, NULL, db);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_pw, pw, db);
- myquery(rc);
-
- rc= mysql_change_user(mysql, user_pw, pw, NULL);
- myquery(rc);
-
- rc= mysql_change_user(mysql, user_pw, pw, "");
- myquery(rc);
-
- rc= mysql_change_user(mysql, user_no_pw, pw, db);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_no_pw, pw, "");
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_no_pw, pw, NULL);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, user_no_pw, "", NULL);
- myquery(rc);
-
- rc= mysql_change_user(mysql, user_no_pw, "", "");
- myquery(rc);
-
- rc= mysql_change_user(mysql, user_no_pw, "", db);
- myquery(rc);
-
- rc= mysql_change_user(mysql, user_no_pw, NULL, db);
- myquery(rc);
-
- rc= mysql_change_user(mysql, "", pw, db);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, "", pw, "");
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, "", pw, NULL);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, NULL, pw, NULL);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, NULL, NULL, db);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, NULL, "", db);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- rc= mysql_change_user(mysql, "", "", db);
- DIE_UNLESS(rc);
- if (! opt_silent)
- printf("Got error (as expected): %s\n", mysql_error(mysql));
-
- /* Cleanup the environment */
-
- mysql_change_user(mysql, opt_user, opt_password, current_db);
-
- sprintf(buff, "drop database %s", db);
- rc= mysql_query(mysql, buff);
- myquery(rc);
-
- sprintf(buff, "drop user %s@'%%'", user_pw);
- rc= mysql_query(mysql, buff);
- myquery(rc);
-
- sprintf(buff, "drop user %s@'%%'", user_no_pw);
- rc= mysql_query(mysql, buff);
- myquery(rc);
DBUG_VOID_RETURN;
}
| Thread |
|---|
| • bk commit into 5.1 tree (thek:1.2655) | kpettersson | 2 Jan |