[MDEV-9342] MySQL procedure while loop: Gets stuck after one iteration Created: 2015-12-29 Updated: 2016-01-13 Resolved: 2016-01-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Update |
| Affects Version/s: | 10.0.21-galera |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Mohsen Mesgarpour | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
The MariaDB Server is installed on Linux x86_64, Fedora v.21 with the following configurations: |
||
| Description |
|
There are some very large tables (TargetTable) that I am querying against, and there is a particular procedure that get stuck in its second iteration and never finishes nor crashes. The first iteration always finishes in less than a few minutes, regardless of the start of the range (loopIndex) or size of the of the range (loopStepShort). This problem goes away if I do one of the following:
After a lot of head scratching, I suspect the source of the problem could be Not clearing out buffer(s) properly. The procedure body is as the following:
Finally, below are approximate dimensions of the tables:
This issue first raise on Stackoverflowhttp://stackoverflow.com/questions/32945135/mysql-procedure-while-loop-gets-stuck-after-one-iteration-cache-clean-up |
| Comments |
| Comment by Elena Stepanova [ 2016-01-12 ] |
|
Could you please paste the output of SHOW CREATE TABLE for the involved tables, and attach your cnf file(s) if there is anything in them other than what you already mentioned in the environment? Did you notice, when it's stuck, does it consume CPU? Does it grow in memory? Thanks. |
| Comment by Mohsen Mesgarpour [ 2016-01-13 ] |
|
Hi Elena, I have tried the query again, and it works without any problem! I think the problem might have been occurred, when some of databases indexes were not copied on the process of database transition. Because, when I tried to reproduce an example, it was occurring for non-indexed tables (High CPU usage and virtually infinite loop step). I think we can close the ticket. Many thanks for your time and assistance. |