-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jay Pipes wrote: > Pulling into my captain branch now....
There are problems in this, actually. Specifically, you need to do:
=== modified file 'drizzled/session.h' - --- drizzled/session.h 2009-09-06 06:18:00 +0000 +++ drizzled/session.h 2009-09-07 22:36:14 +0000 @@ -164,7 +164,7 @@ uint32_t query_alloc_block_size; uint32_t query_prealloc_size; uint32_t trans_alloc_block_size; - - uint64_t trans_prealloc_size; + uint32_t trans_prealloc_size; uint64_t group_concat_max_len; /* TODO: change this to my_thread_id - but have to fix set_var first */ uint64_t pseudo_thread_id;
=== modified file 'drizzled/set_var.cc' - --- drizzled/set_var.cc 2009-09-03 23:21:40 +0000 +++ drizzled/set_var.cc 2009-09-07 22:36:14 +0000 @@ -194,7 +194,7 @@ static sys_var_session_uint32_t sys_trans_alloc_block_size(&vars, "transaction_alloc_block_size",
&SV::trans_alloc_block_size, false, fix_trans_mem_root); - -static sys_var_session_uint64_t sys_trans_prealloc_size(&vars, "transaction_prealloc_size", +static sys_var_session_uint32_t sys_trans_prealloc_size(&vars, "transaction_prealloc_size",
&SV::trans_prealloc_size);
static sys_var_const_str_ptr sys_secure_file_priv(&vars, "secure_file_priv", @@ -470,16 +470,22 @@ return out; }
- -static bool get_unsigned32(Session *, set_var *var) +static bool get_unsigned32(Session *session, set_var *var) { if (var->value->unsigned_flag) - - var->save_result.uint32_t_value= (uint32_t) var->value->val_int(); + var->save_result.uint32_t_value= + static_cast<uint32_t>(var->value->val_int()); else { int64_t v= var->value->val_int(); - - var->save_result.uint32_t_value= (uint32_t) ((v < 0) ? 0 : v); + if (v > UINT32_MAX) + throw_bounds_warning(session, true, true, var->var->getName().c_str(), v); + + var->save_result.uint32_t_value= + static_cast<uint32_t>((v > UINT32_MAX) ? UINT32_MAX : (v < 0) ? 0 : v); + } - - return 0; + return false; }
static bool get_unsigned64(Session *, set_var *var)
Otherwise performance on solaris DIES.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqugjUACgkQ2Jv7/VK1RgHNQQCgnp40a/QO7Ewo9qV9UlWXv7jv SNAAnRWAqOgMFdfhiIxkj1HTMQoUGyut =2Ipj -----END PGP SIGNATURE-----
« Back to merge proposal
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jay Pipes wrote:
> Pulling into my captain branch now....
There are problems in this, actually. Specifically, you need to do:
=== modified file 'drizzled/ session. h' block_size; size; block_size; size; size; max_len;
- --- drizzled/session.h 2009-09-06 06:18:00 +0000
+++ drizzled/session.h 2009-09-07 22:36:14 +0000
@@ -164,7 +164,7 @@
uint32_t query_alloc_
uint32_t query_prealloc_
uint32_t trans_alloc_
- - uint64_t trans_prealloc_
+ uint32_t trans_prealloc_
uint64_t group_concat_
/* TODO: change this to my_thread_id - but have to fix set_var first */
uint64_t pseudo_thread_id;
=== modified file 'drizzled/ set_var. cc' session_ uint32_ t sys_trans_ alloc_block_ size(&vars, alloc_block_ size",
- --- drizzled/set_var.cc 2009-09-03 23:21:40 +0000
+++ drizzled/set_var.cc 2009-09-07 22:36:14 +0000
@@ -194,7 +194,7 @@
static sys_var_
"transaction_
&SV::trans_ alloc_block_ size,
false, mem_root) ; session_ uint64_ t sys_trans_ prealloc_ size(&vars, prealloc_ size", session_ uint32_ t sys_trans_ prealloc_ size(&vars, prealloc_ size",
fix_trans_
- -static sys_var_
"transaction_
+static sys_var_
"transaction_
&SV::trans_ prealloc_ size);
static sys_var_ const_str_ ptr sys_secure_ file_priv( &vars,
"secure_file_priv",
@@ -470,16 +470,22 @@
return out;
}
- -static bool get_unsigned32( Session *, set_var *var) Session *session, set_var *var) >unsigned_ flag) result. uint32_ t_value= (uint32_t) var->value- >val_int( ); result. uint32_ t_value= cast<uint32_ t>(var- >value- >val_int( )); >val_int( ); result. uint32_ t_value= (uint32_t) ((v < 0) ? 0 : v); warning( session, true, true, >getName( ).c_str( ), v); result. uint32_ t_value= cast<uint32_ t>((v > UINT32_MAX) ? UINT32_MAX : (v < 0) ? 0
+static bool get_unsigned32(
{
if (var->value-
- - var->save_
+ var->save_
+ static_
else
{
int64_t v= var->value-
- - var->save_
+ if (v > UINT32_MAX)
+ throw_bounds_
var->var-
+
+ var->save_
+ static_
: v);
+
}
- - return 0;
+ return false;
}
static bool get_unsigned64( Session *, set_var *var)
Otherwise performance on solaris DIES.
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org
ugjUACgkQ2Jv7/ VK1RgHNQQCgnp40 a/QO7Ewo9qV9UlW Xv7jv hiIxkj1HTMQoUGy ut
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq
SNAAnRWAqOgMFdf
=2Ipj
-----END PGP SIGNATURE-----