logo       

bk commit into 4.0 tree (1.1475): msg#00380

db.mysql.devel

Subject: bk commit into 4.0 tree (1.1475)

Below is the list of changes that have just been committed into a local
4.0 repository of monty. When monty 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
1.1475 03/04/27 22:12:08 monty@xxxxxxxxxxxxxxx +25 -0
Fixed problem when comparing a key for a multi-byte-character set. (bug 152)
Use 0x.... as strings if 'new' mode. (bug 152)
Don't report -max on windows when InnoDB is enabled. (bug 332)
Reset current_linfo; This could cause a hang when doing PURGE LOGS.
Fix for row numbers in EXPLAIN (bug 322)
Fix that USE_FRM works for all table types (bug 97)

sql/sql_yacc.yy
1.205 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +1 -5
Removed compiler warnings.

sql/sql_table.cc
1.154 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +26 -6
Fix that USE_FRM works for all table types (without strange errors)

sql/sql_select.cc
1.231 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +3 -0
Fix for row numbers in EXPLAIN

sql/sql_repl.cc
1.93 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +3 -0
Reset current_linfo; This could cause a hang when doing PURGE LOGS.

sql/sql_insert.cc
1.98 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +1 -1
Removed debug message

sql/sql_analyse.cc
1.19 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +0 -1
Removed unused variable

sql/mysqld.cc
1.420 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +2 -2
Don't report -max on windows when InnoDB is enabled.

sql/item.h
1.38 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +1 -1
Use 0x.... as strings if 'new' mode

sql/item.cc
1.29 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +8 -0
Use 0x.... as strings if 'new' mode

sql/field.cc
1.73 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +23 -2
Fixed problem when comparing a key for a multi-byte-character set.

mysql-test/t/repair.test
1.2 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +3 -1
Test of USE_FRM and HEAP tables

mysql-test/t/ctype_latin1_de.test
1.6 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +23 -0
New test for latin1_de

mysql-test/t/ctype_latin1_de-master.opt
1.3 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +2 -1
--new is needed to get 0x... strings to work properly

mysql-test/r/rpl_alter.result
1.4 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +11 -11
New test results

mysql-test/r/repair.result
1.2 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +5 -1
New test results

mysql-test/r/join.result
1.23 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +8 -0
New test results

mysql-test/r/ctype_latin1_de.result
1.7 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +52 -0
New test results

myisam/sort.c
1.27 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +3 -3
Fixed printf statements

myisam/myisamdef.h
1.58 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +3 -1
Fixed problem when comparing a key for a multi-byte-character set.

myisam/mi_test2.c
1.15 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +6 -6
Fixed printf statements

myisam/mi_search.c
1.34 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +31 -0
Fixed problem when comparing a key for a multi-byte-character set.

myisam/mi_rkey.c
1.12 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +23 -10
Fixed problem when comparing a key for a multi-byte-character set.

myisam/mi_range.c
1.7 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +2 -1
Fixed problem when comparing a key for a multi-byte-character set.

myisam/mi_key.c
1.16 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +20 -3
Fixed problem when comparing a key for a multi-byte-character set.

VC++Files/libmysql/libmysql.dsp
1.9 03/04/27 22:12:05 monty@xxxxxxxxxxxxxxx +15 -7
Added new source files

# 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: monty
# Host: mashka.mysql.fi
# Root: /home/my/mysql-4.0

--- 1.15/myisam/mi_key.c Fri Jul 26 15:42:49 2002
+++ 1.16/myisam/mi_key.c Sun Apr 27 22:12:05 2003
@@ -136,11 +136,26 @@
} /* _mi_make_key */


- /* Pack a key to intern format from given format (c_rkey) */
- /* returns length of packed key */
+/*
+ Pack a key to intern format from given format (c_rkey)
+
+ SYNOPSIS
+ _mi_pack_key()
+ info MyISAM handler
+ uint keynr key number
+ key Store packed key here
+ old Not packed key
+ k_length Length of 'old' to use
+ last_used_keyseg out parameter. May be NULL
+
+ RETURN
+ length of packed key
+
+ last_use_keyseg Store pointer to the keyseg after the last used one
+*/

uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
- uint k_length)
+ uint k_length, MI_KEYSEG **last_used_keyseg)
{
uint length;
uchar *pos,*end,*start_key=key;
@@ -211,6 +226,8 @@
key+= length;
k_length-=length;
}
+ if (last_used_keyseg)
+ *last_used_keyseg= keyseg;

#ifdef NOT_USED
if (keyseg->type)

--- 1.6/myisam/mi_range.c Thu Dec 6 14:10:40 2001
+++ 1.7/myisam/mi_range.c Sun Apr 27 22:12:05 2003
@@ -83,7 +83,8 @@
if (key_len == 0)
key_len=USE_WHOLE_KEY;
key_buff=info->lastkey+info->s->base.max_key_length;
- key_len=_mi_pack_key(info,inx,key_buff,(uchar*) key,key_len);
+ key_len=_mi_pack_key(info,inx,key_buff,(uchar*) key,key_len,
+ (MI_KEYSEG**) 0);
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,keyinfo->seg,
(uchar*) key_buff,key_len););
nextflag=myisam_read_vec[search_flag];

--- 1.11/myisam/mi_rkey.c Tue Oct 2 05:52:59 2001
+++ 1.12/myisam/mi_rkey.c Sun Apr 27 22:12:05 2003
@@ -23,10 +23,12 @@
/* Ordinary search_flag is 0 ; Give error if no record with key */

int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
- enum ha_rkey_function search_flag)
+ enum ha_rkey_function search_flag)
{
uchar *key_buff;
MYISAM_SHARE *share=info->s;
+ MI_KEYDEF *keyinfo;
+ MI_KEYSEG *last_used_keyseg;
uint pack_key_length, use_key_length, nextflag;
DBUG_ENTER("mi_rkey");
DBUG_PRINT("enter",("base: %lx inx: %d search_flag: %d",
@@ -36,23 +38,27 @@
DBUG_RETURN(my_errno);

info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
+ keyinfo= share->keyinfo + inx;

if (!info->use_packed_key)
{
if (key_len == 0)
key_len=USE_WHOLE_KEY;
key_buff=info->lastkey+info->s->base.max_key_length;
- pack_key_length=_mi_pack_key(info,(uint) inx,key_buff,(uchar*)
key,key_len);
- info->last_rkey_length=pack_key_length;
- DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,share->keyinfo[inx].seg,
- key_buff,pack_key_length););
+ pack_key_length=_mi_pack_key(info, (uint) inx, key_buff, (uchar*) key,
+ key_len, &last_used_keyseg);
+ DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE, keyinfo->seg,
+ key_buff, pack_key_length););
}
else
{
- /* key is already packed! */
+ /*
+ key is already packed!; This happens when we are using a MERGE TABLE
+ */
key_buff=info->lastkey+info->s->base.max_key_length;
- info->last_rkey_length=pack_key_length=key_len;
+ pack_key_length= key_len;
bmove(key_buff,key,key_len);
+ last_used_keyseg= 0;
}

if (fast_mi_readinfo(info))
@@ -65,8 +71,8 @@
if (!(nextflag & (SEARCH_FIND | SEARCH_NO_FIND | SEARCH_LAST)))
use_key_length=USE_WHOLE_KEY;

- if (!_mi_search(info,info->s->keyinfo+inx,key_buff,use_key_length,
- myisam_read_vec[search_flag],info->s->state.key_root[inx]))
+ if (!_mi_search(info,keyinfo, key_buff, use_key_length,
+ myisam_read_vec[search_flag], info->s->state.key_root[inx]))
{
while (info->lastpos >= info->state->data_file_length)
{
@@ -76,7 +82,7 @@
exact key, because the keys are sorted according to position
*/

- if (_mi_search_next(info,info->s->keyinfo+inx,info->lastkey,
+ if (_mi_search_next(info, keyinfo, info->lastkey,
info->lastkey_length,
myisam_readnext_vec[search_flag],
info->s->state.key_root[inx]))
@@ -86,6 +92,12 @@
if (share->concurrent_insert)
rw_unlock(&share->key_root_lock[inx]);

+ /* Calculate length of the found key; Used by mi_rnext_same */
+ if ((keyinfo->flag & HA_VAR_LENGTH_KEY) && last_used_keyseg)
+ info->last_rkey_length= _mi_keylength_part(keyinfo, info->lastkey,
+ last_used_keyseg);
+ else
+ info->last_rkey_length= pack_key_length;
if (!buf)
DBUG_RETURN(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0);

@@ -99,6 +111,7 @@

/* Store key for read next */
memcpy(info->lastkey,key_buff,pack_key_length);
+ info->last_rkey_length= pack_key_length;
bzero((char*) info->lastkey+pack_key_length,info->s->base.rec_reflength);
info->lastkey_length=pack_key_length+info->s->base.rec_reflength;


--- 1.33/myisam/mi_search.c Thu Jan 9 02:19:11 2003
+++ 1.34/myisam/mi_search.c Sun Apr 27 22:12:05 2003
@@ -1441,6 +1441,37 @@
} /* _mi_keylength */


+/*
+ Calculate length of part key.
+
+ Used in mi_rkey() to find the key found for the key-part that was used.
+ This is needed in case of multi-byte character sets where we may search
+ after '0xDF' but find 'ss'
+*/
+
+uint _mi_keylength_part(MI_KEYDEF *keyinfo, register uchar *key,
+ MI_KEYSEG *end)
+{
+ reg1 MI_KEYSEG *keyseg;
+ uchar *start= key;
+
+ for (keyseg=keyinfo->seg ; keyseg != end ; keyseg++)
+ {
+ if (keyseg->flag & HA_NULL_PART)
+ if (!*key++)
+ continue;
+ if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH))
+ {
+ uint length;
+ get_key_length(length,key);
+ key+=length;
+ }
+ else
+ key+= keyseg->length;
+ }
+ return (uint) (key-start);
+}
+
/* Move a key */

uchar *_mi_move_key(MI_KEYDEF *keyinfo, uchar *to, uchar *from)

--- 1.14/myisam/mi_test2.c Tue Jul 23 18:31:14 2002
+++ 1.15/myisam/mi_test2.c Sun Apr 27 22:12:05 2003
@@ -639,14 +639,14 @@
if ((long) range_records < (long) records*7/10-2 ||
(long) range_records > (long) records*14/10+2)
{
- printf("mi_records_range for key: %d returned %ld; Should be about
%ld\n",
- i, range_records, records);
+ printf("mi_records_range for key: %d returned %lu; Should be about
%lu\n",
+ i, (ulong) range_records, (ulong) records);
goto end;
}
if (verbose && records)
{
- printf("mi_records_range returned %ld; Exact is %ld (diff: %4.2g
%%)\n",
- range_records,records,
+ printf("mi_records_range returned %lu; Exact is %lu (diff: %4.2g
%%)\n",
+ (ulong) range_records, (ulong) records,
labs((long) range_records-(long) records)*100.0/records);

}
@@ -660,8 +660,8 @@
|| info.keys != keys)
{
puts("Wrong info from mi_info");
- printf("Got: records: %ld delete: %ld i_keys: %d\n",
- info.records,info.deleted,info.keys);
+ printf("Got: records: %lu delete: %lu i_keys: %d\n",
+ (ulong) info.records, (ulong) info.deleted, info.keys);
}
if (verbose)
{

--- 1.57/myisam/myisamdef.h Wed Apr 23 13:03:19 2003
+++ 1.58/myisam/myisamdef.h Sun Apr 27 22:12:05 2003
@@ -505,6 +505,8 @@
extern uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uchar *keypos, uint *return_key_length);
extern uint _mi_keylength(MI_KEYDEF *keyinfo,uchar *key);
+extern uint _mi_keylength_part(MI_KEYDEF *keyinfo, register uchar *key,
+ MI_KEYSEG *end);
extern uchar *_mi_move_key(MI_KEYDEF *keyinfo,uchar *to,uchar *from);
extern int _mi_search_next(MI_INFO *info,MI_KEYDEF *keyinfo,uchar *key,
uint key_length,uint nextflag,my_off_t pos);
@@ -519,7 +521,7 @@
extern uint _mi_make_key(MI_INFO *info,uint keynr,uchar *key,
const byte *record,my_off_t filepos);
extern uint _mi_pack_key(MI_INFO *info,uint keynr,uchar *key,uchar *old,
- uint key_length);
+ uint key_length, MI_KEYSEG **last_used_keyseg);
extern int _mi_read_key_record(MI_INFO *info,my_off_t filepos,byte *buf);
extern int _mi_read_cache(IO_CACHE *info,byte *buff,my_off_t pos,
uint length,int re_read_if_possibly);

--- 1.26/myisam/sort.c Mon Mar 24 12:19:25 2003
+++ 1.27/myisam/sort.c Sun Apr 27 22:12:05 2003
@@ -163,8 +163,8 @@
if (maxbuffer == 0)
{
if (!no_messages)
- printf(" - Dumping %lu keys\n",records);
- if (write_index(info,sort_keys,(uint) records))
+ printf(" - Dumping %lu keys\n", (ulong) records);
+ if (write_index(info,sort_keys, (uint) records))
goto err; /* purecov: inspected */
}
else
@@ -173,7 +173,7 @@
if (maxbuffer >= MERGEBUFF2)
{
if (!no_messages)
- printf(" - Merging %lu keys\n",records); /* purecov: tested */
+ printf(" - Merging %lu keys\n", (ulong) records); /* purecov: tested */
if (merge_many_buff(info,keys,sort_keys,
dynamic_element(&buffpek,0,BUFFPEK *),&maxbuffer,&tempfile))
goto err; /* purecov: inspected */

--- 1.72/sql/field.cc Wed Apr 23 21:52:14 2003
+++ 1.73/sql/field.cc Sun Apr 27 22:12:05 2003
@@ -162,6 +162,14 @@
}


+static inline uint field_length_without_space(const char *ptr, uint length)
+{
+ const char *end= ptr+length;
+ while (end > ptr && end[-1] == ' ')
+ end--;
+ return (uint) (end-ptr);
+}
+
/****************************************************************************
** Functions for the base classes
** This is an unpacked number.
@@ -3673,8 +3681,21 @@
{
if (binary_flag)
return memcmp(a_ptr,b_ptr,field_length);
- else
- return my_sortcmp(a_ptr,b_ptr,field_length);
+#ifdef USE_STRCOLL
+ if (use_strcoll(default_charset_info))
+ {
+ /*
+ We have to remove end space to be able to compare multi-byte-characters
+ like in latin_de 'ae' and 0xe4
+ */
+ uint a_length= field_length_without_space(a_ptr, field_length);
+ uint b_length= field_length_without_space(b_ptr, field_length);
+ return my_strnncoll(default_charset_info,
+ (const uchar*) a_ptr, a_length,
+ (const uchar*) b_ptr, b_length);
+ }
+#endif
+ return my_sortcmp(a_ptr,b_ptr,field_length);
}

void Field_string::sort_string(char *to,uint length)

--- 1.28/sql/item.cc Tue Mar 25 13:06:18 2003
+++ 1.29/sql/item.cc Sun Apr 27 22:12:05 2003
@@ -576,6 +576,14 @@
X-'a'+10);
}

+/* In MySQL 4.1 this will always return STRING_RESULT */
+
+enum Item_result Item_varbinary::result_type () const
+{
+ return (current_thd->variables.new_mode) ? STRING_RESULT : INT_RESULT;
+}
+
+
Item_varbinary::Item_varbinary(const char *str, uint str_length)
{
name=(char*) str-2; // Lex makes this start with 0x

--- 1.37/sql/item.h Thu Mar 13 14:44:00 2003
+++ 1.38/sql/item.h Sun Apr 27 22:12:05 2003
@@ -353,7 +353,7 @@
String *val_str(String*) { return &str_value; }
bool save_in_field(Field *field, bool no_conversions);
void make_field(Send_field *field);
- enum Item_result result_type () const { return INT_RESULT; }
+ enum Item_result result_type () const;
unsigned int size_of() { return sizeof(*this);}
};


--- 1.419/sql/mysqld.cc Sat Apr 26 21:10:11 2003
+++ 1.420/sql/mysqld.cc Sun Apr 27 22:12:05 2003
@@ -204,12 +204,12 @@
#ifdef __WIN__
#undef MYSQL_SERVER_SUFFIX
#ifdef __NT__
-#if defined(HAVE_INNOBASE_DB) || defined(HAVE_BERKELEY_DB)
+#if defined(HAVE_BERKELEY_DB)
#define MYSQL_SERVER_SUFFIX "-max-nt"
#else
#define MYSQL_SERVER_SUFFIX "-nt"
#endif /* ...DB */
-#elif defined(HAVE_INNOBASE_DB) || defined(HAVE_BERKELEY_DB)
+#elif defined(HAVE_BERKELEY_DB)
#define MYSQL_SERVER_SUFFIX "-max"
#else
#define MYSQL_SERVER_SUFFIX ""

--- 1.18/sql/sql_analyse.cc Thu Mar 13 14:44:00 2003
+++ 1.19/sql/sql_analyse.cc Sun Apr 27 22:12:05 2003
@@ -284,7 +284,6 @@
char buff[MAX_FIELD_WIDTH], *ptr;
String s(buff, sizeof(buff)), *res;
ulong length;
- TREE_ELEMENT *element;

if (!(res = item->val_str(&s)))
{

--- 1.97/sql/sql_insert.cc Sat Apr 26 20:43:25 2003
+++ 1.98/sql/sql_insert.cc Sun Apr 27 22:12:05 2003
@@ -1029,7 +1029,7 @@
#else
error=pthread_cond_timedwait(&di->cond,&di->mutex,&abstime);
#ifdef EXTRA_DEBUG
- if (error && error != EINTR)
+ if (error && error != EINTR && error != ETIMEDOUT)
{
fprintf(stderr, "Got error %d from pthread_cond_timedwait\n",error);
DBUG_PRINT("error",("Got error %d from pthread_cond_timedwait",

--- 1.230/sql/sql_select.cc Sat Apr 26 20:43:25 2003
+++ 1.231/sql/sql_select.cc Sun Apr 27 22:12:05 2003
@@ -2631,6 +2631,9 @@
join->thd->select_limit)) < 0)
DBUG_RETURN(1); // Impossible range
sel->cond=orig_cond;
+ /* Fix for EXPLAIN */
+ if (sel->quick)
+ join->best_positions[i].records_read= sel->quick->records;
}
else
{

--- 1.153/sql/sql_table.cc Wed Apr 23 14:44:37 2003
+++ 1.154/sql/sql_table.cc Sun Apr 27 22:12:05 2003
@@ -23,6 +23,7 @@
#endif
#include <hash.h>
#include <myisam.h>
+#include <my_dir.h>
#include <assert.h>

#ifdef __WIN__
@@ -1046,12 +1047,31 @@
}
else
{
+ /*
+ User gave us USE_FRM which means that the header in the index file is
+ trashed.
+ In this case we will try to fix the table the following way:
+ - Rename the data file to a temporary name
+ - Truncate the table
+ - Replace the new data file with the old one
+ - Run a normal repair using the new index file and the old data file
+ */
+
+ char from[FN_REFLEN],tmp[FN_REFLEN+32];
+ const char **ext= table->table->file->bas_ext();
+ MY_STAT stat_info;
+
+ /*
+ Check if this is a table type that stores index and data separately,
+ like ISAM or MyISAM
+ */
+ if (!ext[0] || !ext[1])
+ DBUG_RETURN(0); // No data file
+
+ strxmov(from, table->table->path, ext[1], NullS); // Name of data file
+ if (!my_stat(from, &stat_info, MYF(0)))
+ DBUG_RETURN(0); // Can't use USE_FRM flag

- char from[FN_REFLEN],tmp[FN_REFLEN];
- char* db = thd->db ? thd->db : table->db;
-
- sprintf(from, "%s/%s/%s", mysql_real_data_home, db, table->real_name);
- fn_format(from, from, "", MI_NAME_DEXT, 4);
sprintf(tmp,"%s-%lx_%lx", from, current_pid, thd->thread_id);

pthread_mutex_lock(&LOCK_open);
@@ -1067,7 +1087,7 @@
unlock_table_name(thd, table);
pthread_mutex_unlock(&LOCK_open);
DBUG_RETURN(send_check_errmsg(thd, table, "repair",
- "Failed renaming .MYD file"));
+ "Failed renaming data file"));
}
if (mysql_truncate(thd, table, 1))
{

--- 1.204/sql/sql_yacc.yy Sat Apr 26 20:43:25 2003
+++ 1.205/sql/sql_yacc.yy Sun Apr 27 22:12:05 2003
@@ -2310,16 +2310,12 @@
| WITH CUBE_SYM
{
LEX *lex=Lex;
- lex->olap = true;
- lex->select->olap= CUBE_TYPE;
net_printf(&lex->thd->net, ER_NOT_SUPPORTED_YET, "CUBE");
YYABORT; /* To be deleted in 4.1 */
}
| WITH ROLLUP_SYM
{
LEX *lex=Lex;
- lex->olap = true;
- lex->select->olap= ROLLUP_TYPE;
net_printf(&lex->thd->net, ER_NOT_SUPPORTED_YET, "ROLLUP");
YYABORT; /* To be deleted in 4.1 */
}
@@ -2407,7 +2403,7 @@

ULONG_NUM:
NUM { $$= strtoul($1.str,NULL,10); }
- | LONG_NUM { $$= (ulonglong) strtoll($1.str,NULL,10); }
+ | LONG_NUM { $$= (ulong) strtoll($1.str,NULL,10); }
| ULONGLONG_NUM { $$= (ulong) strtoull($1.str,NULL,10); }
| REAL_NUM { $$= strtoul($1.str,NULL,10); }
| FLOAT_NUM { $$= strtoul($1.str,NULL,10); };

--- 1.8/VC++Files/libmysql/libmysql.dsp Fri Feb 28 22:23:58 2003
+++ 1.9/VC++Files/libmysql/libmysql.dsp Sun Apr 27 22:12:05 2003
@@ -25,7 +25,7 @@
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=cl.exe
+CPP=xicl6.exe
MTL=midl.exe
RSC=rc.exe

@@ -52,14 +52,14 @@
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
/def:"libmysql.def" /out:"..\lib_release\libmysql.dll" /libpath:"."
/libpath:"..\lib_release"
# SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
SOURCE="$(InputPath)"
-PostBuild_Desc=Copy .lib file
-PostBuild_Cmds=xcopy release\libmysql.lib ..\lib_release\
+PostBuild_Desc=Move DLL export lib
+PostBuild_Cmds=xcopy release\libmysql.lib ..\lib_release /y
# End Special Build Tool

!ELSEIF "$(CFG)" == "libmysql - Win32 Debug"
@@ -85,14 +85,14 @@
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=link.exe
+LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 zlib.lib wsock32.lib kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll
/incremental:no /map /debug /machine:I386 /def:"libmysql.def"
/out:"..\lib_debug\libmysql.dll" /pdbtype:sept /libpath:"."
/libpath:"..\lib_debug"
# SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
SOURCE="$(InputPath)"
-PostBuild_Desc=Copy .lib file
-PostBuild_Cmds=xcopy ..\lib_debug\libmysql.dll C:\winnt\system32\
xcopy debug\libmysql.lib ..\lib_debug\
+PostBuild_Desc=Move DLL export lib
+PostBuild_Cmds=xcopy ..\lib_debug\libmysql.dll C:\winnt\system32\ /y xcopy
debug\libmysql.lib ..\lib_debug\ /y
# End Special Build Tool

!ENDIF
@@ -239,6 +239,10 @@
# End Source File
# Begin Source File

+SOURCE=..\mysys\mf_path.c
+# End Source File
+# Begin Source File
+
SOURCE=..\mysys\mf_unixpath.c
# End Source File
# Begin Source File
@@ -392,6 +396,10 @@
# Begin Source File

SOURCE=..\client\select_test.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\mysys\sha1.c
# End Source File
# Begin Source File


--- 1.22/mysql-test/r/join.result Sat Apr 26 21:10:11 2003
+++ 1.23/mysql-test/r/join.result Sun Apr 27 22:12:05 2003
@@ -273,8 +273,16 @@
SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING
(siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith';
rate_code base_rate
cust 20
+drop table t1,t2;
+CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, Value1 VARCHAR(255));
+CREATE TABLE t2 (ID INTEGER NOT NULL PRIMARY KEY, Value2 VARCHAR(255));
+INSERT INTO t1 VALUES (1, 'A');
+INSERT INTO t2 VALUES (1, 'B');
+SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND (Value1 = 'A' AND Value2 <> 'B');
ID Value1 ID Value2
+SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND Value1 = 'A' AND Value2 <> 'B';
ID Value1 ID Value2
+SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1;
ID Value1 ID Value2
drop table t1,t2;
create table t1 (i int);

--- 1.6/mysql-test/r/ctype_latin1_de.result Fri Mar 7 12:36:51 2003
+++ 1.7/mysql-test/r/ctype_latin1_de.result Sun Apr 27 22:12:05 2003
@@ -212,3 +212,55 @@
a
test
drop table t1;
+create table t1 (word varchar(255) not null, word2 varchar(255) not null,
index(word));
+insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae');
+update t1 set word2=word;
+select word, word=0xdf as t from t1 having t > 0;
+word t
+ß 1
+select word, word=cast(0xdf AS CHAR) as t from t1 having t > 0;
+word t
+ss 1
+ß 1
+select * from t1 where word=0xDF;
+word word2
+ß ß
+select * from t1 where word=CAST(0xDF as CHAR);
+word word2
+ss ss
+ß ß
+select * from t1 where word2=0xDF;
+word word2
+ß ß
+select * from t1 where word2=CAST(0xDF as CHAR);
+word word2
+ss ss
+ß ß
+select * from t1 where word='ae';
+word word2
+ä ä
+ae ae
+select * from t1 where word= 0xe4 or word=CAST(0xe4 as CHAR);
+word word2
+ä ä
+ae ae
+select * from t1 where word between 0xDF and 0xDF;
+word word2
+ß ß
+select * from t1 where word between CAST(0xDF AS CHAR) and CAST(0xDF AS CHAR);
+word word2
+ss ss
+ß ß
+select * from t1 where word like 'ae';
+word word2
+ae ae
+select * from t1 where word like 'AE';
+word word2
+ae ae
+select * from t1 where word like 0xDF;
+word word2
+ß ß
+select * from t1 where word like CAST(0xDF as CHAR);
+word word2
+ß ß
+drop table t1;

--- 1.2/mysql-test/t/ctype_latin1_de-master.opt Thu Oct 11 03:59:41 2001
+++ 1.3/mysql-test/t/ctype_latin1_de-master.opt Sun Apr 27 22:12:05 2003
@@ -1 +1,2 @@
---default-character-set=latin1_de
+--default-character-set=latin1_de --new
+

--- 1.5/mysql-test/t/ctype_latin1_de.test Fri Mar 7 12:36:51 2003
+++ 1.6/mysql-test/t/ctype_latin1_de.test Sun Apr 27 22:12:05 2003
@@ -45,3 +45,26 @@
select * from t1 where a like "te_t";
select * from t1 where match a against ("te*" in boolean mode)+0;
drop table t1;
+
+#
+# Test bug report #152 (problem with index on latin1_de)
+#
+
+create table t1 (word varchar(255) not null, word2 varchar(255) not null,
index(word));
+insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae');
+update t1 set word2=word;
+select word, word=0xdf as t from t1 having t > 0;
+select word, word=cast(0xdf AS CHAR) as t from t1 having t > 0;
+select * from t1 where word=0xDF;
+select * from t1 where word=CAST(0xDF as CHAR);
+select * from t1 where word2=0xDF;
+select * from t1 where word2=CAST(0xDF as CHAR);
+select * from t1 where word='ae';
+select * from t1 where word= 0xe4 or word=CAST(0xe4 as CHAR);
+select * from t1 where word between 0xDF and 0xDF;
+select * from t1 where word between CAST(0xDF AS CHAR) and CAST(0xDF AS CHAR);
+select * from t1 where word like 'ae';
+select * from t1 where word like 'AE';
+select * from t1 where word like 0xDF;
+select * from t1 where word like CAST(0xDF as CHAR);
+drop table t1;

--- 1.3/mysql-test/r/rpl_alter.result Thu Aug 8 03:11:05 2002
+++ 1.4/mysql-test/r/rpl_alter.result Sun Apr 27 22:12:05 2003
@@ -4,18 +4,18 @@
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
-drop database if exists d1;
-create database d1;
-create table d1.t1 ( n int);
-alter table d1.t1 add m int;
-insert into d1.t1 values (1,2);
-create table d1.t2 (n int);
-insert into d1.t2 values (45);
-rename table d1.t2 to d1.t3, d1.t1 to d1.t2;
-select * from d1.t2;
+drop database if exists test_$1;
+create database test_$1;
+create table test_$1.t1 ( n int);
+alter table test_$1.t1 add m int;
+insert into test_$1.t1 values (1,2);
+create table test_$1.t2 (n int);
+insert into test_$1.t2 values (45);
+rename table test_$1.t2 to test_$1.t3, test_$1.t1 to test_$1.t2;
+select * from test_$1.t2;
n m
1 2
-select * from d1.t3;
+select * from test_$1.t3;
n
45
-drop database d1;
+drop database test_$1;

--- 1.92/sql/sql_repl.cc Mon Mar 17 23:51:53 2003
+++ 1.93/sql/sql_repl.cc Sun Apr 27 22:12:05 2003
@@ -1042,6 +1042,9 @@
}

send_eof(&thd->net);
+ pthread_mutex_lock(&LOCK_thread_count);
+ thd->current_linfo = 0;
+ pthread_mutex_unlock(&LOCK_thread_count);
DBUG_RETURN(0);
}


--- 1.1/mysql-test/r/repair.result Sun Sep 1 20:52:17 2002
+++ 1.2/mysql-test/r/repair.result Sun Apr 27 22:12:05 2003
@@ -4,4 +4,8 @@
Table Op Msg_type Msg_text
test.t1 repair warning Number of rows changed from 0 to 1
test.t1 repair status OK
-drop table if exists t1;
+alter table t1 TYPE=HEAP;
+repair table t1 use_frm;
+Table Op Msg_type Msg_text
+test.t1 repair error The handler for the table doesn't support repair
+drop table t1;

--- 1.1/mysql-test/t/repair.test Sun Sep 1 20:52:16 2002
+++ 1.2/mysql-test/t/repair.test Sun Apr 27 22:12:05 2003
@@ -5,4 +5,6 @@
drop table if exists t1;
create table t1 SELECT 1,"table 1";
repair table t1 use_frm;
-drop table if exists t1;
+alter table t1 TYPE=HEAP;
+repair table t1 use_frm;
+drop table t1;

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=gcdmd-internals@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise