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
dee46f91
Commit
dee46f91
authored
Dec 21, 2006
by
istruewing@chilla.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into chilla.local:/home/mydev/mysql-5.1-axmrg
parents
80b97a6b
1341cf18
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
244 additions
and
40 deletions
+244
-40
client/mysql_upgrade.c
client/mysql_upgrade.c
+11
-1
mysql-test/include/innodb_rollback_on_timeout.inc
mysql-test/include/innodb_rollback_on_timeout.inc
+37
-0
mysql-test/include/mix1.inc
mysql-test/include/mix1.inc
+2
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+6
-0
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+12
-0
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+36
-0
mysql-test/r/innodb_timeout_rollback.result
mysql-test/r/innodb_timeout_rollback.result
+35
-0
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+1
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+8
-0
mysql-test/t/innodb_mysql-master.opt
mysql-test/t/innodb_mysql-master.opt
+1
-0
mysql-test/t/innodb_timeout_rollback-master.opt
mysql-test/t/innodb_timeout_rollback-master.opt
+1
-0
mysql-test/t/innodb_timeout_rollback.test
mysql-test/t/innodb_timeout_rollback.test
+5
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+1
-1
mysql-test/t/query_cache_notembedded.test
mysql-test/t/query_cache_notembedded.test
+2
-2
mysql-test/t/rpl_000015.test
mysql-test/t/rpl_000015.test
+1
-1
mysql-test/t/rpl_rotate_logs.test
mysql-test/t/rpl_rotate_logs.test
+1
-1
scripts/make_binary_distribution.sh
scripts/make_binary_distribution.sh
+1
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+19
-20
sql/mysqld.cc
sql/mysqld.cc
+9
-2
sql/set_var.cc
sql/set_var.cc
+3
-1
sql/udf_example.c
sql/udf_example.c
+1
-1
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+7
-0
storage/innobase/handler/ha_innodb.h
storage/innobase/handler/ha_innodb.h
+1
-0
storage/innobase/include/row0mysql.h
storage/innobase/include/row0mysql.h
+2
-0
storage/innobase/row/row0mysql.c
storage/innobase/row/row0mysql.c
+10
-1
strings/decimal.c
strings/decimal.c
+26
-8
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+5
-1
No files found.
client/mysql_upgrade.c
View file @
dee46f91
...
@@ -144,6 +144,7 @@ void set_extra_default(int id, const struct my_option *opt)
...
@@ -144,6 +144,7 @@ void set_extra_default(int id, const struct my_option *opt)
case
'f'
:
/* --force is ours */
case
'f'
:
/* --force is ours */
case
'u'
:
/* --user passed on cmdline */
case
'u'
:
/* --user passed on cmdline */
case
'T'
:
/* --debug-info is not accepted by mysqlcheck */
case
'T'
:
/* --debug-info is not accepted by mysqlcheck */
case
'p'
:
/* --password may change yet */
/* so, do nothing */
/* so, do nothing */
break
;
break
;
default:
default:
...
@@ -175,7 +176,7 @@ void set_extra_default(int id, const struct my_option *opt)
...
@@ -175,7 +176,7 @@ void set_extra_default(int id, const struct my_option *opt)
d
->
id
=
id
;
d
->
id
=
id
;
d
->
name
=
opt
->
name
;
d
->
name
=
opt
->
name
;
d
->
n_len
=
strlen
(
opt
->
name
);
d
->
n_len
=
strlen
(
opt
->
name
);
if
(
opt
->
arg_type
!=
NO_ARG
)
if
(
opt
->
arg_type
!=
NO_ARG
&&
opt
->
value
)
switch
(
opt
->
var_type
&
GET_TYPE_MASK
)
{
switch
(
opt
->
var_type
&
GET_TYPE_MASK
)
{
case
GET_BOOL
:
case
GET_BOOL
:
if
(
*
((
int
*
)
opt
->
value
))
if
(
*
((
int
*
)
opt
->
value
))
...
@@ -321,6 +322,15 @@ static int create_defaults_file(const char *path, const char *forced_path)
...
@@ -321,6 +322,15 @@ static int create_defaults_file(const char *path, const char *forced_path)
}
}
dynstr_set
(
&
buf
,
"
\n
[client]"
);
dynstr_set
(
&
buf
,
"
\n
[client]"
);
if
(
opt_password
)
{
if
(
dynstr_append
(
&
buf
,
"
\n
password="
)
||
dynstr_append
(
&
buf
,
opt_password
))
{
ret
=
1
;
goto
error
;
}
}
while
(
extra_defaults
)
while
(
extra_defaults
)
{
{
int
len
;
int
len
;
...
...
mysql-test/include/innodb_rollback_on_timeout.inc
0 → 100644
View file @
dee46f91
#
# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
# transaction timeout"
#
show
variables
like
'innodb_rollback_on_timeout'
;
create
table
t1
(
a
int
unsigned
not
null
primary
key
)
engine
=
innodb
;
insert
into
t1
values
(
1
);
commit
;
connect
(
con1
,
localhost
,
root
,,);
connect
(
con2
,
localhost
,
root
,,);
connection
con2
;
begin
work
;
insert
into
t1
values
(
2
);
select
*
from
t1
;
connection
con1
;
begin
work
;
insert
into
t1
values
(
5
);
select
*
from
t1
;
# Lock wait timeout set to 2 seconds in <THIS TEST>-master.opt; this
# statement will time out; in 5.0.13+, it will not roll back transaction.
--
error
ER_LOCK_WAIT_TIMEOUT
insert
into
t1
values
(
2
);
# On 5.0.13+, this should give ==> 1, 5
select
*
from
t1
;
commit
;
connection
con2
;
select
*
from
t1
;
commit
;
connection
default
;
select
*
from
t1
;
drop
table
t1
;
disconnect
con1
;
disconnect
con2
;
mysql-test/include/mix1.inc
View file @
dee46f91
...
@@ -462,6 +462,8 @@ EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
...
@@ -462,6 +462,8 @@ EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
EXPLAIN
SELECT
SQL_BIG_RESULT
b
,
SUM
(
c
)
FROM
t1
GROUP
BY
b
;
EXPLAIN
SELECT
SQL_BIG_RESULT
b
,
SUM
(
c
)
FROM
t1
GROUP
BY
b
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
source
include
/
innodb_rollback_on_timeout
.
inc
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
...
...
mysql-test/mysql-test-run.pl
View file @
dee46f91
...
@@ -58,6 +58,7 @@ $Devel::Trace::TRACE= 0; # Don't trace boring init stuff
...
@@ -58,6 +58,7 @@ $Devel::Trace::TRACE= 0; # Don't trace boring init stuff
use
File::
Path
;
use
File::
Path
;
use
File::
Basename
;
use
File::
Basename
;
use
File::
Copy
;
use
File::
Copy
;
use
File::
Temp
qw /
tempdir
/
;
use
Cwd
;
use
Cwd
;
use
Getopt::
Long
;
use
Getopt::
Long
;
use
Sys::
Hostname
;
use
Sys::
Hostname
;
...
@@ -1020,6 +1021,11 @@ sub command_line_setup () {
...
@@ -1020,6 +1021,11 @@ sub command_line_setup () {
my
$sockdir
=
$opt_tmpdir
;
my
$sockdir
=
$opt_tmpdir
;
$sockdir
=~
s|/+$||
;
$sockdir
=~
s|/+$||
;
# On some operating systems, there is a limit to the length of a
# UNIX domain socket's path far below PATH_MAX, so try to avoid long
# socket path names.
$sockdir
=
tempdir
(
CLEANUP
=>
1
)
if
(
length
(
$sockdir
)
>
80
);
# Put this into a hash, will be a C struct
# Put this into a hash, will be a C struct
$master
->
[
0
]
=
$master
->
[
0
]
=
...
...
mysql-test/r/func_str.result
View file @
dee46f91
...
@@ -2249,4 +2249,16 @@ CHAR(0xff,0x8f USING utf8) IS NULL
...
@@ -2249,4 +2249,16 @@ CHAR(0xff,0x8f USING utf8) IS NULL
Warnings:
Warnings:
Error 1300 Invalid utf8 character string: 'FF8F'
Error 1300 Invalid utf8 character string: 'FF8F'
SET SQL_MODE=@orig_sql_mode;
SET SQL_MODE=@orig_sql_mode;
select substring('abc', cast(2 as unsigned int));
substring('abc', cast(2 as unsigned int))
bc
select repeat('a', cast(2 as unsigned int));
repeat('a', cast(2 as unsigned int))
aa
select rpad('abc', cast(5 as unsigned integer), 'x');
rpad('abc', cast(5 as unsigned integer), 'x')
abcxx
select lpad('abc', cast(5 as unsigned integer), 'x');
lpad('abc', cast(5 as unsigned integer), 'x')
xxabc
End of 5.0 tests
End of 5.0 tests
mysql-test/r/innodb_mysql.result
View file @
dee46f91
...
@@ -403,6 +403,42 @@ EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
...
@@ -403,6 +403,42 @@ EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort
1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort
DROP TABLE t1;
DROP TABLE t1;
show variables like 'innodb_rollback_on_timeout';
Variable_name Value
innodb_rollback_on_timeout OFF
create table t1 (a int unsigned not null primary key) engine = innodb;
insert into t1 values (1);
commit;
begin work;
insert into t1 values (2);
select * from t1;
a
1
2
begin work;
insert into t1 values (5);
select * from t1;
a
1
5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
a
1
5
commit;
select * from t1;
a
1
2
commit;
select * from t1;
a
1
2
5
drop table t1;
End of 5.0 tests
End of 5.0 tests
CREATE TABLE `t2` (
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
`k` int(11) NOT NULL auto_increment,
...
...
mysql-test/r/innodb_timeout_rollback.result
0 → 100644
View file @
dee46f91
show variables like 'innodb_rollback_on_timeout';
Variable_name Value
innodb_rollback_on_timeout ON
create table t1 (a int unsigned not null primary key) engine = innodb;
insert into t1 values (1);
commit;
begin work;
insert into t1 values (2);
select * from t1;
a
1
2
begin work;
insert into t1 values (5);
select * from t1;
a
1
5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
a
1
commit;
select * from t1;
a
1
2
commit;
select * from t1;
a
1
2
drop table t1;
End of 5.0 tests
mysql-test/t/disabled.def
View file @
dee46f91
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
##############################################################################
##############################################################################
user_limits : Bug#23921 random failure of user_limits.test
user_limits : Bug#23921 random failure of user_limits.test
im_daemon_life_cycle : Bug#24415 see note: [19 Dec 23:17] Trudy Pelzer
im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly
im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
...
...
mysql-test/t/func_str.test
View file @
dee46f91
...
@@ -1098,5 +1098,13 @@ SELECT CHAR(0xff,0x8f USING utf8) IS NULL;
...
@@ -1098,5 +1098,13 @@ SELECT CHAR(0xff,0x8f USING utf8) IS NULL;
SET
SQL_MODE
=@
orig_sql_mode
;
SET
SQL_MODE
=@
orig_sql_mode
;
#
# Bug #24947: problem with some string function with unsigned int parameters
#
select
substring
(
'abc'
,
cast
(
2
as
unsigned
int
));
select
repeat
(
'a'
,
cast
(
2
as
unsigned
int
));
select
rpad
(
'abc'
,
cast
(
5
as
unsigned
integer
),
'x'
);
select
lpad
(
'abc'
,
cast
(
5
as
unsigned
integer
),
'x'
);
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
mysql-test/t/innodb_mysql-master.opt
0 → 100644
View file @
dee46f91
--innodb-lock-wait-timeout=2
mysql-test/t/innodb_timeout_rollback-master.opt
0 → 100644
View file @
dee46f91
--innodb_lock_wait_timeout=2 --innodb_rollback_on_timeout
mysql-test/t/innodb_timeout_rollback.test
0 → 100644
View file @
dee46f91
--
source
include
/
have_innodb
.
inc
--
source
include
/
innodb_rollback_on_timeout
.
inc
--
echo
End
of
5.0
tests
mysql-test/t/myisam.test
View file @
dee46f91
...
@@ -498,7 +498,7 @@ insert into t1 values (1),(2),(3),(4),(5),(6);
...
@@ -498,7 +498,7 @@ insert into t1 values (1),(2),(3),(4),(5),(6);
insert
into
t2
values
(
1
,
1
),(
2
,
1
);
insert
into
t2
values
(
1
,
1
),(
2
,
1
);
lock
tables
t1
read
local
,
t2
read
local
;
lock
tables
t1
read
local
,
t2
read
local
;
select
straight_join
*
from
t1
,
t2
force
index
(
primary
)
where
t1
.
a
=
t2
.
a
;
select
straight_join
*
from
t1
,
t2
force
index
(
primary
)
where
t1
.
a
=
t2
.
a
;
connect
(
root
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
master
.
sock
);
connect
(
root
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
insert
into
t2
values
(
2
,
0
);
insert
into
t2
values
(
2
,
0
);
disconnect
root
;
disconnect
root
;
connection
default
;
connection
default
;
...
...
mysql-test/t/query_cache_notembedded.test
View file @
dee46f91
...
@@ -81,12 +81,12 @@ drop table t1, t2, t3, t11, t21;
...
@@ -81,12 +81,12 @@ drop table t1, t2, t3, t11, t21;
#
#
# do not use QC if tables locked (BUG#12385)
# do not use QC if tables locked (BUG#12385)
#
#
connect
(
root
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
master
.
sock
);
connect
(
root
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
connection
root
;
connection
root
;
CREATE
TABLE
t1
(
a
INT
NOT
NULL
PRIMARY
KEY
AUTO_INCREMENT
)
ENGINE
=
CREATE
TABLE
t1
(
a
INT
NOT
NULL
PRIMARY
KEY
AUTO_INCREMENT
)
ENGINE
=
MyISAM
;
MyISAM
;
LOCK
TABLE
t1
READ
LOCAL
;
LOCK
TABLE
t1
READ
LOCAL
;
connect
(
root2
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
master
.
sock
);
connect
(
root2
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
connection
root2
;
connection
root2
;
INSERT
INTO
t1
VALUES
(),
(),
();
INSERT
INTO
t1
VALUES
(),
(),
();
connection
root
;
connection
root
;
...
...
mysql-test/t/rpl_000015.test
View file @
dee46f91
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#####################
#####################
connect
(
master
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
connect
(
master
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
connect
(
slave
,
localhost
,
root
,,
test
,
$SLAVE_MYPORT
,
slave
.
sock
);
connect
(
slave
,
localhost
,
root
,,
test
,
$SLAVE_MYPORT
,
$SLAVE_MYSOCK
);
connection
master
;
connection
master
;
reset
master
;
reset
master
;
show
master
status
;
show
master
status
;
...
...
mysql-test/t/rpl_rotate_logs.test
View file @
dee46f91
...
@@ -19,7 +19,7 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
...
@@ -19,7 +19,7 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
--
enable_warnings
--
enable_warnings
connect
(
slave
,
localhost
,
root
,,
test
,
$SLAVE_MYPORT
,
slave
.
sock
);
connect
(
slave
,
localhost
,
root
,,
test
,
$SLAVE_MYPORT
,
$SLAVE_MYSOCK
);
system
cat
/
dev
/
null
>
$MYSQLTEST_VARDIR
/
slave
-
data
/
master
.
info
;
system
cat
/
dev
/
null
>
$MYSQLTEST_VARDIR
/
slave
-
data
/
master
.
info
;
system
chmod
000
$MYSQLTEST_VARDIR
/
slave
-
data
/
master
.
info
;
system
chmod
000
$MYSQLTEST_VARDIR
/
slave
-
data
/
master
.
info
;
connection
slave
;
connection
slave
;
...
...
scripts/make_binary_distribution.sh
View file @
dee46f91
...
@@ -246,6 +246,7 @@ $CP mysql-test/include/*.inc $BASE/mysql-test/include
...
@@ -246,6 +246,7 @@ $CP mysql-test/include/*.inc $BASE/mysql-test/include
$CP
mysql-test/include/
*
.test
$BASE
/mysql-test/include
$CP
mysql-test/include/
*
.test
$BASE
/mysql-test/include
$CP
mysql-test/t/
*
.def
$BASE
/mysql-test/t
$CP
mysql-test/t/
*
.def
$BASE
/mysql-test/t
$CP
mysql-test/std_data/
*
.dat mysql-test/std_data/
*
.frm
\
$CP
mysql-test/std_data/
*
.dat mysql-test/std_data/
*
.frm
\
mysql-test/std_data/
*
.MYD mysql-test/std_data/
*
.MYI
\
mysql-test/std_data/
*
.pem mysql-test/std_data/Moscow_leap
\
mysql-test/std_data/
*
.pem mysql-test/std_data/Moscow_leap
\
mysql-test/std_data/des_key_file mysql-test/std_data/
*
.
*
001
\
mysql-test/std_data/des_key_file mysql-test/std_data/
*
.
*
001
\
mysql-test/std_data/
*
.cnf
\
mysql-test/std_data/
*
.cnf
\
...
...
sql/item_strfunc.cc
View file @
dee46f91
...
@@ -1166,7 +1166,8 @@ String *Item_func_substr::val_str(String *str)
...
@@ -1166,7 +1166,8 @@ String *Item_func_substr::val_str(String *str)
/* if "unsigned_flag" is set, we have a *huge* positive number. */
/* if "unsigned_flag" is set, we have a *huge* positive number. */
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Assumes that the maximum length of a String is < INT_MAX32. */
if
((
args
[
1
]
->
unsigned_flag
)
||
(
start
<
INT_MIN32
)
||
(
start
>
INT_MAX32
))
if
((
!
args
[
1
]
->
unsigned_flag
&&
(
start
<
INT_MIN32
||
start
>
INT_MAX32
))
||
(
args
[
1
]
->
unsigned_flag
&&
((
ulonglong
)
start
>
INT_MAX32
)))
return
&
my_empty_string
;
return
&
my_empty_string
;
start
=
((
start
<
0
)
?
res
->
numchars
()
+
start
:
start
-
1
);
start
=
((
start
<
0
)
?
res
->
numchars
()
+
start
:
start
-
1
);
...
@@ -2272,25 +2273,23 @@ String *Item_func_repeat::val_str(String *str)
...
@@ -2272,25 +2273,23 @@ String *Item_func_repeat::val_str(String *str)
uint
length
,
tot_length
;
uint
length
,
tot_length
;
char
*
to
;
char
*
to
;
/* must be longlong to avoid truncation */
/* must be longlong to avoid truncation */
longlong
tmp_count
=
args
[
1
]
->
val_int
();
longlong
count
=
args
[
1
]
->
val_int
();
long
count
=
(
long
)
tmp_count
;
String
*
res
=
args
[
0
]
->
val_str
(
str
);
String
*
res
=
args
[
0
]
->
val_str
(
str
);
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Bounds check on count: If this is triggered, we will error. */
if
((
tmp_count
>
INT_MAX32
)
||
args
[
1
]
->
unsigned_flag
)
count
=
INT_MAX32
;
if
(
args
[
0
]
->
null_value
||
args
[
1
]
->
null_value
)
if
(
args
[
0
]
->
null_value
||
args
[
1
]
->
null_value
)
goto
err
;
// string and/or delim are null
goto
err
;
// string and/or delim are null
null_value
=
0
;
null_value
=
0
;
if
((
tmp_
count
<=
0
)
&&
!
args
[
1
]
->
unsigned_flag
)
// For nicer SQL code
if
((
count
<=
0
)
&&
!
args
[
1
]
->
unsigned_flag
)
// For nicer SQL code
return
&
my_empty_string
;
return
&
my_empty_string
;
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Bounds check on count: If this is triggered, we will error. */
if
((
ulonglong
)
count
>
INT_MAX32
)
count
=
INT_MAX32
;
if
(
count
==
1
)
// To avoid reallocs
if
(
count
==
1
)
// To avoid reallocs
return
res
;
return
res
;
length
=
res
->
length
();
length
=
res
->
length
();
// Safe length check
// Safe length check
if
(
length
>
current_thd
->
variables
.
max_allowed_packet
/
count
)
if
(
length
>
current_thd
->
variables
.
max_allowed_packet
/
(
uint
)
count
)
{
{
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_WARN_ALLOWED_PACKET_OVERFLOWED
,
ER_WARN_ALLOWED_PACKET_OVERFLOWED
,
...
@@ -2364,15 +2363,14 @@ String *Item_func_rpad::val_str(String *str)
...
@@ -2364,15 +2363,14 @@ String *Item_func_rpad::val_str(String *str)
String
*
res
=
args
[
0
]
->
val_str
(
str
);
String
*
res
=
args
[
0
]
->
val_str
(
str
);
String
*
rpad
=
args
[
2
]
->
val_str
(
&
rpad_str
);
String
*
rpad
=
args
[
2
]
->
val_str
(
&
rpad_str
);
if
(
!
res
||
args
[
1
]
->
null_value
||
!
rpad
||
((
count
<
0
)
&&
!
args
[
1
]
->
unsigned_flag
))
goto
err
;
null_value
=
0
;
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Set here so that rest of code sees out-of-bound value as such. */
/* Set here so that rest of code sees out-of-bound value as such. */
if
((
count
>
INT_MAX32
)
||
args
[
1
]
->
unsigned_flag
)
if
((
ulonglong
)
count
>
INT_MAX32
)
count
=
INT_MAX32
;
count
=
INT_MAX32
;
if
(
!
res
||
args
[
1
]
->
null_value
||
!
rpad
||
count
<
0
)
goto
err
;
null_value
=
0
;
if
(
count
<=
(
res_char_length
=
res
->
numchars
()))
if
(
count
<=
(
res_char_length
=
res
->
numchars
()))
{
// String to pad is big enough
{
// String to pad is big enough
res
->
length
(
res
->
charpos
((
int
)
count
));
// Shorten result if longer
res
->
length
(
res
->
charpos
((
int
)
count
));
// Shorten result if longer
...
@@ -2466,14 +2464,15 @@ String *Item_func_lpad::val_str(String *str)
...
@@ -2466,14 +2464,15 @@ String *Item_func_lpad::val_str(String *str)
String
*
res
=
args
[
0
]
->
val_str
(
&
tmp_value
);
String
*
res
=
args
[
0
]
->
val_str
(
&
tmp_value
);
String
*
pad
=
args
[
2
]
->
val_str
(
&
lpad_str
);
String
*
pad
=
args
[
2
]
->
val_str
(
&
lpad_str
);
if
(
!
res
||
args
[
1
]
->
null_value
||
!
pad
||
((
count
<
0
)
&&
!
args
[
1
]
->
unsigned_flag
))
goto
err
;
null_value
=
0
;
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Set here so that rest of code sees out-of-bound value as such. */
/* Set here so that rest of code sees out-of-bound value as such. */
if
((
count
>
INT_MAX32
)
||
args
[
1
]
->
unsigned_flag
)
if
((
ulonglong
)
count
>
INT_MAX32
)
count
=
INT_MAX32
;
count
=
INT_MAX32
;
if
(
!
res
||
args
[
1
]
->
null_value
||
!
pad
||
count
<
0
)
goto
err
;
null_value
=
0
;
res_char_length
=
res
->
numchars
();
res_char_length
=
res
->
numchars
();
if
(
count
<=
res_char_length
)
if
(
count
<=
res_char_length
)
...
...
sql/mysqld.cc
View file @
dee46f91
...
@@ -391,6 +391,7 @@ extern my_bool innobase_log_archive,
...
@@ -391,6 +391,7 @@ extern my_bool innobase_log_archive,
innobase_use_large_pages
,
innobase_use_large_pages
,
innobase_use_native_aio
,
innobase_use_native_aio
,
innobase_file_per_table
,
innobase_locks_unsafe_for_binlog
,
innobase_file_per_table
,
innobase_locks_unsafe_for_binlog
,
innobase_rollback_on_timeout
,
innobase_create_status_file
;
innobase_create_status_file
;
extern
"C"
{
extern
"C"
{
extern
ulong
srv_max_buf_pool_modified_pct
;
extern
ulong
srv_max_buf_pool_modified_pct
;
...
@@ -4869,7 +4870,8 @@ enum options_mysqld
...
@@ -4869,7 +4870,8 @@ enum options_mysqld
OPT_PORT_OPEN_TIMEOUT
,
OPT_PORT_OPEN_TIMEOUT
,
OPT_GENERAL_LOG
,
OPT_GENERAL_LOG
,
OPT_SLOW_LOG
,
OPT_SLOW_LOG
,
OPT_MERGE
OPT_MERGE
,
OPT_INNODB_ROLLBACK_ON_TIMEOUT
};
};
...
@@ -5162,6 +5164,10 @@ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite,
...
@@ -5162,6 +5164,10 @@ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite,
(
gptr
*
)
&
srv_max_purge_lag
,
(
gptr
*
)
&
srv_max_purge_lag
,
(
gptr
*
)
&
srv_max_purge_lag
,
0
,
GET_LONG
,
REQUIRED_ARG
,
0
,
0
,
~
0L
,
(
gptr
*
)
&
srv_max_purge_lag
,
0
,
GET_LONG
,
REQUIRED_ARG
,
0
,
0
,
~
0L
,
0
,
1L
,
0
},
0
,
1L
,
0
},
{
"innodb_rollback_on_timeout"
,
OPT_INNODB_ROLLBACK_ON_TIMEOUT
,
"Roll back the complete transaction on lock wait timeout, for 4.x compatibility (disabled by default)"
,
(
gptr
*
)
&
innobase_rollback_on_timeout
,
(
gptr
*
)
&
innobase_rollback_on_timeout
,
0
,
GET_BOOL
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"innodb_status_file"
,
OPT_INNODB_STATUS_FILE
,
{
"innodb_status_file"
,
OPT_INNODB_STATUS_FILE
,
"Enable SHOW INNODB STATUS output in the innodb_status.<pid> file"
,
"Enable SHOW INNODB STATUS output in the innodb_status.<pid> file"
,
(
gptr
*
)
&
innobase_create_status_file
,
(
gptr
*
)
&
innobase_create_status_file
,
(
gptr
*
)
&
innobase_create_status_file
,
(
gptr
*
)
&
innobase_create_status_file
,
...
@@ -8149,7 +8155,8 @@ my_bool innobase_log_archive,
...
@@ -8149,7 +8155,8 @@ my_bool innobase_log_archive,
innobase_use_doublewrite
,
innobase_use_doublewrite
,
innobase_use_checksums
,
innobase_use_checksums
,
innobase_file_per_table
,
innobase_file_per_table
,
innobase_locks_unsafe_for_binlog
;
innobase_locks_unsafe_for_binlog
,
innobase_rollback_on_timeout
;
extern
"C"
{
extern
"C"
{
ulong
srv_max_buf_pool_modified_pct
;
ulong
srv_max_buf_pool_modified_pct
;
...
...
sql/set_var.cc
View file @
dee46f91
...
@@ -78,7 +78,8 @@ extern my_bool innobase_log_archive,
...
@@ -78,7 +78,8 @@ extern my_bool innobase_log_archive,
innobase_use_doublewrite
,
innobase_use_doublewrite
,
innobase_use_checksums
,
innobase_use_checksums
,
innobase_file_per_table
,
innobase_file_per_table
,
innobase_locks_unsafe_for_binlog
;
innobase_locks_unsafe_for_binlog
,
innobase_rollback_on_timeout
;
extern
"C"
{
extern
"C"
{
extern
ulong
srv_max_buf_pool_modified_pct
;
extern
ulong
srv_max_buf_pool_modified_pct
;
...
@@ -825,6 +826,7 @@ SHOW_VAR init_vars[]= {
...
@@ -825,6 +826,7 @@ SHOW_VAR init_vars[]= {
{
sys_innodb_max_purge_lag
.
name
,
(
char
*
)
&
sys_innodb_max_purge_lag
,
SHOW_SYS
},
{
sys_innodb_max_purge_lag
.
name
,
(
char
*
)
&
sys_innodb_max_purge_lag
,
SHOW_SYS
},
{
"innodb_mirrored_log_groups"
,
(
char
*
)
&
innobase_mirrored_log_groups
,
SHOW_LONG
},
{
"innodb_mirrored_log_groups"
,
(
char
*
)
&
innobase_mirrored_log_groups
,
SHOW_LONG
},
{
"innodb_open_files"
,
(
char
*
)
&
innobase_open_files
,
SHOW_LONG
},
{
"innodb_open_files"
,
(
char
*
)
&
innobase_open_files
,
SHOW_LONG
},
{
"innodb_rollback_on_timeout"
,
(
char
*
)
&
innobase_rollback_on_timeout
,
SHOW_MY_BOOL
},
{
sys_innodb_support_xa
.
name
,
(
char
*
)
&
sys_innodb_support_xa
,
SHOW_SYS
},
{
sys_innodb_support_xa
.
name
,
(
char
*
)
&
sys_innodb_support_xa
,
SHOW_SYS
},
{
sys_innodb_sync_spin_loops
.
name
,
(
char
*
)
&
sys_innodb_sync_spin_loops
,
SHOW_SYS
},
{
sys_innodb_sync_spin_loops
.
name
,
(
char
*
)
&
sys_innodb_sync_spin_loops
,
SHOW_SYS
},
{
sys_innodb_table_locks
.
name
,
(
char
*
)
&
sys_innodb_table_locks
,
SHOW_SYS
},
{
sys_innodb_table_locks
.
name
,
(
char
*
)
&
sys_innodb_table_locks
,
SHOW_SYS
},
...
...
sql/udf_example.c
View file @
dee46f91
...
@@ -1087,7 +1087,7 @@ my_bool is_const_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
...
@@ -1087,7 +1087,7 @@ my_bool is_const_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
strmov
(
message
,
"IS_CONST accepts only one argument"
);
strmov
(
message
,
"IS_CONST accepts only one argument"
);
return
1
;
return
1
;
}
}
initid
->
ptr
=
(
char
*
)((
args
->
args
[
0
]
!=
NULL
)
?
1
:
0
);
initid
->
ptr
=
(
char
*
)((
args
->
args
[
0
]
!=
NULL
)
?
1
UL
:
0
);
return
0
;
return
0
;
}
}
...
...
storage/innobase/handler/ha_innodb.cc
View file @
dee46f91
...
@@ -181,6 +181,7 @@ my_bool innobase_use_large_pages = FALSE;
...
@@ -181,6 +181,7 @@ my_bool innobase_use_large_pages = FALSE;
my_bool
innobase_use_native_aio
=
FALSE
;
my_bool
innobase_use_native_aio
=
FALSE
;
my_bool
innobase_file_per_table
=
FALSE
;
my_bool
innobase_file_per_table
=
FALSE
;
my_bool
innobase_locks_unsafe_for_binlog
=
FALSE
;
my_bool
innobase_locks_unsafe_for_binlog
=
FALSE
;
my_bool
innobase_rollback_on_timeout
=
FALSE
;
my_bool
innobase_create_status_file
=
FALSE
;
my_bool
innobase_create_status_file
=
FALSE
;
static
char
*
internal_innobase_data_file_path
=
NULL
;
static
char
*
internal_innobase_data_file_path
=
NULL
;
...
@@ -473,6 +474,10 @@ convert_error_code_to_mysql(
...
@@ -473,6 +474,10 @@ convert_error_code_to_mysql(
latest SQL statement in a lock wait timeout. Previously, we
latest SQL statement in a lock wait timeout. Previously, we
rolled back the whole transaction. */
rolled back the whole transaction. */
if
(
thd
&&
row_rollback_on_timeout
)
{
ha_rollback
(
thd
);
}
return
(
HA_ERR_LOCK_WAIT_TIMEOUT
);
return
(
HA_ERR_LOCK_WAIT_TIMEOUT
);
}
else
if
(
error
==
(
int
)
DB_NO_REFERENCED_ROW
)
{
}
else
if
(
error
==
(
int
)
DB_NO_REFERENCED_ROW
)
{
...
@@ -1566,6 +1571,8 @@ innobase_init(void *p)
...
@@ -1566,6 +1571,8 @@ innobase_init(void *p)
os_use_large_pages
=
(
ibool
)
innobase_use_large_pages
;
os_use_large_pages
=
(
ibool
)
innobase_use_large_pages
;
os_large_page_size
=
(
ulint
)
innobase_large_page_size
;
os_large_page_size
=
(
ulint
)
innobase_large_page_size
;
row_rollback_on_timeout
=
(
ibool
)
innobase_rollback_on_timeout
;
srv_file_per_table
=
(
ibool
)
innobase_file_per_table
;
srv_file_per_table
=
(
ibool
)
innobase_file_per_table
;
srv_locks_unsafe_for_binlog
=
(
ibool
)
innobase_locks_unsafe_for_binlog
;
srv_locks_unsafe_for_binlog
=
(
ibool
)
innobase_locks_unsafe_for_binlog
;
...
...
storage/innobase/handler/ha_innodb.h
View file @
dee46f91
...
@@ -224,6 +224,7 @@ extern my_bool innobase_log_archive,
...
@@ -224,6 +224,7 @@ extern my_bool innobase_log_archive,
innobase_use_large_pages
,
innobase_use_large_pages
,
innobase_use_native_aio
,
innobase_use_native_aio
,
innobase_file_per_table
,
innobase_locks_unsafe_for_binlog
,
innobase_file_per_table
,
innobase_locks_unsafe_for_binlog
,
innobase_rollback_on_timeout
,
innobase_create_status_file
;
innobase_create_status_file
;
extern
"C"
{
extern
"C"
{
extern
ulong
srv_max_buf_pool_modified_pct
;
extern
ulong
srv_max_buf_pool_modified_pct
;
...
...
storage/innobase/include/row0mysql.h
View file @
dee46f91
...
@@ -19,6 +19,8 @@ Created 9/17/2000 Heikki Tuuri
...
@@ -19,6 +19,8 @@ Created 9/17/2000 Heikki Tuuri
#include "btr0pcur.h"
#include "btr0pcur.h"
#include "trx0types.h"
#include "trx0types.h"
extern
ibool
row_rollback_on_timeout
;
typedef
struct
row_prebuilt_struct
row_prebuilt_t
;
typedef
struct
row_prebuilt_struct
row_prebuilt_t
;
/***********************************************************************
/***********************************************************************
...
...
storage/innobase/row/row0mysql.c
View file @
dee46f91
...
@@ -35,6 +35,9 @@ Created 9/17/2000 Heikki Tuuri
...
@@ -35,6 +35,9 @@ Created 9/17/2000 Heikki Tuuri
/* A dummy variable used to fool the compiler */
/* A dummy variable used to fool the compiler */
ibool
row_mysql_identically_false
=
FALSE
;
ibool
row_mysql_identically_false
=
FALSE
;
/* Provide optional 4.x backwards compatibility for 5.0 and above */
ibool
row_rollback_on_timeout
=
FALSE
;
/* List of tables we should drop in background. ALTER TABLE in MySQL requires
/* List of tables we should drop in background. ALTER TABLE in MySQL requires
that the table handler can drop the table in background when there are no
that the table handler can drop the table in background when there are no
queries to it any more. Protected by the kernel mutex. */
queries to it any more. Protected by the kernel mutex. */
...
@@ -496,7 +499,9 @@ row_mysql_handle_errors(
...
@@ -496,7 +499,9 @@ row_mysql_handle_errors(
return
(
TRUE
);
return
(
TRUE
);
}
else
if
(
err
==
DB_DEADLOCK
}
else
if
(
err
==
DB_DEADLOCK
||
err
==
DB_LOCK_TABLE_FULL
)
{
||
err
==
DB_LOCK_TABLE_FULL
||
(
err
==
DB_LOCK_WAIT_TIMEOUT
&&
row_rollback_on_timeout
))
{
/* Roll back the whole transaction; this resolution was added
/* Roll back the whole transaction; this resolution was added
to version 3.23.43 */
to version 3.23.43 */
...
@@ -504,6 +509,10 @@ row_mysql_handle_errors(
...
@@ -504,6 +509,10 @@ row_mysql_handle_errors(
}
else
if
(
err
==
DB_OUT_OF_FILE_SPACE
}
else
if
(
err
==
DB_OUT_OF_FILE_SPACE
||
err
==
DB_LOCK_WAIT_TIMEOUT
)
{
||
err
==
DB_LOCK_WAIT_TIMEOUT
)
{
ut_ad
(
!
(
err
==
DB_LOCK_WAIT_TIMEOUT
&&
row_rollback_on_timeout
));
if
(
savept
)
{
if
(
savept
)
{
/* Roll back the latest, possibly incomplete
/* Roll back the latest, possibly incomplete
insertion or update */
insertion or update */
...
...
strings/decimal.c
View file @
dee46f91
...
@@ -138,6 +138,12 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={
...
@@ -138,6 +138,12 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={
900000000
,
990000000
,
999000000
,
900000000
,
990000000
,
999000000
,
999900000
,
999990000
,
999999000
,
999900000
,
999990000
,
999999000
,
999999900
,
999999990
};
999999900
,
999999990
};
static
double
scaler10
[]
=
{
1
.
0
,
1e10
,
1e20
,
1e30
,
1e40
,
1e50
,
1e60
,
1e70
,
1e80
,
1e90
};
static
double
scaler1
[]
=
{
1
.
0
,
10
.
0
,
1e2
,
1e3
,
1e4
,
1e5
,
1e6
,
1e7
,
1e8
,
1e9
};
#ifdef HAVE_purify
#ifdef HAVE_purify
#define sanity(d) DBUG_ASSERT((d)->len > 0)
#define sanity(d) DBUG_ASSERT((d)->len > 0)
...
@@ -946,15 +952,27 @@ internal_str2dec(const char *from, decimal_t *to, char **end, my_bool fixed)
...
@@ -946,15 +952,27 @@ internal_str2dec(const char *from, decimal_t *to, char **end, my_bool fixed)
int
decimal2double
(
decimal_t
*
from
,
double
*
to
)
int
decimal2double
(
decimal_t
*
from
,
double
*
to
)
{
{
double
x
=
0
,
t
=
DIG_BASE
;
double
result
=
0
.
0
;
int
intg
,
frac
;
int
i
,
exp
=
0
;
dec1
*
buf
=
from
->
buf
;
dec1
*
buf
=
from
->
buf
;
for
(
i
=
from
->
intg
;
i
>
0
;
i
-=
DIG_PER_DEC1
)
result
=
result
*
DIG_BASE
+
*
buf
++
;
for
(
i
=
from
->
frac
;
i
>
0
;
i
-=
DIG_PER_DEC1
)
{
result
=
result
*
DIG_BASE
+
*
buf
++
;
exp
+=
DIG_PER_DEC1
;
}
DBUG_PRINT
(
"info"
,
(
"interm.: %f %d %f"
,
result
,
exp
,
scaler10
[
exp
/
10
]
*
scaler1
[
exp
%
10
]));
result
/=
scaler10
[
exp
/
10
]
*
scaler1
[
exp
%
10
];
*
to
=
from
->
sign
?
-
result
:
result
;
DBUG_PRINT
(
"info"
,
(
"result: %f (%lx)"
,
*
to
,
*
(
ulong
*
)
to
));
for
(
intg
=
from
->
intg
;
intg
>
0
;
intg
-=
DIG_PER_DEC1
)
x
=
x
*
DIG_BASE
+
*
buf
++
;
for
(
frac
=
from
->
frac
;
frac
>
0
;
frac
-=
DIG_PER_DEC1
,
t
*=
DIG_BASE
)
x
+=*
buf
++/
t
;
*
to
=
from
->
sign
?
-
x
:
x
;
return
E_DEC_OK
;
return
E_DEC_OK
;
}
}
...
...
support-files/mysql.spec.sh
View file @
dee46f91
...
@@ -533,7 +533,7 @@ fi
...
@@ -533,7 +533,7 @@ fi
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql_upgrade.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql_upgrade.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysqlhotcopy.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysqlhotcopy.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysqlman.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysqlman.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man
1
/mysqlmanager.8
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man
8
/mysqlmanager.8
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql.server.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql.server.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql_tzinfo_to_sql.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql_tzinfo_to_sql.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql_zap.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql_zap.1
*
...
@@ -689,6 +689,10 @@ fi
...
@@ -689,6 +689,10 @@ fi
# itself - note that they must be ordered by date (important when
# itself - note that they must be ordered by date (important when
# merging BK trees)
# merging BK trees)
%changelog
%changelog
*
Mon Dec 18 2006 Joerg Bruehe <joerg@mysql.com>
- Fix the move of
"mysqlmanager"
to section 8: Directory name was wrong.
*
Thu Dec 14 2006 Joerg Bruehe <joerg@mysql.com>
*
Thu Dec 14 2006 Joerg Bruehe <joerg@mysql.com>
- Include the new man pages
for
"my_print_defaults"
and
"mysql_tzinfo_to_sql"
- Include the new man pages
for
"my_print_defaults"
and
"mysql_tzinfo_to_sql"
...
...
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