Internet Info, s.r.o. Lupa Měšec Podnikatel Root Zdroják DigiZone Slunečnice Vitalia TopDrive KupDnes Navrcholu NovýTarif Dobrý web Weblogy Woko Jagg Computer.cz SK: MojeLinky

Hlavní navigace

Názor k článku
Co nefunguje v MySQL a jak to obejít

Pavel Stěhule aura:90
16. 12. 2009 17:02

Re: ad Příkazy ukončující transakci

celé vlákno

např. postgresql.

postgres=# begin;
BEGIN
Time: 27,588 ms
postgres=# create table xx(a integer);
CREATE TABLE
Time: 200,168 ms
postgres=# insert into xx values(10);
INSERT 0 1
Time: 35,007 ms
postgres=# rollback;
ROLLBACK
Time: 0,682 ms
postgres=# select * from xx;
ERROR: relation „xx“ does not exist
LINE 1: select * from xx;
^
postgres=# create table xx(a integer);
CREATE TABLE
Time: 1,445 ms
postgres=# \d xx
Table „public.xx“
Column | Type | Modifiers
--------±--------±----------
a | integer |
postgres=# begin;
BEGIN
Time: 0,250 ms
postgres=# alter table xx add column b integer;
ALTER TABLE
Time: 0,537 ms
postgres=# insert into xx values(10,20);
INSERT 0 1
Time: 0,474 ms
postgres=# select * from xx;
a | b
----±---
10 | 20
(1 row)
Time: 0,380 ms
postgres=# rollback;
ROLLBACK
Time: 0,475 ms
postgres=# select * from xx;
 a


(0 rows)
Time: 1,129 ms
postgres=# \d xx
Table „public.xx“
Column | Type | Modifiers
--------±--------±----------
a | integer |