File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2929 $ maxsize = $ row ['tablesize ' ];
3030 }
3131}
32- $ maxsize = (int ) $ maxsize ;
33- $ avail = disk_free_space ('/ ' ); //# we have no idea where MySql stores the data, so this is only a crude check and warning.
34-
3532$ maxsize = (int ) ($ maxsize * 1.2 ); //# add another 20%
33+ $ row = Sql_Fetch_Row_Query ('select @@datadir ' );
34+ $ dataDir = $ row [0 ];
35+ $ avail = disk_free_space ($ dataDir );
3636
3737$ require_confirmation = !isset ($ _GET ['force ' ]) || $ _GET ['force ' ] != 'yes ' ;
3838
Original file line number Diff line number Diff line change @@ -229,9 +229,10 @@ function output($message)
229229 $ maxsize = $ row ['tablesize ' ];
230230 }
231231 }
232- $ maxsize = (int ) $ maxsize ;
233- $ avail = disk_free_space ('/ ' ); //# we have no idea where MySql stores the data, so this is only a crude check and warning.
234232 $ maxsize = (int ) ($ maxsize * 1.2 ); //# add another 20%
233+ $ row = Sql_Fetch_Row_Query ('select @@datadir ' );
234+ $ dataDir = $ row [0 ];
235+ $ avail = disk_free_space ($ dataDir );
235236
236237 //# convert to UTF8
237238 $ dbname = $ GLOBALS ['database_name ' ];
You can’t perform that action at this time.
0 commit comments