Restrictions on server-side cursors in MySQL

Source: Internet
Author: User

Starting with the MySQL 5.0.2, the server-side cursor is implemented through the Mysql_stmt_attr_set () C API function. The server-side cursor allows the result set to be generated on the server side, but is not transferred to the client unless the client requests the rows. For example, if a client executes a query but is interested only in line 1th, the remaining rows are not transferred.

The cursor is read-only and the row cannot be updated with the cursor.

Update where current and delete where current is not implemented because updatable cursors are not supported.

The cursor is not persisted (no longer remains open after submission).

The cursor is not sensitive.

The cursor is not scrollable.

The cursor is not named. The statement handler plays the role of the cursor ID.

For each preprocessing statement, only 1 cursors can be opened. If multiple cursors are required, multiple statements must be processed.

If a statement is not supported in preprocessing mode, you cannot use the cursor on the statement that generates the result set. Includes check TABLES, HANDLER read and show Binlog events statements.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.