Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
MariaDB and MySQL Packaging Team
mariadb-5.5
Commits
a295acf5
Commit
a295acf5
authored
Dec 10, 2015
by
Otto Kekäläinen
Browse files
Imported Upstream version 5.5.47
parent
a90934f3
Changes
124
Hide whitespace changes
Inline
Side-by-side
mysql-test/suite/plugins/r/feedback_plugin_send.result
View file @
a295acf5
...
@@ -6,14 +6,14 @@ SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback wher
...
@@ -6,14 +6,14 @@ SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback wher
variable_value = @feedback_used + 1
variable_value = @feedback_used + 1
1
1
select * from information_schema.feedback where variable_name like 'feed%'
select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used';
and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used'
and variable_name not like '%debug%';
VARIABLE_NAME VARIABLE_VALUE
VARIABLE_NAME VARIABLE_VALUE
FEEDBACK version 1.1
FEEDBACK version 1.1
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
FEEDBACK_USER_INFO mysql-test
FEEDBACK_USER_INFO mysql-test
feedback plugin: report to 'http://mariadb.org/feedback_plugin/post' was sent
set global sql_mode=ONLY_FULL_GROUP_BY;
feedback plugin: server replied 'ok'
6: feedback plugin: report to 'http://mariadb.org/feedback_plugin/post' was sent
feedback plugin: report to 'http://mariadb.org/feedback_plugin/post' was sent
6: feedback plugin: server replied 'ok'
feedback plugin: server replied 'ok'
mysql-test/suite/plugins/t/feedback_plugin_install.test
View file @
a295acf5
...
@@ -10,6 +10,8 @@ select plugin_status from information_schema.plugins where plugin_name='feedback
...
@@ -10,6 +10,8 @@ select plugin_status from information_schema.plugins where plugin_name='feedback
--
replace_result
https
http
--
replace_result
https
http
--
sorted_result
--
sorted_result
select
*
from
information_schema
.
feedback
where
variable_name
like
'feed%'
select
*
from
information_schema
.
feedback
where
variable_name
like
'feed%'
and
variable_name
not
like
'%_uid'
;
and
variable_name
not
like
'%_uid'
and
variable_name
not
like
'%debug%'
;
uninstall
plugin
feedback
;
uninstall
plugin
feedback
;
mysql-test/suite/plugins/t/feedback_plugin_load.test
View file @
a295acf5
...
@@ -24,4 +24,5 @@ SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback wher
...
@@ -24,4 +24,5 @@ SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback wher
--
replace_result
https
http
--
replace_result
https
http
--
sorted_result
--
sorted_result
select
*
from
information_schema
.
feedback
where
variable_name
like
'feed%'
select
*
from
information_schema
.
feedback
where
variable_name
like
'feed%'
and
variable_name
not
like
'%_uid'
and
variable_name
not
like
'FEEDBACK used'
;
and
variable_name
not
like
'%_uid'
and
variable_name
not
like
'FEEDBACK used'
and
variable_name
not
like
'%debug%'
;
mysql-test/suite/plugins/t/feedback_plugin_send.test
View file @
a295acf5
...
@@ -13,7 +13,11 @@ if (!$MTR_FEEDBACK_PLUGIN) {
...
@@ -13,7 +13,11 @@ if (!$MTR_FEEDBACK_PLUGIN) {
# Let's wait, and hope that mtr is started with --parallel and
# Let's wait, and hope that mtr is started with --parallel and
# is doing some work in other workers.
# is doing some work in other workers.
#
#
sleep
310
;
sleep
100
;
set
global
sql_mode
=
ONLY_FULL_GROUP_BY
;
sleep
210
;
# The test expects that the plugin will send a report at least 2 times,
# The test expects that the plugin will send a report at least 2 times,
# now (5 min after loading) and on server shutdown which happens below.
# now (5 min after loading) and on server shutdown which happens below.
...
@@ -25,20 +29,15 @@ sleep 310;
...
@@ -25,20 +29,15 @@ sleep 310;
--
let
$shutdown_timeout
=
60
--
let
$shutdown_timeout
=
60
source
include
/
restart_mysqld
.
inc
;
source
include
/
restart_mysqld
.
inc
;
replace_result
https
http
;
replace_result
https
http
2
6
;
perl
;
perl
;
$log_error
=
$ENV
{
'MYSQLTEST_VARDIR'
}
.
'/log/mysqld.1.err'
;
$log_error
=
$ENV
{
'MYSQLTEST_VARDIR'
}
.
'/log/mysqld.1.err'
;
open
(
LOG
,
'<'
,
$log_error
)
or
die
"open(<
$log_error
): $!"
;
open
(
LOG
,
'<'
,
$log_error
)
or
die
"open(<
$log_error
): $!"
;
# Get the first few rows (as there may be different number rows in the log)
%
logg
=
();
$i
=
0
;
while
(
$_
=<
LOG
>
)
{
while
(
$_
=<
LOG
>
)
$logg
{
$
&
}
++
if
/
feedback
plugin
:.*/
;
{
if
(
/
feedback
plugin
:.*/
)
{
print
"$&
\n
"
;
break
if
(
$i
++
>=
3
);
}
}
}
print
"
$logg
{
$_
}
:
$_
\n
"
for
sort
keys
%
logg
;
close
LOG
;
close
LOG
;
EOF
EOF
mysql-test/t/create.test
View file @
a295acf5
...
@@ -2053,3 +2053,11 @@ select * from t1;
...
@@ -2053,3 +2053,11 @@ select * from t1;
show
create
table
t1
;
show
create
table
t1
;
drop
table
t1
;
drop
table
t1
;
#
# MDEV-7050: MySQL#74603 - Assertion `comma_length > 0' failed in mysql_prepare_create_table
#
set
@@
session
.
collation_server
=
filename
;
create
table
t1
(
a
enum
(
''
,
''
));
drop
table
t1
;
set
@@
session
.
collation_server
=
default
;
mysql-test/t/ctype_filename.test
View file @
a295acf5
...
@@ -19,3 +19,6 @@ drop table com1;
...
@@ -19,3 +19,6 @@ drop table com1;
create
table
`clock$`
(
a
int
);
create
table
`clock$`
(
a
int
);
drop
table
`clock$`
;
drop
table
`clock$`
;
select
convert
(
convert
(
','
using
filename
)
using
binary
);
mysql-test/t/ctype_utf8.test
View file @
a295acf5
...
@@ -1631,6 +1631,22 @@ INSERT INTO t2 VALUES ('aaa');
...
@@ -1631,6 +1631,22 @@ INSERT INTO t2 VALUES ('aaa');
SELECT
(
SELECT
CONCAT
(
a
),
1
FROM
t1
)
<=>
(
SELECT
CONCAT
(
a
),
1
FROM
t2
);
SELECT
(
SELECT
CONCAT
(
a
),
1
FROM
t1
)
<=>
(
SELECT
CONCAT
(
a
),
1
FROM
t2
);
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-8630 Datetime value dropped in "INSERT ... SELECT ... ON DUPLICATE KEY"
--
echo
#
SET
NAMES
utf8
;
CREATE
TABLE
t1
(
id2
int
,
ts
timestamp
);
INSERT
INTO
t1
VALUES
(
1
,
'2012-06-11 15:17:34'
),(
2
,
'2012-06-11 15:18:24'
);
CREATE
TABLE
t2
AS
SELECT
COALESCE
(
ts
,
0
)
AS
c0
,
GREATEST
(
COALESCE
(
ts
,
0
),
COALESCE
(
ts
,
0
))
AS
c1
,
GREATEST
(
CASE
WHEN
1
THEN
ts
ELSE
0
END
,
CASE
WHEN
1
THEN
ts
ELSE
0
END
)
AS
c2
,
GREATEST
(
IFNULL
(
ts
,
0
),
IFNULL
(
ts
,
0
))
AS
c3
,
GREATEST
(
IF
(
1
,
ts
,
0
),
IF
(
1
,
ts
,
0
))
AS
c4
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
SELECT
*
FROM
t2
;
DROP
TABLE
t2
,
t1
;
--
echo
#
--
echo
#
--
echo
# End of 5.5 tests
--
echo
# End of 5.5 tests
...
...
mysql-test/t/events_1.test
View file @
a295acf5
...
@@ -125,7 +125,7 @@ drop event existant;
...
@@ -125,7 +125,7 @@ drop event existant;
create
table
t_event3
(
a
int
,
b
float
);
create
table
t_event3
(
a
int
,
b
float
);
drop
event
if
exists
event3
;
drop
event
if
exists
event3
;
create
event
event3
on
schedule
every
50
+
10
minute
starts
date_add
(
"20100101"
,
interval
5
minute
)
ends
date_add
(
"20151010"
,
interval
5
day
)
comment
"portokala_comment"
DO
insert
into
t_event3
values
(
unix_timestamp
(),
rand
());
create
event
event3
on
schedule
every
50
+
10
minute
starts
date_add
(
curdate
()
,
interval
5
minute
)
ends
date_add
(
curdate
()
,
interval
5
day
)
comment
"portokala_comment"
DO
insert
into
t_event3
values
(
unix_timestamp
(),
rand
());
let
$wait_condition
=
SELECT
count
(
*
)
=
0
from
t_event3
;
let
$wait_condition
=
SELECT
count
(
*
)
=
0
from
t_event3
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
select
count
(
*
)
from
t_event3
;
select
count
(
*
)
from
t_event3
;
...
...
mysql-test/t/mysql_upgrade.test
View file @
a295acf5
...
@@ -19,7 +19,7 @@ file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
...
@@ -19,7 +19,7 @@ file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
# It should have created a file in the MySQL Servers datadir
# It should have created a file in the MySQL Servers datadir
file_exists
$MYSQLD_DATADIR
/
mysql_upgrade_info
;
file_exists
$MYSQLD_DATADIR
/
mysql_upgrade_info
;
--
echo
Force
should
run
it
regardless
of
wether
it
'
s been run before
--
echo
Force
should
run
it
regardless
of
w
h
ether
it
ha
s
been
run
before
--
exec
$MYSQL_UPGRADE
--
force
2
>&
1
--
exec
$MYSQL_UPGRADE
--
force
2
>&
1
# It should have created a file in the MySQL Servers datadir
# It should have created a file in the MySQL Servers datadir
...
@@ -129,6 +129,13 @@ let $MYSQLD_DATADIR= `select @@datadir`;
...
@@ -129,6 +129,13 @@ let $MYSQLD_DATADIR= `select @@datadir`;
# so the following command should never fail.
# so the following command should never fail.
--
remove_file
$MYSQLD_DATADIR
/
mysql_upgrade_info
--
remove_file
$MYSQLD_DATADIR
/
mysql_upgrade_info
--
echo
#
--
echo
# Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR
--
echo
#
--
echo
Run
mysql_upgrade
with
unauthorized
access
--
error
1
--
exec
$MYSQL_UPGRADE
--
skip
-
verbose
--
user
=
root
--
password
=
wrong_password
2
>&
1
# 5.5-only test (involves manual modification of system tables)
# 5.5-only test (involves manual modification of system tables)
--
echo
#
--
echo
#
...
...
mysql-test/t/mysqldump.test
View file @
a295acf5
...
@@ -2494,3 +2494,13 @@ DROP DATABASE db_20772273;
...
@@ -2494,3 +2494,13 @@ DROP DATABASE db_20772273;
--
exec
$MYSQL_DUMP
--
user
=
foo
2
>&
1
>
$MYSQLTEST_VARDIR
/
tmp
/
bug6056
.
out
--
exec
$MYSQL_DUMP
--
user
=
foo
2
>&
1
>
$MYSQLTEST_VARDIR
/
tmp
/
bug6056
.
out
--
exec
$MYSQL_DUMP
--
help
>
$MYSQLTEST_VARDIR
/
tmp
/
bug6056
.
out
--
exec
$MYSQL_DUMP
--
help
>
$MYSQLTEST_VARDIR
/
tmp
/
bug6056
.
out
--
echo
#
--
echo
# MDEV-9001 - [PATCH] Fix DB name quoting in mysqldump --routine
--
echo
#
CREATE
DATABASE
`a\"'``b`
;
USE
`a\"'``b`
;
CREATE
PROCEDURE
p1
()
BEGIN
END
;
ALTER
DATABASE
`a\"'``b`
COLLATE
utf8_general_ci
;
--
exec
$MYSQL_DUMP
--
routines
--
compact
a
\\\
"\'\`b 2>&1
DROP DATABASE `a
\"
'``b`;
mysql-test/t/ps.test
View file @
a295acf5
...
@@ -3633,3 +3633,25 @@ SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1;
...
@@ -3633,3 +3633,25 @@ SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1;
drop
table
t1
;
drop
table
t1
;
--
echo
# End of 5.3 tests
--
echo
# End of 5.3 tests
--
echo
#
--
echo
# MDEV-8756: MariaDB 10.0.21 crashes during PREPARE
--
echo
#
CREATE
TABLE
t1
(
id
INT
(
10
),
value
INT
(
10
)
);
CREATE
TABLE
t2
(
id
INT
(
10
)
);
SET
@
save_sql_mode
=
@@
sql_mode
;
SET
SESSION
sql_mode
=
'ONLY_FULL_GROUP_BY'
;
PREPARE
stmt
FROM
'UPDATE t1 t1 SET value = (SELECT 1 FROM t2 WHERE id = t1.id)'
;
execute
stmt
;
insert
into
t1
values
(
1
,
10
),(
2
,
10
),(
3
,
10
);
insert
into
t2
values
(
1
),(
2
);
execute
stmt
;
select
*
from
t1
;
deallocate
prepare
stmt
;
SET
SESSION
sql_mode
=
@
save_sql_mode
;
DROP
TABLE
t1
,
t2
;
--
echo
# End of 10.0 tests
mysql-test/t/ps_change_master.test
0 → 100644
View file @
a295acf5
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_log_bin
.
inc
--
echo
#
--
echo
# CHANGE MASTER TO doesn't work with prepared statements
--
echo
#
CHANGE
MASTER
TO
MASTER_HOST
=
'host1'
,
MASTER_USER
=
'user1'
;
let
$master_host
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Master_Host
,
1
);
let
$master_user
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Master_User
,
1
);
--
echo
# Master_Host : $master_host
--
echo
# Master_User : $master_user
SET
@
s
:=
"CHANGE MASTER TO MASTER_HOST='host2'"
;
PREPARE
stmt
FROM
@
s
;
EXECUTE
stmt
;
DEALLOCATE
PREPARE
stmt
;
let
$master_host
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Master_Host
,
1
);
let
$master_user
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Master_User
,
1
);
--
echo
# Master_Host : $master_host
--
echo
# Master_User : $master_user
SET
@
s
:=
"CHANGE MASTER TO MASTER_USER='user2'"
;
PREPARE
stmt
FROM
@
s
;
EXECUTE
stmt
;
# Multiple executions should not hurt.
EXECUTE
stmt
;
EXECUTE
stmt
;
DEALLOCATE
PREPARE
stmt
;
let
$master_host
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Master_Host
,
1
);
let
$master_user
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Master_User
,
1
);
--
echo
# Master_Host : $master_host
--
echo
# Master_User : $master_user
# Reset
CHANGE
MASTER
TO
MASTER_HOST
=
'127.0.0.1'
,
MASTER_USER
=
'root'
;
--
echo
# End of test
mysql-test/t/range.test
View file @
a295acf5
...
@@ -1677,3 +1677,15 @@ select count(*) from t1 ignore index (ix_fd) where fd <'😁';
...
@@ -1677,3 +1677,15 @@ select count(*) from t1 ignore index (ix_fd) where fd <'😁';
drop
table
t1
;
drop
table
t1
;
set
names
default
;
set
names
default
;
#
# Bug#17755540 VALGRIND ERROR WHEN SETTING UP ROW COMPARATORS
#
create
table
t2
(
a
int
,
b
int
,
c
int
,
d
int
,
key
x
(
a
,
b
));
insert
into
t2
values
(
2
,
2
,
2
,
2
),
(
3
,
3
,
3
,
3
),
(
4
,
4
,
4
,
4
),
(
5
,
5
,
5
,
5
),
(
6
,
6
,
6
,
6
),
(
7
,
7
,
7
,
7
),
(
8
,
8
,
8
,
8
),
(
9
,
9
,
9
,
9
);
insert
into
t2
select
*
from
t2
;
insert
into
t2
values
(
0
,
0
,
0
,
0
),
(
1
,
1
,
1
,
1
);
analyze
table
t2
;
select
a
,
b
from
t2
where
(
a
,
b
)
in
((
0
,
0
),
(
1
,
1
));
drop
table
t2
;
mysql-test/t/show_row_order-9226.test
0 → 100644
View file @
a295acf5
#
# MDEV-9226 SHOW COLUMNS returns wrong column order for tables with large ENUMs
#
create
table
test_table
(
column_number_1
enum
(
'1'
,
'2'
)
not
null
,
column_number_2
enum
(
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'10'
,
'11'
,
'12'
)
not
null
,
column_number_3
varchar
(
10
)
not
null
,
column_number_4
varchar
(
10
)
not
null
,
column_number_5
enum
(
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa01'
,
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa02'
,
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa03'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
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'10'
,
'11'
,
'12'
,
'13'
,
'14'
,
'15'
,
'16'
,
'17'
,
'18'
,
'19'
,
'20'
,
'21'
,
'22'
,
'23'
,
'24'
,
'25'
,
'26'
,
'27'
,
'28'
,
'29'
,
'30'
,
'31'
,
'32'
,
'33'
,
'34'
,
'35'
,
'36'
,
'37'
,
'38'
,
'39'
,
'40'
,
'41'
,
'42'
,
'43'
,
'44'
,
'45'
,
'46'
,
'47'
,
'48'
,
'49'
,
'50'
,
'51'
,
'52'
,
'53'
,
'54'
,
'55'
,
'56'
,
'57'
,
'58'
,
'59'
,
'60'
,
'61'
,
'62'
,
'63'
,
'64'
,
'65'
,
'66'
,
'67'
,
'68'
,
'69'
,
'70'
,
'71'
,
'72'
,
'73'
,
'74'
,
'75'
,
'76'
,
'77'
,
'78'
,
'79'
,
'80'
,
'81'
,
'82'
,
'83'
,
'84'
,
'85'
,
'86'
,
'87'
,
'88'
,
'89'
,
'90'
,
'91'
,
'92'
,
'93'
,
'94'
,
'95'
,
'96'
,
'97'
,
'98'
,
'99'
,
'100'
,
'101'
,
'102'
,
'103'
,
'104'
,
'105'
,
'106'
,
'107'
,
'108'
,
'109'
,
'110'
,
'111'
,
'112'
,
'113'
,
'114'
,
'115'
,
'116'
,
'117'
,
'118'
,
'119'
,
'120'
,
'121'
,
'122'
,
'123'
,
'124'
,
'125'
,
'126'
,
'127'
,
'128'
,
'129'
,
'130'
,
'131'
)
not
null
,
column_number_7
enum
(
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
)
not
null
,
column_number_8
enum
(
'8'
)
not
null
,
column_number_9
enum
(
'9'
)
not
null
,
column_number_10
varchar
(
10
)
not
null
,
column_number_11
enum
(
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'10'
,
'11'
,
'12'
,
'13'
,
'14'
,
'15'
,
'16'
,
'17'
,
'18'
,
'19'
,
'20'
,
'21'
,
'22'
,
'23'
,
'24'
,
'25'
,
'26'
,
'27'
,
'28'
,
'29'
,
'30'
,
'31'
,
'32'
,
'33'
,
'34'
,
'35'
,
'36'
,
'37'
,
'38'
,
'39'
,
'40'
,
'41'
,
'42'
,
'43'
,
'44'
,
'45'
,
'46'
,
'47'
,
'48'
,
'49'
)
not
null
)
default
charset
=
utf8mb4
;
# SHOW command must list columns in the table order
# (SELECT isn't required to do it, though)
show
columns
from
test_table
;
drop
table
test_table
;
mysql-test/t/udf_notembedded.test
0 → 100644
View file @
a295acf5
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_udf
.
inc
#
# MDEV-8644 Using a UDF in a virtual column causes a crash when stopping the server
#
--
replace_result
$UDF_EXAMPLE_SO
UDF_EXAMPLE_LIB
eval
create
function
sequence
returns
integer
soname
"
$UDF_EXAMPLE_SO
"
;
create
table
t1
(
n
int
key
not
null
auto_increment
,
msg
int
as
(
sequence
())
virtual
);
select
*
from
t1
;
source
include
/
restart_mysqld
.
inc
;
drop
table
t1
;
drop
function
sequence
;
mysql-test/t/update.test
View file @
a295acf5
...
@@ -559,3 +559,76 @@ SHOW STATUS LIKE 'HANDLER_UPDATE';
...
@@ -559,3 +559,76 @@ SHOW STATUS LIKE 'HANDLER_UPDATE';
ROLLBACK
;
ROLLBACK
;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-8938: Server Crash on Update with joins
--
echo
#
CREATE
TABLE
`t1`
(
`name`
varchar
(
255
)
NOT
NULL
,
`value`
varchar
(
4095
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`name`
)
);
UPDATE
`t1`
SET
value
=
CONCAT
(
"*."
,(
SELECT
`temptable`
.
`value`
FROM
(
SELECT
*
FROM
`t1`
WHERE
`name`
=
"consoleproxy.url.domain"
)
AS
`temptable`
WHERE
`temptable`
.
`name`
=
"consoleproxy.url.domain"
))
WHERE
`name`
=
"consoleproxy.url.domain"
;
drop
table
t1
;
CREATE
TABLE
`t1`
(
`name`
varchar
(
255
)
NOT
NULL
,
`value`
varchar
(
4095
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`name`
)
);
create
table
t2
(
`name`
varchar
(
255
)
NOT
NULL
,
`value`
varchar
(
4095
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`name`
)
);
UPDATE
t1
SET
value
=
(
SELECT
value
FROM
t2
WHERE
`name`
=
t1
.
name
)
WHERE
value
is
null
;
drop
table
t1
,
t2
;
--
echo
#
--
echo
#MDEV-8701: Crash on derived query
--
echo
#
CREATE
TABLE
t1
(
data_exit_entry_id
int
(
11
)
NOT
NULL
,
data_entry_id
int
(
11
)
NOT
NULL
,
data_entry_exit_id
int
(
11
)
NOT
NULL
,
data_exit_entry_quantity
double
NOT
NULL
)
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
t2
(
data_entry_id
int
(
11
)
NOT
NULL
,
data_entry_cost
double
NOT
NULL
,
data_entry_quantity
double
NOT
NULL
)
DEFAULT
CHARSET
=
utf8
;
create
algorithm
=
temptable
view
v1
as
SELECT
data_entry_exit_id
,
data_exit_entry_quantity
,
data_entry_cost
FROM
t1
INNER
JOIN
t2
as
dt
ON
dt
.
data_entry_id
=
t1
.
data_entry_id
;
UPDATE
t2
SET
data_entry_cost
=
(
(
SELECT
SUM
(
data_exit_entry_quantity
*
data_entry_cost
)
FROM
v1
AS
query
WHERE
data_entry_exit_id
=
t2
.
data_entry_id
)
);
UPDATE
t2
SET
data_entry_cost
=
(
(
SELECT
SUM
(
data_exit_entry_quantity
*
data_entry_cost
)
FROM
(
SELECT
data_entry_exit_id
,
data_exit_entry_quantity
,
data_entry_cost
FROM
t1
INNER
JOIN
t2
as
dt
ON
dt
.
data_entry_id
=
t1
.
data_entry_id
)
AS
query
WHERE
data_entry_exit_id
=
t2
.
data_entry_id
)
);
drop
view
v1
;
drop
table
t1
,
t2
;
mysql-test/t/view.test
View file @
a295acf5
...
@@ -5445,6 +5445,41 @@ EXECUTE stmt;
...
@@ -5445,6 +5445,41 @@ EXECUTE stmt;
DROP
TABLE
t1
,
t2
,
t3
;
DROP
TABLE
t1
,
t2
,
t3
;
DROP
VIEW
v3
;
DROP
VIEW
v3
;
--
echo
#
--
echo
# MDEV-8632: Segmentation fault on INSERT
--
echo
#
CREATE
TABLE
`t1`
(
`id`
int
(
10
)
unsigned
NOT
NULL
,
`r`
float
NOT
NULL
,
PRIMARY
KEY
(
`id`
)
)
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
;
create
view
v1
as
select
id
,
if
(
r
=
r
,
1
,
2
)
as
d
from
t1
;
create
view
v2
as
select
id
,
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
as
p
from
v1
;
insert
into
t1
(
id
,
r
)
select
id
,
p
from
(
select
id
,
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
+
d
as
p
from
(
select
id
,
if
(
r
=
r
,
1
,
2
)
as
d
from
t1
)
a
)
b
on
duplicate
key
update
r
=
p
;
insert
into
t1
(
id
,
r
)
select
id
,
p
from
v2
on
duplicate
key
update
r
=
p
;
prepare
stmt
from
"insert into t1 (id, r) select id,p from v2 on duplicate key update r=p"
;
execute
stmt
;
execute
stmt
;
deallocate
prepare
stmt
;
drop
view
v1
,
v2
;
drop
table
`t1`
;
--
echo
# -----------------------------------------------------------------
--
echo
# -----------------------------------------------------------------
--
echo
# -- End of 5.5 tests.
--
echo
# -- End of 5.5 tests.
--
echo
# -----------------------------------------------------------------
--
echo
# -----------------------------------------------------------------
...
...
mysys/my_getopt.c
View file @
a295acf5
/*
/*
Copyright (c) 2002, 2013, Oracle and/or its affiliates
Copyright (c) 2002, 2013, Oracle and/or its affiliates
Copyright (c) 2009, 201
3
, M
onty Program Ab
Copyright (c) 2009, 201
5
, M
ariaDB
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
...
packaging/rpm-oel/mysql.spec.in
View file @
a295acf5
...
@@ -301,6 +301,7 @@ Obsoletes: mysql-devel < %{version}-%{release}
...
@@ -301,6 +301,7 @@ Obsoletes: mysql-devel < %{version}-%{release}
Obsoletes: mariadb-devel
Obsoletes: mariadb-devel
Provides: mysql-devel = %{version}-%{release}
Provides: mysql-devel = %{version}-%{release}
Provides: mysql-devel%{?_isa} = %{version}-%{release}
Provides: mysql-devel%{?_isa} = %{version}-%{release}
Conflicts: mysql-connector-c-devel < 6.2
%description devel
%description devel
This package contains the development header files and libraries necessary
This package contains the development header files and libraries necessary
...
@@ -323,6 +324,7 @@ Obsoletes: mysql-libs < %{version}-%{release}
...
@@ -323,6 +324,7 @@ Obsoletes: mysql-libs < %{version}-%{release}
Obsoletes: mariadb-libs
Obsoletes: mariadb-libs
Provides: mysql-libs = %{version}-%{release}
Provides: mysql-libs = %{version}-%{release}
Provides: mysql-libs%{?_isa} = %{version}-%{release}
Provides: mysql-libs%{?_isa} = %{version}-%{release}
Conflicts: mysql-connector-c-shared < 6.2
%description libs
%description libs
This package contains the shared libraries for MySQL client
This package contains the shared libraries for MySQL client
...
@@ -620,7 +622,7 @@ rm -r $(readlink var) var
...
@@ -620,7 +622,7 @@ rm -r $(readlink var) var
%pre server
%pre server
/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
/usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /bin/bash \
/usr/sbin/useradd -M
%{!?el5:
-N
}
-g mysql -o -r -d /var/lib/mysql -s /bin/bash \
-c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || :
-c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || :
%post server
%post server
...
@@ -913,6 +915,9 @@ fi
...
@@ -913,6 +915,9 @@ fi
%endif
%endif
%changelog
%changelog
* Tue Sep 29 2015 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.5.47-1
- Added conflicts to mysql-connector-c-shared dependencies
* Tue Jul 22 2014 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.5.39-5
* Tue Jul 22 2014 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.5.39-5
- Provide mysql-compat-server dependencies
- Provide mysql-compat-server dependencies
...
...
plugin/daemon_example/daemon_example.cc
View file @
a295acf5
/* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights
reserved.
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -46,7 +47,6 @@ pthread_handler_t mysql_heartbeat(void *p)
...
@@ -46,7 +47,6 @@ pthread_handler_t mysql_heartbeat(void *p)
DBUG_ENTER
(
"mysql_heartbeat"
);
DBUG_ENTER
(
"mysql_heartbeat"
);
struct
mysql_heartbeat_context
*
con
=
(
struct
mysql_heartbeat_context
*
)
p
;
struct
mysql_heartbeat_context
*
con
=
(
struct
mysql_heartbeat_context
*
)
p
;
char
buffer
[
HEART_STRING_BUFFER
];
char
buffer
[
HEART_STRING_BUFFER
];
unsigned
int
x
=
0
;
time_t
result
;
time_t
result
;
struct
tm
tm_tmp
;
struct
tm
tm_tmp
;
...
@@ -65,7 +65,6 @@ pthread_handler_t mysql_heartbeat(void *p)
...
@@ -65,7 +65,6 @@ pthread_handler_t mysql_heartbeat(void *p)
tm_tmp
.
tm_min
,
tm_tmp
.
tm_min
,
tm_tmp
.
tm_sec
);
tm_tmp
.
tm_sec
);
my_write
(
con
->
heartbeat_file
,
(
uchar
*
)
buffer
,
strlen
(
buffer
),
MYF
(
0
));
my_write
(
con
->
heartbeat_file
,
(
uchar
*
)
buffer
,
strlen
(
buffer
),
MYF
(
0
));
x
++
;
}
}
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
@@ -174,6 +173,13 @@ static int daemon_example_plugin_deinit(void *p __attribute__ ((unused)))
...
@@ -174,6 +173,13 @@ static int daemon_example_plugin_deinit(void *p __attribute__ ((unused)))
tm_tmp
.
tm_min
,
tm_tmp
.
tm_min
,
tm_tmp
.
tm_sec
);
tm_tmp
.
tm_sec
);
my_write
(
con
->
heartbeat_file
,
(
uchar
*
)
buffer
,
strlen
(
buffer
),
MYF
(
0
));
my_write
(
con
->
heartbeat_file
,
(
uchar
*
)
buffer
,
strlen
(
buffer
),
MYF
(
0
));
/*
Need to wait for the hearbeat thread to terminate before closing
the file it writes to and freeing the memory it uses.
*/
pthread_join
(
con
->
heartbeat_thread
,
NULL
);
my_close
(
con
->
heartbeat_file
,
MYF
(
0
));
my_close
(
con
->
heartbeat_file
,
MYF
(
0
));
my_free
(
con
);
my_free
(
con
);
...
...
Prev
1
2
3
4
5
6
7
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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