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
b70efcac
Commit
b70efcac
authored
May 07, 2006
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fixes.
parent
e7f21dce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
42 deletions
+46
-42
mysql-test/r/rpl_user_variables.result
mysql-test/r/rpl_user_variables.result
+30
-29
sql/sql_lex.cc
sql/sql_lex.cc
+1
-1
sql/sql_prepare.cc
sql/sql_prepare.cc
+15
-12
No files found.
mysql-test/r/rpl_user_variables.result
View file @
b70efcac
...
@@ -76,35 +76,36 @@ abcn1n2
...
@@ -76,35 +76,36 @@ abcn1n2
NULL
NULL
NULL
NULL
NULL
NULL
show binlog events from 141;
show binlog events from 98;
Log_name Pos Event_type Server_id Orig_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 141 User var 2 141 @`i1`=12345678901234
slave-bin.000001 # Query 1 # use `test`; create table t1(n char(30))
slave-bin.000001 184 User var 2 184 @`i2`=-12345678901234
slave-bin.000001 # User var 2 # @`i1`=12345678901234
slave-bin.000001 227 User var 2 227 @`i3`=0
slave-bin.000001 # User var 2 # @`i2`=-12345678901234
slave-bin.000001 270 User var 2 270 @`i4`=-1
slave-bin.000001 # User var 2 # @`i3`=0
slave-bin.000001 313 Query 1 313 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4)
slave-bin.000001 # User var 2 # @`i4`=-1
slave-bin.000001 396 User var 2 396 @`r1`=12.5
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4)
slave-bin.000001 439 User var 2 439 @`r2`=-12.5
slave-bin.000001 # User var 2 # @`r1`=12.5
slave-bin.000001 482 Query 1 482 use `test`; insert into t1 values (@r1), (@r2)
slave-bin.000001 # User var 2 # @`r2`=-12.5
slave-bin.000001 551 User var 2 551 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@r1), (@r2)
slave-bin.000001 600 User var 2 600 @`s2`=_latin1 "" COLLATE latin1_swedish_ci
slave-bin.000001 # User var 2 # @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci
slave-bin.000001 635 User var 2 635 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
slave-bin.000001 # User var 2 # @`s2`=_latin1 "" COLLATE latin1_swedish_ci
slave-bin.000001 677 User var 2 677 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci
slave-bin.000001 # User var 2 # @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
slave-bin.000001 719 User var 2 719 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
slave-bin.000001 # User var 2 # @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci
slave-bin.000001 761 Query 1 761 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5)
slave-bin.000001 # User var 2 # @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
slave-bin.000001 851 User var 2 851 @`n1`=NULL
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5)
slave-bin.000001 877 Query 1 877 use `test`; insert into t1 values (@n1)
slave-bin.000001 # User var 2 # @`n1`=NULL
slave-bin.000001 939 User var 2 939 @`n2`=NULL
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@n1)
slave-bin.000001 965 Query 1 965 use `test`; insert into t1 values (@n2)
slave-bin.000001 # User var 2 # @`n2`=NULL
slave-bin.000001 1027 Query 1 1027 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@n2)
slave-bin.000001 1115 User var 2 1115 @`a`=2
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
slave-bin.000001 1157 Query 1 1157 use `test`; insert into t1 values (@a+(@b:=@a+1))
slave-bin.000001 # User var 2 # @`a`=2
slave-bin.000001 1229 User var 2 1229 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a+(@b:=@a+1))
slave-bin.000001 1266 Query 1 1266 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
slave-bin.000001 # User var 2 # @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci
slave-bin.000001 1370 User var 2 1370 @`a`=5
slave-bin.000001 # Query 1 # use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
slave-bin.000001 1412 Query 1 1412 use `test`; insert into t1 values (@a),(@a)
slave-bin.000001 # User var 2 # @`a`=5
slave-bin.000001 1478 User var 2 1478 @`a`=NULL
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a),(@a)
slave-bin.000001 1503 Query 1 1503 use `test`; insert into t1 values (@a),(@a),(@a*5)
slave-bin.000001 # User var 2 # @`a`=NULL
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a),(@a),(@a*5)
insert into t1 select * FROM (select @var1 union select @var2) AS t2;
insert into t1 select * FROM (select @var1 union select @var2) AS t2;
drop table t1;
drop table t1;
stop slave;
stop slave;
sql/sql_lex.cc
View file @
b70efcac
...
@@ -1145,7 +1145,7 @@ void st_select_lex::init_query()
...
@@ -1145,7 +1145,7 @@ void st_select_lex::init_query()
cond_count
=
with_wild
=
0
;
cond_count
=
with_wild
=
0
;
conds_processed_with_permanent_arena
=
0
;
conds_processed_with_permanent_arena
=
0
;
ref_pointer_array
=
0
;
ref_pointer_array
=
0
;
select_n_having_items
=
0
;
}
select_n_having_items
=
0
;
subquery_in_having
=
explicit_limit
=
0
;
subquery_in_having
=
explicit_limit
=
0
;
is_item_list_lookup
=
0
;
is_item_list_lookup
=
0
;
first_execution
=
1
;
first_execution
=
1
;
...
...
sql/sql_prepare.cc
View file @
b70efcac
...
@@ -1965,6 +1965,7 @@ static const char *get_dynamic_sql_string(LEX *lex, uint *query_len)
...
@@ -1965,6 +1965,7 @@ static const char *get_dynamic_sql_string(LEX *lex, uint *query_len)
memcpy
(
query_str
,
var_value
->
ptr
(),
var_value
->
length
());
memcpy
(
query_str
,
var_value
->
ptr
(),
var_value
->
length
());
query_str
[
len
]
=
'\0'
;
// Safety (mostly for debug)
query_str
[
len
]
=
'\0'
;
// Safety (mostly for debug)
*
query_len
=
len
;
*
query_len
=
len
;
}
else
else
{
{
query_str
=
lex
->
prepared_stmt_code
.
str
;
query_str
=
lex
->
prepared_stmt_code
.
str
;
...
@@ -2084,19 +2085,20 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
...
@@ -2084,19 +2085,20 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
sl
->
exclude_from_table_unique_test
=
FALSE
;
sl
->
exclude_from_table_unique_test
=
FALSE
;
/*
/*
Copy WHERE, HAVING clause pointers to avoid damaging them by optimisation
Copy WHERE, HAVING clause pointers to avoid damaging them
by optimisation
*/
*/
if
(
sl
->
prep_where
)
if
(
sl
->
prep_where
)
{
{
sl
->
where
=
sl
->
prep_where
->
copy_andor_structure
(
thd
);
sl
->
where
=
sl
->
prep_where
->
copy_andor_structure
(
thd
);
sl
->
where
->
cleanup
();
sl
->
where
->
cleanup
();
}
}
if
(
sl
->
prep_having
)
if
(
sl
->
prep_having
)
{
{
sl
->
having
=
sl
->
prep_having
->
copy_andor_structure
(
thd
);
sl
->
having
=
sl
->
prep_having
->
copy_andor_structure
(
thd
);
sl
->
having
->
cleanup
();
sl
->
having
->
cleanup
();
}
}
DBUG_ASSERT
(
sl
->
join
==
0
);
DBUG_ASSERT
(
sl
->
join
==
0
);
ORDER
*
order
;
ORDER
*
order
;
/* Fix GROUP list */
/* Fix GROUP list */
for
(
order
=
(
ORDER
*
)
sl
->
group_list
.
first
;
order
;
order
=
order
->
next
)
for
(
order
=
(
ORDER
*
)
sl
->
group_list
.
first
;
order
;
order
=
order
->
next
)
...
@@ -2104,6 +2106,7 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
...
@@ -2104,6 +2106,7 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
/* Fix ORDER list */
/* Fix ORDER list */
for
(
order
=
(
ORDER
*
)
sl
->
order_list
.
first
;
order
;
order
=
order
->
next
)
for
(
order
=
(
ORDER
*
)
sl
->
order_list
.
first
;
order
;
order
=
order
->
next
)
order
->
item
=
&
order
->
item_ptr
;
order
->
item
=
&
order
->
item_ptr
;
}
{
{
SELECT_LEX_UNIT
*
unit
=
sl
->
master_unit
();
SELECT_LEX_UNIT
*
unit
=
sl
->
master_unit
();
unit
->
unclean
();
unit
->
unclean
();
...
...
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