Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ce79eb9c
Commit
ce79eb9c
authored
Mar 25, 2004
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
merge with 3.23
parents
755c068f
d6f9fa03
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
31 deletions
+53
-31
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+49
-27
scripts/mysqlbug.sh
scripts/mysqlbug.sh
+2
-2
sql/nt_servc.cc
sql/nt_servc.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/t/alter_table.test
View file @
ce79eb9c
...
...
@@ -3,6 +3,8 @@
#
drop
table
if
exists
t1
,
t2
;
drop
database
if
exists
mysqltest
;
create
table
t1
(
col1
int
not
null
auto_increment
primary
key
,
col2
varchar
(
30
)
not
null
,
...
...
@@ -76,6 +78,53 @@ UNLOCK TABLES;
OPTIMIZE
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
...
...
@@ -98,16 +147,6 @@ alter table t1 enable keys;
show
keys
from
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
#
...
...
@@ -204,20 +243,3 @@ LOCK TABLES t1 WRITE;
ALTER
TABLE
t1
DISABLE
KEYS
;
SHOW
INDEX
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
;
scripts/mysqlbug.sh
View file @
ce79eb9c
...
...
@@ -254,9 +254,9 @@ eval $EDIT $TEMP
if
cmp
-s
$TEMP
$TEMP
.x
then
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
"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
fi
...
...
sql/nt_servc.cc
View file @
ce79eb9c
...
...
@@ -498,7 +498,7 @@ BOOL NTService::IsService(LPCSTR ServiceName)
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
;
CloseServiceHandle
(
service
);
...
...
sql/sql_parse.cc
View file @
ce79eb9c
...
...
@@ -1772,7 +1772,7 @@ mysql_execute_command(void)
tmp_table
.
real_name
=
lex
->
name
;
tmp_table
.
db
=
select_lex
->
db
;
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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment