Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
This commit is contained in:
commit
50ac19ba37
@ -17,7 +17,7 @@ http://dev.mysql.com/doc/mysql/en/MySQL_test_suite.html
|
|||||||
|
|
||||||
You can create your own test cases. To create a test case:
|
You can create your own test cases. To create a test case:
|
||||||
|
|
||||||
xeamacs t/test_case_name.test
|
xemacs t/test_case_name.test
|
||||||
|
|
||||||
in the file, put a set of SQL commands that will create some tables,
|
in the file, put a set of SQL commands that will create some tables,
|
||||||
load test data, run some queries to manipulate it.
|
load test data, run some queries to manipulate it.
|
||||||
|
@ -520,3 +520,11 @@ SHOW VARIABLES LIKE 'table_cache';
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
table_cache 1
|
table_cache 1
|
||||||
SET GLOBAL table_cache=DEFAULT;
|
SET GLOBAL table_cache=DEFAULT;
|
||||||
|
create table t1 (a int);
|
||||||
|
select a into @x from t1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1329 No data to FETCH
|
||||||
|
show warnings;
|
||||||
|
Level Code Message
|
||||||
|
Warning 1329 No data to FETCH
|
||||||
|
drop table t1;
|
||||||
|
@ -388,3 +388,12 @@ SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE';
|
|||||||
SET GLOBAL table_cache=-1;
|
SET GLOBAL table_cache=-1;
|
||||||
SHOW VARIABLES LIKE 'table_cache';
|
SHOW VARIABLES LIKE 'table_cache';
|
||||||
SET GLOBAL table_cache=DEFAULT;
|
SET GLOBAL table_cache=DEFAULT;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#6282 Packet error with SELECT INTO
|
||||||
|
#
|
||||||
|
create table t1 (a int);
|
||||||
|
select a into @x from t1;
|
||||||
|
show warnings;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
@ -2439,7 +2439,14 @@ ha_innobase::store_key_val_for_row(
|
|||||||
(byte*) (record
|
(byte*) (record
|
||||||
+ (ulint)get_field_offset(table, field)),
|
+ (ulint)get_field_offset(table, field)),
|
||||||
lenlen);
|
lenlen);
|
||||||
|
|
||||||
|
/* In a column prefix index, we may need to truncate
|
||||||
|
the stored value: */
|
||||||
|
|
||||||
|
if (len > key_part->length) {
|
||||||
|
len = key_part->length;
|
||||||
|
}
|
||||||
|
|
||||||
/* The length in a key value is always stored in 2
|
/* The length in a key value is always stored in 2
|
||||||
bytes */
|
bytes */
|
||||||
|
|
||||||
@ -2476,6 +2483,11 @@ ha_innobase::store_key_val_for_row(
|
|||||||
|
|
||||||
ut_a(get_field_offset(table, field)
|
ut_a(get_field_offset(table, field)
|
||||||
== key_part->offset);
|
== key_part->offset);
|
||||||
|
|
||||||
|
/* All indexes on BLOB and TEXT are column prefix
|
||||||
|
indexes, and we may need to truncate the data to be
|
||||||
|
stored in the kay value: */
|
||||||
|
|
||||||
if (blob_len > key_part->length) {
|
if (blob_len > key_part->length) {
|
||||||
blob_len = key_part->length;
|
blob_len = key_part->length;
|
||||||
}
|
}
|
||||||
@ -2494,11 +2506,17 @@ ha_innobase::store_key_val_for_row(
|
|||||||
|
|
||||||
buff += key_part->length;
|
buff += key_part->length;
|
||||||
} else {
|
} else {
|
||||||
|
/* Here we handle all other data types except the
|
||||||
|
true VARCHAR, BLOB and TEXT. Note that the column
|
||||||
|
value we store may be also in a column prefix
|
||||||
|
index. */
|
||||||
|
|
||||||
if (is_null) {
|
if (is_null) {
|
||||||
buff += key_part->length;
|
buff += key_part->length;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(buff, record + key_part->offset,
|
memcpy(buff, record + key_part->offset,
|
||||||
key_part->length);
|
key_part->length);
|
||||||
buff += key_part->length;
|
buff += key_part->length;
|
||||||
|
@ -193,6 +193,7 @@ THD::THD()
|
|||||||
variables.pseudo_thread_id= 0;
|
variables.pseudo_thread_id= 0;
|
||||||
one_shot_set= 0;
|
one_shot_set= 0;
|
||||||
file_id = 0;
|
file_id = 0;
|
||||||
|
query_id= 0;
|
||||||
warn_id= 0;
|
warn_id= 0;
|
||||||
db_charset= global_system_variables.collation_database;
|
db_charset= global_system_variables.collation_database;
|
||||||
bzero(ha_data, sizeof(ha_data));
|
bzero(ha_data, sizeof(ha_data));
|
||||||
|
@ -2276,7 +2276,7 @@ static int my_strnxfrm_utf8(CHARSET_INFO *cs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dst < de) /* Clear the last byte, if "dstlen" was an odd number */
|
if (dst < de) /* Clear the last byte, if "dstlen" was an odd number */
|
||||||
*de= 0x00;
|
*dst= 0x00;
|
||||||
|
|
||||||
return dstlen;
|
return dstlen;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user