diff options
author | unknown <jimw@mysql.com> | 2005-05-07 08:25:58 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-05-07 08:25:58 -0700 |
commit | 051c2999ea221112b72073500c8d504d40a38b14 (patch) | |
tree | 0a1534765795d08014f77b4124d29d383bf130ed | |
parent | be4ff318c7975eb9b7a7e9ce58d0249ff1889788 (diff) | |
parent | 6a0d541d895b1660e93aa9b427aafcef1ff528ee (diff) | |
download | mariadb-git-051c2999ea221112b72073500c8d504d40a38b14.tar.gz |
Merge
BUILD/FINISH.sh:
Auto merged
client/mysql.cc:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/type_float.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
sql/ha_heap.cc:
Auto merged
mysql-test/r/create.result:
Merge changes
mysql-test/r/temp_table.result:
SCCS merged
mysql-test/t/temp_table.test:
Merge new tests
sql/item.cc:
Merge from 4.1
sql/sql_select.cc:
Merge from 4.1
-rw-r--r-- | BUILD/FINISH.sh | 6 | ||||
-rw-r--r-- | client/mysql.cc | 3 | ||||
-rw-r--r-- | mysql-test/r/create.result | 6 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/r/temp_table.result | 9 | ||||
-rw-r--r-- | mysql-test/r/type_float.result | 2 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 9 | ||||
-rw-r--r-- | mysql-test/t/temp_table-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/temp_table.test | 8 | ||||
-rw-r--r-- | sql/ha_heap.cc | 6 | ||||
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/sql_select.cc | 10 |
12 files changed, 49 insertions, 19 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index 81defaa7f52..01e58b0ee1c 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -2,12 +2,6 @@ cflags="$c_warnings $extra_flags" cxxflags="$cxx_warnings $base_cxxflags $extra_flags" extra_configs="$extra_configs $local_infile_configs" configure="./configure $base_configs $extra_configs" -for arg -do - # Escape special characters so they don't confuse eval - configure="$configure "`echo "$arg" | \ - sed -e 's,\([^a-zA-Z0-9_.=-]\),\\\\\1,g'` -done commands="\ $make -k distclean || true diff --git a/client/mysql.cc b/client/mysql.cc index 8ea8f234b7c..c3a3b3df6d4 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -962,7 +962,8 @@ static int read_lines(bool execute_commands) } else { - char *prompt= (char*) (glob_buffer.is_empty() ? construct_prompt() : + char *prompt= (char*) (ml_comment ? " /*> " : + glob_buffer.is_empty() ? construct_prompt() : !in_string ? " -> " : in_string == '\'' ? " '> " : (in_string == '`' ? diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 82c0f4c1ce5..fc7fee8f997 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -448,11 +448,11 @@ Table Create Table t2 CREATE TABLE `t2` ( `ifnull(a,a)` tinyint(4) default NULL, `ifnull(b,b)` smallint(6) default NULL, - `ifnull(c,c)` mediumint(9) default NULL, + `ifnull(c,c)` mediumint(8) default NULL, `ifnull(d,d)` int(11) default NULL, `ifnull(e,e)` bigint(20) default NULL, - `ifnull(f,f)` float(3,2) default NULL, - `ifnull(g,g)` double(4,3) default NULL, + `ifnull(f,f)` float(24,2) default NULL, + `ifnull(g,g)` double(53,3) default NULL, `ifnull(h,h)` decimal(5,4) default NULL, `ifnull(i,i)` year(4) default NULL, `ifnull(j,j)` date default NULL, diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index d6cfefff9e6..b22330c7f90 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -2391,3 +2391,9 @@ drop table t1; set storage_engine=MyISAM; create table t1 (v varchar(16384)) engine=innodb; drop table t1; +create table t1(a int(1) , b int(1)) engine=innodb; +insert into t1 values ('1111', '3333'); +select distinct concat(a, b) from t1; +concat(a, b) +11113333 +drop table t1; diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result index f43fd09982a..081bd35622e 100644 --- a/mysql-test/r/temp_table.result +++ b/mysql-test/r/temp_table.result @@ -123,3 +123,12 @@ select * from t1; A This is view again drop view t1; +create table t1 (a int, b int, index(a), index(b)); +create table t2 (c int auto_increment, d varchar(255), primary key (c)); +insert into t1 values (3,1),(3,2); +insert into t2 values (NULL, 'foo'), (NULL, 'bar'); +select d, c from t1 left join t2 on b = c where a = 3 order by d; +d c +bar 2 +foo 1 +drop table t1, t2; diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 3cdf35f5032..b0b3ab147b0 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -92,7 +92,7 @@ show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `col1` double default NULL, - `col2` double(22,5) default NULL, + `col2` double(53,5) default NULL, `col3` double default NULL, `col4` double default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index bd07d2220d2..335f78941da 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1300,3 +1300,12 @@ eval set storage_engine=$default; # InnoDB specific varchar tests create table t1 (v varchar(16384)) engine=innodb; drop table t1; + +# +# Bug #4082: integer truncation +# + +create table t1(a int(1) , b int(1)) engine=innodb; +insert into t1 values ('1111', '3333'); +select distinct concat(a, b) from t1; +drop table t1; diff --git a/mysql-test/t/temp_table-master.opt b/mysql-test/t/temp_table-master.opt new file mode 100644 index 00000000000..026d3d4640c --- /dev/null +++ b/mysql-test/t/temp_table-master.opt @@ -0,0 +1 @@ +--tmpdir=$MYSQL_TEST_DIR/var//tmp diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test index eeb33515570..da7ce9b4722 100644 --- a/mysql-test/t/temp_table.test +++ b/mysql-test/t/temp_table.test @@ -104,3 +104,11 @@ drop table t1; select * from t1; drop view t1; +# Bug #8497: tmpdir with extra slashes would cause failures +# +create table t1 (a int, b int, index(a), index(b)); +create table t2 (c int auto_increment, d varchar(255), primary key (c)); +insert into t1 values (3,1),(3,2); +insert into t2 values (NULL, 'foo'), (NULL, 'bar'); +select d, c from t1 left join t2 on b = c where a = 3 order by d; +drop table t1, t2; diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index 52ff776c5d6..e3212b095cf 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -424,7 +424,8 @@ THR_LOCK_DATA **ha_heap::store_lock(THD *thd, int ha_heap::delete_table(const char *name) { char buff[FN_REFLEN]; - int error= heap_delete_table(fn_format(buff,name,"","",4+2)); + int error= heap_delete_table(fn_format(buff,name,"","", + MY_REPLACE_EXT|MY_UNPACK_FILENAME)); return error == ENOENT ? 0 : error; } @@ -555,7 +556,8 @@ int ha_heap::create(const char *name, TABLE *table_arg, hp_create_info.max_table_size=current_thd->variables.max_heap_table_size; hp_create_info.with_auto_increment= found_real_auto_increment; max_rows = (ha_rows) (hp_create_info.max_table_size / mem_per_row); - error= heap_create(fn_format(buff,name,"","",4+2), + error= heap_create(fn_format(buff,name,"","", + MY_REPLACE_EXT|MY_UNPACK_FILENAME), keys, keydef, share->reclength, (ulong) ((share->max_rows < max_rows && share->max_rows) ? diff --git a/sql/item.cc b/sql/item.cc index 68a091de3ef..30c134ebdd5 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1035,7 +1035,7 @@ void Item_field::set_field(Field *field_par) field=result_field=field_par; // for easy coding with fields maybe_null=field->maybe_null(); decimals= field->decimals(); - max_length= field_par->field_length; + max_length= field_par->max_length(); table_name= *field_par->table_name; field_name= field_par->field_name; db_name= field_par->table->s->db; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3d0a6d0aafe..25bd99ee194 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -7955,20 +7955,20 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, temp_pool_slot = bitmap_set_next(&temp_pool); if (temp_pool_slot != MY_BIT_NONE) // we got a slot - sprintf(filename, "%s_%lx_%i", tmp_file_prefix, - current_pid, temp_pool_slot); + sprintf(path, "%s_%lx_%i", tmp_file_prefix, + current_pid, temp_pool_slot); else { /* if we run out of slots or we are not using tempool */ - sprintf(filename,"%s%lx_%lx_%x",tmp_file_prefix,current_pid, + sprintf(path,"%s%lx_%lx_%x", tmp_file_prefix,current_pid, thd->thread_id, thd->tmp_table++); } /* - No need for change table name to lower case as we are only creating + No need to change table name to lower case as we are only creating MyISAM or HEAP tables here */ - sprintf(path, "%s%s", mysql_tmpdir, filename); + fn_format(path, path, mysql_tmpdir, "", MY_REPLACE_EXT|MY_UNPACK_FILENAME); if (group) { |