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
79926634
Commit
79926634
authored
Apr 06, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1 sql/sql_table.cc: Auto merged
parents
6a868cca
f4638489
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
185 additions
and
76 deletions
+185
-76
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_prepare.cc
sql/sql_prepare.cc
+1
-1
sql/sql_table.cc
sql/sql_table.cc
+0
-5
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-9
sql/table.cc
sql/table.cc
+1
-1
No files found.
mysql-test/include/have_debug.inc
deleted
100644 → 0
View file @
6a868cca
--
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 @
6a868cca
instr(version(),convert('debug' using utf8))!=0
1
mysql-test/r/synchronization.result
View file @
79926634
CREATE TABLE t1 (
a
int);
CREATE TABLE t1 (
x1
int);
CREATE TABLE t2 LIKE t1
;
ALTER TABLE t1 CHANGE x1 x2 int
;
ALTER TABLE t1 add key(a)
;
CREATE TABLE t2 LIKE t1
;
SHOW CREATE TABLE t2;
SHOW CREATE TABLE t2;
Table Create Table
Table Create Table
t2 CREATE TABLE `t2` (
t2 CREATE TABLE `t2` (
`
a
` int(11) default NULL
`
xx
` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
DROP TABLE t2;
CREATE TABLE t1 (a int);
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
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)
-----------
SHOW CREATE TABLE t2;
SHOW CREATE TABLE t2;
Table Create Table
Table Create Table
t2 CREATE TABLE `t2` (
t2 CREATE TABLE `t2` (
`
b
` int(11) default NULL
`
xx
` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) 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 @
6a868cca
--exit-info=2048
\ No newline at end of file
mysql-test/t/synchronization.test
View file @
79926634
--
source
include
/
have_debug
.
inc
#
#
# Test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table
# Test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table
#
#
connect
(
con
_to_sleep
,
localhost
,
lock_controller
,,);
connect
(
con
1
,
localhost
,
root
,,);
connect
(
con
_to_harm_sleeper
,
localhost
,
root
,,);
connect
(
con
2
,
localhost
,
root
,,);
# locking of source:
# 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
;
CREATE
TABLE
t1
(
x1
int
);
\ No newline at end of file
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_prepare.cc
View file @
79926634
...
@@ -802,7 +802,7 @@ static int mysql_test_select_fields(Prepared_statement *stmt,
...
@@ -802,7 +802,7 @@ static int mysql_test_select_fields(Prepared_statement *stmt,
if
(
check_table_access
(
thd
,
privilege
,
tables
,
0
))
if
(
check_table_access
(
thd
,
privilege
,
tables
,
0
))
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
else
if
(
check_access
(
thd
,
privilege
,
"*any*"
,
0
,
0
,
0
))
else
if
(
check_access
(
thd
,
privilege
,
any_db
,
0
,
0
,
0
))
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
#endif
#endif
if
((
&
lex
->
select_lex
!=
lex
->
all_selects_list
&&
if
((
&
lex
->
select_lex
!=
lex
->
all_selects_list
&&
...
...
sql/sql_table.cc
View file @
79926634
...
@@ -1963,11 +1963,6 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
...
@@ -1963,11 +1963,6 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
/*
/*
Create a new table by copying from source 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
)))
if
(
my_copy
(
src_path
,
dst_path
,
MYF
(
MY_WME
|
MY_DONT_OVERWRITE_FILE
)))
goto
err
;
goto
err
;
...
...
sql/sql_yacc.yy
View file @
79926634
...
@@ -722,7 +722,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
...
@@ -722,7 +722,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
union_clause union_list
union_clause union_list
precision subselect_start opt_and charset
precision subselect_start opt_and charset
subselect_end select_var_list select_var_list_init help opt_len
subselect_end select_var_list select_var_list_init help opt_len
opt_extended_describe
curr_user
opt_extended_describe
END_OF_INPUT
END_OF_INPUT
%type <NONE>
%type <NONE>
...
@@ -2685,7 +2685,7 @@ simple_expr:
...
@@ -2685,7 +2685,7 @@ simple_expr:
$$= new Item_func_curtime_local($3);
$$= new Item_func_curtime_local($3);
Lex->safe_to_cache_query=0;
Lex->safe_to_cache_query=0;
}
}
|
curr_user
|
CURRENT_USER optional_braces
{ $$= create_func_current_user(); }
{ $$= create_func_current_user(); }
| DATE_ADD_INTERVAL '(' expr ',' interval_expr interval ')'
| DATE_ADD_INTERVAL '(' expr ',' interval_expr interval ')'
{ $$= new Item_date_add_interval($3,$5,$6,0); }
{ $$= new Item_date_add_interval($3,$5,$6,0); }
...
@@ -4769,11 +4769,6 @@ ident_or_text:
...
@@ -4769,11 +4769,6 @@ ident_or_text:
| TEXT_STRING_sys { $$=$1;}
| TEXT_STRING_sys { $$=$1;}
| LEX_HOSTNAME { $$=$1;};
| LEX_HOSTNAME { $$=$1;};
curr_user:
CURRENT_USER {;}
| CURRENT_USER '(' ')' {;}
;
user:
user:
ident_or_text
ident_or_text
{
{
...
@@ -4791,7 +4786,7 @@ user:
...
@@ -4791,7 +4786,7 @@ user:
YYABORT;
YYABORT;
$$->user = $1; $$->host=$3;
$$->user = $1; $$->host=$3;
}
}
|
curr_user
|
CURRENT_USER optional_braces
{
{
THD *thd= YYTHD;
THD *thd= YYTHD;
if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
...
@@ -4846,7 +4841,6 @@ keyword:
...
@@ -4846,7 +4841,6 @@ keyword:
| COMPRESSED_SYM {}
| COMPRESSED_SYM {}
| CONCURRENT {}
| CONCURRENT {}
| CUBE_SYM {}
| CUBE_SYM {}
| CURRENT_USER {}
| DATA_SYM {}
| DATA_SYM {}
| DATETIME {}
| DATETIME {}
| DATE_SYM {}
| DATE_SYM {}
...
...
sql/table.cc
View file @
79926634
...
@@ -1288,7 +1288,7 @@ bool check_db_name(char *name)
...
@@ -1288,7 +1288,7 @@ bool check_db_name(char *name)
/* Used to catch empty names and names with end space */
/* Used to catch empty names and names with end space */
bool
last_char_is_space
=
TRUE
;
bool
last_char_is_space
=
TRUE
;
if
(
lower_case_table_names
)
if
(
lower_case_table_names
&&
name
!=
any_db
)
my_casedn_str
(
files_charset_info
,
name
);
my_casedn_str
(
files_charset_info
,
name
);
while
(
*
name
)
while
(
*
name
)
...
...
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