@@ -155,12 +155,20 @@ class Mysqldump extends SimulatorExecutable implements Simulator
155155
156156 /**
157157 * Add general transaction id statement.
158- * --set-gids-purged
158+ * --set-gids-purged=['ON', 'OFF', 'AUTO']
159159 *
160160 * @var string
161161 */
162162 private $ gtidPurged ;
163163
164+ /**
165+ * Dump procedures and functions.
166+ * --routines
167+ *
168+ * @var bool
169+ */
170+ private $ routines ;
171+
164172 /**
165173 * Setup.
166174 *
@@ -186,6 +194,7 @@ public function setup(array $conf = [])
186194 $ this ->extendedInsert = Util \Str::toBoolean (Util \Arr::getValue ($ conf , 'extendedInsert ' , '' ), false );
187195 $ this ->noData = Util \Str::toBoolean (Util \Arr::getValue ($ conf , 'noData ' , '' ), false );
188196 $ this ->filePerTable = Util \Str::toBoolean (Util \Arr::getValue ($ conf , 'filePerTable ' , '' ), false );
197+ $ this ->routines = Util \Str::toBoolean (Util \Arr::getValue ($ conf , 'routines ' , '' ), false );
189198
190199 // this doesn't fail, but it doesn't work, so throw an exception so the user understands
191200 if ($ this ->filePerTable && count ($ this ->structureOnly )) {
@@ -259,6 +268,7 @@ protected function createExecutable(Target $target) : Executable
259268 ->ignoreTables ($ this ->ignoreTables )
260269 ->produceFilePerTable ($ this ->filePerTable )
261270 ->dumpNoData ($ this ->noData )
271+ ->dumpRoutines ($ this ->routines )
262272 ->dumpStructureOnly ($ this ->structureOnly )
263273 ->dumpTo ($ this ->getDumpTarget ($ target ));
264274 // if compression is active and commands can be piped
0 commit comments