![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 853 Pomógł: 25 Dołączył: 27.08.2003 Skąd: Katowice Ostrzeżenie: (0%) ![]() ![]() |
wykonanie ponizszeg kodu
skutkuje wystapieniem nastepujacego bledu : Fatal error: 1192:Can't execute the given command because you have active locked tables or an active transaction Czy jest jakis sposob na uzycie TRUNCATE po zablokowaniu tabeli? |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 83 Pomógł: 0 Dołączył: 23.02.2005 Ostrzeżenie: (10%) ![]() ![]() |
Zastanów się chwilę...
Zablokowłeś tabelę dla zapisu i pytasz się jak usunąć rekordy? (IMG:http://forum.php.pl/style_emoticons/default/withstupidsmiley.gif) Edit: Pomyliłem blokadę READ z WRITE (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) Ten post edytował markac 30.08.2005, 10:43:55 |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 853 Pomógł: 25 Dołączył: 27.08.2003 Skąd: Katowice Ostrzeżenie: (0%) ![]() ![]() |
Cytat(markac @ 2005-08-03 21:35:47) Zastanów się chwilę... Zablokowłeś tabelę dla zapisu i pytasz się jak usunąć rekordy? (IMG:http://forum.php.pl/style_emoticons/default/withstupidsmiley.gif) w takim razie dlaczego DELETE FROM table dziala? zablokowanie do zapisu to nie tylko zablokowanie do wykonywania INSERT i UPDATE |
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 83 Pomógł: 0 Dołączył: 23.02.2005 Ostrzeżenie: (10%) ![]() ![]() |
Cytat TRUNCATE TABLE differs from DELETE FROM ... in the following ways: Truncate operations drop and re-create the table, which is much faster than deleting rows one by one. Not transaction-safe; you will get an error if you have an active transaction or an active table lock. Doesn't return the number of deleted rows. As long as the table definition file `table_name.frm' is valid, the table can be re-created this way, even if the data or index files have become corrupted. Mam nadzieję, że to trochę rozjaśniło sytuację (IMG:http://forum.php.pl/style_emoticons/default/cool.gif) |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 853 Pomógł: 25 Dołączył: 27.08.2003 Skąd: Katowice Ostrzeżenie: (0%) ![]() ![]() |
no rozjasnilo ;-) tylko tyrzeba bylo tak od razu ;-)
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 23.08.2025 - 04:32 |