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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1bd6e4f6
Commit
1bd6e4f6
authored
Nov 27, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.1-new-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
parents
0e4d97ed
332afaa7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
5 deletions
+45
-5
mysql-test/lib/mtr_io.pl
mysql-test/lib/mtr_io.pl
+14
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+9
-1
mysql-test/r/read_only.result
mysql-test/r/read_only.result
+5
-0
mysql-test/t/read_only.test
mysql-test/t/read_only.test
+12
-0
sql/sql_parse.cc
sql/sql_parse.cc
+5
-4
No files found.
mysql-test/lib/mtr_io.pl
View file @
1bd6e4f6
...
@@ -13,6 +13,8 @@ sub mtr_tofile ($@);
...
@@ -13,6 +13,8 @@ sub mtr_tofile ($@);
sub
mtr_tonewfile
($@);
sub
mtr_tonewfile
($@);
sub
mtr_lastlinefromfile
($);
sub
mtr_lastlinefromfile
($);
sub
mtr_appendfile_to_file
($$);
sub
mtr_appendfile_to_file
($$);
sub
mtr_grab_file
($);
##############################################################################
##############################################################################
#
#
...
@@ -128,6 +130,7 @@ sub unspace {
...
@@ -128,6 +130,7 @@ sub unspace {
return
"
$quote$string$quote
";
return
"
$quote$string$quote
";
}
}
# Read a whole file, stripping leading and trailing whitespace.
sub
mtr_fromfile
($)
{
sub
mtr_fromfile
($)
{
my
$file
=
shift
;
my
$file
=
shift
;
...
@@ -181,5 +184,16 @@ sub mtr_appendfile_to_file ($$) {
...
@@ -181,5 +184,16 @@ sub mtr_appendfile_to_file ($$) {
close
TOFILE
;
close
TOFILE
;
}
}
# Read a whole file verbatim.
sub
mtr_grab_file
($)
{
my
$file
=
shift
;
open
(
FILE
,
'
<
',
$file
)
or
return
undef
;
local
$/
=
undef
;
my
$data
=
scalar
(
<
FILE
>
);
close
FILE
;
return
$data
;
}
1
;
1
;
mysql-test/mysql-test-run.pl
View file @
1bd6e4f6
...
@@ -1630,9 +1630,17 @@ sub environment_setup () {
...
@@ -1630,9 +1630,17 @@ sub environment_setup () {
# impossible to add correct supressions, that means if "/usr/lib/debug"
# impossible to add correct supressions, that means if "/usr/lib/debug"
# is available, it should be added to
# is available, it should be added to
# LD_LIBRARY_PATH
# LD_LIBRARY_PATH
#
# But pthread is broken in libc6-dbg on Debian <= 3.1 (see Debian
# bug 399035, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=399035),
# so don't change LD_LIBRARY_PATH on that platform.
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
my
$debug_libraries_path
=
"
/usr/lib/debug
";
my
$debug_libraries_path
=
"
/usr/lib/debug
";
if
(
$opt_valgrind
and
-
d
$debug_libraries_path
)
my
$deb_version
;
if
(
$opt_valgrind
and
-
d
$debug_libraries_path
and
(
!
-
e
'
/etc/debian_version
'
or
(
$deb_version
=
mtr_grab_file
('
/etc/debian_version
'))
==
0
or
$deb_version
>
3.1
)
)
{
{
push
(
@ld_library_paths
,
$debug_libraries_path
);
push
(
@ld_library_paths
,
$debug_libraries_path
);
}
}
...
...
mysql-test/r/read_only.result
View file @
1bd6e4f6
...
@@ -39,6 +39,11 @@ delete t1 from t1,t3 where t1.a=t3.a;
...
@@ -39,6 +39,11 @@ delete t1 from t1,t3 where t1.a=t3.a;
drop table t1;
drop table t1;
insert into t1 values(1);
insert into t1 values(1);
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
drop temporary table ttt;
ERROR 42S02: Unknown table 'ttt'
drop temporary table if exists ttt;
Warnings:
Note 1051 Unknown table 'ttt'
drop table t1,t2;
drop table t1,t2;
drop user test@localhost;
drop user test@localhost;
set global read_only=0;
set global read_only=0;
mysql-test/t/read_only.test
View file @
1bd6e4f6
...
@@ -101,6 +101,18 @@ drop table t1;
...
@@ -101,6 +101,18 @@ drop table t1;
--
error
1290
--
error
1290
insert
into
t1
values
(
1
);
insert
into
t1
values
(
1
);
#
# BUG #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
#
# check if DROP TEMPORARY on a non-existing temporary table returns the right
# error
--
error
ER_BAD_TABLE_ERROR
drop
temporary
table
ttt
;
# check if DROP TEMPORARY TABLE IF EXISTS produces a warning with read_only set
drop
temporary
table
if
exists
ttt
;
connection
default
;
connection
default
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
drop
user
test
@
localhost
;
drop
user
test
@
localhost
;
...
...
sql/sql_parse.cc
View file @
1bd6e4f6
...
@@ -2580,10 +2580,11 @@ mysql_execute_command(THD *thd)
...
@@ -2580,10 +2580,11 @@ mysql_execute_command(THD *thd)
if
(
opt_readonly
&&
if
(
opt_readonly
&&
!
(
thd
->
security_ctx
->
master_access
&
SUPER_ACL
)
&&
!
(
thd
->
security_ctx
->
master_access
&
SUPER_ACL
)
&&
(
sql_command_flags
[
lex
->
sql_command
]
&
CF_CHANGES_DATA
)
&&
(
sql_command_flags
[
lex
->
sql_command
]
&
CF_CHANGES_DATA
)
&&
!
((
lex
->
sql_command
==
SQLCOM_CREATE_TABLE
)
&&
!
((
lex
->
sql_command
==
SQLCOM_CREATE_TABLE
)
&&
(
lex
->
create_info
.
options
&
HA_LEX_CREATE_TMP_TABLE
))
&&
(
lex
->
create_info
.
options
&
HA_LEX_CREATE_TMP_TABLE
))
&&
((
lex
->
sql_command
!=
SQLCOM_UPDATE_MULTI
)
&&
!
((
lex
->
sql_command
==
SQLCOM_DROP_TABLE
)
&&
lex
->
drop_temporary
)
&&
some_non_temp_table_to_be_updated
(
thd
,
all_tables
)))
((
lex
->
sql_command
!=
SQLCOM_UPDATE_MULTI
)
&&
some_non_temp_table_to_be_updated
(
thd
,
all_tables
)))
{
{
my_error
(
ER_OPTION_PREVENTS_STATEMENT
,
MYF
(
0
),
"--read-only"
);
my_error
(
ER_OPTION_PREVENTS_STATEMENT
,
MYF
(
0
),
"--read-only"
);
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
...
...
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