Three bug fixes and one fix being undone.

parent 0fc5b734
...@@ -147,4 +147,5 @@ HANDLER t1 READ `primary` = (1, 1000); ...@@ -147,4 +147,5 @@ HANDLER t1 READ `primary` = (1, 1000);
no1 no2 no1 no2
HANDLER t1 READ `primary` PREV; HANDLER t1 READ `primary` PREV;
no1 no2 no1 no2
1 275
DROP TABLE t1; DROP TABLE t1;
...@@ -351,6 +351,13 @@ bool mysql_change_db(THD *thd,const char *name) ...@@ -351,6 +351,13 @@ bool mysql_change_db(THD *thd,const char *name)
x_free(dbname); x_free(dbname);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
if (dbname[0] == '`' && dbname[db_length-1] == '`')
{
int counter=1;
for (; counter < db_length - 1; counter++)
dbname[counter-1]=dbname[counter];
dbname[(db_length= counter)-1]='\0';
}
DBUG_PRINT("info",("Use database: %s", dbname)); DBUG_PRINT("info",("Use database: %s", dbname));
if (test_all_bits(thd->master_access,DB_ACLS)) if (test_all_bits(thd->master_access,DB_ACLS))
db_access=DB_ACLS; db_access=DB_ACLS;
......
...@@ -478,11 +478,6 @@ int multi_update::prepare(List<Item> &not_used_values) ...@@ -478,11 +478,6 @@ int multi_update::prepare(List<Item> &not_used_values)
table->used_keys=0; table->used_keys=0;
table->pos_in_table_list= tl; table->pos_in_table_list= tl;
} }
else
{
table_ref->lock_type=TL_READ;
mysql_unlock_some_tables(thd,&table,1);
}
} }
......
...@@ -491,7 +491,7 @@ static uchar* thai2sortable(const uchar * tstr,uint len) ...@@ -491,7 +491,7 @@ static uchar* thai2sortable(const uchar * tstr,uint len)
return((uchar*) tstr); return((uchar*) tstr);
} }
pLeft4 = pRight4;*/ pLeft4 = pRight4;*/
while(len--) { while((len--)) {
if(isldvowel(*p) && isconsnt(p[1])) { if(isldvowel(*p) && isconsnt(p[1])) {
*pRight1++ = t_ctype[p[1]][0]; *pRight1++ = t_ctype[p[1]][0];
*pRight2++ = t_ctype[p[1]][1]; *pRight2++ = t_ctype[p[1]][1];
...@@ -501,7 +501,8 @@ static uchar* thai2sortable(const uchar * tstr,uint len) ...@@ -501,7 +501,8 @@ static uchar* thai2sortable(const uchar * tstr,uint len)
*pRight2++ = t_ctype[*p][1]; *pRight2++ = t_ctype[*p][1];
*pRight3++ = t_ctype[*p][2]; *pRight3++ = t_ctype[*p][2];
/* *pRight4++ = t_ctype[*p][3]; */ /* *pRight4++ = t_ctype[*p][3]; */
len--; if (!(len--))
break;
p += 2; p += 2;
} else { } else {
*pRight1 = t_ctype[*p][0]; *pRight1 = t_ctype[*p][0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment