Below is the list of changes that have just been committed into a local
5.1 repository of bar. When bar does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-12 09:40:01+05:00, bar@stripped +4 -0
Merge mysql.com:/usr/home/bar/mysql-5.0-rpl.b22052
into mysql.com:/usr/home/bar/mysql-5.1-rpl
MERGE: 1.1810.2130.25
mysql-test/r/ctype_ucs.result@stripped, 2006-10-12 09:39:54+05:00,
bar@stripped +0 -0
Auto merged
MERGE: 1.39.1.11
mysql-test/t/ctype_ucs.test@stripped, 2006-10-12 09:39:54+05:00,
bar@stripped +0 -0
Auto merged
MERGE: 1.36.1.12
storage/myisam/mi_key.c@stripped, 2006-10-12 09:39:54+05:00, bar@stripped
+0 -0
Auto merged
MERGE: 1.38.14.2
storage/myisam/mi_key.c@stripped, 2006-10-12 09:39:54+05:00,
bar@stripped +0 -0
Merge rename: myisam/mi_key.c -> storage/myisam/mi_key.c
storage/myisam/mi_open.c@stripped, 2006-10-12 09:39:54+05:00, bar@stripped
+0 -0
Auto merged
MERGE: 1.90.6.2
storage/myisam/mi_open.c@stripped, 2006-10-12 09:39:54+05:00,
bar@stripped +0 -0
Merge rename: myisam/mi_open.c -> storage/myisam/mi_open.c
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: bar
# Host: bar.intranet.mysql.r18.ru
# Root: /usr/home/bar/mysql-5.1-rpl/RESYNC
--- 1.90.6.1/myisam/mi_open.c 2006-10-12 09:40:12 +05:00
+++ 1.104/storage/myisam/mi_open.c 2006-10-12 09:40:12 +05:00
@@ -95,7 +95,8 @@
head_length=sizeof(share_buff.state.header);
bzero((byte*) &info,sizeof(info));
- my_realpath(name_buff, fn_format(org_name,name,"",MI_NAME_IEXT,4),MYF(0));
+ my_realpath(name_buff, fn_format(org_name,name,"",MI_NAME_IEXT,
+ MY_UNPACK_FILENAME),MYF(0));
pthread_mutex_lock(&THR_LOCK_myisam);
if (!(old_info=test_if_reopen(name_buff)))
{
@@ -141,17 +142,27 @@
~(HA_OPTION_PACK_RECORD | HA_OPTION_PACK_KEYS |
HA_OPTION_COMPRESS_RECORD | HA_OPTION_READ_ONLY_DATA |
HA_OPTION_TEMP_COMPRESS_RECORD | HA_OPTION_CHECKSUM |
- HA_OPTION_TMP_TABLE | HA_OPTION_DELAY_KEY_WRITE))
+ HA_OPTION_TMP_TABLE | HA_OPTION_DELAY_KEY_WRITE |
+ HA_OPTION_RELIES_ON_SQL_LAYER))
{
DBUG_PRINT("error",("wrong options: 0x%lx", share->options));
my_errno=HA_ERR_OLD_FILE;
goto err;
}
+ if ((share->options & HA_OPTION_RELIES_ON_SQL_LAYER) &&
+ ! (open_flags & HA_OPEN_FROM_SQL_LAYER))
+ {
+ DBUG_PRINT("error", ("table cannot be openned from non-sql layer"));
+ my_errno= HA_ERR_UNSUPPORTED;
+ goto err;
+ }
/* Don't call realpath() if the name can't be a link */
if (!strcmp(name_buff, org_name) ||
my_readlink(index_name, org_name, MYF(0)) == -1)
(void) strmov(index_name, org_name);
- (void) fn_format(data_name,org_name,"",MI_NAME_DEXT,2+4+16);
+ *strrchr(org_name, '.')= '\0';
+ (void) fn_format(data_name,org_name,"",MI_NAME_DEXT,
+ MY_APPEND_EXT|MY_UNPACK_FILENAME|MY_RESOLVE_SYMLINKS);
info_length=mi_uint2korr(share->state.header.header_length);
base_pos=mi_uint2korr(share->state.header.base_pos);
@@ -197,9 +208,9 @@
if (len != MI_BASE_INFO_SIZE)
{
DBUG_PRINT("warning",("saved_base_info_length: %d base_info_length: %d",
- len,MI_BASE_INFO_SIZE))
+ len,MI_BASE_INFO_SIZE));
}
- disk_pos= (char*)
+ disk_pos= (char*)
my_n_base_info_read((uchar*) disk_cache + base_pos, &share->base);
share->state.state_length=base_pos;
@@ -284,10 +295,11 @@
&share->data_file_name,strlen(data_name)+1,
&share->state.key_root,keys*sizeof(my_off_t),
&share->state.key_del,
- (share->state.header.max_block_size*sizeof(my_off_t)),
+ (share->state.header.max_block_size_index*sizeof(my_off_t)),
#ifdef THREAD
&share->key_root_lock,sizeof(rw_lock_t)*keys,
#endif
+ &share->mmap_lock,sizeof(rw_lock_t),
NullS))
goto err;
errpos=4;
@@ -298,7 +310,7 @@
(char*) key_root, sizeof(my_off_t)*keys);
memcpy((char*) share->state.key_del,
(char*) key_del, (sizeof(my_off_t) *
- share->state.header.max_block_size));
+ share->state.header.max_block_size_index));
strmov(share->unique_file_name, name_buff);
share->unique_name_length= strlen(name_buff);
strmov(share->index_file_name, index_name);
@@ -419,6 +431,7 @@
pos->flag=0;
pos++;
}
+ share->ftparsers= 0;
}
disk_pos_assert(disk_pos + share->base.fields *MI_COLUMNDEF_SIZE, end_pos);
@@ -461,7 +474,6 @@
(keys ? MI_INDEX_BLOCK_MARGIN *
share->blocksize * keys : 0));
share->blocksize=min(IO_SIZE,myisam_block_size);
-
share->data_file_type=STATIC_RECORD;
if (share->options & HA_OPTION_COMPRESS_RECORD)
{
@@ -479,11 +491,13 @@
share->data_file_type = DYNAMIC_RECORD;
my_afree((gptr) disk_cache);
mi_setup_functions(share);
+ share->is_log_table= FALSE;
#ifdef THREAD
thr_lock_init(&share->lock);
VOID(pthread_mutex_init(&share->intern_lock,MY_MUTEX_INIT_FAST));
for (i=0; i<keys; i++)
VOID(my_rwlock_init(&share->key_root_lock[i], NULL));
+ VOID(my_rwlock_init(&share->mmap_lock, NULL));
if (!thr_lock_inited)
{
/* Probably a single threaded program; Don't use concurrent inserts */
@@ -738,6 +752,8 @@
share->compare_unique=_mi_cmp_static_unique;
share->calc_checksum= mi_static_checksum;
}
+ share->file_read= mi_nommap_pread;
+ share->file_write= mi_nommap_pwrite;
if (!(share->options & HA_OPTION_CHECKSUM))
share->calc_checksum=0;
return;
@@ -807,7 +823,7 @@
uchar buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE];
uchar *ptr=buff;
uint i, keys= (uint) state->header.keys,
- key_blocks=state->header.max_block_size;
+ key_blocks=state->header.max_block_size_index;
DBUG_ENTER("mi_state_info_write");
memcpy_fixed(ptr,&state->header,sizeof(state->header));
@@ -873,7 +889,7 @@
ptr +=sizeof(state->header);
keys=(uint) state->header.keys;
key_parts=mi_uint2korr(state->header.key_parts);
- key_blocks=state->header.max_block_size;
+ key_blocks=state->header.max_block_size_index;
state->open_count = mi_uint2korr(ptr); ptr +=2;
state->changed= (bool) *ptr++;
@@ -1046,9 +1062,11 @@
keydef->keylength = mi_uint2korr(ptr); ptr +=2;
keydef->minlength = mi_uint2korr(ptr); ptr +=2;
keydef->maxlength = mi_uint2korr(ptr); ptr +=2;
- keydef->block_size = keydef->block_length/MI_MIN_KEY_BLOCK_LENGTH-1;
+ keydef->block_size_index= keydef->block_length/MI_MIN_KEY_BLOCK_LENGTH-1;
keydef->underflow_block_length=keydef->block_length/3;
keydef->version = 0; /* Not saved */
+ keydef->parser = &ft_default_parser;
+ keydef->ftparser_nr = 0;
return ptr;
}
--- 1.53/mysql-test/r/ctype_ucs.result 2006-10-12 09:40:12 +05:00
+++ 1.54/mysql-test/r/ctype_ucs.result 2006-10-12 09:40:12 +05:00
@@ -723,6 +723,28 @@
river
drop table t1;
deallocate prepare stmt;
+create table t1 (
+a char(10) unicode not null,
+index a (a)
+) engine=myisam;
+insert into t1 values (repeat(0x201f, 10));
+insert into t1 values (repeat(0x2020, 10));
+insert into t1 values (repeat(0x2021, 10));
+explain select hex(a) from t1 order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL a 20 NULL 3 Using index
+select hex(a) from t1 order by a;
+hex(a)
+201F201F201F201F201F201F201F201F201F201F
+2020202020202020202020202020202020202020
+2021202120212021202120212021202120212021
+alter table t1 drop index a;
+select hex(a) from t1 order by a;
+hex(a)
+201F201F201F201F201F201F201F201F201F201F
+2020202020202020202020202020202020202020
+2021202120212021202120212021202120212021
+drop table t1;
CREATE TABLE t1 (id int, s char(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci);
INSERT INTO t1 VALUES (1, 'ZZZZZ'), (1, 'ZZZ'), (2, 'ZZZ'), (2, 'ZZZZZ');
SELECT id, MIN(s) FROM t1 GROUP BY id;
--- 1.48/mysql-test/t/ctype_ucs.test 2006-10-12 09:40:12 +05:00
+++ 1.49/mysql-test/t/ctype_ucs.test 2006-10-12 09:40:12 +05:00
@@ -455,6 +455,23 @@
deallocate prepare stmt;
#
+# Bug#22052 Trailing spaces are not removed from UNICODE fields in an index
+#
+create table t1 (
+ a char(10) unicode not null,
+ index a (a)
+) engine=myisam;
+insert into t1 values (repeat(0x201f, 10));
+insert into t1 values (repeat(0x2020, 10));
+insert into t1 values (repeat(0x2021, 10));
+# make sure "index read" is used
+explain select hex(a) from t1 order by a;
+select hex(a) from t1 order by a;
+alter table t1 drop index a;
+select hex(a) from t1 order by a;
+drop table t1;
+
+#
# Bug #20076: server crashes for a query with GROUP BY if MIN/MAX aggregation
# over a 'ucs2' field uses a temporary table
#
| Thread |
|---|
| • bk commit into 5.1 tree (bar:1.2308) | bar | 12 Oct |