Skip to content

File util_sa.c

FileList > cubrid > src > executables > util_sa.c

Go to the source code of this file

  • #include "config.h"
  • #include <stdio.h>
  • #include <stdlib.h>
  • #include <string.h>
  • #include <sys/types.h>
  • #include <sys/stat.h>
  • #include <assert.h>
  • #include "porting.h"
  • #include "chartype.h"
  • #include "error_manager.h"
  • #include "message_catalog.h"
  • #include "databases_file.h"
  • #include "environment_variable.h"
  • #include "system_parameter.h"
  • #include "boot_sr.h"
  • #include "db.h"
  • #include "authenticate.h"
  • #include "schema_manager.h"
  • #include "heap_file.h"
  • #include "btree.h"
  • #include "extendible_hash.h"
  • #include "locator_sr.h"
  • #include "xserver_interface.h"
  • #include "utility.h"
  • #include "transform.h"
  • #include "csql.h"
  • #include "locator_cl.h"
  • #include "network_interface_cl.h"
  • #include "locale_support.h"
  • #include "tz_support.h"
  • #include "tz_compile.h"
  • #include "tsc_timer.h"
  • #include <dlfcn.h>
  • #include "dbtype.h"
  • #include "thread_manager.hpp"
  • #include "log_volids.hpp"
  • #include "schema_system_catalog.hpp"
  • #include "catalog_class.h"

Public Types

Type Name
enum DIAGDUMP_TYPE

Public Attributes

Type Name
int log_default_input_for_archive_log_location

Public Static Attributes

Type Name
char bo_Dbfullname

Public Functions

Type Name
int alterdbhost (UTIL_FUNCTION_ARG * arg)
int copydb (UTIL_FUNCTION_ARG * arg)
int createdb (UTIL_FUNCTION_ARG * arg)
int deletedb (UTIL_FUNCTION_ARG * arg)
int diagdb (UTIL_FUNCTION_ARG * arg)
int dump_tz (UTIL_FUNCTION_ARG * arg)
int dumplocale (UTIL_FUNCTION_ARG * arg)
int estimatedb_data (UTIL_FUNCTION_ARG * arg)
int estimatedb_index (UTIL_FUNCTION_ARG * arg)
int gen_tz (UTIL_FUNCTION_ARG * arg)
int genlocale (UTIL_FUNCTION_ARG * arg)
int installdb (UTIL_FUNCTION_ARG * arg)
int optimizedb (UTIL_FUNCTION_ARG * arg)
int patchdb (UTIL_FUNCTION_ARG * arg)
int renamedb (UTIL_FUNCTION_ARG * arg)
int restoredb (UTIL_FUNCTION_ARG * arg)
int restoreslave (UTIL_FUNCTION_ARG * arg)
int synccoll_force (void)
int synccolldb (UTIL_FUNCTION_ARG * arg)
void util_admin_usage (const char * argv0)
void util_admin_version (const char * argv0)

Public Static Functions

Type Name
bool check_ha_db_and_node_list (char * database_name, char * source_host_name)
int delete_all_ha_apply_info (void)
int delete_all_slave_ha_apply_info (char * database_name, char * master_host_name)
int execute_query (const char * str)
int insert_ha_apply_info (char * database_name, char * master_host_name, INT64 database_creation, INT64 pageid, int offset, INT64 committed_pageid, int committed_offset)
void make_valid_page_size (int * v)
int parse_up_to_date (char * up_to_date, struct tm * time_date)
int parse_user_define_file (FILE * user_define_file, FILE * output_file)
int parse_user_define_line (char * line, FILE * output_file)
int print_backup_info (char * database_name, BO_RESTART_ARG * restart_arg)
int synccoll_check (const char * db_name, int * db_obs_coll_cnt, int * new_sys_coll_cnt)
int synccoll_check_attrs (const LANG_COLL_COMPAT * db_coll, FILE * f_stmt, bool * need_manual_sync)
int synccoll_check_foreign_keys (const LANG_COLL_COMPAT * db_coll, FILE * f_stmt, bool * need_manual_sync)
int synccoll_check_function_indexes (const LANG_COLL_COMPAT * db_coll, FILE * f_stmt, bool * need_manual_sync)
int synccoll_check_tables (const LANG_COLL_COMPAT * db_coll, FILE * f_stmt, bool * need_manual_sync)
int synccoll_check_triggers (const LANG_COLL_COMPAT * db_coll, FILE * f_stmt, bool * need_manual_sync)
int synccoll_check_views (const LANG_COLL_COMPAT * db_coll, FILE * f_stmt, bool * need_manual_sync)

Macros

Type Name
define APPLY_INFO_VALUES 15
define APPLY_INFO_VALUES 15
define ARRAY_DEFAULT_SIZE 10
define BO_DB_FULLNAME ([**bo\_Dbfullname**](util__sa_8c.md#variable-bo_dbfullname))
define COMMAND_GROUP "group"
define COMMAND_GROUPS "groups"
define COMMAND_MEMBERS "members"
define COMMAND_USER "user"
define COMMENT_CHAR '-'
define FILE_STMT_NAME "cubrid\_synccolldb\_"
define MAX_LINE_LEN 4096
define QUERY_BUF_SIZE 1024
define QUERY_BUF_SIZE 1024
define QUERY_BUF_SIZE 1024
define QUERY_BUF_SIZE 1024
define QUERY_BUF_SIZE 1024
define QUERY_BUF_SIZE 1024
define QUERY_BUF_SIZE 1024
define QUERY_BUF_SIZE 1024
define QUERY_BUF_SIZE 1024

Public Types Documentation

enum DIAGDUMP_TYPE

enum DIAGDUMP_TYPE {
    DIAGDUMP_ALL = -1,
    DIAGDUMP_FILE_TABLES = 1,
    DIAGDUMP_FILE_CAPACITIES,
    DIAGDUMP_HEAP_CAPACITIES,
    DIAGDUMP_INDEX_CAPACITIES,
    DIAGDUMP_CLASSNAMES,
    DIAGDUMP_DISK_BITMAPS,
    DIAGDUMP_CATALOG,
    DIAGDUMP_LOG,
    DIAGDUMP_HEAP,
    DIAGDUMP_END_OF_OPTION
};

Public Attributes Documentation

variable log_default_input_for_archive_log_location

int log_default_input_for_archive_log_location;

Public Static Attributes Documentation

variable bo_Dbfullname

char bo_Dbfullname[PATH_MAX];

Public Functions Documentation

function alterdbhost

int alterdbhost (
    UTIL_FUNCTION_ARG * arg
) 

function copydb

int copydb (
    UTIL_FUNCTION_ARG * arg
) 

function createdb

int createdb (
    UTIL_FUNCTION_ARG * arg
) 

function deletedb

int deletedb (
    UTIL_FUNCTION_ARG * arg
) 

function diagdb

int diagdb (
    UTIL_FUNCTION_ARG * arg
) 

function dump_tz

int dump_tz (
    UTIL_FUNCTION_ARG * arg
) 

function dumplocale

int dumplocale (
    UTIL_FUNCTION_ARG * arg
) 

function estimatedb_data

int estimatedb_data (
    UTIL_FUNCTION_ARG * arg
) 

function estimatedb_index

int estimatedb_index (
    UTIL_FUNCTION_ARG * arg
) 

function gen_tz

int gen_tz (
    UTIL_FUNCTION_ARG * arg
) 

function genlocale

int genlocale (
    UTIL_FUNCTION_ARG * arg
) 

function installdb

int installdb (
    UTIL_FUNCTION_ARG * arg
) 

function optimizedb

int optimizedb (
    UTIL_FUNCTION_ARG * arg
) 

function patchdb

int patchdb (
    UTIL_FUNCTION_ARG * arg
) 

function renamedb

int renamedb (
    UTIL_FUNCTION_ARG * arg
) 

function restoredb

int restoredb (
    UTIL_FUNCTION_ARG * arg
) 

function restoreslave

int restoreslave (
    UTIL_FUNCTION_ARG * arg
) 

function synccoll_force

int synccoll_force (
    void
) 

function synccolldb

int synccolldb (
    UTIL_FUNCTION_ARG * arg
) 

function util_admin_usage

void util_admin_usage (
    const  char * argv0
) 

function util_admin_version

void util_admin_version (
    const  char * argv0
) 

Public Static Functions Documentation

function check_ha_db_and_node_list

static bool check_ha_db_and_node_list (
    char * database_name,
    char * source_host_name
) 

function delete_all_ha_apply_info

static int delete_all_ha_apply_info (
    void
) 

function delete_all_slave_ha_apply_info

static int delete_all_slave_ha_apply_info (
    char * database_name,
    char * master_host_name
) 

function execute_query

static int execute_query (
    const  char * str
) 

function insert_ha_apply_info

static int insert_ha_apply_info (
    char * database_name,
    char * master_host_name,
    INT64 database_creation,
    INT64 pageid,
    int offset,
    INT64 committed_pageid,
    int committed_offset
) 

function make_valid_page_size

static void make_valid_page_size (
    int * v
) 

function parse_up_to_date

static int parse_up_to_date (
    char * up_to_date,
    struct  tm * time_date
) 

function parse_user_define_file

static int parse_user_define_file (
    FILE * user_define_file,
    FILE * output_file
) 

function parse_user_define_line

static int parse_user_define_line (
    char * line,
    FILE * output_file
) 

function print_backup_info

static int print_backup_info (
    char * database_name,
    BO_RESTART_ARG * restart_arg
) 

function synccoll_check

static int synccoll_check (
    const  char * db_name,
    int * db_obs_coll_cnt,
    int * new_sys_coll_cnt
) 

function synccoll_check_attrs

static int synccoll_check_attrs (
    const  LANG_COLL_COMPAT * db_coll,
    FILE * f_stmt,
    bool * need_manual_sync
) 

function synccoll_check_foreign_keys

static int synccoll_check_foreign_keys (
    const  LANG_COLL_COMPAT * db_coll,
    FILE * f_stmt,
    bool * need_manual_sync
) 

function synccoll_check_function_indexes

static int synccoll_check_function_indexes (
    const  LANG_COLL_COMPAT * db_coll,
    FILE * f_stmt,
    bool * need_manual_sync
) 

function synccoll_check_tables

static int synccoll_check_tables (
    const  LANG_COLL_COMPAT * db_coll,
    FILE * f_stmt,
    bool * need_manual_sync
) 

function synccoll_check_triggers

static int synccoll_check_triggers (
    const  LANG_COLL_COMPAT * db_coll,
    FILE * f_stmt,
    bool * need_manual_sync
) 

function synccoll_check_views

static int synccoll_check_views (
    const  LANG_COLL_COMPAT * db_coll,
    FILE * f_stmt,
    bool * need_manual_sync
) 

Macro Definition Documentation

define APPLY_INFO_VALUES

#define APPLY_INFO_VALUES `15`

define APPLY_INFO_VALUES

#define APPLY_INFO_VALUES `15`

define ARRAY_DEFAULT_SIZE

#define ARRAY_DEFAULT_SIZE `10`

define BO_DB_FULLNAME

#define BO_DB_FULLNAME `( bo_Dbfullname )`

define COMMAND_GROUP

#define COMMAND_GROUP `"group"`

define COMMAND_GROUPS

#define COMMAND_GROUPS `"groups"`

define COMMAND_MEMBERS

#define COMMAND_MEMBERS `"members"`

define COMMAND_USER

#define COMMAND_USER `"user"`

define COMMENT_CHAR

#define COMMENT_CHAR `'-'`

define FILE_STMT_NAME

#define FILE_STMT_NAME `"cubrid_synccolldb_"`

define MAX_LINE_LEN

#define MAX_LINE_LEN `4096`

define QUERY_BUF_SIZE

#define QUERY_BUF_SIZE `1024`

define QUERY_BUF_SIZE

#define QUERY_BUF_SIZE `1024`

define QUERY_BUF_SIZE

#define QUERY_BUF_SIZE `1024`

define QUERY_BUF_SIZE

#define QUERY_BUF_SIZE `1024`

define QUERY_BUF_SIZE

#define QUERY_BUF_SIZE `1024`

define QUERY_BUF_SIZE

#define QUERY_BUF_SIZE `1024`

define QUERY_BUF_SIZE

#define QUERY_BUF_SIZE `1024`

define QUERY_BUF_SIZE

#define QUERY_BUF_SIZE `1024`

define QUERY_BUF_SIZE

#define QUERY_BUF_SIZE `1024`


The documentation for this class was generated from the following file cubrid/src/executables/util_sa.c