mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0 client/mysql.cc: Auto merged client/mysql_upgrade.c: Auto merged client/mysqltest.c: Auto merged extra/yassl/include/yassl_imp.hpp: Auto merged extra/yassl/include/yassl_int.hpp: Auto merged extra/yassl/taocrypt/include/algebra.hpp: Auto merged extra/yassl/taocrypt/include/des.hpp: Auto merged extra/yassl/taocrypt/include/modes.hpp: Auto merged extra/yassl/taocrypt/src/aes.cpp: Auto merged extra/yassl/taocrypt/src/algebra.cpp: Auto merged extra/yassl/taocrypt/test/test.cpp: Auto merged include/my_sys.h: Auto merged libmysql/libmysql.c: Auto merged libmysqld/lib_sql.cc: Auto merged myisam/mi_open.c: Auto merged myisam/myisampack.c: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/t/mysqltest.test: Auto merged ndb/src/common/util/File.cpp: Auto merged ndb/src/common/util/socket_io.cpp: Auto merged ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Auto merged ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged ndb/src/kernel/blocks/dbdih/Dbdih.hpp: Auto merged ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Auto merged ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Auto merged ndb/src/kernel/blocks/dbtc/Dbtc.hpp: Auto merged ndb/src/kernel/blocks/dbtup/Dbtup.hpp: Auto merged ndb/src/mgmsrv/Services.cpp: Auto merged ndb/tools/ndb_config.cpp: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.cc: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_subselect.h: Auto merged sql/item_sum.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_load.cc: Auto merged sql-common/my_time.c: Auto merged sql/sql_string.h: Auto merged sql/sql_table.cc: Auto merged sql/sql_trigger.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged strings/strtod.c: Auto merged tests/mysql_client_test.c: Auto merged extra/yassl/taocrypt/include/rsa.hpp: manual merge mysql-test/t/mysql.test: manual merge sql/sql_parse.cc: manual merge
This commit is contained in:
@ -183,6 +183,8 @@ THD::THD()
|
||||
clear_next_insert_id(0), in_lock_tables(0), bootstrap(0),
|
||||
derived_tables_processing(FALSE), spcont(NULL)
|
||||
{
|
||||
ulong tmp;
|
||||
|
||||
stmt_arena= this;
|
||||
thread_stack= 0;
|
||||
db= 0;
|
||||
@ -269,8 +271,8 @@ THD::THD()
|
||||
protocol_prep.init(this);
|
||||
|
||||
tablespace_op=FALSE;
|
||||
ulong tmp=sql_rnd_with_mutex();
|
||||
randominit(&rand, tmp + (ulong) &rand, tmp + (ulong) ::query_id);
|
||||
tmp= sql_rnd_with_mutex();
|
||||
randominit(&rand, tmp + (ulong) &rand, tmp + (ulong) ::global_query_id);
|
||||
substitute_null_with_insert_id = FALSE;
|
||||
thr_lock_info_init(&lock_info); /* safety: will be reset after start */
|
||||
thr_lock_owner_init(&main_lock_id, &lock_info);
|
||||
@ -1432,7 +1434,7 @@ bool select_max_min_finder_subselect::send_data(List<Item> &items)
|
||||
|
||||
bool select_max_min_finder_subselect::cmp_real()
|
||||
{
|
||||
Item *maxmin= ((Item_singlerow_subselect *)item)->el(0);
|
||||
Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
|
||||
double val1= cache->val_real(), val2= maxmin->val_real();
|
||||
if (fmax)
|
||||
return (cache->null_value && !maxmin->null_value) ||
|
||||
@ -1445,7 +1447,7 @@ bool select_max_min_finder_subselect::cmp_real()
|
||||
|
||||
bool select_max_min_finder_subselect::cmp_int()
|
||||
{
|
||||
Item *maxmin= ((Item_singlerow_subselect *)item)->el(0);
|
||||
Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
|
||||
longlong val1= cache->val_int(), val2= maxmin->val_int();
|
||||
if (fmax)
|
||||
return (cache->null_value && !maxmin->null_value) ||
|
||||
@ -1458,7 +1460,7 @@ bool select_max_min_finder_subselect::cmp_int()
|
||||
|
||||
bool select_max_min_finder_subselect::cmp_decimal()
|
||||
{
|
||||
Item *maxmin= ((Item_singlerow_subselect *)item)->el(0);
|
||||
Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
|
||||
my_decimal cval, *cvalue= cache->val_decimal(&cval);
|
||||
my_decimal mval, *mvalue= maxmin->val_decimal(&mval);
|
||||
if (fmax)
|
||||
@ -1473,7 +1475,7 @@ bool select_max_min_finder_subselect::cmp_decimal()
|
||||
bool select_max_min_finder_subselect::cmp_str()
|
||||
{
|
||||
String *val1, *val2, buf1, buf2;
|
||||
Item *maxmin= ((Item_singlerow_subselect *)item)->el(0);
|
||||
Item *maxmin= ((Item_singlerow_subselect *)item)->element_index(0);
|
||||
/*
|
||||
as far as both operand is Item_cache buf1 & buf2 will not be used,
|
||||
but added for safety
|
||||
|
Reference in New Issue
Block a user