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
08e5a7e1
Commit
08e5a7e1
authored
Aug 26, 2003
by
pem@mysql.telia.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fixes.
parent
7f158dd1
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
84 additions
and
57 deletions
+84
-57
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+4
-4
mysql-test/r/sel000100.result
mysql-test/r/sel000100.result
+2
-2
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+1
-1
mysql-test/r/symlink.result
mysql-test/r/symlink.result
+0
-2
mysql-test/r/variables.result
mysql-test/r/variables.result
+1
-1
mysql-test/t/sel000100.test
mysql-test/t/sel000100.test
+2
-2
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+21
-21
sql/item.cc
sql/item.cc
+1
-1
sql/item_subselect.cc
sql/item_subselect.cc
+6
-6
sql/mysqld.cc
sql/mysqld.cc
+0
-1
sql/slave.cc
sql/slave.cc
+1
-1
sql/sp_head.cc
sql/sp_head.cc
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/sql_table.cc
sql/sql_table.cc
+1
-1
sql/sql_union.cc
sql/sql_union.cc
+1
-1
sql/sql_update.cc
sql/sql_update.cc
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+39
-9
No files found.
mysql-test/r/query_cache.result
View file @
08e5a7e1
...
...
@@ -1248,10 +1248,10 @@ Variable_name Value
Qcache_queries_in_cache 0
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts
4
1
Qcache_inserts 1
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 1
3
Qcache_hits 1
/**/ select * from t1;
a
/**/ select * from t1;
...
...
@@ -1261,8 +1261,8 @@ Variable_name Value
Qcache_queries_in_cache 1
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts
4
2
Qcache_inserts 2
show status like "Qcache_hits";
Variable_name Value
Qcache_hits
14
Qcache_hits
2
drop table t1;
mysql-test/r/sel000100.result
View file @
08e5a7e1
...
...
@@ -29,10 +29,10 @@ drop table t1,t2;
CREATE TABLE t1 (
html varchar(5) default NULL,
rin int(11) default '0',
out int(11) default '0'
r
out int(11) default '0'
) TYPE=MyISAM;
INSERT INTO t1 VALUES ('1',1,0);
SELECT DISTINCT html,SUM(out)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin;
SELECT DISTINCT html,SUM(
r
out)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin;
html prod
1 0.00
drop table t1;
mysql-test/r/sp-error.result
View file @
08e5a7e1
...
...
@@ -35,7 +35,7 @@ call foo();
ERROR HY000: PROCEDURE foo does not exist
drop procedure if exists foo;
Warnings:
Warning 127
2
PROCEDURE foo does not exist
Warning 127
5
PROCEDURE foo does not exist
create procedure foo()
foo: loop
leave bar;
...
...
mysql-test/r/symlink.result
View file @
08e5a7e1
...
...
@@ -46,8 +46,6 @@ alter table t8 rename t7;
rename table t7 to t9;
drop table t1;
Got one of the listed errors
Warnings:
Note 1008 Can't drop database 'test_mysqltest'; database doesn't exist
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
...
...
mysql-test/r/variables.result
View file @
08e5a7e1
...
...
@@ -311,7 +311,7 @@ set sql_log_bin=1;
set sql_log_off=1;
set sql_log_update=1;
Warnings:
Note 128
2
The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
Note 128
5
The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
set sql_low_priority_updates=1;
set sql_max_join_size=200;
select @@sql_max_join_size,@@max_join_size;
...
...
mysql-test/t/sel000100.test
View file @
08e5a7e1
...
...
@@ -38,11 +38,11 @@ drop table t1,t2;
CREATE
TABLE
t1
(
html
varchar
(
5
)
default
NULL
,
rin
int
(
11
)
default
'0'
,
out
int
(
11
)
default
'0'
r
out
int
(
11
)
default
'0'
)
TYPE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
'1'
,
1
,
0
);
SELECT
DISTINCT
html
,
SUM
(
out
)
/
(
SUM
(
rin
)
+
1
)
as
'prod'
FROM
t1
GROUP
BY
rin
;
SELECT
DISTINCT
html
,
SUM
(
r
out
)
/
(
SUM
(
rin
)
+
1
)
as
'prod'
FROM
t1
GROUP
BY
rin
;
drop
table
t1
;
mysql-test/t/sp-error.test
View file @
08e5a7e1
...
...
@@ -32,18 +32,18 @@ create function func1() returns int
return
42
|
# Can't create recursively
--
error
127
0
--
error
127
3
create
procedure
foo
()
create
procedure
bar
()
set
@
x
=
3
|
--
error
127
0
--
error
127
3
create
procedure
foo
()
create
function
bar
()
returns
double
return
2.3
|
# Already exists
--
error
127
1
--
error
127
4
create
procedure
proc1
()
set
@
x
=
42
|
--
error
127
1
--
error
127
4
create
function
func1
()
returns
int
return
42
|
...
...
@@ -51,32 +51,32 @@ drop procedure proc1|
drop
function
func1
|
# Does not exist
--
error
127
2
--
error
127
5
alter
procedure
foo
|
--
error
127
2
--
error
127
5
alter
function
foo
|
--
error
127
2
--
error
127
5
drop
procedure
foo
|
--
error
127
2
--
error
127
5
drop
function
foo
|
--
error
127
2
--
error
127
5
call
foo
()
|
drop
procedure
if
exists
foo
|
# LEAVE/ITERATE with no match
--
error
127
5
--
error
127
8
create
procedure
foo
()
foo
:
loop
leave
bar
;
end
loop
|
--
error
127
5
--
error
127
8
create
procedure
foo
()
foo
:
loop
iterate
bar
;
end
loop
|
# Redefining label
--
error
127
6
--
error
127
9
create
procedure
foo
()
foo
:
loop
foo
:
loop
...
...
@@ -85,14 +85,14 @@ foo: loop
end
loop
foo
|
# End label mismatch
--
error
12
77
--
error
12
80
create
procedure
foo
()
foo
:
loop
set
@
x
=
2
;
end
loop
bar
|
# Referring to undef variable
--
error
12
78
--
error
12
81
create
procedure
foo
(
out
x
int
)
begin
declare
y
int
;
...
...
@@ -106,17 +106,17 @@ begin
select
name
from
mysql
.
proc
;
select
type
from
mysql
.
proc
;
end
|
--
error
12
79
--
error
12
82
call
foo
()
|
drop
procedure
foo
|
# RETURN in FUNCTION only
--
error
128
0
--
error
128
3
create
procedure
foo
()
return
42
|
# Doesn't allow queries in FUNCTIONs (for now :-( )
--
error
128
1
--
error
128
4
create
function
foo
()
returns
int
begin
declare
x
int
;
...
...
@@ -130,13 +130,13 @@ create procedure p(x int)
create
function
f
(
x
int
)
returns
int
return
x
+
42
|
--
error
128
5
--
error
128
8
call
p
()
|
--
error
128
5
--
error
128
8
call
p
(
1
,
2
)
|
--
error
128
5
--
error
128
8
select
f
()
|
--
error
128
5
--
error
128
8
select
f
(
1
,
2
)
|
drop
procedure
p
|
...
...
sql/item.cc
View file @
08e5a7e1
...
...
@@ -54,7 +54,7 @@ Item::Item():
command => we should check thd->lex.current_select on zero (thd->lex
can be uninitialised)
*/
if
(
thd
->
lex
.
current_select
)
if
(
thd
->
lex
->
current_select
)
{
SELECT_LEX_NODE
::
enum_parsing_place
place
=
thd
->
lex
->
current_select
->
parsing_place
;
...
...
sql/item_subselect.cc
View file @
08e5a7e1
...
...
@@ -501,7 +501,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
SELECT_LEX_UNIT
*
unit
=
select_lex
->
master_unit
();
substitution
=
optimizer
=
new
Item_in_optimizer
(
left_expr
,
this
);
SELECT_LEX
*
current
=
thd
->
lex
.
current_select
,
*
up
;
SELECT_LEX
*
current
=
thd
->
lex
->
current_select
,
*
up
;
thd
->
lex
->
current_select
=
up
=
current
->
return_after_parsing
();
//optimizer never use Item **ref => we can pass 0 as parameter
...
...
@@ -603,7 +603,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
// fix_field of item will be done in time of substituting
substitution
=
item
;
have_to_be_excluded
=
1
;
if
(
thd
->
lex
.
describe
)
if
(
thd
->
lex
->
describe
)
{
char
warn_buff
[
MYSQL_ERRMSG_SIZE
];
sprintf
(
warn_buff
,
ER
(
ER_SELECT_REDUCED
),
select_lex
->
select_number
);
...
...
@@ -634,15 +634,15 @@ Item_in_subselect::row_value_transformer(JOIN *join,
SELECT_LEX_UNIT
*
unit
=
select_lex
->
master_unit
();
substitution
=
optimizer
=
new
Item_in_optimizer
(
left_expr
,
this
);
SELECT_LEX
*
current
=
thd
->
lex
.
current_select
,
*
up
;
thd
->
lex
.
current_select
=
up
=
current
->
return_after_parsing
();
SELECT_LEX
*
current
=
thd
->
lex
->
current_select
,
*
up
;
thd
->
lex
->
current_select
=
up
=
current
->
return_after_parsing
();
//optimizer never use Item **ref => we can pass 0 as parameter
if
(
!
optimizer
||
optimizer
->
fix_left
(
thd
,
up
->
get_table_list
(),
0
))
{
thd
->
lex
.
current_select
=
current
;
thd
->
lex
->
current_select
=
current
;
DBUG_RETURN
(
ERROR
);
}
thd
->
lex
.
current_select
=
current
;
thd
->
lex
->
current_select
=
current
;
unit
->
dependent
=
1
;
}
...
...
sql/mysqld.cc
View file @
08e5a7e1
...
...
@@ -2009,7 +2009,6 @@ static int init_common_variables(const char *conf_file_name, int argc,
before MY_INIT(). So we do it here.
*/
mysql_log
.
init_pthread_objects
();
mysql_update_log
.
init_pthread_objects
();
mysql_slow_log
.
init_pthread_objects
();
mysql_bin_log
.
init_pthread_objects
();
...
...
sql/slave.cc
View file @
08e5a7e1
...
...
@@ -2385,7 +2385,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
thd
->
server_id
=
ev
->
server_id
;
// use the original server id for logging
thd
->
set_time
();
// time the query
thd
->
lex
.
current_select
=
0
;
thd
->
lex
->
current_select
=
0
;
if
(
!
ev
->
when
)
ev
->
when
=
time
(
NULL
);
ev
->
thd
=
thd
;
...
...
sql/sp_head.cc
View file @
08e5a7e1
...
...
@@ -77,12 +77,12 @@ eval_func_item(THD *thd, Item *it, enum enum_field_types type)
default:
{
char
buffer
[
MAX_FIELD_WIDTH
];
String
tmp
(
buffer
,
sizeof
(
buffer
),
it
->
c
harset
()
);
String
tmp
(
buffer
,
sizeof
(
buffer
),
it
->
c
ollation
.
collation
);
String
*
s
=
it
->
val_str
(
&
tmp
);
DBUG_PRINT
(
"info"
,(
"default result: %*s"
,
s
->
length
(),
s
->
c_ptr_quick
()));
it
=
new
Item_string
(
thd
->
strmake
(
s
->
c_ptr_quick
(),
s
->
length
()),
s
->
length
(),
it
->
c
harset
()
);
s
->
length
(),
it
->
c
ollation
.
collation
);
break
;
}
}
...
...
sql/sql_parse.cc
View file @
08e5a7e1
...
...
@@ -3867,7 +3867,7 @@ void create_select_for_variable(const char *var_name)
DBUG_ENTER
(
"create_select_for_variable"
);
thd
=
current_thd
;
lex
=
&
thd
->
lex
;
lex
=
thd
->
lex
;
mysql_init_select
(
lex
);
lex
->
sql_command
=
SQLCOM_SELECT
;
tmp
.
str
=
(
char
*
)
var_name
;
...
...
sql/sql_table.cc
View file @
08e5a7e1
...
...
@@ -2494,7 +2494,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
tables
.
db
=
from
->
table_cache_key
;
error
=
1
;
if
(
thd
->
lex
.
select_lex
->
setup_ref_array
(
thd
,
order_num
)
||
if
(
thd
->
lex
->
select_lex
.
setup_ref_array
(
thd
,
order_num
)
||
setup_order
(
thd
,
thd
->
lex
->
select_lex
.
ref_pointer_array
,
&
tables
,
fields
,
all_fields
,
order
)
||
!
(
sortorder
=
make_unireg_sortorder
(
order
,
&
length
))
||
...
...
sql/sql_union.cc
View file @
08e5a7e1
...
...
@@ -257,7 +257,7 @@ int st_select_lex_unit::exec()
for
(
SELECT_LEX
*
sl
=
select_cursor
;
sl
;
sl
=
sl
->
next_select
())
{
ha_rows
rows
=
0
;
thd
->
lex
.
current_select
=
sl
;
thd
->
lex
->
current_select
=
sl
;
if
(
optimized
)
res
=
sl
->
join
->
reinit
();
...
...
sql/sql_update.cc
View file @
08e5a7e1
...
...
@@ -95,7 +95,7 @@ int mysql_update(THD *thd,
if
(
setup_tables
(
update_table_list
)
||
setup_conds
(
thd
,
update_table_list
,
&
conds
)
||
thd
->
lex
.
select_lex
->
setup_ref_array
(
thd
,
order_num
)
||
thd
->
lex
->
select_lex
.
setup_ref_array
(
thd
,
order_num
)
||
setup_order
(
thd
,
thd
->
lex
->
select_lex
.
ref_pointer_array
,
&
tables
,
all_fields
,
all_fields
,
order
)
||
setup_ftfuncs
(
&
thd
->
lex
->
select_lex
))
...
...
sql/sql_yacc.yy
View file @
08e5a7e1
...
...
@@ -5251,10 +5251,27 @@ opt_var_ident_type:
option_value:
'@' ident_or_text equal expr
{
Lex->var_list.push_back(new set_var_user(new Item_func_set_user_var($2,$4)));
Lex->var_list.push_back(new set_var_user(new Item_func_set_user_var($2,$4)));
}
| internal_variable_name equal set_expr_or_default
{
LEX *lex=Lex;
if ($1.var)
{ /* System variable */
lex->var_list.push_back(new set_var(lex->option_type, $1.var,
&$1.base_name, $3));
}
else
{ /* An SP local variable */
sp_pvar_t *spv= lex->spcont->find_pvar(&$1.base_name);
sp_instr_set *i= new sp_instr_set(lex->sphead->instructions(),
spv->offset, $3, spv->type);
lex->sphead->add_instr(i);
spv->isset= TRUE;
}
}
| internal_or_splocal
{}
| '@' '@' opt_var_ident_type internal_variable_name equal set_expr_or_default
{
LEX *lex=Lex;
...
...
@@ -5311,12 +5328,25 @@ option_value:
internal_variable_name:
ident
{
sys_var *tmp=find_sys_var($1.str, $1.length);
if (!tmp)
YYABORT;
$$.var= tmp;
$$.base_name.str=0;
$$.base_name.length=0;
LEX *lex= Lex;
sp_pcontext *spc= lex->spcont;
sp_pvar_t *spv;
/* We have to lookup here since local vars can shadow sysvars */
if (!spc || !(spv = spc->find_pvar(&$1)))
{ /* Not an SP local variable */
sys_var *tmp=find_sys_var($1.str, $1.length);
if (!tmp)
YYABORT;
$$.var= tmp;
$$.base_name.str=0;
$$.base_name.length=0;
}
else
{ /* An SP local variable */
$$.var= NULL;
$$.base_name= $1;
}
}
| ident '.' ident
{
...
...
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