Add sql_big_selects switch

Registered by Dmitry Ilyin

To solve this error:
ERROR 1104: The SELECT would examine too many records and probably take a very long time. Check your WHERE and use SET OPTION SQL_BIG_SELECTS=1 if the SELECT is ok
You need to execute ' SET SESSION SQL_BIG_SELECTS=1' before bumping data of VERY large tables.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Author: Dmitry Ilyin <email address hidden>
Date: Fri Oct 26 20:43:30 2012 +0400

    Add SQL_BIG_SELECTS query

diff --git a/mydumper.c b/mydumper.c
index 2e41c0d..a7a4048 100644
--- a/mydumper.c
+++ b/mydumper.c
@@ -235,6 +235,9 @@ void *process_queue(struct thread_data *td) {
        if ((detected_server == SERVER_TYPE_MYSQL) && mysql_query(thrconn, "SET SESSION wait_timeout = 2147483")){
                g_warning("Failed to increase wait_timeout: %s", mysql_error(thrconn));
        }
+ if (mysql_query(thrconn, "SET SESSION SQL_BIG_SELECTS=1")) {
+ g_warning("Failed to set SQL Big Selects: %s", mysql_error(thrconn));
+ }
        if (mysql_query(thrconn, "SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ")) {
                g_warning("Failed to set isolation level: %s", mysql_error(thrconn));
        }

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.