Commit 447baa90 authored by monty@mysql.com's avatar monty@mysql.com

After merge fixes + simple optimizations

parent e0e0314d
......@@ -121,7 +121,7 @@ create database mysqltest;
create table mysqltest.t1 (a int,b int,c int);
grant all on mysqltest.t1 to mysqltest_1@localhost;
alter table t1 rename t2;
insert command denied to user: 'mysqltest_1@localhost' for table 't2'
ERROR 42000: insert command denied to user: 'mysqltest_1'@'localhost' for table 't2'
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user='mysqltest_1';
drop database mysqltest;
......
......@@ -13,6 +13,6 @@ Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 use `test`; create database `drop-temp+table-test`
master-bin.000001 152 Query 1 152 use `drop-temp+table-test`; create temporary table `table:name` (a int)
master-bin.000001 246 Query 1 246 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE `drop-temp+table-test`.`table:name`
master-bin.000001 365 Query 1 365 use `drop-temp+table-test`; DO RELEASE_LOCK("a")
master-bin.000001 246 Query 1 246 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
master-bin.000001 375 Query 1 375 use `drop-temp+table-test`; DO RELEASE_LOCK("a")
drop database `drop-temp+table-test`;
......@@ -435,7 +435,7 @@ drop temporary table t1;
create table t1 select a from t1 union select a from t2;
ERROR HY000: You can't specify target table 't1' for update in FROM clause
select a from t1 union select a from t2 order by t2.a;
Unknown column 't2.a' in 'ORDER BY'
ERROR 42S22: Unknown column 't2.a' in 'ORDER BY'
drop table t1,t2;
select length(version()) > 1 as `*` UNION select 2;
*
......
......@@ -164,9 +164,9 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
bool silent)
{
char path[FN_REFLEN+16];
MY_DIR *dirp;
long result=1;
int error = 0;
MY_STAT stat_info;
uint create_options = create_info ? create_info->options : 0;
DBUG_ENTER("mysql_create_db");
......@@ -180,12 +180,12 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
}
/* Check directory */
(void)sprintf(path,"%s/%s", mysql_data_home, db);
strxmov(path, mysql_data_home, "/", db, NullS);
unpack_dirname(path,path); // Convert if not unix
if ((dirp = my_dir(path,MYF(MY_DONT_SORT))))
if (my_stat(path,&stat_info,MYF(MY_WME)))
{
my_dirend(dirp);
if (!(create_options & HA_LEX_CREATE_IF_NOT_EXISTS))
if (!(create_options & HA_LEX_CREATE_IF_NOT_EXISTS))
{
my_error(ER_DB_CREATE_EXISTS,MYF(0),db);
error = -1;
......
......@@ -210,7 +210,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
for (tmp_order= (ORDER*) global_parameters->order_list.first;
tmp_order ;
tmp_order= tmp_order->next;
tmp_order= tmp_order->next)
{
Item *item= *tmp_order->item;
if (((item->type() == Item::FIELD_ITEM) &&
......
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