merge with 3.23
BitKeeper/etc/logging_ok: auto-union scripts/mysqlbug.sh: Auto merged sql/sql_parse.cc: Auto merged mysql-test/t/alter_table.test: Merge code with 3.23 sql/nt_servc.cc: use original code
This commit is contained in:
commit
7f0a632c19
@ -3,6 +3,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
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,
|
||||||
@ -76,6 +78,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,0,mysql-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,0,mysql-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
|
||||||
|
|
||||||
@ -98,16 +147,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
|
||||||
#
|
#
|
||||||
@ -204,20 +243,3 @@ 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;
|
|
||||||
|
@ -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)
|
|||||||
|
|
||||||
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);
|
||||||
|
@ -1772,7 +1772,7 @@ mysql_execute_command(void)
|
|||||||
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))
|
if (check_grant(thd,INSERT_ACL | CREATE_ACL, &tmp_table))
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user