Skip to content

Wrap table update in transaction #16

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions populate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ set @func_query = CONCAT( @func_query , ";" );
END IF;
SET i=in_rows;
SET batch_size=500;
START TRANSACTION;
populate :loop
WHILE (i>batch_size) DO
PREPARE t_stmt FROM @func_query;
Expand All @@ -87,6 +88,7 @@ SET @func_query=concat("INSERT INTO ", in_db,".",in_table," VALUES (",func_query
END WHILE;
LEAVE populate;
END LOOP populate;
COMMIT;
SELECT "Kedar Vaijanapurkar" AS "Developed by";
END
$$
Expand Down