Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7113

difference between check_vcol_func_processor and check_partition_func_processor

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
    • 10.5
    • None

    Description

      Item::check_vcol_func_processor tells whether an Item can be used in a virtual column expression. Item::check_partition_func_processor tells whether an Item can be used in a partitioning expression.

      Most of the time they return the same value — indeed, the limitations are similar, like, no expressions that depends on the environment, only deterministic, etc.

      Sometimes they disagree, and often this is a bug, not an intentional
      difference. All these differences need to be analyzed:

      Item Allowed in partitioning Allowed in virtual columns Comments
      Item_blob YES NO doesn't matter *
      Item_empty_string YES NO doesn't matter *
      Item_func_unix_timestamp YES NO only UNIX_TIMESTAMP(val)
      Item_func_uuid_short YES NO bug in partitioning
      Item_insert_value YES NO bug in partitioning 1
      Item_return_date_time YES NO doesn't matter *
      Item_trigger_field YES NO doesn't matter *
      Item_char_typecast NO YES  
      Item_cond_and NO YES  
      Item_cond_or NO YES  
      Item_date_add_interval NO YES  
      Item_date_typecast NO YES  
      Item_datetime_typecast NO YES  
      Item_decimal_typecast NO YES  
      Item_double_typecast NO YES  
      Item_dyncol_get NO YES  
      Item_equal NO YES Optimizer-level item. Doesn't occur in expressions which are not optimized.
      Item_func_acos NO YES  
      Item_func_add_time NO YES  
      Item_func_aes_decrypt NO YES  
      Item_func_aes_encrypt NO YES  
      Item_func_area NO YES  
      Item_func_as_wkb NO YES  
      Item_func_as_wkt NO YES  
      Item_func_ascii NO YES  
      Item_func_asin NO YES  
      Item_func_atan NO YES  
      Item_func_between NO YES  
      Item_func_binary NO YES  
      Item_func_bit_and NO YES  
      Item_func_bit_count NO YES  
      Item_func_bit_length NO YES  
      Item_func_bit_neg NO YES  
      Item_func_bit_or NO YES  
      Item_func_bit_xor NO YES  
      Item_func_buffer NO YES  
      Item_func_case NO YES  
      Item_func_centroid NO YES  
      Item_func_char NO YES  
      Item_func_char_length NO YES  
      Item_func_charset NO YES  
      Item_func_coalesce NO YES  
      Item_func_coercibility NO YES  
      Item_func_collation NO YES  
      Item_func_compress NO YES  
      Item_func_concat NO YES  
      Item_func_concat_ws NO YES  
      Item_func_conv NO YES  
      Item_func_conv_charset NO YES  
      Item_func_convert_tz NO YES  
      Item_func_cos NO YES  
      Item_func_cot NO YES  
      Item_func_crc32 NO YES  
      Item_func_date_format NO YES bug in virtual columns 2
      Item_func_dayname NO YES bug in virtual columns 2
      Item_func_decode NO YES  
      Item_func_des_decrypt NO YES bug in virtual columns
      Item_func_des_encrypt NO YES bug in virtual columns
      Item_func_dimension NO YES  
      Item_func_distance NO YES  
      Item_func_div NO YES bug in virtual columns 3
      Item_func_dyncol_add NO YES  
      Item_func_dyncol_create NO YES  
      Item_func_dyncol_exists NO YES  
      Item_func_dyncol_list NO YES  
      Item_func_elt NO YES  
      Item_func_encode NO YES  
      Item_func_envelope NO YES  
      Item_func_eq NO YES  
      Item_func_equal NO YES  
      Item_func_exp NO YES  
      Item_func_export_set NO YES  
      Item_func_field NO YES  
      Item_func_find_in_set NO YES  
      Item_func_format NO YES  
      Item_func_from_unixtime NO YES bug in virtual columns
      Item_func_ge NO YES  
      Item_func_geometry_from_text NO YES  
      Item_func_geometry_from_wkb NO YES  
      Item_func_geometry_type NO YES  
      Item_func_get_format NO YES  
      Item_func_get_system_var NO YES Bug in virtual columns - depends on the environment
      Item_func_get_user_var NO YES Bug in virtual columns - depends on the environment
      Item_func_glength NO YES  
      Item_func_gt NO YES  
      Item_func_hex NO YES  
      Item_func_if NO YES  
      Item_func_ifnull NO YES  
      Item_func_in NO YES  
      Item_func_inet_aton NO YES  
      Item_func_inet_ntoa NO YES  
      Item_func_insert NO YES  
      Item_func_interval NO YES  
      Item_func_isclosed NO YES  
      Item_func_isempty NO YES  
      Item_func_isfalse NO YES  
      Item_func_isnotfalse NO YES  
      Item_func_isnotnull NO YES  
      Item_func_isnottrue NO YES  
      Item_func_isnull NO YES  
      Item_func_issimple NO YES  
      Item_func_istrue NO YES  
      Item_func_last_day NO YES  
      Item_func_last_value NO YES  
      Item_func_lcase NO YES  
      Item_func_le NO YES  
      Item_func_left NO YES  
      Item_func_length NO YES  
      Item_func_like NO YES  
      Item_func_like_range_max NO YES  
      Item_func_like_range_min NO YES  
      Item_func_ln NO YES  
      Item_func_locate NO YES  
      Item_func_log NO YES  
      Item_func_log10 NO YES  
      Item_func_log2 NO YES  
      Item_func_lpad NO YES  
      Item_func_lt NO YES  
      Item_func_ltrim NO YES  
      Item_func_make_set NO YES  
      Item_func_makedate NO YES  
      Item_func_maketime NO YES  
      Item_func_max NO YES  
      Item_func_md5 NO YES  
      Item_func_min NO YES  
      Item_func_monthname NO YES bug in virtual columns 2
      Item_func_ne NO YES  
      Item_func_nop_all NO YES  
      Item_func_not NO YES  
      Item_func_not_all NO YES Subquery-related item. Can't occur in subquery-free expressions
      Item_func_nullif NO YES  
      Item_func_numgeometries NO YES  
      Item_func_numinteriorring NO YES  
      Item_func_numpoints NO YES  
      Item_func_old_password NO YES  
      Item_func_ord NO YES  
      Item_func_password NO YES  
      Item_func_period_add NO YES  
      Item_func_period_diff NO YES  
      Item_func_point NO YES  
      Item_func_pow NO YES  
      Item_func_quote NO YES  
      Item_func_regex NO YES  
      Item_func_repeat NO YES  
      Item_func_replace NO YES  
      Item_func_reverse NO YES  
      Item_func_right NO YES  
      Item_func_rollup_const NO YES doesn't matter *
      Item_func_round NO YES  
      Item_func_rpad NO YES  
      Item_func_rtrim NO YES  
      Item_func_sec_to_time NO YES  
      Item_func_set_collation NO YES  
      Item_func_set_user_var NO YES deterministic constant expressions should not get or set user vars
      Item_func_sha NO YES  
      Item_func_sha2 NO YES  
      Item_func_shift_left NO YES  
      Item_func_shift_right NO YES  
      Item_func_sign NO YES  
      Item_func_signed NO YES  
      Item_func_sin NO YES  
      Item_func_soundex NO YES  
      Item_func_spatial_collection NO YES  
      Item_func_spatial_decomp NO YES  
      Item_func_spatial_decomp_n NO YES  
      Item_func_spatial_mbr_rel NO YES  
      Item_func_spatial_operation NO YES  
      Item_func_spatial_rel NO YES  
      Item_func_sqrt NO YES  
      Item_func_srid NO YES  
      Item_func_str_to_date NO YES  
      Item_func_strcmp NO YES  
      Item_func_substr NO YES  
      Item_func_substr_index NO YES  
      Item_func_tan NO YES  
      Item_func_timediff NO YES  
      Item_func_timestamp_diff NO YES  
      Item_func_trig_cond NO YES This is only created by optimizer. Can't be present in constant expressions
      Item_func_trim NO YES  
      Item_func_ucase NO YES  
      Item_func_udf_decimal NO YES bug in virtual columns
      Item_func_udf_float NO YES bug in virtual columns
      Item_func_udf_int NO YES bug in virtual columns
      Item_func_udf_str NO YES bug in virtual columns
      Item_func_uncompress NO YES  
      Item_func_uncompressed_length NO YES  
      Item_func_unhex NO YES  
      Item_func_units NO YES  
      Item_func_unsigned NO YES  
      Item_func_week NO YES  
      Item_func_x NO YES  
      Item_func_xor NO YES  
      Item_func_y NO YES  
      Item_in_optimizer NO YES doesn't matter *
      Item_is_not_null_test NO YES  
      Item_row NO YES  
      Item_time_typecast NO YES  

      *) this Item can never possibly happen in the partitioning or virtual column expression, but still it's better to remove the difference.
      1)

      create table t1 (a int) partition by list (values(a) div 1) (partition p0 values in (0), partition p1 values in (1));

      2 depends on @@lc_time_names
      3 depends on @@div_precision_increment


      Bugs should be fixed in 5.5 or 10.0, unnecessarily disabled functions — enabled in
      10.1.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.