Skip to content

Temporary table names may incorrectly think they have a schema #5843

Description

@MSS970

Cacti [1.3.0 Dev]
Windows 2019

The following issues have been identified in lib/boost.php (function boost_process_poller_output())

  1. Line 728 to 730:
    $timestamp = db_fetch_cell('SELECT MIN(UNIX_TIMESTAMP(start_time))
    FROM poller_time
    WHERE end_time="0000-00-00"');

Should be fixed by:

$timestamp = db_fetch_cell('SELECT MIN(UNIX_TIMESTAMP(start_time))
	FROM poller_time
	WHERE end_time LIKE "0000-00-00%"');
  1. Line 742 to 744:
    $temp_table = 'poller_output_boost_temp_' . $local_data_id . '' . mt_rand() . '' . microtime(true);

     db_execute("CREATE TEMPORARY TABLE $temp_table LIKE poller_output_boost");
    

Should be fixed by:
$temp_table = 'poller_output_boost_temp';

	db_execute("CREATE TABLE IF NOT EXISTS $temp_table LIKE poller_output_boost");
  1. Line 792:
    db_execute("DROP TEMPORARY TABLE $temp_table");

Should be fixed by:
db_execute("TRUNCATE TABLE $temp_table");

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourconfirmedBug is confirm by dev teamresolvedA fixed issue

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions