Add sql_big_selects switch
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
- Started by
- Completed by
Related branches
Related bugs
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_
if ((detected_server == SERVER_TYPE_MYSQL) && mysql_query(
}
+ if (mysql_
+ g_warning("Failed to set SQL Big Selects: %s", mysql_error(
+ }
if (mysql_
}