mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
merge w/ 5.1
This commit is contained in:
commit
310584a849
8 changed files with 23 additions and 6 deletions
|
@ -610,14 +610,14 @@ public:
|
|||
lines++;
|
||||
|
||||
int show_offset= 0;
|
||||
char buf[256];
|
||||
char buf[256+1]; /* + zero termination for DBUG_PRINT */
|
||||
size_t bytes;
|
||||
bool found_bof= false;
|
||||
|
||||
/* Search backward in file until "lines" newline has been found */
|
||||
while (lines && !found_bof)
|
||||
{
|
||||
show_offset-= sizeof(buf);
|
||||
show_offset-= sizeof(buf)-1;
|
||||
while(fseek(m_file, show_offset, SEEK_END) != 0 && show_offset < 0)
|
||||
{
|
||||
found_bof= true;
|
||||
|
@ -625,7 +625,7 @@ public:
|
|||
show_offset++;
|
||||
}
|
||||
|
||||
if ((bytes= fread(buf, 1, sizeof(buf), m_file)) <= 0)
|
||||
if ((bytes= fread(buf, 1, sizeof(buf)-1, m_file)) <= 0)
|
||||
{
|
||||
// ferror=0 will happen here if no queries executed yet
|
||||
if (ferror(m_file))
|
||||
|
@ -635,6 +635,7 @@ public:
|
|||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
IF_DBUG(buf[bytes]= '\0';)
|
||||
DBUG_PRINT("info", ("Read %lu bytes from file, buf: %s",
|
||||
(unsigned long)bytes, buf));
|
||||
|
||||
|
@ -679,8 +680,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
while ((bytes= fread(buf, 1, sizeof(buf), m_file)) > 0)
|
||||
if (fwrite(buf, 1, bytes, stderr))
|
||||
while ((bytes= fread(buf, 1, sizeof(buf)-1, m_file)) > 0)
|
||||
if (bytes != fwrite(buf, 1, bytes, stderr))
|
||||
die("Failed to write to '%s', errno: %d",
|
||||
m_file_name, errno);
|
||||
|
||||
|
@ -723,6 +724,10 @@ void handle_no_error(struct st_command*);
|
|||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
|
||||
/* workaround for MySQL BUG#57491 */
|
||||
#undef MY_WME
|
||||
#define MY_WME 0
|
||||
|
||||
/* attributes of the query thread */
|
||||
pthread_attr_t cn_thd_attrib;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ typedef struct st_key_cache_statistics
|
|||
ulonglong blocks_used; /* maximum number of used blocks/buffers */
|
||||
ulonglong blocks_unused; /* number of currently unused blocks */
|
||||
ulonglong blocks_changed; /* number of currently dirty blocks */
|
||||
ulonglong blocks_warm; /* number of blocks in warm sub-chain */
|
||||
ulonglong read_requests; /* number of read requests (read hits) */
|
||||
ulonglong reads; /* number of actual reads from files into buffers */
|
||||
ulonglong write_requests; /* number of write requests (write hits) */
|
||||
|
|
|
@ -412,6 +412,7 @@ Variable_name Value
|
|||
Key_blocks_not_flushed 0
|
||||
Key_blocks_unused KEY_BLOCKS_UNUSED
|
||||
Key_blocks_used 4
|
||||
Key_blocks_warm 0
|
||||
Key_read_requests 22
|
||||
Key_reads 0
|
||||
Key_write_requests 26
|
||||
|
@ -459,6 +460,7 @@ Variable_name Value
|
|||
Key_blocks_not_flushed 0
|
||||
Key_blocks_unused KEY_BLOCKS_UNUSED
|
||||
Key_blocks_used 4
|
||||
Key_blocks_warm 0
|
||||
Key_read_requests 22
|
||||
Key_reads 0
|
||||
Key_write_requests 26
|
||||
|
@ -501,6 +503,7 @@ Variable_name Value
|
|||
Key_blocks_not_flushed 0
|
||||
Key_blocks_unused KEY_BLOCKS_UNUSED
|
||||
Key_blocks_used 4
|
||||
Key_blocks_warm 0
|
||||
Key_read_requests 22
|
||||
Key_reads 0
|
||||
Key_write_requests 26
|
||||
|
|
|
@ -4,6 +4,7 @@ drop procedure if exists p_verify_reprepare_count;
|
|||
drop procedure if exists p1;
|
||||
drop function if exists f1;
|
||||
drop view if exists v1, v2;
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
create procedure p_verify_reprepare_count(expected int)
|
||||
begin
|
||||
declare old_reprepare_count int default @reprepare_count;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
# This test verifies if loading data infile will work fine
|
||||
# if the path of the load data file is a symbolic link.
|
||||
#
|
||||
--source include/master-slave.inc
|
||||
--source include/not_windows.inc
|
||||
--source include/master-slave.inc
|
||||
--source include/have_binlog_format_statement.inc
|
||||
|
||||
create table t1(a int not null auto_increment, b int, primary key(a) );
|
||||
|
|
|
@ -58,6 +58,10 @@ drop function if exists f1;
|
|||
drop view if exists v1, v2;
|
||||
--enable_warnings
|
||||
|
||||
# Avoid selecting from a huge table possibly left over from previous tests,
|
||||
# as this really hurts --valgrind testing.
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
|
||||
delimiter |;
|
||||
create procedure p_verify_reprepare_count(expected int)
|
||||
begin
|
||||
|
|
|
@ -4906,6 +4906,7 @@ void get_simple_key_cache_statistics(SIMPLE_KEY_CACHE_CB *keycache,
|
|||
keycache_stats->blocks_used= keycache->blocks_used;
|
||||
keycache_stats->blocks_unused= keycache->blocks_unused;
|
||||
keycache_stats->blocks_changed= keycache->global_blocks_changed;
|
||||
keycache_stats->blocks_warm= keycache->warm_blocks;
|
||||
keycache_stats->read_requests= keycache->global_cache_r_requests;
|
||||
keycache_stats->reads= keycache->global_cache_read;
|
||||
keycache_stats->write_requests= keycache->global_cache_w_requests;
|
||||
|
@ -5797,6 +5798,7 @@ get_partitioned_key_cache_statistics(PARTITIONED_KEY_CACHE_CB *keycache,
|
|||
keycache_stats->blocks_used+= partition->blocks_used;
|
||||
keycache_stats->blocks_unused+= partition->blocks_unused;
|
||||
keycache_stats->blocks_changed+= partition->global_blocks_changed;
|
||||
keycache_stats->blocks_warm+= partition->warm_blocks;
|
||||
keycache_stats->read_requests+= partition->global_cache_r_requests;
|
||||
keycache_stats->reads+= partition->global_cache_read;
|
||||
keycache_stats->write_requests+= partition->global_cache_w_requests;
|
||||
|
|
|
@ -7973,6 +7973,7 @@ static int show_default_keycache(THD *thd, SHOW_VAR *var, char *buff)
|
|||
set_one_keycache_var("blocks_not_flushed", blocks_changed);
|
||||
set_one_keycache_var("blocks_unused", blocks_unused);
|
||||
set_one_keycache_var("blocks_used", blocks_used);
|
||||
set_one_keycache_var("blocks_warm", blocks_warm);
|
||||
set_one_keycache_var("read_requests", read_requests);
|
||||
set_one_keycache_var("reads", reads);
|
||||
set_one_keycache_var("write_requests", write_requests);
|
||||
|
|
Loading…
Add table
Reference in a new issue