|
|
Choosing A Webhost: |
bk commit into 4.0 tree: msg#00224db.mysql.devel
Below is the list of changes that have just been committed into a 4.0 repository of Sinisa. When Sinisa 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://www.mysql.com/doc/I/n/Installing_source_tree.html ChangeSet@xxxxxx, 2002-07-31 19:53:06+03:00, Sinisa@xxxxxxxxxxxxxxxxxxxx A bug with tables with different ref_length's whose order is changed in table initialization mysql-test/r/multi_update.result 1.10 02/07/31 19:53:05 Sinisa@xxxxxxxxxxxxxxxxxxxx +30 -0 A bug with tables with different ref_length's whose order is changed in table initialization mysql-test/t/multi_update.test 1.12 02/07/31 19:53:05 Sinisa@xxxxxxxxxxxxxxxxxxxx +25 -0 A bug with tables with different ref_length's whose order is changed in table initialization sql/sql_delete.cc 1.83 02/07/31 19:53:05 Sinisa@xxxxxxxxxxxxxxxxxxxx +14 -13 A bug with tables with different ref_length's whose order is changed in table initialization Docs/manual.texi 1.1063 02/07/31 19:53:04 Sinisa@xxxxxxxxxxxxxxxxxxxx +3 -0 A bug with tables with different ref_length's whose order is changed in table initialization # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: Sinisa # Host: sinisa.nasamreza.org # Root: /mnt/work/mysql-4.0 --- 1.1062/Docs/manual.texi Mon Jul 29 06:07:21 2002 +++ 1.1063/Docs/manual.texi Wed Jul 31 19:53:04 2002 @@ -50064,6 +50064,9 @@ @itemize @bullet @item +Fixed bug in multi-table delete when tables are re-ordered in table +initialization method and ref_length's are of different sizes +@item Fixed bug in query cache initialisation with very small query cache size. @item Allow @code{DEFAULT} with @code{INSERT} statement. --- 1.82/sql/sql_delete.cc Mon Jul 29 17:54:43 2002 +++ 1.83/sql/sql_delete.cc Wed Jul 31 19:53:05 2002 @@ -215,21 +215,8 @@ num_of_tables(num_of_tables_arg), error(0), lock_option(lock_option_arg), do_delete(false) { - uint counter=0; not_trans_safe=false; tempfiles = (Unique **) sql_calloc(sizeof(Unique *) * (num_of_tables-1)); - - /* Don't use key read with MULTI-TABLE-DELETE */ - dt->table->used_keys=0; - for (dt=dt->next ; dt ; dt=dt->next,counter++) - { - TABLE *table=dt->table; - table->used_keys=0; - tempfiles[counter] = new Unique (refposcmp2, - (void *) &table->file->ref_length, - table->file->ref_length, - MEM_STRIP_BUF_SIZE); - } } @@ -260,6 +247,7 @@ void multi_delete::initialize_tables(JOIN *join) { + int counter=0; TABLE_LIST *walk; table_map tables_to_delete_from=0; for (walk= delete_tables ; walk ; walk=walk->next) @@ -280,6 +268,19 @@ if (!not_trans_safe && !tbl->file->has_transactions()) not_trans_safe=true; } + } + walk= delete_tables; + walk->table->used_keys=0; + for (walk=walk->next ; walk ; walk=walk->next, counter++) + { + tables_to_delete_from|= walk->table->map; + TABLE *table=walk->table; + /* Don't use key read with MULTI-TABLE-DELETE */ + table->used_keys=0; + tempfiles[counter] = new Unique (refposcmp2, + (void *) &table->file->ref_length, + table->file->ref_length, + MEM_STRIP_BUF_SIZE); } init_ftfuncs(thd,1); } --- 1.9/mysql-test/r/multi_update.result Tue Jun 11 22:45:51 2002 +++ 1.10/mysql-test/r/multi_update.result Wed Jul 31 19:53:05 2002 @@ -70,3 +70,33 @@ create table t2(id2 int not null, t varchar(100), index(id2)) pack_keys = 1; delete t1 from t1,t2 where t1.id1 = t2.id2 and t1.id1 > 500; drop table t1,t2; +DROP TABLE IF EXISTS a,b,c; +CREATE TABLE a ( +id int(11) NOT NULL default '0', +name varchar(10) default NULL, +PRIMARY KEY (id) +) TYPE=MyISAM; +INSERT INTO a VALUES (1,'aaa'),(2,'aaa'),(3,'aaa'); +CREATE TABLE b ( +id int(11) NOT NULL default '0', +name varchar(10) default NULL, +PRIMARY KEY (id) +) TYPE=MyISAM; +INSERT INTO b VALUES (2,'bbb'),(3,'bbb'),(4,'bbb'); +CREATE TABLE c ( +id int(11) NOT NULL default '0', +mydate datetime default NULL, +PRIMARY KEY (id) +) TYPE=MyISAM; +INSERT INTO c VALUES (1,'2002-02-04 00:00:00'),(3,'2002-05-12 00:00:00'),(5,'2002-05-12 00:00:00'),(6,'2002-06-22 +00:00:00'),(7,'2002-07-22 00:00:00'); +delete a,b,c from a,b,c +where to_days(now())-to_days(c.mydate)>=30 +and c.id=a.id and c.id=b.id; +select * from c; +id mydate +1 2002-02-04 00:00:00 +5 2002-05-12 00:00:00 +6 2002-06-22 00:00:00 +7 2002-07-22 00:00:00 +DROP TABLE IF EXISTS a,b,c; --- 1.11/mysql-test/t/multi_update.test Tue Jun 11 22:45:51 2002 +++ 1.12/mysql-test/t/multi_update.test Wed Jul 31 19:53:05 2002 @@ -80,3 +80,28 @@ enable_query_log; delete t1 from t1,t2 where t1.id1 = t2.id2 and t1.id1 > 500; drop table t1,t2; +DROP TABLE IF EXISTS a,b,c; +CREATE TABLE a ( + id int(11) NOT NULL default '0', + name varchar(10) default NULL, + PRIMARY KEY (id) +) TYPE=MyISAM; +INSERT INTO a VALUES (1,'aaa'),(2,'aaa'),(3,'aaa'); +CREATE TABLE b ( + id int(11) NOT NULL default '0', + name varchar(10) default NULL, + PRIMARY KEY (id) +) TYPE=MyISAM; +INSERT INTO b VALUES (2,'bbb'),(3,'bbb'),(4,'bbb'); +CREATE TABLE c ( + id int(11) NOT NULL default '0', + mydate datetime default NULL, + PRIMARY KEY (id) +) TYPE=MyISAM; +INSERT INTO c VALUES (1,'2002-02-04 00:00:00'),(3,'2002-05-12 00:00:00'),(5,'2002-05-12 00:00:00'),(6,'2002-06-22 +00:00:00'),(7,'2002-07-22 00:00:00'); +delete a,b,c from a,b,c +where to_days(now())-to_days(c.mydate)>=30 +and c.id=a.id and c.id=b.id; +select * from c; +DROP TABLE IF EXISTS a,b,c; --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail internals-thread4228@xxxxxxxxxxxxxxx To unsubscribe, e-mail <internals-unsubscribe@xxxxxxxxxxxxxxx>
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | bk commit into 3.23 tree, monty |
|---|---|
| Next by Date: | bk commit into 3.23 tree, monty |
| Previous by Thread: | bk commit into 4.0 tree, serg |
| Next by Thread: | bk commit into 4.0 tree, arjen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |