Skip to content

[Bug]: regexp_instr have invalid input for func REGEXP_INSTR/REGEXP_REPLACE/REGEXP_SUBSTR with column para #13659

Closed

Description

@aressu1985

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93):45a01657e81903b64c9a7350221a22a210f103a6
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

mysql> select col11 from big_data_test.table_basic_for_load_100M limit 1;
+---------------------------------------------------------+
| col11 |
+---------------------------------------------------------+
| ,GHI,G;KL/MN?OPQR.STU-_+=VWXYZabcdefghigklmnopqrstuvwxy |
+---------------------------------------------------------+
1 row in set (0.31 sec)

mysql> select REGEXP_INSTR(',GHI,G;KL/MN?OPQR.STU-+=VWXYZabcdefghigklmnopqrstuvwxy', ',',1)
-> ;
+-----------------------------------------------------------------------------+
| regexp_instr(,GHI,G;KL/MN?OPQR.STU-
+=VWXYZabcdefghigklmnopqrstuvwxy, ,, 1) |
+-----------------------------------------------------------------------------+
| 1 |
+-----------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> select REGEXP_INSTR(',GHI,G;KL/MN?OPQR.STU-+=VWXYZabcdefghigklmnopqrstuvwxy', 'a',1)
-> ;
+-----------------------------------------------------------------------------+
| regexp_instr(,GHI,G;KL/MN?OPQR.STU-
+=VWXYZabcdefghigklmnopqrstuvwxy, a, 1) |
+-----------------------------------------------------------------------------+
| 31 |
+-----------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> select REGEXP_INSTR(col11,'a',2) from big_data_test.table_basic_for_load_100M limit 1;
ERROR 20301 (HY000): invalid input: regexp_instr have invalid input
mysql> select REGEXP_INSTR(col11,'a',1)) from big_data_test.table_basic_for_load_100M limit 1;
ERROR 20301 (HY000): invalid input: regexp_instr have invalid input
mysql> select REGEXP_INSTR(col11,','',1) from big_data_test.table_basic_for_load_100M limit 1;
ERROR 20301 (HY000): invalid input: regexp_instr have invalid input

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

Activity

  1. added
    kind/bug
    severity/s0
    on Dec 20, 2023
  2. added this to the 1.1.0 milestone on Dec 20, 2023
  3. changed the title [-][Bug]: regexp_instr have invalid input for func REGEXP_INSTR with column para[/-] [+][Bug]: regexp_instr have invalid input for func REGEXP_INSTR/REGEXP_REPLACE/REGEXP_SUBSTR with column para[/+] on Dec 20, 2023
  4. YANGGMM commented on Dec 21, 2023

    @YANGGMM
    Contributor
    create database big_data_test;
    use big_data_test;
    create table table_basic_for_load_100M(col1 varchar(100));
    insert into table_basic_for_load_100M values(',GHI,G;KL/MN?OPQR.STU-_+=VWXYZabcdefghigklmnopqrstuvwxy');
    insert into table_basic_for_load_100M values('a');
    select col1 from table_basic_for_load_100M;
    select REGEXP_INSTR(',GHI,G;KL/MN?OPQR.STU-_+=VWXYZabcdefghigklmnopqrstuvwxy', ',',1);
    select REGEXP_INSTR(',GHI,G;KL/MN?OPQR.STU-_+=VWXYZabcdefghigklmnopqrstuvwxy', 'a',1);
    select REGEXP_INSTR(col1,',',1) from big_data_test.table_basic_for_load_100M;
    select REGEXP_INSTR(col1,'a',1) from big_data_test.table_basic_for_load_100M;
  5. YANGGMM commented on Dec 21, 2023

    @YANGGMM
    Contributor
    select REGEXP_INSTR(',GHI,G;KL/MN?OPQR.STU-_+=VWXYZabcdefghigklmnopqrstuvwxy', 'a',1);
    select REGEXP_INSTR(col1,'a',1) from big_data_test.table_basic_for_load_100M limit 1;
  6. YANGGMM commented on Dec 22, 2023

    @YANGGMM
    Contributor

    fixed

  7. aressu1985 commented on Dec 26, 2023

    @aressu1985
    ContributorAuthor

    fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions