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
5ecb34c2
Commit
5ecb34c2
authored
Nov 07, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
parents
4250321d
03618c71
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
137 additions
and
16 deletions
+137
-16
BitKeeper/etc/collapsed
BitKeeper/etc/collapsed
+2
-0
mysql-test/r/func_test.result
mysql-test/r/func_test.result
+75
-0
mysql-test/r/rpl_view.result
mysql-test/r/rpl_view.result
+2
-2
mysql-test/t/func_test.test
mysql-test/t/func_test.test
+34
-0
sql/item_func.cc
sql/item_func.cc
+8
-1
sql/item_func.h
sql/item_func.h
+1
-0
sql/slave.cc
sql/slave.cc
+15
-13
No files found.
BitKeeper/etc/collapsed
View file @
5ecb34c2
...
...
@@ -15,3 +15,5 @@
45214442pBGT9KuZEGixBH71jTzbOA
45214a07hVsIGwvwa-WrO-jpeaSwVw
452a92d0-31-8wSzSfZi165fcGcXPA
454a7ef8gdvE_ddMlJyghvOAkKPNOQ
454f8960jsVT_kMKJtZ9OCgXoba0xQ
mysql-test/r/func_test.result
View file @
5ecb34c2
...
...
@@ -182,6 +182,81 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
5 mod 3 5 mod -3 -5 mod 3 -5 mod -3
2 2 -2 -2
select (12%0) <=> null as '1';
1
1
select (12%0) is null as '1';
1
1
select 12%0 as 'NULL';
NULL
NULL
select 12%2 as '0';
0
0
select 12%NULL as 'NULL';
NULL
NULL
select 12 % null as 'NULL';
NULL
NULL
select null % 12 as 'NULL';
NULL
NULL
select null % 0 as 'NULL';
NULL
NULL
select 0 % null as 'NULL';
NULL
NULL
select null % null as 'NULL';
NULL
NULL
select (12 mod 0) <=> null as '1';
1
1
select (12 mod 0) is null as '1';
1
1
select 12 mod 0 as 'NULL';
NULL
NULL
select 12 mod 2 as '0';
0
0
select 12 mod null as 'NULL';
NULL
NULL
select null mod 12 as 'NULL';
NULL
NULL
select null mod 0 as 'NULL';
NULL
NULL
select 0 mod null as 'NULL';
NULL
NULL
select null mod null as 'NULL';
NULL
NULL
select mod(12.0, 0) as 'NULL';
NULL
NULL
select mod(12, 0.0) as 'NULL';
NULL
NULL
select mod(12, NULL) as 'NULL';
NULL
NULL
select mod(12.0, NULL) as 'NULL';
NULL
NULL
select mod(NULL, 2) as 'NULL';
NULL
NULL
select mod(NULL, 2.0) as 'NULL';
NULL
NULL
create table t1 (a int, b int);
insert into t1 values (1,2), (2,3), (3,4), (4,5);
select * from t1 where a not between 1 and 2;
...
...
mysql-test/r/rpl_view.result
View file @
5ecb34c2
...
...
@@ -47,11 +47,11 @@ show binlog events limit 1,100;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query 1 # use `test`; create table t1 (a int)
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (1)
slave-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=
root@localhost SQL SECURITY DEFINER VIEW v1
AS select a from t1
slave-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=
`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select a from t1
slave-bin.000001 # Query 1 # use `test`; insert into v1 values (2)
slave-bin.000001 # Query 1 # use `test`; update v1 set a=3 where a=1
slave-bin.000001 # Query 1 # use `test`; delete from v1 where a=2
slave-bin.000001 # Query 1 # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=
root@localhost SQL SECURITY DEFINER VIEW v1
AS select a as b from t1
slave-bin.000001 # Query 1 # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=
`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select a as b from t1
slave-bin.000001 # Query 1 # use `test`; drop view v1
slave-bin.000001 # Query 1 # use `test`; drop table t1
...
...
mysql-test/t/func_test.test
View file @
5ecb34c2
...
...
@@ -108,6 +108,40 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
select
5
mod
3
,
5
mod
-
3
,
-
5
mod
3
,
-
5
mod
-
3
;
#
# Bug#23411: The "%" (MOD) operator is not documented; MOD-ing zero returns strange result
# Manual: "Division by zero produces a NULL result"
#
select
(
12
%
0
)
<=>
null
as
'1'
;
select
(
12
%
0
)
is
null
as
'1'
;
select
12
%
0
as
'NULL'
;
select
12
%
2
as
'0'
;
select
12
%
NULL
as
'NULL'
;
select
12
%
null
as
'NULL'
;
select
null
%
12
as
'NULL'
;
select
null
%
0
as
'NULL'
;
select
0
%
null
as
'NULL'
;
select
null
%
null
as
'NULL'
;
select
(
12
mod
0
)
<=>
null
as
'1'
;
select
(
12
mod
0
)
is
null
as
'1'
;
select
12
mod
0
as
'NULL'
;
select
12
mod
2
as
'0'
;
select
12
mod
null
as
'NULL'
;
select
null
mod
12
as
'NULL'
;
select
null
mod
0
as
'NULL'
;
select
0
mod
null
as
'NULL'
;
select
null
mod
null
as
'NULL'
;
select
mod
(
12.0
,
0
)
as
'NULL'
;
select
mod
(
12
,
0.0
)
as
'NULL'
;
select
mod
(
12
,
NULL
)
as
'NULL'
;
select
mod
(
12.0
,
NULL
)
as
'NULL'
;
select
mod
(
NULL
,
2
)
as
'NULL'
;
select
mod
(
NULL
,
2.0
)
as
'NULL'
;
#
# Bug#6726: NOT BETWEEN parse failure
#
create
table
t1
(
a
int
,
b
int
);
...
...
sql/item_func.cc
View file @
5ecb34c2
...
...
@@ -105,7 +105,7 @@ Item_func::Item_func(THD *thd, Item_func *item)
/*
Resolve references to table column for a function and it
'
s argument
Resolve references to table column for a function and its argument
SYNOPSIS:
fix_fields()
...
...
@@ -1377,6 +1377,13 @@ void Item_func_mod::result_precision()
}
void
Item_func_mod
::
fix_length_and_dec
()
{
Item_num_op
::
fix_length_and_dec
();
maybe_null
=
1
;
}
double
Item_func_neg
::
real_op
()
{
double
value
=
args
[
0
]
->
val_real
();
...
...
sql/item_func.h
View file @
5ecb34c2
...
...
@@ -430,6 +430,7 @@ public:
my_decimal
*
decimal_op
(
my_decimal
*
);
const
char
*
func_name
()
const
{
return
"%"
;
}
void
result_precision
();
void
fix_length_and_dec
();
};
...
...
sql/slave.cc
View file @
5ecb34c2
...
...
@@ -2854,8 +2854,21 @@ improper_arguments: %d timed_out: %d",
void
set_slave_thread_options
(
THD
*
thd
)
{
thd
->
options
=
((
opt_log_slave_updates
)
?
OPTION_BIN_LOG
:
0
)
|
OPTION_AUTO_IS_NULL
;
/*
It's nonsense to constrain the slave threads with max_join_size; if a
query succeeded on master, we HAVE to execute it. So set
OPTION_BIG_SELECTS. Setting max_join_size to HA_POS_ERROR is not enough
(and it's not needed if we have OPTION_BIG_SELECTS) because an INSERT
SELECT examining more than 4 billion rows would still fail (yes, because
when max_join_size is 4G, OPTION_BIG_SELECTS is automatically set, but
only for client threads.
*/
ulonglong
options
=
thd
->
options
|
OPTION_BIG_SELECTS
;
if
(
opt_log_slave_updates
)
options
|=
OPTION_BIN_LOG
;
else
options
&=
~
OPTION_BIN_LOG
;
thd
->
options
=
options
;
thd
->
variables
.
completion_type
=
0
;
}
...
...
@@ -2885,17 +2898,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
thd
->
net
.
read_timeout
=
slave_net_timeout
;
thd
->
slave_thread
=
1
;
set_slave_thread_options
(
thd
);
/*
It's nonsense to constrain the slave threads with max_join_size; if a
query succeeded on master, we HAVE to execute it. So set
OPTION_BIG_SELECTS. Setting max_join_size to HA_POS_ERROR is not enough
(and it's not needed if we have OPTION_BIG_SELECTS) because an INSERT
SELECT examining more than 4 billion rows would still fail (yes, because
when max_join_size is 4G, OPTION_BIG_SELECTS is automatically set, but
only for client threads.
*/
thd
->
options
=
((
opt_log_slave_updates
)
?
OPTION_BIN_LOG
:
0
)
|
OPTION_AUTO_IS_NULL
|
OPTION_BIG_SELECTS
;
thd
->
client_capabilities
=
CLIENT_LOCAL_FILES
;
thd
->
real_id
=
pthread_self
();
pthread_mutex_lock
(
&
LOCK_thread_count
);
...
...
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