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
b3c2bc8c
Commit
b3c2bc8c
authored
Oct 23, 2007
by
tnurnberg@white.intern.koehntopp.de
Browse files
Options
Browse Files
Download
Plain Diff
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/scratch/tnurnberg/20901/51-20901
parents
e9229319
017ba8da
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
114 additions
and
12 deletions
+114
-12
mysql-test/r/func_misc.result
mysql-test/r/func_misc.result
+6
-0
mysql-test/r/insert.result
mysql-test/r/insert.result
+14
-0
mysql-test/r/log_state.result
mysql-test/r/log_state.result
+13
-0
mysql-test/r/status.result
mysql-test/r/status.result
+3
-0
mysql-test/t/func_misc.test
mysql-test/t/func_misc.test
+8
-0
mysql-test/t/insert.test
mysql-test/t/insert.test
+15
-0
mysql-test/t/log_state.test
mysql-test/t/log_state.test
+20
-0
mysql-test/t/status.test
mysql-test/t/status.test
+3
-0
sql/item_strfunc.h
sql/item_strfunc.h
+6
-1
sql/set_var.cc
sql/set_var.cc
+17
-6
strings/ctype-simple.c
strings/ctype-simple.c
+9
-5
No files found.
mysql-test/r/func_misc.result
View file @
b3c2bc8c
...
...
@@ -190,6 +190,12 @@ ERROR 21000: Operand should contain 1 column(s)
drop table table_26093;
drop function func_26093_a;
drop function func_26093_b;
create table t1 (a int not null);
insert into t1 values (-1), (-2);
select min(a) from t1 group by inet_ntoa(a);
min(a)
-2
drop table t1;
End of 5.0 tests
select connection_id() > 0;
connection_id() > 0
...
...
mysql-test/r/insert.result
View file @
b3c2bc8c
...
...
@@ -499,4 +499,18 @@ i
2
2
DROP TABLE t1, t2;
CREATE TABLE t1 (c1 INT NOT NULL);
INSERT INTO t1 VALUES(4188.32999999999992724042385816574096679687500),
('4188.32999999999992724042385816574096679687500'), (4188);
SELECT * FROM t1;
c1
4188
4188
4188
CREATE TABLE t2 (c1 BIGINT);
INSERT INTO t2 VALUES('15449237462.0000000000');
SELECT * FROM t2;
c1
15449237462
DROP TABLE t1, t2;
End of 5.0 tests.
mysql-test/r/log_state.result
View file @
b3c2bc8c
...
...
@@ -175,3 +175,16 @@ SET GLOBAL slow_query_log = ON;
SET GLOBAL READ_ONLY = OFF;
SET GLOBAL general_log = @old_general_log_state;
SET GLOBAL slow_query_log = @old_slow_log_state;
set @old_general_log_file= @@global.general_log_file;
set @old_slow_query_log_file= @@global.slow_query_log_file;
set global general_log_file= concat('/not exiting path/log.maste', 'r');
ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master'
set global general_log_file= NULL;
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'NULL'
set global slow_query_log_file= concat('/not exiting path/log.maste', 'r');
ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/not exiting path/log.master'
set global slow_query_log_file= NULL;
ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'NULL'
set global general_log_file= @old_general_log_file;
set global slow_query_log_file= @old_slow_query_log_file;
End of 5.1 tests
mysql-test/r/status.result
View file @
b3c2bc8c
...
...
@@ -8,6 +8,8 @@ VARIABLE_NAME VARIABLE_VALUE
TABLE_LOCKS_IMMEDIATE 2
TABLE_LOCKS_WAITED 0
SET SQL_LOG_BIN=0;
set @old_general_log = @@global.general_log;
set global general_log = 'OFF';
drop table if exists t1;
create table t1(n int) engine=myisam;
insert into t1 values(1);
...
...
@@ -20,6 +22,7 @@ show status like 'Table_locks_waited';
Variable_name Value
Table_locks_waited 1
drop table t1;
set global general_log = @old_general_log;
select 1;
1
1
...
...
mysql-test/t/func_misc.test
View file @
b3c2bc8c
...
...
@@ -198,6 +198,14 @@ drop table table_26093;
drop
function
func_26093_a
;
drop
function
func_26093_b
;
#
# Bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
#
create
table
t1
(
a
int
not
null
);
insert
into
t1
values
(
-
1
),
(
-
2
);
select
min
(
a
)
from
t1
group
by
inet_ntoa
(
a
);
drop
table
t1
;
--
echo
End
of
5.0
tests
#
...
...
mysql-test/t/insert.test
View file @
b3c2bc8c
...
...
@@ -387,5 +387,20 @@ SELECT * FROM t2;
DROP
TABLE
t1
,
t2
;
#
# Bug #30453: String not cast to int correctly
#
CREATE
TABLE
t1
(
c1
INT
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
4188.32999999999992724042385816574096679687500
),
(
'4188.32999999999992724042385816574096679687500'
),
(
4188
);
SELECT
*
FROM
t1
;
CREATE
TABLE
t2
(
c1
BIGINT
);
INSERT
INTO
t2
VALUES
(
'15449237462.0000000000'
);
SELECT
*
FROM
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.0
tests
.
mysql-test/t/log_state.test
View file @
b3c2bc8c
...
...
@@ -189,3 +189,23 @@ disconnect con1;
# Remove the log files that was created in the "default location"
# i.e var/run
--
remove_file
$MYSQLTEST_VARDIR
/
run
/
master
.
log
#
# Bug #31604: server crash when setting slow_query_log_file/general_log_file
#
set
@
old_general_log_file
=
@@
global
.
general_log_file
;
set
@
old_slow_query_log_file
=
@@
global
.
slow_query_log_file
;
--
error
1231
set
global
general_log_file
=
concat
(
'/not exiting path/log.maste'
,
'r'
);
--
error
1231
set
global
general_log_file
=
NULL
;
--
error
1231
set
global
slow_query_log_file
=
concat
(
'/not exiting path/log.maste'
,
'r'
);
--
error
1231
set
global
slow_query_log_file
=
NULL
;
set
global
general_log_file
=
@
old_general_log_file
;
set
global
slow_query_log_file
=
@
old_slow_query_log_file
;
--
echo
End
of
5.1
tests
mysql-test/t/status.test
View file @
b3c2bc8c
...
...
@@ -21,6 +21,8 @@ select * from information_schema.session_status where variable_name like 'Table_
connection
con1
;
# ++Immediate = 3
SET
SQL_LOG_BIN
=
0
;
set
@
old_general_log
=
@@
global
.
general_log
;
set
global
general_log
=
'OFF'
;
--
disable_warnings
# ++Immediate = 4
drop
table
if
exists
t1
;
...
...
@@ -60,6 +62,7 @@ reap;
# ++Immediate = 16 + $wait_condition_reps
show
status
like
'Table_locks_waited'
;
drop
table
t1
;
set
global
general_log
=
@
old_general_log
;
disconnect
con2
;
disconnect
con1
;
...
...
sql/item_strfunc.h
View file @
b3c2bc8c
...
...
@@ -657,7 +657,12 @@ class Item_func_inet_ntoa : public Item_str_func
}
String
*
val_str
(
String
*
str
);
const
char
*
func_name
()
const
{
return
"inet_ntoa"
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
3
*
8
+
7
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
3
*
8
+
7
;
maybe_null
=
1
;
}
};
class
Item_func_quote
:
public
Item_str_func
...
...
sql/set_var.cc
View file @
b3c2bc8c
...
...
@@ -2102,18 +2102,24 @@ void sys_var_log_state::set_default(THD *thd, enum_var_type type)
static
int
sys_check_log_path
(
THD
*
thd
,
set_var
*
var
)
{
char
path
[
FN_REFLEN
];
char
path
[
FN_REFLEN
]
,
buff
[
FN_REFLEN
]
;
MY_STAT
f_stat
;
const
char
*
var_path
=
var
->
value
->
str_value
.
ptr
();
String
str
(
buff
,
sizeof
(
buff
),
system_charset_info
),
*
res
;
const
char
*
log_file_str
;
if
(
!
(
res
=
var
->
value
->
val_str
(
&
str
)))
goto
err
;
log_file_str
=
res
->
c_ptr
();
bzero
(
&
f_stat
,
sizeof
(
MY_STAT
));
(
void
)
unpack_filename
(
path
,
var_path
);
(
void
)
unpack_filename
(
path
,
log_file_str
);
if
(
my_stat
(
path
,
&
f_stat
,
MYF
(
0
)))
{
/* Check if argument is a file and we have 'write' permission */
if
(
!
MY_S_ISREG
(
f_stat
.
st_mode
)
||
!
(
f_stat
.
st_mode
&
MY_S_IWRITE
))
return
-
1
;
goto
err
;
}
else
{
...
...
@@ -2122,11 +2128,16 @@ static int sys_check_log_path(THD *thd, set_var *var)
Check if directory exists and
we have permission to create file & write to file
*/
(
void
)
dirname_part
(
path
,
var_path
,
&
path_length
);
(
void
)
dirname_part
(
path
,
log_file_str
,
&
path_length
);
if
(
my_access
(
path
,
(
F_OK
|
W_OK
)))
return
-
1
;
goto
err
;
}
return
0
;
err:
my_error
(
ER_WRONG_VALUE_FOR_VAR
,
MYF
(
0
),
var
->
var
->
name
,
res
?
log_file_str
:
"NULL"
);
return
1
;
}
...
...
strings/ctype-simple.c
View file @
b3c2bc8c
...
...
@@ -1561,14 +1561,18 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
}
else
addon
=
(
*
str
>=
'5'
);
for
(
;
str
<
end
&&
(
ch
=
(
uchar
)
(
*
str
-
'0'
))
<
10
;
str
++
)
if
(
!
dot
)
{
if
(
!
dot
)
shift
++
;
for
(
;
str
<
end
&&
(
ch
=
(
uchar
)
(
*
str
-
'0'
))
<
10
;
shift
++
,
str
++
);
if
(
str
<
end
&&
*
str
==
'.'
)
{
str
++
;
for
(
;
str
<
end
&&
(
ch
=
(
uchar
)
(
*
str
-
'0'
))
<
10
;
str
++
);
}
}
if
(
str
<
end
&&
*
str
==
'.'
&&
!
dot
)
else
{
s
tr
++
;
s
hift
=
dot
-
str
;
for
(
;
str
<
end
&&
(
ch
=
(
uchar
)
(
*
str
-
'0'
))
<
10
;
str
++
);
}
goto
exp
;
...
...
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