Commit c1caaf75 authored by unknown's avatar unknown

Fixed bug in full join with many NULL fields.


Build-tools/Do-compile:
  Fixed 'touch' and 'chmod' of files.
Docs/manual.texi:
  Changelog
parent 61b769d9
...@@ -108,7 +108,7 @@ $|=1; ...@@ -108,7 +108,7 @@ $|=1;
select STDOUT; select STDOUT;
$|=1; $|=1;
safe_cd("$host"); safe_cd($host);
if ($opt_stage == 0 && ! $opt_use_old_distribution) if ($opt_stage == 0 && ! $opt_use_old_distribution)
{ {
safe_system("gunzip < $opt_distribution | $tar xf -"); safe_system("gunzip < $opt_distribution | $tar xf -");
...@@ -118,6 +118,7 @@ if ($opt_stage == 0 && ! $opt_use_old_distribution) ...@@ -118,6 +118,7 @@ if ($opt_stage == 0 && ! $opt_use_old_distribution)
system("touch timestamp; find . -newer timestamp -print | xargs touch; rm -f timestamp"); system("touch timestamp; find . -newer timestamp -print | xargs touch; rm -f timestamp");
sleep(2); sleep(2);
# Ensure that files we don't want to rebuild are newer than other files # Ensure that files we don't want to rebuild are newer than other files
safe_cd($ver);
foreach $name ("configure", foreach $name ("configure",
"Docs/include.texi", "Docs/include.texi",
"Docs/*.html", "Docs/manual.txt", "Docs/mysql.info", "Docs/*.html", "Docs/manual.txt", "Docs/mysql.info",
...@@ -125,9 +126,11 @@ if ($opt_stage == 0 && ! $opt_use_old_distribution) ...@@ -125,9 +126,11 @@ if ($opt_stage == 0 && ! $opt_use_old_distribution)
{ {
system("touch $name"); system("touch $name");
} }
# Fix some file modes in BDB tables that makes life harder.
system("chmod -R u+rw .");
} }
safe_cd($ver); safe_cd("$pwd/$host/$ver");
if ($opt_stage <= 1) if ($opt_stage <= 1)
{ {
$opt_config_options.=" --with-low-memory" if ($opt_with_low_memory); $opt_config_options.=" --with-low-memory" if ($opt_with_low_memory);
......
...@@ -46833,6 +46833,7 @@ users use this code as the rest of the code and because of this we are ...@@ -46833,6 +46833,7 @@ users use this code as the rest of the code and because of this we are
not yet 100% confident in this code. not yet 100% confident in this code.
@menu @menu
* News-3.23.49::
* News-3.23.48:: Changes in release 3.23.48 * News-3.23.48:: Changes in release 3.23.48
* News-3.23.47:: Changes in release 3.23.47 * News-3.23.47:: Changes in release 3.23.47
* News-3.23.46:: Changes in release 3.23.46 * News-3.23.46:: Changes in release 3.23.46
...@@ -46885,7 +46886,15 @@ not yet 100% confident in this code. ...@@ -46885,7 +46886,15 @@ not yet 100% confident in this code.
* News-3.23.0:: Changes in release 3.23.0 * News-3.23.0:: Changes in release 3.23.0
@end menu @end menu
@node News-3.23.48, News-3.23.47, News-3.23.x, News-3.23.x @node News-3.23.49, News-3.23.48, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.49
@itemize @bullet
@item
Fixed unlikely caching bug when doing a join without keys. In this case
the last used field for a table always returned @code{NULL}.
@end itemize
@node News-3.23.48, News-3.23.47, News-3.23.49, News-3.23.x
@appendixsubsec Changes in release 3.23.48 @appendixsubsec Changes in release 3.23.48
@itemize @bullet @itemize @bullet
@item @item
...@@ -31,3 +31,6 @@ COUNT(t1.Title) ...@@ -31,3 +31,6 @@ COUNT(t1.Title)
1 1
COUNT(t1.Title) COUNT(t1.Title)
1 1
t1_id t2_id type cost_unit min_value max_value t3_id item_id id name
22 1 Percent Cost 100 -1 6 291 1 s1
23 1 Percent Cost 100 -1 21 291 1 s1
...@@ -194,3 +194,27 @@ t3.Contractor_ID = '999999' OR ...@@ -194,3 +194,27 @@ t3.Contractor_ID = '999999' OR
t3.Contractor_ID = '1') AND t3.Contractor_ID = '1') AND
t3.CanRead='1' AND t3.Active='1'; t3.CanRead='1' AND t3.Active='1';
drop table t1,t2,t3; drop table t1,t2,t3;
#
# Bug when doing full join and NULL fields.
#
CREATE TABLE t1 (
t1_id int(11) default NULL,
t2_id int(11) default NULL,
type enum('Cost','Percent') default NULL,
cost_unit enum('Cost','Unit') default NULL,
min_value double default NULL,
max_value double default NULL,
t3_id int(11) default NULL,
item_id int(11) default NULL
) TYPE=MyISAM;
INSERT INTO t1 VALUES (12,5,'Percent','Cost',-1,0,-1,-1),(14,4,'Percent','Cost',-1,0,-1,-1),(18,5,'Percent','Cost',-1,0,-1,-1),(19,4,'Percent','Cost',-1,0,-1,-1),(20,5,'Percent','Cost',100,-1,22,291),(21,5,'Percent','Cost',100,-1,18,291),(22,1,'Percent','Cost',100,-1,6,291),(23,1,'Percent','Cost',100,-1,21,291),(24,1,'Percent','Cost',100,-1,9,291),(25,1,'Percent','Cost',100,-1,4,291),(26,1,'Percent','Cost',100,-1,20,291),(27,4,'Percent','Cost',100,-1,7,202),(28,1,'Percent','Cost',50,-1,-1,137),(29,2,'Percent','Cost',100,-1,4,354),(30,2,'Percent','Cost',100,-1,9,137),(93,2,'Cost','Cost',-1,10000000,-1,-1);
CREATE TABLE t2 (
id int(10) unsigned NOT NULL auto_increment,
name varchar(255) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
INSERT INTO t2 VALUES (1,'s1'),(2,'s2'),(3,'s3'),(4,'s4'),(5,'s5');
select t1.*, t2.* from t1, t2 where t2.id=t1.t2_id limit 2;
drop table t1,t2;
...@@ -5636,10 +5636,10 @@ SORT_FIELD *make_unireg_sortorder(ORDER *order, uint *length) ...@@ -5636,10 +5636,10 @@ SORT_FIELD *make_unireg_sortorder(ORDER *order, uint *length)
/***************************************************************************** /*****************************************************************************
** Fill join cache with packed records Fill join cache with packed records
** Records are stored in tab->cache.buffer and last record in Records are stored in tab->cache.buffer and last record in
** last record is stored with pointers to blobs to support very big last record is stored with pointers to blobs to support very big
** records records
******************************************************************************/ ******************************************************************************/
static int static int
...@@ -5701,7 +5701,7 @@ join_init_cache(THD *thd,JOIN_TAB *tables,uint table_count) ...@@ -5701,7 +5701,7 @@ join_init_cache(THD *thd,JOIN_TAB *tables,uint table_count)
if (null_fields && tables[i].table->null_fields) if (null_fields && tables[i].table->null_fields)
{ /* must copy null bits */ { /* must copy null bits */
copy->str=(char*) tables[i].table->null_flags; copy->str=(char*) tables[i].table->null_flags;
copy->length=(tables[i].table->null_fields+7)/8; copy->length=tables[i].table->null_bytes;
copy->strip=0; copy->strip=0;
copy->blob_field=0; copy->blob_field=0;
length+=copy->length; length+=copy->length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment