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
f4638489
Commit
f4638489
authored
Apr 06, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
ca37588f
315f5d27
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
180 additions
and
65 deletions
+180
-65
mysql-test/include/have_debug.inc
mysql-test/include/have_debug.inc
+0
-4
mysql-test/r/have_debug.require
mysql-test/r/have_debug.require
+0
-2
mysql-test/r/synchronization.result
mysql-test/r/synchronization.result
+154
-15
mysql-test/t/synchronization-master.opt
mysql-test/t/synchronization-master.opt
+0
-1
mysql-test/t/synchronization.test
mysql-test/t/synchronization.test
+26
-38
sql/sql_table.cc
sql/sql_table.cc
+0
-5
No files found.
mysql-test/include/have_debug.inc
deleted
100644 → 0
View file @
ca37588f
--
require
r
/
have_debug
.
require
disable_query_log
;
select
instr
(
version
(),
convert
(
'debug'
using
utf8
))
!=
0
;
enable_query_log
;
mysql-test/r/have_debug.require
deleted
100644 → 0
View file @
ca37588f
instr(version(),convert('debug' using utf8))!=0
1
mysql-test/r/synchronization.result
View file @
f4638489
CREATE TABLE t1 (
a
int);
CREATE TABLE t2 LIKE t1
;
ALTER TABLE t1 add key(a)
;
CREATE TABLE t1 (
x1
int);
ALTER TABLE t1 CHANGE x1 x2 int
;
CREATE TABLE t2 LIKE t1
;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`
a
` int(11) default NULL
`
xx
` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
CREATE TABLE t1 (a int);
CREATE TABLE t2 LIKE t1;
CREATE TABLE t2 (b int);
let's take a look at result of create .. like :
-----------
ERROR HY000: Can't create/write to file './test/t2.frm' (Errcode: 17)
-----------
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`
b
` int(11) default NULL
`
xx
` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
mysql-test/t/synchronization-master.opt
deleted
100644 → 0
View file @
ca37588f
--exit-info=2048
\ No newline at end of file
mysql-test/t/synchronization.test
View file @
f4638489
--
source
include
/
have_debug
.
inc
#
# Test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table
#
connect
(
con
_to_sleep
,
localhost
,
lock_controller
,,);
connect
(
con
_to_harm_sleeper
,
localhost
,
root
,,);
connect
(
con
1
,
localhost
,
root
,,);
connect
(
con
2
,
localhost
,
root
,,);
# locking of source:
connection
con_to_sleep
;
CREATE
TABLE
t1
(
a
int
);
send
CREATE
TABLE
t2
LIKE
t1
;
connection
con_to_harm_sleeper
;
sleep
1
;
ALTER
TABLE
t1
add
key
(
a
);
connection
con_to_sleep
;
sleep
4
;
SHOW
CREATE
TABLE
t2
;
drop
table
t1
,
t2
;
# locking of destination:
connection
con_to_sleep
;
CREATE
TABLE
t1
(
a
int
);
send
CREATE
TABLE
t2
LIKE
t1
;
connection
con_to_harm_sleeper
;
sleep
1
;
CREATE
TABLE
t2
(
b
int
);
disable_query_log
;
select
"-----------"
as
"let's take a look at result of create .. like : "
;
enable_query_log
;
connection
con_to_sleep
;
sleep
1
;
--
error
1
reap
;
disable_query_log
;
select
""
as
"-----------"
;
enable_query_log
;
SHOW
CREATE
TABLE
t2
;
drop
table
t1
,
t2
;
\ No newline at end of file
CREATE
TABLE
t1
(
x1
int
);
let
$
1
=
10
;
while
(
$
1
)
{
connection
con1
;
send
ALTER
TABLE
t1
CHANGE
x1
x2
int
;
connection
con2
;
CREATE
TABLE
t2
LIKE
t1
;
replace_result
x1
xx
x2
xx
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t2
;
connection
con1
;
reap
;
send
ALTER
TABLE
t1
CHANGE
x2
x1
int
;
connection
con2
;
CREATE
TABLE
t2
LIKE
t1
;
replace_result
x1
xx
x2
xx
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t2
;
connection
con1
;
reap
;
dec
$
1
;
}
DROP
TABLE
t1
;
sql/sql_table.cc
View file @
f4638489
...
...
@@ -1963,11 +1963,6 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
/*
Create a new table by copying from source table
*/
#ifndef DBUG_OFF
// The code stated below is for test synchronization.test Bug #2385
if
(
test_flags
&
TEST_SYNCHRONIZATION
)
sleep
(
3
);
#endif
if
(
my_copy
(
src_path
,
dst_path
,
MYF
(
MY_WME
|
MY_DONT_OVERWRITE_FILE
)))
goto
err
;
...
...
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