Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
This commit is contained in:
commit
8427dfd46e
@ -2524,13 +2524,21 @@ row_sel_store_mysql_rec(
|
||||
(byte) (templ->mysql_null_bit_mask);
|
||||
switch (templ->type) {
|
||||
case DATA_VARCHAR:
|
||||
case DATA_CHAR:
|
||||
case DATA_BINARY:
|
||||
case DATA_VARMYSQL:
|
||||
if (templ->mysql_type
|
||||
== DATA_MYSQL_TRUE_VARCHAR) {
|
||||
/* This is a >= 5.0.3 type
|
||||
true VARCHAR. Zero the field. */
|
||||
pad_char = 0x00;
|
||||
break;
|
||||
}
|
||||
/* Fall through */
|
||||
case DATA_CHAR:
|
||||
case DATA_FIXBINARY:
|
||||
case DATA_MYSQL:
|
||||
case DATA_VARMYSQL:
|
||||
/* MySQL pads all non-BLOB and non-TEXT
|
||||
string types with space ' ' */
|
||||
/* MySQL pads all string types (except
|
||||
BLOB, TEXT and true VARCHAR) with space. */
|
||||
if (UNIV_UNLIKELY(templ->mbminlen == 2)) {
|
||||
/* Treat UCS2 as a special case. */
|
||||
data = mysql_rec
|
||||
|
@ -940,3 +940,12 @@ f5 19 NULL
|
||||
f6 1 NULL
|
||||
f7 64 NULL
|
||||
drop table t1;
|
||||
create table t1 (f1 integer);
|
||||
create trigger tr1 after insert on t1 for each row set @test_var=42;
|
||||
use information_schema;
|
||||
select trigger_schema, trigger_name from triggers where
|
||||
trigger_name='tr1';
|
||||
trigger_schema trigger_name
|
||||
test tr1
|
||||
use test;
|
||||
drop table t1;
|
||||
|
@ -1452,16 +1452,16 @@ Error 1146 Table 'test.t4' doesn't exist
|
||||
checksum table t1, t2, t3, t4;
|
||||
Table Checksum
|
||||
test.t1 2948697075
|
||||
test.t2 1157260244
|
||||
test.t3 1157260244
|
||||
test.t2 3835700799
|
||||
test.t3 3835700799
|
||||
test.t4 NULL
|
||||
Warnings:
|
||||
Error 1146 Table 'test.t4' doesn't exist
|
||||
checksum table t1, t2, t3, t4 extended;
|
||||
Table Checksum
|
||||
test.t1 3092701434
|
||||
test.t2 1157260244
|
||||
test.t3 1157260244
|
||||
test.t2 3835700799
|
||||
test.t3 3835700799
|
||||
test.t4 NULL
|
||||
Warnings:
|
||||
Error 1146 Table 'test.t4' doesn't exist
|
||||
|
@ -525,3 +525,15 @@ set @@warning_count=1;
|
||||
ERROR HY000: Variable 'warning_count' is a read only variable
|
||||
set @@global.error_count=1;
|
||||
ERROR HY000: Variable 'error_count' is a read only variable
|
||||
set @@max_heap_table_size= 4294967296;
|
||||
select @@max_heap_table_size;
|
||||
@@max_heap_table_size
|
||||
4294967296
|
||||
set global max_heap_table_size= 4294967296;
|
||||
select @@max_heap_table_size;
|
||||
@@max_heap_table_size
|
||||
4294967296
|
||||
set @@max_heap_table_size= 4294967296;
|
||||
select @@max_heap_table_size;
|
||||
@@max_heap_table_size
|
||||
4294967296
|
||||
|
@ -622,3 +622,14 @@ select column_name, NUMERIC_PRECISION, NUMERIC_SCALE
|
||||
from information_schema.columns
|
||||
where table_name='t1';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #12127 triggers do not show in info_schema before they are used if set to the database
|
||||
#
|
||||
create table t1 (f1 integer);
|
||||
create trigger tr1 after insert on t1 for each row set @test_var=42;
|
||||
use information_schema;
|
||||
select trigger_schema, trigger_name from triggers where
|
||||
trigger_name='tr1';
|
||||
use test;
|
||||
drop table t1;
|
||||
|
@ -408,3 +408,13 @@ drop table t1;
|
||||
set @@warning_count=1;
|
||||
--error 1238
|
||||
set @@global.error_count=1;
|
||||
|
||||
#
|
||||
# Bug #10351: Setting max_heap_table_size to 4G fails
|
||||
#
|
||||
set @@max_heap_table_size= 4294967296;
|
||||
select @@max_heap_table_size;
|
||||
set global max_heap_table_size= 4294967296;
|
||||
select @@max_heap_table_size;
|
||||
set @@max_heap_table_size= 4294967296;
|
||||
select @@max_heap_table_size;
|
||||
|
@ -216,10 +216,10 @@ static handlerton innobase_hton = {
|
||||
innobase_xa_recover, /* recover */
|
||||
innobase_commit_by_xid, /* commit_by_xid */
|
||||
innobase_rollback_by_xid, /* rollback_by_xid */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
HTON_CLOSE_CURSORS_AT_COMMIT
|
||||
innobase_create_cursor_view,
|
||||
innobase_set_cursor_view,
|
||||
innobase_close_cursor_view,
|
||||
HTON_NO_FLAGS
|
||||
};
|
||||
|
||||
/*********************************************************************
|
||||
|
@ -143,8 +143,8 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
|
||||
*errors=0;
|
||||
|
||||
/* We always treat the loopback address as "localhost". */
|
||||
if (in->s_addr == INADDR_LOOPBACK)
|
||||
return (char *)my_localhost;
|
||||
if (in->s_addr == htonl(INADDR_LOOPBACK)) // is expanded inline by gcc
|
||||
DBUG_RETURN((char *)my_localhost);
|
||||
|
||||
/* Check first if we have name in cache */
|
||||
if (!(specialflag & SPECIAL_NO_HOST_CACHE))
|
||||
|
@ -1151,6 +1151,7 @@ class Item_uint :public Item_int
|
||||
public:
|
||||
Item_uint(const char *str_arg, uint length);
|
||||
Item_uint(uint32 i) :Item_int((ulonglong) i, 10) {}
|
||||
Item_uint(ulong i) :Item_int((ulonglong) i, 10) {}
|
||||
Item_uint(const char *str_arg, longlong i, uint length);
|
||||
double val_real()
|
||||
{ DBUG_ASSERT(fixed == 1); return ulonglong2double((ulonglong)value); }
|
||||
|
@ -5371,7 +5371,7 @@ The minimum value for this variable is 4096.",
|
||||
"Limit assumed max number of seeks when looking up rows based on a key",
|
||||
(gptr*) &global_system_variables.max_seeks_for_key,
|
||||
(gptr*) &max_system_variables.max_seeks_for_key, 0, GET_ULONG,
|
||||
REQUIRED_ARG, ~0L, 1, ~0L, 0, 1, 0 },
|
||||
REQUIRED_ARG, UINT_MAX32, 1, UINT_MAX32, 0, 1, 0 },
|
||||
{"max_sort_length", OPT_MAX_SORT_LENGTH,
|
||||
"The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored).",
|
||||
(gptr*) &global_system_variables.max_sort_length,
|
||||
|
@ -1679,7 +1679,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
|
||||
pthread_mutex_lock(&LOCK_global_system_variables);
|
||||
value= *(uint*) value_ptr(thd, var_type, base);
|
||||
pthread_mutex_unlock(&LOCK_global_system_variables);
|
||||
return new Item_uint((int32) value);
|
||||
return new Item_uint((uint32) value);
|
||||
}
|
||||
case SHOW_LONG:
|
||||
{
|
||||
@ -1687,7 +1687,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
|
||||
pthread_mutex_lock(&LOCK_global_system_variables);
|
||||
value= *(ulong*) value_ptr(thd, var_type, base);
|
||||
pthread_mutex_unlock(&LOCK_global_system_variables);
|
||||
return new Item_uint((int32) value);
|
||||
return new Item_uint(value);
|
||||
}
|
||||
case SHOW_LONGLONG:
|
||||
{
|
||||
|
@ -520,6 +520,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
|
||||
char path_buff[FN_REFLEN];
|
||||
LEX_STRING path;
|
||||
File_parser *parser;
|
||||
LEX_STRING save_db;
|
||||
|
||||
DBUG_ENTER("Table_triggers_list::check_n_load");
|
||||
|
||||
@ -580,6 +581,10 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
|
||||
|
||||
thd->lex= &lex;
|
||||
|
||||
save_db.str= thd->db;
|
||||
save_db.length= thd->db_length;
|
||||
thd->db_length= strlen(db);
|
||||
thd->db= (char *) db;
|
||||
while ((trg_create_str= it++))
|
||||
{
|
||||
lex_start(thd, (uchar*)trg_create_str->str, trg_create_str->length);
|
||||
@ -622,6 +627,8 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
|
||||
|
||||
lex_end(&lex);
|
||||
}
|
||||
thd->db= save_db.str;
|
||||
thd->db_length= save_db.length;
|
||||
thd->lex= old_lex;
|
||||
|
||||
DBUG_RETURN(0);
|
||||
@ -630,6 +637,8 @@ err_with_lex_cleanup:
|
||||
// QQ: anything else ?
|
||||
lex_end(&lex);
|
||||
thd->lex= old_lex;
|
||||
thd->db= save_db.str;
|
||||
thd->db_length= save_db.length;
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user