zoukankan      html  css  js  c++  java
  • 5.Mysql常用函数

    5.常用函数
    函数可以进行字符串的处理、数值计算和日期计算等,mysql可以用在SQL(DML)中以增加SQL的功能。
    5.1 数值函数
    1. abs(x) 返回x的绝对值
    select abs(5),abs(-5);
    2. ceil(x) 向上取整
    select ceil(5.01),ceil(-5.01); -- 正负号结果不一致
    3. floor(x) 向下取整
    select floor(5.98),floor(-5.98); -- 正负号结果不一致
    4. mod(x,y) 返回x除以y的余数
    select mod(7,4);
    5. rand() 返回0~1内的随机值
    select rand(),rand();
    6. round(x,y) 返回对x保留y位小数后的四舍五入结果
    select round(123.456,2),round(-123.456,2); -- 正负号结果一致
    7. truncate(x,y) 返回对x保留y位小数后的截断结果
    select truncate(123.456,2),truncate(-123.456,2); -- 正负号结果一致

    5.2 字符串函数
    1.concat(s1,s2,...,sn) 连接n个字符串
    select concat('hello ','mysql ','database');
    2.concat_ws(d,s1,s2,...,sn) 连接n个字符串,并指定连接符
    select concat_ws(' ','hello','mysql','database');
    3.insert(str,x,y,instr) 将字符串str从第x位置开始,y个字符串长的子串替换为字符串instr
    select insert('ABCDEFG',2,3,'123');
    4.lower(str) 将字符串str中所有字符转为小写字符
    select lower('ABCDEFG');
    5.upper(str) 将字符串str中所有字符转为大写字符
    select upper('abCD12fG');
    6.left(str,x) 返回字符串str中最左边的x个字符
    select left('ABCDEFG',3);
    7.right(str,x) 返回字符串str中最右边的x个字符
    select right('ABCDEFG',3);
    8.lpad(str,n,pad) 用字符串pad对str最左边进行填充,直到长度为n个字符长度
    select lpad('ABCDEFG',10,'*');
    9.rpad(str,n,pad) 用字符串pad对str最右边进行填充,直到长度为n个字符长度
    select rpad('ABCDEFG',10,'*');
    10.trim(str) 去掉字符串左右两端的空格,并返回
    select trim(' ABC DEFG ');
    11.ltrim(str) 去掉字符串左侧的空格,并返回
    select ltrim(' ABC DEFG ');
    12.rtrim(str) 去掉字符串右侧的空格,并返回
    select rtrim(' ABC DEFG ');
    13.instr(str,x) 从str字符串中查找x子字符串,找到则返回x子字符串首字母在str字符串中的位置,未找到则返回0
    select instr('ABCDEFG','CD'); -- 3
    select instr('ABCDEFG','DC'); -- 0
    14.repeat(str,x) 返回str重复x次的结果
    select repeat('ABC',3);
    15.replace(str,a,b) 用b字符串替换str字符串中的a字符串。
    select replace('ABCDEFG','ABC','123');
    select replace(' ABC DEFG ',' ','');
    16.strcmp(s1,s2) 从首字母开始比较字符串s1和s2的ASCII码值的大小,0相等,1大于,-1小于
    select strcmp('ABC','ABC'); -- 0
    select strcmp('ABC','abc'); -- 0 不区分大小写
    select strcmp('BC','AD'); -- 1 首字母不同时比较首字母
    select strcmp('BC','BB'); -- 1 首字母相同时比较后续字母
    select strcmp('AB','BB'); -- -1
    17.substring(str,x,y) 返回str中从x位置开始的y位长度子串
    select substring('ABCDEFG',1,3); -- ABC
    select substring('ABCDEFG',0,3); -- null
    select substring('ABCDEFG',6,3); -- FG
    select substring('ABCDEFG',-1,3); -- G
    select substring('ABCDEFG',-6,3); -- BCD

    5.3 日期和时间函数
    1.curdate() 返回当前日期(年月日)
    2.curtime() 返回当前时间(时分秒)
    3.now() 返回当前日期时间(年月日时分秒)
    select curdate(),curtime(),now();
    4.unix_timestamp(date) 返回日期date的unix时间戳
    select unix_timestamp(now()); -- 1535008983
    5.from_unixtime(n) 返回unix时间戳对应的日期值
    select from_unixtime(1535008983); -- '2018-08-23 15:23:03'
    6.year(date) 返回日期date的年
    7.month(date) 返回日期date的月
    8.day(date) 返回日期date的日
    9.hour(date) 返回日期date的时
    10.minute(date) 返回日期date的分
    11.second(date) 返回日期date的秒
    select year(now()),month(now()),day(now()),hour(now()),minute(now()),second(now());
    12.week(date) 返回日期date是本年的第几周
    select week(now());
    13.monthname(date) 返回日期date所在月份的月份名
    select monthname(now());
    14.date_format(date,fmt) 返回按字符串fmt格式化的日期字符串
    select date_format(now(),'%Y-%m-%d %H:%i:%s');
    select date_format(now(),'%Y年%m月%d日%H时%i分%s秒');
    15.date_add(date,interval expr type) 返回日期date加上时间间隔interval expr type后的日期值
    select date_add(now(),interval 1 year),date_add(now(),interval 2 month),date_add(now(),interval 3 day),date_add(now(),interval 4 hour),date_add(now(),interval 5 minute),date_add(now(),interval 6 second);
    select date_add(now(),interval '1_2' year_month); -- 增加1年2月
    select date_add(now(),interval '2_3' month_day); -- 1064
    select date_add(now(),interval '3_4' day_hour); -- 增加3天4小时
    select date_add(now(),interval '3_4_5' day_minute); -- 增加3天4小时5分
    select date_add(now(),interval '3_4_5_6' day_second); -- 增加3天4小时5分6秒
    select date_add(now(),interval '4_5' hour_minute); -- 增加4小时5分
    select date_add(now(),interval '4_5_6' hour_second); -- 增加4小时5分6秒
    select date_add(now(),interval '5_6' minute_second); -- 增加5分6秒
    select date_add(now(),interval -1 year); -- 可以使用负数,表示减去一个时间间隔返回之前的耨个日期
    16.datediff(date1,date2) 计算两个日期之间相差的天数
    select datediff(now(),date_add(now(),interval '-1_2' year_month)); -- 相差1年2月,大致为365+61=426
    select datediff(now(),'2008-08-08'); -- 当前日期减去特定日期的天数
    select datediff('2008-08-08',now()); -- 可以为负值

    5.4 流程函数
    流程函数跟条件选择相关,可以分支功能。
    1.if(value,t,f) 如果value为真,则返回t,否则返回f
    select *,if(sal>2500,'good','bad') from emp;
    2.ifnull(value1,value2) 如果value1不为空,则返回value1,否则返回value2
    select *,sal+ifnull(comm,0) from emp;
    3.case when [value1] then [result1]...else [default] end 如果value1为真,则返回result1,否则返回default
    select *,case when sal>=3000 then 'high' when sal>=1500 then 'medium' else 'low' end from emp;
    4.case [expr] when [value1] then [result1]...else [default] end 如果expr=value1,则返回result1,否则返回default
    select *,case deptno when 10 then 'ACCOUNTING' when 20 then 'RESEARCH' when 30 then 'SALES' when 40 then 'OPERATIONS' else '' end from emp;
    5.decode() 尚不清楚具体用途
    select *,decode(deptno,10) dname from emp;

    5.5 其他常用函数
    1.database() 返回当前数据库名
    2.version() 返回当前数据库版本 5.7.22-log
    3.user() 返回当前登录用户名
    select database(),version(),user();
    4.inet_aton(IP) 返回IP地址的数字表示,用于进行IP范围比较
    5.inet_ntoa(num) 返回数字代表的IP地址
    select inet_aton('192.168.1.125'),inet_ntoa(inet_aton('192.168.1.125'));
    6.password(str) 返回字符串str的加密版本,用于设置mysql用户密码,返回41位长的字符串
    7.md5(str) 返回字符串str的MD5值,用于对应用数据加密
    select password('abc@123'),md5('abc@123');

    5.6 小结
    mysql keyw --> keyword 关键字
    mysql libf --> library function 库函数(内置函数)
    mysql svar --> System variable 系统变量
    mysql uvar --> User variable 用户自定义变量
    mysql scma --> schema 模式
    1.keyword 关键字
    all
    avg
    bit_and
    bit_or
    bit_xor
    case
    cast
    convert
    count
    date
    default
    distinct
    distinctrow
    exists
    false
    float_number
    group_concat
    high_priority
    interval
    match
    max
    min
    not
    null
    row
    sql_big_result
    sql_buffer_result
    sql_cache
    sql_calc_found_rows
    sql_no_cache
    sql_small_result
    std
    stddev
    stddev_samp
    straight_join
    sum
    time
    timestamp
    true
    values
    var_pop
    var_samp
    variance
    2.library function 库函数(内置函数)
    abs()
    acos()
    adddate()
    addtime()
    aes_decrypt()
    aes_encrypt()
    area()
    asbinary()
    ascii()
    asin()
    astext()
    atan()
    atan2()
    avg()
    benchmark()
    bin()
    bit_and()
    bit_count()
    bit_length()
    bit_or()
    bit_xor()
    boundary()
    buffer()
    cast()
    ceil()
    ceiling()
    char()
    char_length()
    character_length()
    charset()
    coalesce()
    coercibility()
    collation()
    compress()
    concat()
    concat_ws()
    connection_id()
    contains()
    conv()
    convert()
    convert_tz()
    cos()
    cot()
    count()
    crc32()
    crosses()
    curdate()
    current_date()
    current_time()
    current_timestamp()
    curtime()
    database()
    date()
    date_add()
    date_format()
    date_sub()
    datediff()
    day()
    dayname()
    dayofmonth()
    dayofweek()
    dayofyear()
    decode()
    default()
    degrees()
    des_decrypt()
    des_encrypt()
    dimension()
    disjoint()
    elt()
    encode()
    encrypt()
    endpoint()
    envelope()
    equals()
    exp()
    export_set()
    exteriorring()
    extract()
    extractvalue()
    field()
    find_in_set()
    floor()
    format()
    found_rows()
    from_base64()
    from_days()
    from_unixtime()
    geomcollfromtext()
    geomcollfromwkb()
    geometrycollection()
    geometryn()
    geometrytype()
    geomfromtext()
    geomfromwkb()
    get_format()
    get_lock()
    glength()
    greatest()
    group_concat()
    gtid_subset()
    gtid_subtract()
    hex()
    hour()
    if()
    ifnull()
    inet6_aton()
    inet6_ntoa()
    inet_aton()
    inet_ntoa()
    insert()
    instr()
    interiorringn()
    intersects()
    interval()
    ipv4_compat()
    is_free_lock()
    is_ipv4()
    is_ipv4_mapped()
    is_ipv6()
    is_used_lock()
    isclosed()
    isempty()
    isnull()
    issimple()
    last_insert_id()
    lcase()
    least()
    left()
    length()
    lineformtext()
    lineformwkb()
    linestring()
    ln()
    load_file()
    localtime()
    localtimestamp()
    locate()
    log()
    log10()
    log2()
    lower()
    lpad()
    ltrim()
    make_set()
    makedate()
    maketime()
    master_pos_wait()
    max()
    mbrcontains()
    mbrdisjoint()
    mbrequal()
    mbrintersects()
    mbroverlaps()
    mbrtouches()
    mbrwithin()
    md5()
    microsecond()
    mid()
    min()
    minute()
    mlineformtext()
    mlinefromwkb()
    mod()
    month()
    monthname()
    mpointfromtext()
    mpointfromwkb()
    mpolyfromtext()
    mpolyfromwkb()
    multilinestring()
    multipoint()
    multipolygon()
    name_const()
    now()
    nullif()
    numgeometries()
    numinteriorrings()
    numpoints()
    oct()
    octet_length()
    old_password()
    ord()
    over_laps()
    password()
    period_add()
    period_diff()
    pi()
    point()
    pointfromtext()
    pointfromwkb()
    pointn()
    polyfromtext()
    polyfromwkb()
    polygon()
    position()
    pow()
    power()
    quarter()
    quote()
    radians()
    rand()
    random_bytes()
    release_lock()
    repeat()
    replace()
    reverse()
    right()
    round()
    row_count()
    rpad()
    rtrim()
    schema()
    sec_to_time()
    second()
    session_user()
    sha()
    sha1()
    sha2()
    sign()
    sin()
    sleep()
    soundex()
    space()
    sqrt()
    srid()
    st_contains()
    st_crosses()
    st_disjoint()
    st_equals()
    st_intersects()
    st_touches()
    st_within()
    startpoint()
    std()
    stddev()
    stddev_pop()
    stddev_samp()
    str_to_date()
    strcmp()
    subdate()
    substr()
    substring()
    substring_index2()
    subtime()
    sum()
    sysdate()
    system_user()
    tan()
    time()
    time_format()
    time_to_sec()
    timediff()
    timestamp()
    timestampadd()
    timestampdiff()
    to_base64()
    to_days()
    to_seconds()
    touches()
    trim()
    truncate()
    ucase()
    uncompress()
    uncompress_length()
    unhex()
    unix_timestamp()
    updatexml()
    upper()
    user()
    utc_date()
    utc_time()
    utc_timestamp()
    uuid()
    uuid_short()
    validate_password_strength()
    values()
    var_pop()
    var_samp()
    variance()
    version()
    wait_until_sql_thread_after_gtids()
    week()
    weekday()
    weekofyear()
    weight_string()
    within()
    x()
    y()
    year()
    yearweek()
    3.System variable 系统变量
    @@auto_increment_increment
    @@auto_increment_offset
    @@autocommit
    @@automatic_sp_privileges
    @@avoid_temporal_upgrade
    @@back_log
    @@basedir
    @@big_tables
    @@bind_address
    @@binlog_cache_size
    @@binlog_checksum
    @@binlog_direct_non_transactional_updates
    @@binlog_error_action
    @@binlog_format
    @@binlog_group_commit_sync_delay
    @@binlog_group_commit_sync_no_delay_count
    @@binlog_gtid_simple_recovery
    @@binlog_max_flush_queue_time
    @@binlog_order_commits
    @@binlog_row_image
    @@binlog_rows_query_log_events
    @@binlog_stmt_cache_size
    @@binlog_transaction_dependency_history_size
    @@binlog_transaction_dependency_tracking
    @@block_encryption_mode
    @@bulk_insert_buffer_size
    @@character_set_client
    @@character_set_connection
    @@character_set_database
    @@character_set_filesystem
    @@character_set_results
    @@character_set_server
    @@character_set_system
    @@character_sets_dir
    @@check_proxy_users
    @@collation_connection
    @@collation_database
    @@collation_server
    @@completion_type
    @@concurrent_insert
    @@connect_timeout
    @@core_file
    @@datadir
    @@date_format
    @@datetime_format
    @@default_authentication_plugin
    @@default_password_lifetime
    @@default_storage_engine
    @@default_tmp_storage_engine
    @@default_week_format
    @@delay_key_write
    @@delayed_insert_limit
    @@delayed_insert_timeout
    @@delayed_queue_size
    @@disabled_storage_engines
    @@disconnect_on_expired_password
    @@div_precision_increment
    @@end_markers_in_json
    @@enforce_gtid_consistency
    @@eq_range_index_dive_limit
    @@error_count
    @@event_scheduler
    @@expire_logs_days
    @@explicit_defaults_for_timestamp
    @@external_user
    @@flush
    @@flush_time
    @@foreign_key_checks
    @@ft_boolean_syntax
    @@ft_max_word_len
    @@ft_min_word_len
    @@ft_query_expansion_limit
    @@ft_stopword_file
    @@general_log
    @@general_log_file
    @@group_concat_max_len
    @@gtid_executed_compression_period
    @@gtid_mode
    @@gtid_next
    @@gtid_owned
    @@gtid_purged
    @@have_compress
    @@have_crypt
    @@have_dynamic_loading
    @@have_geometry
    @@have_openssl
    @@have_profiling
    @@have_query_cache
    @@have_rtree_keys
    @@have_ssl
    @@have_statement_timeout
    @@have_symlink
    @@host_cache_size
    @@hostname
    @@identity
    @@ignore_builtin_innodb
    @@ignore_db_dirs
    @@init_connect
    @@init_file
    @@init_slave
    @@innodb_adaptive_flushing
    @@innodb_adaptive_flushing_lwm
    @@innodb_adaptive_hash_index
    @@innodb_adaptive_hash_index_parts
    @@innodb_adaptive_max_sleep_delay
    @@innodb_api_bk_commit_interval
    @@innodb_api_disable_rowlock
    @@innodb_api_enable_binlog
    @@innodb_api_enable_mdl
    @@innodb_api_trx_level
    @@innodb_autoextend_increment
    @@innodb_autoinc_lock_mode
    @@innodb_buffer_pool_chunk_size
    @@innodb_buffer_pool_dump_at_shutdown
    @@innodb_buffer_pool_dump_now
    @@innodb_buffer_pool_dump_pct
    @@innodb_buffer_pool_filename
    @@innodb_buffer_pool_instances
    @@innodb_buffer_pool_load_abort
    @@innodb_buffer_pool_load_at_startup
    @@innodb_buffer_pool_load_now
    @@innodb_buffer_pool_size
    @@innodb_change_buffer_max_size
    @@innodb_change_buffering
    @@innodb_checksum_algorithm
    @@innodb_checksums
    @@innodb_cmp_per_index_enabled
    @@innodb_commit_concurrency
    @@innodb_compression_failure_threshold_pct
    @@innodb_compression_level
    @@innodb_compression_pad_pct_max
    @@innodb_concurrency_tickets
    @@innodb_data_file_path
    @@innodb_data_home_dir
    @@innodb_deadlock_detect
    @@innodb_default_row_format
    @@innodb_disable_sort_file_cache
    @@innodb_doublewrite
    @@innodb_fast_shutdown
    @@innodb_file_format
    @@innodb_file_format_check
    @@innodb_file_format_max
    @@innodb_file_per_table
    @@innodb_fill_factor
    @@innodb_flush_log_at_timeout
    @@innodb_flush_log_at_trx_commit
    @@innodb_flush_method
    @@innodb_flush_neighbors
    @@innodb_flush_sync
    @@innodb_flushing_avg_loops
    @@innodb_force_load_corrupted
    @@innodb_force_recovery
    @@innodb_ft_aux_table
    @@innodb_ft_cache_size
    @@innodb_ft_enable_diag_print
    @@innodb_ft_enable_stopword
    @@innodb_ft_max_token_size
    @@innodb_ft_min_token_size
    @@innodb_ft_num_word_optimize
    @@innodb_ft_result_cache_limit
    @@innodb_ft_server_stopword_table
    @@innodb_ft_sort_pll_degree
    @@innodb_ft_total_cache_size
    @@innodb_ft_user_stopword_table
    @@innodb_io_capacity
    @@innodb_io_capacity_max
    @@innodb_large_prefix
    @@innodb_lock_wait_timeout
    @@innodb_locks_unsafe_for_binlog
    @@innodb_log_buffer_size
    @@innodb_log_checksums
    @@innodb_log_compressed_pages
    @@innodb_log_file_size
    @@innodb_log_files_in_group
    @@innodb_log_group_home_dir
    @@innodb_log_write_ahead_size
    @@innodb_lru_scan_depth
    @@innodb_max_dirty_pages_pct
    @@innodb_max_dirty_pages_pct_lwm
    @@innodb_max_purge_lag
    @@innodb_max_purge_lag_delay
    @@innodb_max_undo_log_size
    @@innodb_monitor_disable
    @@innodb_monitor_enable
    @@innodb_monitor_reset
    @@innodb_monitor_reset_all
    @@innodb_old_blocks_pct
    @@innodb_old_blocks_time
    @@innodb_online_alter_log_max_size
    @@innodb_open_files
    @@innodb_optimize_fulltext_only
    @@innodb_page_cleaners
    @@innodb_page_size
    @@innodb_print_all_deadlocks
    @@innodb_purge_batch_size
    @@innodb_purge_rseg_truncate_frequency
    @@innodb_purge_threads
    @@innodb_random_read_ahead
    @@innodb_read_ahead_threshold
    @@innodb_read_io_threads
    @@innodb_read_only
    @@innodb_replication_delay
    @@innodb_rollback_on_timeout
    @@innodb_rollback_segments
    @@innodb_sort_buffer_size
    @@innodb_spin_wait_delay
    @@innodb_stats_auto_recalc
    @@innodb_stats_include_delete_marked
    @@innodb_stats_method
    @@innodb_stats_on_metadata
    @@innodb_stats_persistent
    @@innodb_stats_persistent_sample_pages
    @@innodb_stats_sample_pages
    @@innodb_stats_transient_sample_pages
    @@innodb_status_output
    @@innodb_status_output_locks
    @@innodb_strict_mode
    @@innodb_support_xa
    @@innodb_sync_array_size
    @@innodb_sync_spin_loops
    @@innodb_table_locks
    @@innodb_temp_data_file_path
    @@innodb_thread_concurrency
    @@innodb_thread_sleep_delay
    @@innodb_tmpdir
    @@innodb_undo_directory
    @@innodb_undo_log_truncate
    @@innodb_undo_logs
    @@innodb_undo_tablespaces
    @@innodb_use_native_aio
    @@innodb_version
    @@innodb_write_io_threads
    @@insert_id
    @@interactive_timeout
    @@internal_tmp_disk_storage_engine
    @@join_buffer_size
    @@keep_files_on_create
    @@key_buffer_size
    @@key_cache_age_threshold
    @@key_cache_block_size
    @@key_cache_division_limit
    @@keyring_operations
    @@large_files_support
    @@large_page_size
    @@large_pages
    @@last_insert_id
    @@lc_messages
    @@lc_messages_dir
    @@lc_time_names
    @@license
    @@local_infile
    @@lock_wait_timeout
    @@log_bin
    @@log_bin_basename
    @@log_bin_index
    @@log_bin_trust_function_creators
    @@log_bin_use_v1_row_events
    @@log_builtin_as_identified_by_password
    @@log_error
    @@log_error_verbosity
    @@log_output
    @@log_queries_not_using_indexes
    @@log_slave_updates
    @@log_slow_admin_statements
    @@log_slow_slave_statements
    @@log_statements_unsafe_for_binlog
    @@log_syslog
    @@log_syslog_tag
    @@log_throttle_queries_not_using_indexes
    @@log_timestamps
    @@log_warnings
    @@long_query_time
    @@low_priority_updates
    @@lower_case_file_system
    @@lower_case_table_names
    @@master_info_repository
    @@master_verify_checksum
    @@max_allowed_packet
    @@max_binlog_cache_size
    @@max_binlog_size
    @@max_binlog_stmt_cache_size
    @@max_connect_errors
    @@max_connections
    @@max_delayed_threads
    @@max_digest_length
    @@max_error_count
    @@max_execution_time
    @@max_heap_table_size
    @@max_insert_delayed_threads
    @@max_join_size
    @@max_length_for_sort_data
    @@max_points_in_geometry
    @@max_prepared_stmt_count
    @@max_relay_log_size
    @@max_seeks_for_key
    @@max_sort_length
    @@max_sp_recursion_depth
    @@max_tmp_tables
    @@max_user_connections
    @@max_write_lock_count
    @@metadata_locks_cache_size
    @@metadata_locks_hash_instances
    @@min_examined_row_limit
    @@multi_range_count
    @@myisam_data_pointer_size
    @@myisam_max_sort_file_size
    @@myisam_mmap_size
    @@myisam_recover_options
    @@myisam_repair_threads
    @@myisam_sort_buffer_size
    @@myisam_stats_method
    @@myisam_use_mmap
    @@mysql_native_password_proxy_users
    @@named_pipe
    @@net_buffer_length
    @@net_read_timeout
    @@net_retry_count
    @@net_write_timeout
    @@new
    @@ngram_token_size
    @@offline_mode
    @@old
    @@old_alter_table
    @@old_passwords
    @@open_files_limit
    @@optimizer_prune_level
    @@optimizer_search_depth
    @@optimizer_switch
    @@optimizer_trace
    @@optimizer_trace_features
    @@optimizer_trace_limit
    @@optimizer_trace_max_mem_size
    @@optimizer_trace_offset
    @@parser_max_mem_size
    @@performance_schema
    @@performance_schema_accounts_size
    @@performance_schema_digests_size
    @@performance_schema_events_stages_history_long_size
    @@performance_schema_events_stages_history_size
    @@performance_schema_events_statements_history_long_size
    @@performance_schema_events_statements_history_size
    @@performance_schema_events_transactions_history_long_size
    @@performance_schema_events_transactions_history_size
    @@performance_schema_events_waits_history_long_size
    @@performance_schema_events_waits_history_size
    @@performance_schema_hosts_size
    @@performance_schema_max_cond_classes
    @@performance_schema_max_cond_instances
    @@performance_schema_max_digest_length
    @@performance_schema_max_file_classes
    @@performance_schema_max_file_handles
    @@performance_schema_max_file_instances
    @@performance_schema_max_index_stat
    @@performance_schema_max_memory_classes
    @@performance_schema_max_metadata_locks
    @@performance_schema_max_mutex_classes
    @@performance_schema_max_mutex_instances
    @@performance_schema_max_prepared_statements_instances
    @@performance_schema_max_program_instances
    @@performance_schema_max_rwlock_classes
    @@performance_schema_max_rwlock_instances
    @@performance_schema_max_socket_classes
    @@performance_schema_max_socket_instances
    @@performance_schema_max_sql_text_length
    @@performance_schema_max_stage_classes
    @@performance_schema_max_statement_classes
    @@performance_schema_max_statement_stack
    @@performance_schema_max_table_handles
    @@performance_schema_max_table_instances
    @@performance_schema_max_table_lock_stat
    @@performance_schema_max_thread_classes
    @@performance_schema_max_thread_instances
    @@performance_schema_session_connect_attrs_size
    @@performance_schema_setup_actors_size
    @@performance_schema_setup_objects_size
    @@performance_schema_users_size
    @@pid_file
    @@plugin_dir
    @@port
    @@preload_buffer_size
    @@profiling
    @@profiling_history_size
    @@protocol_version
    @@proxy_user
    @@pseudo_slave_mode
    @@pseudo_thread_id
    @@query_alloc_block_size
    @@query_cache_limit
    @@query_cache_min_res_unit
    @@query_cache_size
    @@query_cache_type
    @@query_cache_wlock_invalidate
    @@query_prealloc_size
    @@rand_seed1
    @@rand_seed2
    @@range_alloc_block_size
    @@range_optimizer_max_mem_size
    @@rbr_exec_mode
    @@read_buffer_size
    @@read_only
    @@read_rnd_buffer_size
    @@relay_log
    @@relay_log_basename
    @@relay_log_index
    @@relay_log_info_file
    @@relay_log_info_repository
    @@relay_log_purge
    @@relay_log_recovery
    @@relay_log_space_limit
    @@report_host
    @@report_password
    @@report_port
    @@report_user
    @@require_secure_transport
    @@rpl_stop_slave_timeout
    @@secure_auth
    @@secure_file_priv
    @@server_id
    @@server_id_bits
    @@server_uuid
    @@session_track_gtids
    @@session_track_schema
    @@session_track_state_change
    @@session_track_system_variables
    @@session_track_transaction_info
    @@sha256_password_proxy_user
    @@shared_memory
    @@shared_memory_base_name
    @@show_compatibility_56
    @@show_create_table_verbosity
    @@show_old_temporals
    @@skip_external_locking
    @@skip_name_resolve
    @@skip_networking
    @@skip_show_database
    @@slave_allow_batching
    @@slave_checkpoint_group
    @@slave_checkpoint_period
    @@slave_compressed_protocol
    @@slave_exec_mode
    @@slave_load_tmpdir
    @@slave_max_allowed_packet
    @@slave_net_timeout
    @@slave_parallel_type
    @@slave_parallel_workers
    @@slave_pending_jobs_size_max
    @@slave_preserve_commit_order
    @@slave_rows_search_algorithms
    @@slave_skip_errors
    @@slave_sql_verify_checksum
    @@slave_transaction_retries
    @@slave_type_conversions
    @@slow_launch_time
    @@slow_query_log
    @@slow_query_log_file
    @@socket
    @@sort_buffer_size
    @@sql_auto_is_null
    @@sql_big_selects
    @@sql_buffer_result
    @@sql_log_bin
    @@sql_log_off
    @@sql_mode
    @@sql_notes
    @@sql_quote_show_create
    @@sql_safe_updates
    @@sql_select_limit
    @@sql_slave_skip_counter
    @@sql_warnings
    @@ssl_ca
    @@ssl_capath
    @@ssl_cert
    @@ssl_cipher
    @@ssl_crl
    @@ssl_crlpath
    @@ssl_key
    @@stored_program_cache
    @@super_read_only
    @@sync_binlog
    @@sync_frm
    @@sync_master_info
    @@sync_relay_log
    @@sync_relay_log_info
    @@system_time_zone
    @@table_definition_cache
    @@table_open_cache
    @@table_open_cache_instances
    @@thread_cache_size
    @@thread_handling
    @@thread_stack
    @@time_fromat
    @@time_zone
    @@timestamp
    @@tls_version
    @@tmp_table_size
    @@tmpdir
    @@transaction_alloc_block_size
    @@transaction_allow_batching
    @@transaction_isolation
    @@transaction_prealloc_size
    @@transaction_read_only
    @@transaction_write_set_extraction
    @@tx_isolation
    @@tx_read_only
    @@unique_checks
    @@updatable_views_with_limit
    @@version
    @@version_comment
    @@version_compile_machine
    @@version_compile_os
    @@wait_timeout
    @@warning_count

  • 相关阅读:
    循环控制Goto、Break、Continue
    linux多进/线程编程(6)——进程间通信之信号
    linux多进/线程编程(5)——进程间通信之mmap
    docker学习笔记(6)——docker场景问题汇总(centos7 由于内核版本低带来的一系列问题,docker彻底卸载,安装、启动日志报错分析)
    c/c++ 日常积累
    broken pipe 报错分析和解决办法
    c/c++ 常见字符串处理函数总结 strlen/sizeof strcpy/memcpy/strncpy strcat/strncat strcmp/strncmp sprintf/sscanf strtok/split/getline atoi/atof/atol
    docker学习笔记(5)——docker场景问题汇总(docker权限问题、docker文件目录、查看docker历史日志文件)
    linux多进/线程编程(4)——进程间通信之pipe和fifo
    linux多进/线程编程(3)——wait、waitpid函数和孤儿、僵尸进程
  • 原文地址:https://www.cnblogs.com/BradMiller/p/9544383.html
Copyright © 2011-2022 走看看