From 93db54e83a781bb4e586f4a66ea0f63fd3a9941c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 15 Mar 2004 19:17:18 +0200 Subject: update.test: a fix for a test with latest change mysql-test/t/update.test: a fix for a test with latest change --- mysql-test/t/update.test | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test index a455b308158..2e739dd927d 100644 --- a/mysql-test/t/update.test +++ b/mysql-test/t/update.test @@ -119,7 +119,6 @@ insert into t1 (F1,F2,F3,cnt,groupid) values ('0','0','0',1,6), ('0','1','2',1,5), ('0','2','0',1,3), ('1','0','1',1,2), ('1','2','1',1,1), ('1','2','2',1,1), ('2','0','1',2,4), ('2','2','0',1,7); - delete from t1 using t1 m1,t1 m2 where m1.groupid=m2.groupid and (m1.cnt < m2.cnt or m1.cnt=m2.cnt and m1.F3>m2.F3); select * from t1; drop table t1; -- cgit v1.2.1 From 96f2820f22e94c6f14c38fca4d678b6acd64b230 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Mar 2004 15:49:17 +0100 Subject: The automatic DROP TEMPORARY TABLE is now DROP TEMPORARY TABLE IF EXISTS, this is better in this case: - imagine user1 has created a temp table - imagine user2 does FLUSH TABLES WITH READ LOCK, then takes a backup, then RESET MASTER then UNLOCK TABLES, like mysqldump --first-slave - then in the binlog you will finally have the DROP TEMPORARY TABLE, but not the CREATE TEMPORARY TABLE, so when you later restore with mysqlbinlog|mysql, mysql will complain that table does not exist. Replication was already protected of this (it processes DROP TEMPORARY TABLE as if there was a IF EXISTS), now I add it directly to the query for mysqlbinlog|mysql to work. mysql-test/r/drop_temp_table.result: result update (query changed) --- mysql-test/r/drop_temp_table.result | 4 ++-- sql/sql_base.cc | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/drop_temp_table.result b/mysql-test/r/drop_temp_table.result index 6b18b54335d..fa3a72d9472 100644 --- a/mysql-test/r/drop_temp_table.result +++ b/mysql-test/r/drop_temp_table.result @@ -13,6 +13,6 @@ Log_name Pos Event_type Server_id Orig_log_pos Info master-bin.001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 master-bin.001 79 Query 1 79 use `test`; create database `drop-temp+table-test` master-bin.001 152 Query 1 152 use `drop-temp+table-test`; create temporary table `table:name` (a int) -master-bin.001 246 Query 1 246 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE `drop-temp+table-test`.`table:name` -master-bin.001 365 Query 1 365 use `drop-temp+table-test`; DO RELEASE_LOCK("a") +master-bin.001 246 Query 1 246 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name` +master-bin.001 375 Query 1 375 use `drop-temp+table-test`; DO RELEASE_LOCK("a") drop database `drop-temp+table-test`; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index dac8da12065..9f1caca55bc 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -547,7 +547,7 @@ void close_temporary_tables(THD *thd) return; LINT_INIT(end); - query_buf_size= 50; // Enough for DROP ... TABLE + query_buf_size= 50; // Enough for DROP ... TABLE IF EXISTS for (table=thd->temporary_tables ; table ; table=table->next) /* @@ -558,7 +558,8 @@ void close_temporary_tables(THD *thd) query_buf_size+= table->key_length+1; if ((query = alloc_root(&thd->mem_root, query_buf_size))) - end=strmov(query, "DROP /*!40005 TEMPORARY */ TABLE "); + // Better add "if exists", in case a RESET MASTER has been done + end=strmov(query, "DROP /*!40005 TEMPORARY */ TABLE IF EXISTS "); for (table=thd->temporary_tables ; table ; table=next) { -- cgit v1.2.1 From def79abd6dbb9649811b44878412717e02292549 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Mar 2004 23:50:04 +0200 Subject: fixed config parser to recognize correctly strings like following: test="\"#no comment here"#real comment --- mysys/default.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mysys/default.c b/mysys/default.c index 3c9f9c823a1..e79b598101d 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -449,11 +449,12 @@ static int search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, static char *remove_end_comment(char *ptr) { - char quote= 0; + char quote= 0; /* we are inside quote marks */ + char escape= 0; /* symbol is protected by escape chagacter */ for (; *ptr; ptr++) { - if (*ptr == '\'' || *ptr == '\"') + if ((*ptr == '\'' || *ptr == '\"') && !escape) { if (!quote) quote= *ptr; @@ -465,6 +466,7 @@ static char *remove_end_comment(char *ptr) *ptr= 0; return ptr; } + escape= (quote && *ptr == '\\' && !escape); } return ptr; } -- cgit v1.2.1 From 5f8cdaa4bcd13a99a96d554997f56e0d93e435fd Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 Mar 2004 11:18:29 +0200 Subject: Fixed wrong 'mysql.func' definition --- mysql-test/install_test_db.sh | 2 +- mysql-test/r/system_mysql_db.result | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/install_test_db.sh b/mysql-test/install_test_db.sh index 3b361b8afec..0b95809037f 100644 --- a/mysql-test/install_test_db.sh +++ b/mysql-test/install_test_db.sh @@ -173,7 +173,7 @@ fi if test ! -f $mdata/func.frm then c_f="$c_f CREATE TABLE func (" - c_f="$c_f name char(64) DEFAULT '' NOT NULL," + c_f="$c_f name char(64) binary DEFAULT '' NOT NULL," c_f="$c_f ret tinyint(1) DEFAULT '0' NOT NULL," c_f="$c_f dl char(128) DEFAULT '' NOT NULL," c_f="$c_f type enum ('function','aggregate') NOT NULL," diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result index 257b3b13f08..59cb6c38a59 100644 --- a/mysql-test/r/system_mysql_db.result +++ b/mysql-test/r/system_mysql_db.result @@ -85,7 +85,7 @@ user CREATE TABLE `user` ( show create table func; Table Create Table func CREATE TABLE `func` ( - `name` char(64) NOT NULL default '', + `name` char(64) binary NOT NULL default '', `ret` tinyint(1) NOT NULL default '0', `dl` char(128) NOT NULL default '', `type` enum('function','aggregate') NOT NULL default 'function', -- cgit v1.2.1 From c64c493f5967560b2001287a966d1c6daa743d50 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 Mar 2004 16:35:15 +0200 Subject: union.result: A test case for the bug that allowed table names to be used in ORDER BY columns (But #3064) union.test: A test case for the bug that allowed table names to be used in ORDER BY columns (But #3064) sql_union.cc: A fix for a bug that allowed table names to be used in ORDER BY columns (But #3064) sql/sql_union.cc: A fix for a bug that allowed table names to be used in ORDER BY columns (But #3064) mysql-test/t/union.test: A test case for the bug that allowed table names to be used in ORDER BY columns (But #3064) mysql-test/r/union.result: A test case for the bug that allowed table names to be used in ORDER BY columns (But #3064) --- mysql-test/r/union.result | 2 ++ mysql-test/t/union.test | 2 ++ sql/sql_union.cc | 10 ++++++++++ 3 files changed, 14 insertions(+) diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index fc5aa1ad0cb..4b9555c334b 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -422,6 +422,8 @@ Wrong usage/placement of 'SQL_CALC_FOUND_ROWS' create temporary table t1 select a from t1 union select a from t2; create table t1 select a from t1 union select a from t2; INSERT TABLE 't1' isn't allowed in FROM table list +select a from t1 union select a from t2 order by t2.a; +Unknown column 't2.a' in 'ORDER BY' drop table t1,t2; select length(version()) > 1 as `*` UNION select 2; * diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index badfe4b9a3a..c978aef9ce0 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -226,6 +226,8 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a desc LIMIT 1; create temporary table t1 select a from t1 union select a from t2; --error 1093 create table t1 select a from t1 union select a from t2; +--error 1054 +select a from t1 union select a from t2 order by t2.a; drop table t1,t2; # diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 34acd79f18b..8088737c0de 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -100,6 +100,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result) else { Item *item; + ORDER *orr; List_iterator it(lex->select_lex.item_list); TABLE_LIST *first_table= (TABLE_LIST*) lex->select_lex.table_list.first; @@ -110,6 +111,15 @@ int mysql_union(THD *thd, LEX *lex,select_result *result) if (setup_tables(first_table) || setup_fields(thd,first_table,item_list,0,0,1)) DBUG_RETURN(-1); + for (orr=order;orr;orr=orr->next) + { + item=*orr->item; + if (((item->type() == Item::FIELD_ITEM) && ((class Item_field*)item)->table_name)) + { + my_error(ER_BAD_FIELD_ERROR,MYF(0),item->full_name(),"ORDER BY"); + DBUG_RETURN(-1); + } + } } bzero((char*) &tmp_table_param,sizeof(tmp_table_param)); -- cgit v1.2.1 From 81fd02e9cfd4940198ed3a35e823cbefecf24c61 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 Mar 2004 09:38:57 -0600 Subject: "automagically" is not a word. --- client/mysqldump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index f93c791564e..4aec31c8ff2 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -131,7 +131,7 @@ static struct my_option my_long_options[] = (gptr*) &opt_delayed, (gptr*) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"delete-master-logs", OPT_DELETE_MASTER_LOGS, - "Delete logs on master after backup. This will automagically enable --first-slave.", + "Delete logs on master after backup. This automatically enables --first-slave.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"disable-keys", 'K', "'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output.", (gptr*) &opt_disable_keys, @@ -173,7 +173,7 @@ static struct my_option my_long_options[] = {"lock-tables", 'l', "Lock all tables for read.", (gptr*) &lock_tables, (gptr*) &lock_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"master-data", OPT_MASTER_DATA, - "This will cause the master position and filename to be appended to your output. This will automagically enable --first-slave.", + "This causes the master position and filename to be appended to your output. This automatically enables --first-slave.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"no-autocommit", OPT_AUTOCOMMIT, "Wrap tables with autocommit/commit statements.", -- cgit v1.2.1 From 24ee38f0957131f351178379d938a95e320b77d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 Mar 2004 18:06:26 +0200 Subject: sync0sync.c: Fix typo __NETWARE --> __NETWARE__ in mutex creation innobase/sync/sync0sync.c: Fix typo __NETWARE --> __NETWARE__ in mutex creation --- innobase/sync/sync0sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/innobase/sync/sync0sync.c b/innobase/sync/sync0sync.c index 4f5d27bcc7c..fc312a65942 100644 --- a/innobase/sync/sync0sync.c +++ b/innobase/sync/sync0sync.c @@ -180,7 +180,7 @@ mutex_create_func( char* cfile_name, /* in: file name where created */ ulint cline) /* in: file line where created */ { -#if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER) && !defined(__NETWARE) +#if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER) && !defined(__NETWARE__) mutex_reset_lock_word(mutex); #else os_fast_mutex_init(&(mutex->os_fast_mutex)); -- cgit v1.2.1 From 14b98fb25b70c6e00371a481b5db394347138daf Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 Mar 2004 18:11:13 +0200 Subject: sync0sync.c: Actually, assembler is used onnly on 32-bit x86 Win, and no need to exclude Netware specifically innobase/sync/sync0sync.c: Actually, assembler is used onnly on 32-bit x86 Win, and no need to exclude Netware specifically --- innobase/sync/sync0sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/innobase/sync/sync0sync.c b/innobase/sync/sync0sync.c index fc312a65942..72f6f0be390 100644 --- a/innobase/sync/sync0sync.c +++ b/innobase/sync/sync0sync.c @@ -180,7 +180,7 @@ mutex_create_func( char* cfile_name, /* in: file name where created */ ulint cline) /* in: file line where created */ { -#if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER) && !defined(__NETWARE__) +#if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER) mutex_reset_lock_word(mutex); #else os_fast_mutex_init(&(mutex->os_fast_mutex)); -- cgit v1.2.1 From b5f39cecbf0542abb676e556e7ff4117b9a68a5e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 Mar 2004 14:30:30 -0700 Subject: Changes to project files precipitated from 4.1 test builds. BitKeeper/deleted/.del-libmysql.def~f5dffcb3ed925d28: Delete: VC++Files/libmysql/libmysql.def VC++Files/innobase/innobase.dsp: 'com' module no longer exists. VC++Files/strings/MASM6x/strings.dsp: Add strnlen VC++Files/strings/strings.dsp: Add strnlen --- VC++Files/innobase/innobase.dsp | 8 --- VC++Files/libmysql/libmysql.def | 94 ------------------------------------ VC++Files/strings/MASM6x/strings.dsp | 4 ++ VC++Files/strings/strings.dsp | 4 ++ 4 files changed, 8 insertions(+), 102 deletions(-) delete mode 100755 VC++Files/libmysql/libmysql.def diff --git a/VC++Files/innobase/innobase.dsp b/VC++Files/innobase/innobase.dsp index c50911063ab..2687c48ca32 100644 --- a/VC++Files/innobase/innobase.dsp +++ b/VC++Files/innobase/innobase.dsp @@ -168,14 +168,6 @@ SOURCE=.\buf\buf0rea.c # End Source File # Begin Source File -SOURCE=.\com\com0com.c -# End Source File -# Begin Source File - -SOURCE=.\com\com0shm.c -# End Source File -# Begin Source File - SOURCE=.\data\data0data.c # End Source File # Begin Source File diff --git a/VC++Files/libmysql/libmysql.def b/VC++Files/libmysql/libmysql.def deleted file mode 100755 index 726a53864f3..00000000000 --- a/VC++Files/libmysql/libmysql.def +++ /dev/null @@ -1,94 +0,0 @@ -LIBRARY LIBMYSQL -DESCRIPTION 'MySQL 3.23 Client Library' -VERSION 2.5 -EXPORTS - mysql_affected_rows - mysql_close - mysql_connect - mysql_create_db - mysql_data_seek - mysql_debug - mysql_drop_db - mysql_dump_debug_info - mysql_eof - mysql_errno - mysql_error - mysql_escape_string - mysql_fetch_field - mysql_fetch_field_direct - mysql_fetch_fields - mysql_fetch_lengths - mysql_fetch_row - mysql_field_count - mysql_field_seek - mysql_field_tell - mysql_free_result - mysql_get_client_info - mysql_get_host_info - mysql_get_proto_info - mysql_get_server_info - mysql_info - mysql_init - mysql_insert_id - mysql_kill - mysql_list_dbs - mysql_list_fields - mysql_list_processes - mysql_list_tables - mysql_num_fields - mysql_num_rows - mysql_odbc_escape_string - mysql_options - mysql_ping - mysql_query - mysql_real_connect - mysql_real_query - mysql_refresh - mysql_row_seek - mysql_row_tell - mysql_select_db - mysql_shutdown - mysql_stat - mysql_store_result - mysql_thread_id - mysql_use_result - bmove_upp - delete_dynamic - _dig_vec - init_dynamic_array - insert_dynamic - int2str - is_prefix - list_add - list_delete - max_allowed_packet - my_casecmp - my_init - my_end - my_strdup - my_malloc - my_memdup - my_no_flags_free - my_realloc - my_thread_end - my_thread_init - net_buffer_length - set_dynamic - strcend - strdup_root - strfill - strinstr - strmake - strmov - strxmov - myodbc_remove_escape - mysql_thread_safe - mysql_character_set_name - mysql_change_user - mysql_send_query - mysql_read_query_result - mysql_real_escape_string - load_defaults - free_defaults - - diff --git a/VC++Files/strings/MASM6x/strings.dsp b/VC++Files/strings/MASM6x/strings.dsp index 1f54910bf58..649ce0b8f31 100644 --- a/VC++Files/strings/MASM6x/strings.dsp +++ b/VC++Files/strings/MASM6x/strings.dsp @@ -160,6 +160,10 @@ SOURCE=.\str2int.c # End Source File # Begin Source File +SOURCE=.\strnlen.c +# End Source File +# Begin Source File + SOURCE=.\Strings.asm !IF "$(CFG)" == "strings - Win32 Release" diff --git a/VC++Files/strings/strings.dsp b/VC++Files/strings/strings.dsp index 28cc1f39c0c..dec308efa60 100644 --- a/VC++Files/strings/strings.dsp +++ b/VC++Files/strings/strings.dsp @@ -164,6 +164,10 @@ SOURCE=.\str2int.c # End Source File # Begin Source File +SOURCE=.\strnlen.c +# End Source File +# Begin Source File + SOURCE=.\Strings.asm !IF "$(CFG)" == "strings - Win32 Release" -- cgit v1.2.1 From 87efb2b90284ad29d91f9391246f6dca1c0bf496 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Mar 2004 17:15:20 +0200 Subject: used right table for grants check (BUG#3270) mysql-test/t/alter_table.test: test for BUG#3270 added --- mysql-test/t/alter_table.test | 19 +++++++++++++++++++ sql/sql_parse.cc | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index cfb4f958372..ec057c156c8 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -3,6 +3,8 @@ # drop table if exists t1; +drop database if exists mysqltest; + create table t1 ( col1 int not null auto_increment primary key, col2 varchar(30) not null, @@ -99,3 +101,20 @@ select * from t1; select * from mysqltest.t1; drop table t1; drop database mysqltest; + +# +# Rights for renaming test (Bug #3270) +# +connect (root,localhost,root,,test,0,mysql-master.sock); +connection root; +--disable_warnings +create database mysqltest; +--enable_warnings +create table mysqltest.t1 (a int,b int,c int); +grant all on mysqltest.t1 to mysqltest_1@localhost; +connect (user1,localhost,mysqltest_1,,mysqltest,0,mysql-master.sock); +connection user1; +-- error 1142 +alter table t1 rename t2; +connection root; +drop database mysqltest; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3f6fa8d24ad..e3d19de6374 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1446,7 +1446,7 @@ mysql_execute_command(void) tmp_table.real_name=lex->name; tmp_table.db=lex->db; tmp_table.grant.privilege=priv; - if (check_grant(thd,INSERT_ACL | CREATE_ACL,tables)) + if (check_grant(thd,INSERT_ACL | CREATE_ACL, &tmp_table)) goto error; } } -- cgit v1.2.1 From 8652b22afe83362aebf7809aad3013229b6fb7c8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Mar 2004 19:25:30 +0100 Subject: comment --- mysys/default.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/default.c b/mysys/default.c index 3c9f9c823a1..1c4547bdb0a 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -460,7 +460,7 @@ static char *remove_end_comment(char *ptr) else if (quote == *ptr) quote= 0; } - if (!quote && *ptr == '#') /* We are not inside a comment */ + if (!quote && *ptr == '#') /* We are not inside a string */ { *ptr= 0; return ptr; -- cgit v1.2.1 From 4bc6ab7462137bc4c38787f1d38cbfac06996527 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Mar 2004 19:04:57 +0400 Subject: Fix for #3067 Shouldn't be moved to 4.1 myisam/mi_check.c: only set key_map if necessary --- myisam/mi_check.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 61c98eb526f..078f7787dc3 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1247,8 +1247,9 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, That is what the next line is for... (serg) */ - share->state.key_map= ((((ulonglong) 1L << share->base.keys)-1) & - param->keys_in_use); + if (param->testflag & T_CREATE_MISSING_KEYS) + share->state.key_map= ((((ulonglong) 1L << share->base.keys)-1) & + param->keys_in_use); info->state->key_file_length=share->base.keystart; -- cgit v1.2.1 From d043743df33bb5688f43cf8a369ee97b36ea3f64 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Mar 2004 20:27:07 +0100 Subject: protection against "ln -s /etc/passwd /tmp/failed-mysql-bugreport" --- scripts/mysqlbug.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh index bd5cb497e59..3e0e2f9e8b8 100644 --- a/scripts/mysqlbug.sh +++ b/scripts/mysqlbug.sh @@ -252,9 +252,9 @@ eval $EDIT $TEMP if cmp -s $TEMP $TEMP.x then echo "File not changed, no bug report submitted." - cp $TEMP /tmp/failed-mysql-bugreport + mv -f $TEMP /tmp/failed-mysql-bugreport echo "The raw bug report exists in /tmp/failed-mysql-bugreport" - echo "If you use this remember that the first lines of the report now is a lie.." + echo "If you use this remember that the first lines of the report are now a lie.." exit 1 fi -- cgit v1.2.1 From da51fe029406c269902c4c6b3b68d4b68d8f65a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 Mar 2004 11:22:01 +0100 Subject: shared IO_CACHE: protection against remove_io_share in a wrong time bug#3134 BitKeeper/deleted/.del-post-incoming~9f2168f531f09f3b: Delete: BitKeeper/triggers/post-incoming BitKeeper/deleted/.del-post-outgoing~1dd3d8f0f6e8f3cd: Delete: BitKeeper/triggers/post-outgoing --- BitKeeper/triggers/post-incoming | 3 --- BitKeeper/triggers/post-outgoing | 3 --- mysys/mf_iocache.c | 3 ++- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100755 BitKeeper/triggers/post-incoming delete mode 100755 BitKeeper/triggers/post-outgoing diff --git a/BitKeeper/triggers/post-incoming b/BitKeeper/triggers/post-incoming deleted file mode 100755 index f1ea2255de9..00000000000 --- a/BitKeeper/triggers/post-incoming +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -echo "Test: post-incoming works" diff --git a/BitKeeper/triggers/post-outgoing b/BitKeeper/triggers/post-outgoing deleted file mode 100755 index 3fc2cdbad67..00000000000 --- a/BitKeeper/triggers/post-outgoing +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -echo "Test: post-outgoing works" diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index c5bd7db9677..8fb93dc4780 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -481,7 +481,8 @@ static int lock_io_cache(IO_CACHE *info, my_off_t pos) while (!s->active || s->active->pos_in_file < pos) pthread_cond_wait(&s->cond, &s->mutex); - if (s->total < total) + if (s->total < total && + (!s->active || s->active->pos_in_file < pos)) return 1; pthread_mutex_unlock(&s->mutex); -- cgit v1.2.1 From a4f252a0c4daa25be66dfe72df22257deb5e9973 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 Mar 2004 13:29:12 +0100 Subject: bugs-aware post-commit trigger cleanup (VERSION variable) --- BitKeeper/triggers/post-commit | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/BitKeeper/triggers/post-commit b/BitKeeper/triggers/post-commit index 2dfefb5deb3..1c4608835d6 100755 --- a/BitKeeper/triggers/post-commit +++ b/BitKeeper/triggers/post-commit @@ -1,11 +1,11 @@ #!/bin/sh #shift -TO=dev-public@mysql.com FROM=$USER@mysql.com INTERNALS=internals@lists.mysql.com DOCS=docs-commit@mysql.com LIMIT=10000 +VERSION="4.0" if [ "$REAL_EMAIL" = "" ] then @@ -20,17 +20,24 @@ if [ "$BK_STATUS" = OK ] then CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet` +BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/ BUG#\1/p'` +if [ "$BUG" = "" ] +then + TO=dev-public@mysql.com +else + TO=dev-bugs@mysql.com +fi #++ -# dev-public@ +# dev-public@ / dev-bugs@ #-- echo "Commit successful, notifying developers at $TO" ( cat < +List-ID: From: $FROM To: $TO -Subject: bk commit - 4.0 tree ($CHANGESET) +Subject: bk commit - $VERSION tree ($CHANGESET)$BUG EOF bk changes -v -r+ @@ -43,13 +50,13 @@ EOF echo "Notifying internals list at $INTERNALS" ( cat < +List-ID: From: $FROM To: $INTERNALS -Subject: bk commit into 4.0 tree ($CHANGESET) +Subject: bk commit into $VERSION tree ($CHANGESET) Below is the list of changes that have just been committed into a local -4.0 repository of $USER. When $USER does a push these changes will +$VERSION repository of $USER. When $USER 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 @@ -70,10 +77,10 @@ EOF echo "Notifying docs list at $DOCS" ( cat < +List-ID: From: $FROM To: $DOCS -Subject: bk commit - 4.0 tree (Manual) ($CHANGESET) +Subject: bk commit - $VERSION tree (Manual) ($CHANGESET) EOF bk changes -v -r+ -- cgit v1.2.1 From 3e712bfb2802fe572616d212ccbc572e6740a78a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 Mar 2004 21:52:25 +0200 Subject: Improved test case service backport from 4.0 mysql-test/t/alter_table.test: Improved test case sql/nt_servc.cc: service backport from 4.0 BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- BitKeeper/etc/logging_ok | 1 + mysql-test/t/alter_table.test | 2 ++ sql/nt_servc.cc | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 359cad878c2..e0a0f4304fb 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -25,6 +25,7 @@ monty@donna.mysql.fi monty@hundin.mysql.fi monty@mashka.mysql.fi monty@mishka.mysql.fi +monty@mysql.com monty@narttu. monty@narttu.mysql.fi monty@tik. diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index ec057c156c8..160495bcba6 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -117,4 +117,6 @@ connection user1; -- error 1142 alter table t1 rename t2; connection root; +revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; +delete from mysql.user where user='mysqltest_1'; drop database mysqltest; diff --git a/sql/nt_servc.cc b/sql/nt_servc.cc index b18d3d00d88..320098cd8bc 100644 --- a/sql/nt_servc.cc +++ b/sql/nt_servc.cc @@ -498,7 +498,7 @@ BOOL NTService::IsService(LPCSTR ServiceName) if (scm = OpenSCManager(0, 0,SC_MANAGER_ENUMERATE_SERVICE)) { - if ((service = OpenService(scm,ServiceName, SERVICE_ALL_ACCESS ))) + if ((service = OpenService(scm,ServiceName, SERVICE_QUERY_STATUS))) { ret_value=TRUE; CloseServiceHandle(service); -- cgit v1.2.1 From e27b39393bd59129b796a0d30e4bedc95256b618 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 Mar 2004 23:08:42 +0200 Subject: Updated tests after merge mysql-test/r/alter_table.result: Updated tests mysql-test/t/alter_table.test: Updated tests --- mysql-test/r/alter_table.result | 71 +++++++++++++++++++++++------------------ mysql-test/t/alter_table.test | 4 +-- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 037d3420f76..c2fd5161353 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1,4 +1,5 @@ drop table if exists t1,t2; +drop database if exists mysqltest; create table t1 ( col1 int not null auto_increment primary key, col2 varchar(30) not null, @@ -85,6 +86,45 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK DROP TABLE t1; +create table t1 (i int unsigned not null auto_increment primary key); +insert into t1 values (null),(null),(null),(null); +alter table t1 drop i,add i int unsigned not null auto_increment, drop primary key, add primary key (i); +select * from t1; +i +1 +2 +3 +4 +drop table t1; +create table t1 (name char(15)); +insert into t1 (name) values ("current"); +create database mysqltest; +create table mysqltest.t1 (name char(15)); +insert into mysqltest.t1 (name) values ("mysqltest"); +select * from t1; +name +current +select * from mysqltest.t1; +name +mysqltest +alter table t1 rename mysqltest.t1; +Table 't1' already exists +select * from t1; +name +current +select * from mysqltest.t1; +name +mysqltest +drop table t1; +drop database mysqltest; +create database mysqltest; +create table mysqltest.t1 (a int,b int,c int); +grant all on mysqltest.t1 to mysqltest_1@localhost; +alter table t1 rename t2; +insert command denied to user: 'mysqltest_1@localhost' for table 't2' +revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; +delete from mysql.user where user='mysqltest_1'; +drop database mysqltest; create table t1 (n1 int not null, n2 int, n3 int, n4 float, unique(n1), key (n1, n2, n3, n4), @@ -143,16 +183,6 @@ t1 1 n4 3 n2 A 10 NULL NULL YES BTREE t1 1 n4 4 n3 A 10 NULL NULL YES BTREE drop table t1; create table t1 (i int unsigned not null auto_increment primary key); -insert into t1 values (null),(null),(null),(null); -alter table t1 drop i,add i int unsigned not null auto_increment, drop primary key, add primary key (i); -select * from t1; -i -1 -2 -3 -4 -drop table t1; -create table t1 (i int unsigned not null auto_increment primary key); alter table t1 rename t2; alter table t2 rename t1, add c char(10) comment "no comment"; show columns from t1; @@ -350,24 +380,3 @@ t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE t1 0 PRIMARY 2 User A 0 NULL NULL BTREE t1 1 Host 1 Host A NULL NULL NULL BTREE disabled DROP TABLE t1; -create table t1 (name char(15)); -insert into t1 (name) values ("current"); -create database mysqltest; -create table mysqltest.t1 (name char(15)); -insert into mysqltest.t1 (name) values ("mysqltest"); -select * from t1; -name -current -select * from mysqltest.t1; -name -mysqltest -alter table t1 rename mysqltest.t1; -Table 't1' already exists -select * from t1; -name -current -select * from mysqltest.t1; -name -mysqltest -drop table t1; -drop database mysqltest; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 21ea4fcc01f..9a29ab3c2d7 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -109,14 +109,14 @@ drop database mysqltest; # # Rights for renaming test (Bug #3270) # -connect (root,localhost,root,,test,0,mysql-master.sock); +connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock); connection root; --disable_warnings create database mysqltest; --enable_warnings create table mysqltest.t1 (a int,b int,c int); grant all on mysqltest.t1 to mysqltest_1@localhost; -connect (user1,localhost,mysqltest_1,,mysqltest,0,mysql-master.sock); +connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,master.sock); connection user1; -- error 1142 alter table t1 rename t2; -- cgit v1.2.1