Commit 526b25e2 authored by unknown's avatar unknown

Merge with 4.0


BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/deleted/.del-libmysql.def~f5dffcb3ed925d28:
  Auto merged
BitKeeper/deleted/.del-post-incoming~9f2168f531f09f3b:
  Auto merged
BitKeeper/deleted/.del-post-outgoing~1dd3d8f0f6e8f3cd:
  Auto merged
VC++Files/innobase/innobase.dsp:
  Auto merged
VC++Files/strings/MASM6x/strings.dsp:
  Auto merged
client/mysqldump.c:
  Auto merged
innobase/sync/sync0sync.c:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/t/union.test:
  Auto merged
mysql-test/t/update.test:
  Auto merged
mysys/mf_iocache.c:
  Auto merged
sql/nt_servc.cc:
  Auto merged
mysql-test/r/system_mysql_db.result:
  Auto merged
sql/sql_base.cc:
  Auto merged
parents f6e33d67 922818a7
#!/bin/sh #!/bin/sh
#shift #shift
TO=dev-public@mysql.com
FROM=$USER@mysql.com FROM=$USER@mysql.com
INTERNALS=internals@lists.mysql.com INTERNALS=internals@lists.mysql.com
DOCS=docs-commit@mysql.com DOCS=docs-commit@mysql.com
LIMIT=10000 LIMIT=10000
VERSION="4.0"
if [ "$REAL_EMAIL" = "" ] if [ "$REAL_EMAIL" = "" ]
then then
...@@ -20,17 +20,24 @@ if [ "$BK_STATUS" = OK ] ...@@ -20,17 +20,24 @@ if [ "$BK_STATUS" = OK ]
then then
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet` CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/ BUG#\1/p'`
if [ "$BUG" = "" ]
then
TO=dev-public@mysql.com
else
TO=dev-bugs@mysql.com
fi
#++ #++
# dev-public@ # dev-public@ / dev-bugs@
#-- #--
echo "Commit successful, notifying developers at $TO" echo "Commit successful, notifying developers at $TO"
( (
cat <<EOF cat <<EOF
List-ID: <bk.mysql-4.1> List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $TO To: $TO
Subject: bk commit - 4.1 tree ($CHANGESET) Subject: bk commit - $VERSION tree ($CHANGESET)$BUG
EOF EOF
bk changes -v -r+ bk changes -v -r+
...@@ -43,13 +50,13 @@ EOF ...@@ -43,13 +50,13 @@ EOF
echo "Notifying internals list at $INTERNALS" echo "Notifying internals list at $INTERNALS"
( (
cat <<EOF cat <<EOF
List-ID: <bk.mysql-4.1> List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $INTERNALS To: $INTERNALS
Subject: bk commit into 4.1 tree ($CHANGESET) Subject: bk commit into $VERSION tree ($CHANGESET)
Below is the list of changes that have just been committed into a local Below is the list of changes that have just been committed into a local
4.1 repository of $USER. When $USER does a push these changes will $VERSION repository of $USER. When $USER does a push these changes will
be propagated to the main repository and, within 24 hours after the be propagated to the main repository and, within 24 hours after the
push, to the public repository. push, to the public repository.
For information on how to access the public repository For information on how to access the public repository
...@@ -70,10 +77,10 @@ EOF ...@@ -70,10 +77,10 @@ EOF
echo "Notifying docs list at $DOCS" echo "Notifying docs list at $DOCS"
( (
cat <<EOF cat <<EOF
List-ID: <bk.mysql-4.1> List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $DOCS To: $DOCS
Subject: bk commit - 4.1 tree (Manual) ($CHANGESET) Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)
EOF EOF
bk changes -v -r+ bk changes -v -r+
......
...@@ -168,14 +168,6 @@ SOURCE=.\buf\buf0rea.c ...@@ -168,14 +168,6 @@ SOURCE=.\buf\buf0rea.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\com\com0com.c
# End Source File
# Begin Source File
SOURCE=.\com\com0shm.c
# End Source File
# Begin Source File
SOURCE=.\data\data0data.c SOURCE=.\data\data0data.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -156,6 +156,10 @@ SOURCE=.\str2int.c ...@@ -156,6 +156,10 @@ SOURCE=.\str2int.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\strnlen.c
# End Source File
# Begin Source File
SOURCE=.\Strings.asm SOURCE=.\Strings.asm
!IF "$(CFG)" == "strings - Win32 Release" !IF "$(CFG)" == "strings - Win32 Release"
......
...@@ -188,6 +188,10 @@ SOURCE=.\longlong2str.c ...@@ -188,6 +188,10 @@ SOURCE=.\longlong2str.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\strnlen.c
# End Source File
# Begin Source File
SOURCE=.\my_strtoll10.c SOURCE=.\my_strtoll10.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -173,7 +173,7 @@ static struct my_option my_long_options[] = ...@@ -173,7 +173,7 @@ static struct my_option my_long_options[] =
(gptr*) &opt_delayed, (gptr*) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (gptr*) &opt_delayed, (gptr*) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"delete-master-logs", OPT_DELETE_MASTER_LOGS, {"delete-master-logs", OPT_DELETE_MASTER_LOGS,
"Delete logs on master after backup. This will automagically enable --first-slave.", "Delete logs on master after backup. This automatically enables --first-slave.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"disable-keys", 'K', {"disable-keys", 'K',
"'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output.", (gptr*) &opt_disable_keys, "'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output.", (gptr*) &opt_disable_keys,
...@@ -215,7 +215,7 @@ static struct my_option my_long_options[] = ...@@ -215,7 +215,7 @@ static struct my_option my_long_options[] =
{"lock-tables", 'l', "Lock all tables for read.", (gptr*) &lock_tables, {"lock-tables", 'l', "Lock all tables for read.", (gptr*) &lock_tables,
(gptr*) &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, (gptr*) &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"master-data", OPT_MASTER_DATA, {"master-data", OPT_MASTER_DATA,
"This will cause the master position and filename to be appended to your output. This will automagically enable --first-slave.", "This causes the master position and filename to be appended to your output. This automatically enables --first-slave.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-autocommit", OPT_AUTOCOMMIT, {"no-autocommit", OPT_AUTOCOMMIT,
"Wrap tables with autocommit/commit statements.", "Wrap tables with autocommit/commit statements.",
......
...@@ -180,7 +180,7 @@ mutex_create_func( ...@@ -180,7 +180,7 @@ mutex_create_func(
char* cfile_name, /* in: file name where created */ char* cfile_name, /* in: file name where created */
ulint cline) /* in: file line where created */ ulint cline) /* in: file line where created */
{ {
#if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER) && !defined(__NETWARE) #if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER)
mutex_reset_lock_word(mutex); mutex_reset_lock_word(mutex);
#else #else
os_fast_mutex_init(&(mutex->os_fast_mutex)); os_fast_mutex_init(&(mutex->os_fast_mutex));
......
drop table if exists t1,t2; drop table if exists t1,t2;
drop database if exists mysqltest;
create table t1 ( create table t1 (
col1 int not null auto_increment primary key, col1 int not null auto_increment primary key,
col2 varchar(30) not null, col2 varchar(30) not null,
...@@ -85,6 +86,45 @@ OPTIMIZE TABLE t1; ...@@ -85,6 +86,45 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 optimize status OK test.t1 optimize status OK
DROP TABLE t1; DROP TABLE t1;
create table t1 (i int unsigned not null auto_increment primary key);
insert into t1 values (null),(null),(null),(null);
alter table t1 drop i,add i int unsigned not null auto_increment, drop primary key, add primary key (i);
select * from t1;
i
1
2
3
4
drop table t1;
create table t1 (name char(15));
insert into t1 (name) values ("current");
create database mysqltest;
create table mysqltest.t1 (name char(15));
insert into mysqltest.t1 (name) values ("mysqltest");
select * from t1;
name
current
select * from mysqltest.t1;
name
mysqltest
alter table t1 rename mysqltest.t1;
ERROR 42S01: Table 't1' already exists
select * from t1;
name
current
select * from mysqltest.t1;
name
mysqltest
drop table t1;
drop database mysqltest;
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'
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user='mysqltest_1';
drop database mysqltest;
create table t1 (n1 int not null, n2 int, n3 int, n4 float, create table t1 (n1 int not null, n2 int, n3 int, n4 float,
unique(n1), unique(n1),
key (n1, n2, n3, n4), key (n1, n2, n3, n4),
...@@ -143,16 +183,6 @@ t1 1 n4 3 n2 A 10 NULL NULL YES BTREE ...@@ -143,16 +183,6 @@ t1 1 n4 3 n2 A 10 NULL NULL YES BTREE
t1 1 n4 4 n3 A 10 NULL NULL YES BTREE t1 1 n4 4 n3 A 10 NULL NULL YES BTREE
drop table t1; drop table t1;
create table t1 (i int unsigned not null auto_increment primary key); create table t1 (i int unsigned not null auto_increment primary key);
insert into t1 values (null),(null),(null),(null);
alter table t1 drop i,add i int unsigned not null auto_increment, drop primary key, add primary key (i);
select * from t1;
i
1
2
3
4
drop table t1;
create table t1 (i int unsigned not null auto_increment primary key);
alter table t1 rename t2; alter table t1 rename t2;
alter table t2 rename t1, add c char(10) comment "no comment"; alter table t2 rename t1, add c char(10) comment "no comment";
show columns from t1; show columns from t1;
...@@ -428,27 +458,6 @@ t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE ...@@ -428,27 +458,6 @@ t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
t1 0 PRIMARY 2 User A 0 NULL NULL BTREE t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
DROP TABLE t1; DROP TABLE t1;
create table t1 (name char(15));
insert into t1 (name) values ("current");
create database mysqltest;
create table mysqltest.t1 (name char(15));
insert into mysqltest.t1 (name) values ("mysqltest");
select * from t1;
name
current
select * from mysqltest.t1;
name
mysqltest
alter table t1 rename mysqltest.t1;
ERROR 42S01: Table 't1' already exists
select * from t1;
name
current
select * from mysqltest.t1;
name
mysqltest
drop table t1;
drop database mysqltest;
CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE); CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
ALTER TABLE t1 DROP PRIMARY KEY; ALTER TABLE t1 DROP PRIMARY KEY;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
......
...@@ -434,6 +434,8 @@ create temporary table t1 select a from t1 union select a from t2; ...@@ -434,6 +434,8 @@ create temporary table t1 select a from t1 union select a from t2;
drop temporary table t1; drop temporary table t1;
create table t1 select a from t1 union select a from t2; 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 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'
drop table t1,t2; drop table t1,t2;
select length(version()) > 1 as `*` UNION select 2; select length(version()) > 1 as `*` UNION select 2;
* *
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# #
--disable_warnings --disable_warnings
drop table if exists t1,t2; drop table if exists t1,t2;
drop database if exists mysqltest;
--enable_warnings --enable_warnings
create table t1 ( create table t1 (
...@@ -78,6 +79,53 @@ UNLOCK TABLES; ...@@ -78,6 +79,53 @@ UNLOCK TABLES;
OPTIMIZE TABLE t1; OPTIMIZE TABLE t1;
DROP TABLE t1; DROP TABLE t1;
#
# Drop and add an auto_increment column
#
create table t1 (i int unsigned not null auto_increment primary key);
insert into t1 values (null),(null),(null),(null);
alter table t1 drop i,add i int unsigned not null auto_increment, drop primary key, add primary key (i);
select * from t1;
drop table t1;
#
# Bug #2628: 'alter table t1 rename mysqltest.t1' silently drops mysqltest.t1
# if it exists
#
create table t1 (name char(15));
insert into t1 (name) values ("current");
create database mysqltest;
create table mysqltest.t1 (name char(15));
insert into mysqltest.t1 (name) values ("mysqltest");
select * from t1;
select * from mysqltest.t1;
--error 1050
alter table t1 rename mysqltest.t1;
select * from t1;
select * from mysqltest.t1;
drop table t1;
drop database mysqltest;
#
# Rights for renaming test (Bug #3270)
#
connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock);
connection root;
--disable_warnings
create database mysqltest;
--enable_warnings
create table mysqltest.t1 (a int,b int,c int);
grant all on mysqltest.t1 to mysqltest_1@localhost;
connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,master.sock);
connection user1;
-- error 1142
alter table t1 rename t2;
connection root;
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user='mysqltest_1';
drop database mysqltest;
# #
# ALTER TABLE ... ENABLE/DISABLE KEYS # ALTER TABLE ... ENABLE/DISABLE KEYS
...@@ -100,16 +148,6 @@ alter table t1 enable keys; ...@@ -100,16 +148,6 @@ alter table t1 enable keys;
show keys from t1; show keys from t1;
drop table t1; drop table t1;
#
# Drop and add an auto_increment column
#
create table t1 (i int unsigned not null auto_increment primary key);
insert into t1 values (null),(null),(null),(null);
alter table t1 drop i,add i int unsigned not null auto_increment, drop primary key, add primary key (i);
select * from t1;
drop table t1;
# #
# Alter table and rename # Alter table and rename
# #
...@@ -255,26 +293,9 @@ LOCK TABLES t1 WRITE; ...@@ -255,26 +293,9 @@ LOCK TABLES t1 WRITE;
ALTER TABLE t1 DISABLE KEYS; ALTER TABLE t1 DISABLE KEYS;
SHOW INDEX FROM t1; SHOW INDEX FROM t1;
DROP TABLE t1; DROP TABLE t1;
#
# Bug #2628: 'alter table t1 rename mysqltest.t1' silently drops mysqltest.t1
# if it exists
#
create table t1 (name char(15));
insert into t1 (name) values ("current");
create database mysqltest;
create table mysqltest.t1 (name char(15));
insert into mysqltest.t1 (name) values ("mysqltest");
select * from t1;
select * from mysqltest.t1;
--error 1050
alter table t1 rename mysqltest.t1;
select * from t1;
select * from mysqltest.t1;
drop table t1;
drop database mysqltest;
# #
# Bug 2361 # Bug 2361 (Don't drop UNIQUE with DROP PRIMARY KEY)
# #
CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE); CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
......
...@@ -251,6 +251,8 @@ create temporary table t1 select a from t1 union select a from t2; ...@@ -251,6 +251,8 @@ create temporary table t1 select a from t1 union select a from t2;
drop temporary table t1; drop temporary table t1;
--error 1093 --error 1093
create table t1 select a from t1 union select a from t2; create table t1 select a from t1 union select a from t2;
--error 1054
select a from t1 union select a from t2 order by t2.a;
drop table t1,t2; drop table t1,t2;
# #
......
...@@ -125,7 +125,6 @@ insert into t1 (F1,F2,F3,cnt,groupid) values ('0','0','0',1,6), ...@@ -125,7 +125,6 @@ insert into t1 (F1,F2,F3,cnt,groupid) values ('0','0','0',1,6),
('0','1','2',1,5), ('0','2','0',1,3), ('1','0','1',1,2), ('0','1','2',1,5), ('0','2','0',1,3), ('1','0','1',1,2),
('1','2','1',1,1), ('1','2','2',1,1), ('2','0','1',2,4), ('1','2','1',1,1), ('1','2','2',1,1), ('2','0','1',2,4),
('2','2','0',1,7); ('2','2','0',1,7);
delete from m1 using t1 m1,t1 m2 where m1.groupid=m2.groupid and (m1.cnt < m2.cnt or m1.cnt=m2.cnt and m1.F3>m2.F3); delete from m1 using t1 m1,t1 m2 where m1.groupid=m2.groupid and (m1.cnt < m2.cnt or m1.cnt=m2.cnt and m1.F3>m2.F3);
select * from t1; select * from t1;
drop table t1; drop table t1;
...@@ -450,23 +450,25 @@ static int search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, ...@@ -450,23 +450,25 @@ static int search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
static char *remove_end_comment(char *ptr) static char *remove_end_comment(char *ptr)
{ {
char quote= 0; char quote= 0; /* we are inside quote marks */
char escape= 0; /* symbol is protected by escape chagacter */
for (; *ptr; ptr++) for (; *ptr; ptr++)
{ {
if (*ptr == '\'' || *ptr == '\"') if ((*ptr == '\'' || *ptr == '\"') && !escape)
{ {
if (!quote) if (!quote)
quote= *ptr; quote= *ptr;
else if (quote == *ptr) else if (quote == *ptr)
quote= 0; quote= 0;
} }
/* We are not inside a comment */ /* We are not inside a string */
if (!quote && *ptr == '#') if (!quote && *ptr == '#')
{ {
*ptr= 0; *ptr= 0;
return ptr; return ptr;
} }
escape= (quote && *ptr == '\\' && !escape);
} }
return ptr; return ptr;
} }
......
...@@ -506,7 +506,8 @@ static int lock_io_cache(IO_CACHE *info, my_off_t pos) ...@@ -506,7 +506,8 @@ static int lock_io_cache(IO_CACHE *info, my_off_t pos)
while (!s->active || s->active->pos_in_file < pos) while (!s->active || s->active->pos_in_file < pos)
pthread_cond_wait(&s->cond, &s->mutex); pthread_cond_wait(&s->cond, &s->mutex);
if (s->total < total) if (s->total < total &&
(!s->active || s->active->pos_in_file < pos))
return 1; return 1;
pthread_mutex_unlock(&s->mutex); pthread_mutex_unlock(&s->mutex);
......
...@@ -254,9 +254,9 @@ eval $EDIT $TEMP ...@@ -254,9 +254,9 @@ eval $EDIT $TEMP
if cmp -s $TEMP $TEMP.x if cmp -s $TEMP $TEMP.x
then then
echo "File not changed, no bug report submitted." echo "File not changed, no bug report submitted."
cp $TEMP /tmp/failed-mysql-bugreport mv -f $TEMP /tmp/failed-mysql-bugreport
echo "The raw bug report exists in /tmp/failed-mysql-bugreport" echo "The raw bug report exists in /tmp/failed-mysql-bugreport"
echo "If you use this remember that the first lines of the report now is a lie.." echo "If you use this remember that the first lines of the report are now a lie.."
exit 1 exit 1
fi fi
......
...@@ -498,7 +498,7 @@ BOOL NTService::IsService(LPCSTR ServiceName) ...@@ -498,7 +498,7 @@ BOOL NTService::IsService(LPCSTR ServiceName)
if ((scm= OpenSCManager(0, 0,SC_MANAGER_ENUMERATE_SERVICE))) if ((scm= OpenSCManager(0, 0,SC_MANAGER_ENUMERATE_SERVICE)))
{ {
if ((service = OpenService(scm,ServiceName, SERVICE_QUERY_STATUS ))) if ((service = OpenService(scm,ServiceName, SERVICE_QUERY_STATUS)))
{ {
ret_value=TRUE; ret_value=TRUE;
CloseServiceHandle(service); CloseServiceHandle(service);
......
...@@ -485,7 +485,7 @@ void close_temporary_tables(THD *thd) ...@@ -485,7 +485,7 @@ void close_temporary_tables(THD *thd)
return; return;
LINT_INIT(end); LINT_INIT(end);
query_buf_size= 50; // Enough for DROP ... TABLE query_buf_size= 50; // Enough for DROP ... TABLE IF EXISTS
for (table=thd->temporary_tables ; table ; table=table->next) for (table=thd->temporary_tables ; table ; table=table->next)
/* /*
...@@ -496,7 +496,8 @@ void close_temporary_tables(THD *thd) ...@@ -496,7 +496,8 @@ void close_temporary_tables(THD *thd)
query_buf_size+= table->key_length+1; query_buf_size+= table->key_length+1;
if ((query = alloc_root(&thd->mem_root, query_buf_size))) if ((query = alloc_root(&thd->mem_root, query_buf_size)))
end=strmov(query, "DROP /*!40005 TEMPORARY */ TABLE "); // Better add "if exists", in case a RESET MASTER has been done
end=strmov(query, "DROP /*!40005 TEMPORARY */ TABLE IF EXISTS ");
for (table=thd->temporary_tables ; table ; table=next) for (table=thd->temporary_tables ; table ; table=next)
{ {
......
...@@ -2337,7 +2337,7 @@ mysql_execute_command(THD *thd) ...@@ -2337,7 +2337,7 @@ mysql_execute_command(THD *thd)
tmp_table.real_name=lex->name; tmp_table.real_name=lex->name;
tmp_table.db=select_lex->db; tmp_table.db=select_lex->db;
tmp_table.grant.privilege=priv; tmp_table.grant.privilege=priv;
if (check_grant(thd,INSERT_ACL | CREATE_ACL,tables,0,0)) if (check_grant(thd, INSERT_ACL | CREATE_ACL, &tmp_table, 0, 0))
goto error; goto error;
} }
} }
......
...@@ -112,6 +112,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, ...@@ -112,6 +112,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
SELECT_LEX *lex_select_save= thd_arg->lex->current_select; SELECT_LEX *lex_select_save= thd_arg->lex->current_select;
SELECT_LEX *sl, *first_select; SELECT_LEX *sl, *first_select;
select_result *tmp_result; select_result *tmp_result;
ORDER *tmp_order;
DBUG_ENTER("st_select_lex_unit::prepare"); DBUG_ENTER("st_select_lex_unit::prepare");
/* /*
...@@ -207,6 +208,19 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, ...@@ -207,6 +208,19 @@ 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;
{
Item *item= *tmp_order->item;
if (((item->type() == Item::FIELD_ITEM) &&
((class Item_field*) item)->table_name))
{
my_error(ER_BAD_FIELD_ERROR,MYF(0),item->full_name(),"ORDER BY");
DBUG_RETURN(-1);
}
}
item_list.empty(); item_list.empty();
// it is not single select // it is not single select
if (first_select->next_select()) if (first_select->next_select())
......
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