Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #3371 Error handling if statement global id not found #3808

Closed
wants to merge 2 commits into from

Conversation

jaredev
Copy link
Contributor

@jaredev jaredev commented Mar 2, 2022

Resolves Issue 3371

  • Added error log output instead of assert failure if the global id for the statement is not found

  • Returns an error packet to the client if this occurs

* Added error log output instead of assert failure if the global id for the statement is not found

* Returns an error packet to the client
@jaredev jaredev marked this pull request as draft March 2, 2022 20:21
@jaredev
Copy link
Contributor Author

jaredev commented Mar 2, 2022

@renecannao mentioned disconnecting the user when this occurs. That's not ready yet so setting as draft.

@jaredev jaredev marked this pull request as ready for review March 2, 2022 22:53
@renecannao
Copy link
Contributor

@jaredev : please remember we will need a TAP test for this PR

@pondix
Copy link
Contributor

pondix commented Mar 10, 2022

Automated message: PR pending admin approval for build testing

@sushant-115
Copy link

@jaredev @renecannao We are also facing this issue.

#0  MySQL_STMT_Global_info::~MySQL_STMT_Global_info (this=0x7fbf9805d000, __in_chrg=<optimized out>) at MySQL_PreparedStatement.cpp:457
        i = 1
#1  0x00000000004c53cc in MySQL_STMT_Manager_v14::ref_count_client (this=0x7fbf9fc44200, _stmt_id=_stmt_id@entry=11, _v=_v@entry=1, 
    lock=lock@entry=false) at MySQL_PreparedStatement.cpp:831
        id = 501
        s3 = {first = 501, second = 0x7fbf9805d000}
        a = 0x7fbf9805d000
        max_purge = <optimized out>
        i = <optimized out>
        torem = 0x7fbf4b780000
        stmt_info = <optimized out>
        s = <optimized out>
#2  0x00000000004c5776 in MySQL_STMTs_local_v14::generate_new_client_stmt_id (this=0x7fbf7a243080, global_statement_id=11)
    at MySQL_PreparedStatement.cpp:963
        ret = 1
        __PRETTY_FUNCTION__ = "uint32_t MySQL_STMTs_local_v14::generate_new_client_stmt_id(uint64_t)"
#3  0x00000000004876e3 in MySQL_Session::handler (this=this@entry=0x7fbf551b6f00) at MySQL_Session.cpp:2230
        new_stmt_id = <optimized out>
        rc_break = <optimized out>
        hash = <optimized out>
        stmt_info = 0x7fbf9d325800
        pkt = {ptr = 0x7fbf4b670d80, size = 109}
        c = <optimized out>
        __PRETTY_FUNCTION__ = "int MySQL_Session::handler()"
        __func__ = "handler"
        wrong_pass = false
#4  0x000000000047030c in MySQL_Thread::process_all_sessions (this=this@entry=0x7fbf9de0d000) at MySQL_Thread.cpp:3217
        sess = 0x7fbf551b6f00
        total_active_transactions_ = 0
        idle_maintenance_thread = false
        sess_sort = <optimized out>
        total_active_transactions_tmp = <optimized out>
        n = 15
        rc = <optimized out>
---Type <return> to continue, or q <return> to quit---
#5  0x0000000000478f06 in MySQL_Thread::run (this=this@entry=0x7fbf9de0d000) at MySQL_Thread.cpp:3008
        num_idles = <optimized out>
        maintenance_interval = <optimized out>
        idle_maintenance_thread = <optimized out>
        __PRETTY_FUNCTION__ = "void MySQL_Thread::run()"
        __func__ = "run"
        n = <optimized out>
        rc = <optimized out>
#6  0x0000000000449afc in mysql_worker_thread_func (arg=0x7fbf9fc4a9e0) at main.cpp:247
        thread_attr = {__size = '\000' <repeats 17 times>, "\020", '\000' <repeats 37 times>, __align = 0}
        tmp_stack_size = 8388608
        mysql_thread = 0x7fbf9fc4a9e0
        worker = 0x7fbf9de0d000
#7  0x00007fbfa2ba4de5 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#8  0x00007fbfa13bff1d in epoll_wait () from /lib64/libc.so.6
No symbol table info available.
#9  0x0000000000000000 in ?? ()
No symbol table info available.

Is there a way I can help here to complete the TAP test for this? And get this PR merged ASAP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prepared statement - Frequent crash on ProxySQL
4 participants