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
d7bc26c4
Commit
d7bc26c4
authored
Dec 15, 2011
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merge mysql-5.5->mysql-5.5-security
parents
7e63c8ac
7615cb08
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
128 additions
and
10 deletions
+128
-10
cmake/install_macros.cmake
cmake/install_macros.cmake
+0
-1
mysql-test/r/mysqld--help-win.result
mysql-test/r/mysqld--help-win.result
+5
-0
mysql-test/r/select.result
mysql-test/r/select.result
+18
-0
mysql-test/suite/innodb/r/innodb.result
mysql-test/suite/innodb/r/innodb.result
+11
-0
mysql-test/suite/innodb/t/innodb.test
mysql-test/suite/innodb/t/innodb.test
+11
-0
mysql-test/suite/rpl/t/rpl_empty_master_host.test
mysql-test/suite/rpl/t/rpl_empty_master_host.test
+1
-0
mysql-test/suite/rpl/t/rpl_server_id_ignore.test
mysql-test/suite/rpl/t/rpl_server_id_ignore.test
+1
-0
mysql-test/t/select.test
mysql-test/t/select.test
+17
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+5
-0
sql/mysqld.cc
sql/mysqld.cc
+18
-0
sql/nt_servc.cc
sql/nt_servc.cc
+7
-1
sql/nt_servc.h
sql/nt_servc.h
+10
-0
sql/sql_class.cc
sql/sql_class.cc
+5
-0
sql/sql_lex.cc
sql/sql_lex.cc
+1
-0
sql/sql_lex.h
sql/sql_lex.h
+1
-0
sql/sql_repl.cc
sql/sql_repl.cc
+0
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+10
-5
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+0
-1
storage/innobase/include/page0page.h
storage/innobase/include/page0page.h
+4
-0
storage/innobase/page/page0page.c
storage/innobase/page/page0page.c
+3
-1
No files found.
cmake/install_macros.cmake
View file @
d7bc26c4
...
...
@@ -78,7 +78,6 @@ FUNCTION(INSTALL_MANPAGE file)
ELSE
()
SET
(
SECTION man8
)
ENDIF
()
MESSAGE
(
"huj!"
)
INSTALL
(
FILES
"
${
MANPAGE
}
"
DESTINATION
"
${
INSTALL_MANDIR
}
/
${
SECTION
}
"
COMPONENT ManPages
)
ENDIF
()
...
...
mysql-test/r/mysqld--help-win.result
View file @
d7bc26c4
...
...
@@ -665,6 +665,10 @@ The following options may be given as the first argument:
Log slow queries to given log file. Defaults logging to
hostname-slow.log. Must be enabled to activate other slow
log options
--slow-start-timeout=#
Maximum number of milliseconds that the service control
manager should wait before trying to kill the windows
service during startup(Default: 15000).
--socket=name Socket file to use for connection
--sort-buffer-size=#
Each thread that needs to do a sort allocates a buffer of
...
...
@@ -938,6 +942,7 @@ slave-transaction-retries 10
slave-type-conversions
slow-launch-time 2
slow-query-log FALSE
slow-start-timeout 15000
sort-buffer-size 2097152
sporadic-binlog-dump-fail FALSE
sql-mode
...
...
mysql-test/r/select.result
View file @
d7bc26c4
...
...
@@ -4970,3 +4970,21 @@ avg(distinct(t1.a))
0
DROP TABLE t1;
# End of test BUG#57203
#
# Bug#63020: Function "format"'s 'locale' argument is not considered
# when creating a "view'
#
CREATE TABLE t1 (f1 DECIMAL(10,2));
INSERT INTO t1 VALUES (11.67),(17865.3),(12345678.92);
CREATE VIEW view_t1 AS SELECT FORMAT(f1,1,'sk_SK') AS f1 FROM t1;
SHOW CREATE VIEW view_t1;
View Create View character_set_client collation_connection
view_t1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_t1` AS select format(`t1`.`f1`,1,'sk_SK') AS `f1` from `t1` latin1 latin1_swedish_ci
SELECT * FROM view_t1;
f1
11,7
17 865,3
12 345 678,9
DROP TABLE t1;
DROP VIEW view_t1;
# End of test BUG#63020
mysql-test/suite/innodb/r/innodb.result
View file @
d7bc26c4
...
...
@@ -3191,3 +3191,14 @@ Handler_update 1
Variable_name Value
Handler_delete 1
DROP TABLE bug58912;
create table t1 (f1 integer primary key) engine=innodb;
flush status;
show status like "handler_read_key";
Variable_name Value
Handler_read_key 0
select f1 from t1;
f1
show status like "handler_read_key";
Variable_name Value
Handler_read_key 1
drop table t1;
mysql-test/suite/innodb/t/innodb.test
View file @
d7bc26c4
...
...
@@ -2578,6 +2578,17 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
# Clean up after the Bug#55284/Bug#58912 test case.
DROP
TABLE
bug58912
;
#
# Test fix for bug 13117023. InnoDB increments HA_READ_KEY_COUNT (aka
# HANDLER_READ_KEY) when it should not.
#
create
table
t1
(
f1
integer
primary
key
)
engine
=
innodb
;
flush
status
;
show
status
like
"handler_read_key"
;
select
f1
from
t1
;
show
status
like
"handler_read_key"
;
drop
table
t1
;
#######################################################################
# #
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
...
...
mysql-test/suite/rpl/t/rpl_empty_master_host.test
View file @
d7bc26c4
...
...
@@ -17,6 +17,7 @@
# working when expected.
--
source
include
/
master
-
slave
.
inc
--
source
include
/
have_binlog_format_mixed
.
inc
connection
slave
;
STOP
SLAVE
;
...
...
mysql-test/suite/rpl/t/rpl_server_id_ignore.test
View file @
d7bc26c4
...
...
@@ -18,6 +18,7 @@
# executing events this time
source
include
/
master
-
slave
.
inc
;
source
include
/
have_binlog_format_mixed
.
inc
;
connection
slave
;
...
...
mysql-test/t/select.test
View file @
d7bc26c4
...
...
@@ -4236,3 +4236,20 @@ GROUP BY t2.a ORDER BY t1.a;
DROP
TABLE
t1
;
--
echo
# End of test BUG#57203
--
echo
#
--
echo
# Bug#63020: Function "format"'s 'locale' argument is not considered
--
echo
# when creating a "view'
--
echo
#
CREATE
TABLE
t1
(
f1
DECIMAL
(
10
,
2
));
INSERT
INTO
t1
VALUES
(
11.67
),(
17865.3
),(
12345678.92
);
CREATE
VIEW
view_t1
AS
SELECT
FORMAT
(
f1
,
1
,
'sk_SK'
)
AS
f1
FROM
t1
;
SHOW
CREATE
VIEW
view_t1
;
SELECT
*
FROM
view_t1
;
DROP
TABLE
t1
;
DROP
VIEW
view_t1
;
--
echo
# End of test BUG#63020
sql/item_strfunc.cc
View file @
d7bc26c4
...
...
@@ -2385,6 +2385,11 @@ void Item_func_format::print(String *str, enum_query_type query_type)
args
[
0
]
->
print
(
str
,
query_type
);
str
->
append
(
','
);
args
[
1
]
->
print
(
str
,
query_type
);
if
(
arg_count
>
2
)
{
str
->
append
(
','
);
args
[
2
]
->
print
(
str
,
query_type
);
}
str
->
append
(
')'
);
}
...
...
sql/mysqld.cc
View file @
d7bc26c4
...
...
@@ -368,6 +368,9 @@ my_bool locked_in_memory;
bool
opt_using_transactions
;
bool
volatile
abort_loop
;
bool
volatile
shutdown_in_progress
;
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
ulong
slow_start_timeout
;
#endif
/*
True if the bootstrap thread is running. Protected by LOCK_thread_count,
just like thread_count.
...
...
@@ -4369,6 +4372,14 @@ int mysqld_main(int argc, char **argv)
#endif
}
/*
The subsequent calls may take a long time : e.g. innodb log read.
Thus set the long running service control manager timeout
*/
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
Service
.
SetSlowStarting
(
slow_start_timeout
);
#endif
if
(
init_server_components
())
unireg_abort
(
1
);
...
...
@@ -5883,6 +5894,13 @@ struct my_option my_long_options[]=
"Don't give threads different priorities. This option is deprecated "
"because it has no effect; the implied behavior is already the default."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
{
"slow-start-timeout"
,
0
,
"Maximum number of milliseconds that the service control manager should wait "
"before trying to kill the windows service during startup"
"(Default: 15000)."
,
&
slow_start_timeout
,
&
slow_start_timeout
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
15000
,
0
,
0
,
0
,
0
,
0
},
#endif
#ifdef HAVE_REPLICATION
{
"sporadic-binlog-dump-fail"
,
0
,
"Option used by mysql-test for debugging and testing of replication."
,
...
...
sql/nt_servc.cc
View file @
d7bc26c4
...
...
@@ -276,7 +276,13 @@ error:
void
NTService
::
SetRunning
()
{
if
(
pService
)
pService
->
SetStatus
(
SERVICE_RUNNING
,
NO_ERROR
,
0
,
0
,
0
);
pService
->
SetStatus
(
SERVICE_RUNNING
,
NO_ERROR
,
0
,
0
,
0
);
}
void
NTService
::
SetSlowStarting
(
unsigned
long
timeout
)
{
if
(
pService
)
pService
->
SetStatus
(
SERVICE_START_PENDING
,
NO_ERROR
,
0
,
0
,
timeout
);
}
...
...
sql/nt_servc.h
View file @
d7bc26c4
...
...
@@ -71,6 +71,16 @@ class NTService
*/
void
SetRunning
(
void
);
/**
Sets a timeout after which SCM will abort service startup if SetRunning()
was not called or the timeout was not extended with another call to
SetSlowStarting(). Should be called when static initialization completes,
and the variable initialization part begins
@arg timeout the timeout to pass to the SCM (in milliseconds)
*/
void
SetSlowStarting
(
unsigned
long
timeout
);
/*
Stop() is to be called by the application to stop
the service
...
...
sql/sql_class.cc
View file @
d7bc26c4
...
...
@@ -1673,6 +1673,11 @@ void THD::cleanup_after_query()
/* reset table map for multi-table update */
table_map_for_update
=
0
;
m_binlog_invoker
=
FALSE
;
/* reset replication info structure */
if
(
lex
&&
lex
->
mi
.
repl_ignore_server_ids
.
buffer
)
{
delete_dynamic
(
&
lex
->
mi
.
repl_ignore_server_ids
);
}
}
...
...
sql/sql_lex.cc
View file @
d7bc26c4
...
...
@@ -2351,6 +2351,7 @@ LEX::LEX()
plugins_static_buffer
,
INITIAL_LEX_PLUGIN_LIST_SIZE
,
INITIAL_LEX_PLUGIN_LIST_SIZE
);
memset
(
&
mi
,
0
,
sizeof
(
LEX_MASTER_INFO
));
reset_query_tables_list
(
TRUE
);
}
...
...
sql/sql_lex.h
View file @
d7bc26c4
...
...
@@ -292,6 +292,7 @@ typedef struct st_lex_master_info
char
*
relay_log_name
;
ulong
relay_log_pos
;
DYNAMIC_ARRAY
repl_ignore_server_ids
;
ulong
server_ids_buffer
[
2
];
}
LEX_MASTER_INFO
;
typedef
struct
st_lex_reset_slave
...
...
sql/sql_repl.cc
View file @
d7bc26c4
...
...
@@ -1689,7 +1689,6 @@ err:
thd_proc_info
(
thd
,
0
);
if
(
ret
==
FALSE
)
my_ok
(
thd
);
delete_dynamic
(
&
lex_mi
->
repl_ignore_server_ids
);
//freeing of parser-time alloc
DBUG_RETURN
(
ret
);
}
...
...
sql/sql_yacc.yy
View file @
d7bc26c4
...
...
@@ -1863,12 +1863,9 @@ change:
LEX *lex = Lex;
lex->sql_command = SQLCOM_CHANGE_MASTER;
bzero((char*) &lex->mi, sizeof(lex->mi));
/*
resetting flags that can left from the previous CHANGE MASTER
*/
lex->mi.repl_ignore_server_ids_opt= LEX_MASTER_INFO::LEX_MI_UNCHANGED;
my_init_dynamic_array(&Lex->mi.repl_ignore_server_ids,
sizeof(::server_id), 16, 16
);
DBUG_ASSERT(Lex->mi.repl_ignore_server_ids.elements == 0
);
}
master_defs
{}
...
...
@@ -1979,6 +1976,14 @@ ignore_server_id_list:
ignore_server_id:
ulong_num
{
if (Lex->mi.repl_ignore_server_ids.elements == 0)
{
my_init_dynamic_array2(&Lex->mi.repl_ignore_server_ids,
sizeof(::server_id),
Lex->mi.server_ids_buffer,
array_elements(Lex->mi.server_ids_buffer),
16);
}
insert_dynamic(&Lex->mi.repl_ignore_server_ids, (uchar*) &($1));
}
...
...
storage/innobase/handler/ha_innodb.cc
View file @
d7bc26c4
...
...
@@ -5792,7 +5792,6 @@ ha_innobase::innobase_get_index(
dict_index_t
*
index
=
0
;
DBUG_ENTER
(
"innobase_get_index"
);
ha_statistic_increment
(
&
SSV
::
ha_read_key_count
);
if
(
keynr
!=
MAX_KEY
&&
table
->
s
->
keys
>
0
)
{
key
=
table
->
key_info
+
keynr
;
...
...
storage/innobase/include/page0page.h
View file @
d7bc26c4
...
...
@@ -893,6 +893,7 @@ page_parse_create(
ulint
comp
,
/*!< in: nonzero=compact page format */
buf_block_t
*
block
,
/*!< in: block or NULL */
mtr_t
*
mtr
);
/*!< in: mtr or NULL */
#ifndef UNIV_HOTBACKUP
/************************************************************//**
Prints record contents including the data relevant only in
the index page context. */
...
...
@@ -902,6 +903,7 @@ page_rec_print(
/*===========*/
const
rec_t
*
rec
,
/*!< in: physical record */
const
ulint
*
offsets
);
/*!< in: record descriptor */
# ifdef UNIV_BTR_PRINT
/***************************************************************//**
This is used to print the contents of the directory for
debugging purposes. */
...
...
@@ -941,6 +943,8 @@ page_print(
in directory */
ulint
rn
);
/*!< in: print rn first and last records
in directory */
# endif
/* UNIV_BTR_PRINT */
#endif
/* !UNIV_HOTBACKUP */
/***************************************************************//**
The following is used to validate a record on a page. This function
differs from rec_validate as it can also check the n_owned field and
...
...
storage/innobase/page/page0page.c
View file @
d7bc26c4
...
...
@@ -1591,13 +1591,14 @@ page_rec_print(
" n_owned: %lu; heap_no: %lu; next rec: %lu
\n
"
,
(
ulong
)
rec_get_n_owned_old
(
rec
),
(
ulong
)
rec_get_heap_no_old
(
rec
),
(
ulong
)
rec_get_next_offs
(
rec
,
TRU
E
));
(
ulong
)
rec_get_next_offs
(
rec
,
FALS
E
));
}
page_rec_check
(
rec
);
rec_validate
(
rec
,
offsets
);
}
# ifdef UNIV_BTR_PRINT
/***************************************************************//**
This is used to print the contents of the directory for
debugging purposes. */
...
...
@@ -1758,6 +1759,7 @@ page_print(
page_dir_print
(
page
,
dn
);
page_print_list
(
block
,
index
,
rn
);
}
# endif
/* UNIV_BTR_PRINT */
#endif
/* !UNIV_HOTBACKUP */
/***************************************************************//**
...
...
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