diff --git a/mysql-test/r/innodb_handler.result b/mysql-test/r/innodb_handler.result index 949756a6546..8aa5309308f 100644 --- a/mysql-test/r/innodb_handler.result +++ b/mysql-test/r/innodb_handler.result @@ -147,4 +147,5 @@ HANDLER t1 READ `primary` = (1, 1000); no1 no2 HANDLER t1 READ `primary` PREV; no1 no2 +1 275 DROP TABLE t1; diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 900c87d83a5..d33a87f0893 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -351,6 +351,13 @@ bool mysql_change_db(THD *thd,const char *name) x_free(dbname); 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)); if (test_all_bits(thd->master_access,DB_ACLS)) db_access=DB_ACLS; diff --git a/sql/sql_update.cc b/sql/sql_update.cc index de370ab92b5..19961f5d9e1 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -478,11 +478,6 @@ int multi_update::prepare(List ¬_used_values) table->used_keys=0; table->pos_in_table_list= tl; } - else - { - table_ref->lock_type=TL_READ; - mysql_unlock_some_tables(thd,&table,1); - } } diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index d5181dc4db0..6dd3641381a 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -491,7 +491,7 @@ static uchar* thai2sortable(const uchar * tstr,uint len) return((uchar*) tstr); } pLeft4 = pRight4;*/ - while(len--) { + while((len--)) { if(isldvowel(*p) && isconsnt(p[1])) { *pRight1++ = t_ctype[p[1]][0]; *pRight2++ = t_ctype[p[1]][1]; @@ -501,7 +501,8 @@ static uchar* thai2sortable(const uchar * tstr,uint len) *pRight2++ = t_ctype[*p][1]; *pRight3++ = t_ctype[*p][2]; /* *pRight4++ = t_ctype[*p][3]; */ - len--; + if (!(len--)) + break; p += 2; } else { *pRight1 = t_ctype[*p][0];