Commit 474a4d5d authored by unknown's avatar unknown

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
parents de275d94 29fcd4b3
......@@ -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
......
......@@ -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 == '`' ?
......
......@@ -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,
......
......@@ -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;
......@@ -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;
......@@ -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
......
......@@ -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;
--tmpdir=$MYSQL_TEST_DIR/var//tmp
......@@ -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;
......@@ -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) ?
......
......@@ -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;
......
......@@ -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)
{
......
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