• [Info-ingres] x100 transaction

    From Martin Bowes@martin.bowes@ndph.ox.ac.uk to info-ingres@lists.planetingres.org on Fri May 7 10:43:04 2021
    From Newsgroup: comp.databases.ingres

    --_000_3d80aac9cb7e47b3ab7938d663951fa0ndphoxacuk_
    Content-Type: text/plain; charset="us-ascii"
    Content-Transfer-Encoding: quoted-printable
    X-WatchGuard-AntiVirus: part scanned. clean action=allow

    Hi All,

    On an x100 enabled database I did:

    drop table if exists base;
    create table base(...) with structure =3D x100;

    The base table does not exist, I only added the drop command in case I need=
    to rerun this creation script.

    So I was somewhat surprised to be confronted with error:
    E_US250E X100 statements are not allowed in this transaction.
    Create or access an X100 table at the start of a new transaction
    to enable X100 statement processing.

    But I can do this with no error:
    drop table if exists normal;
    create table normal(a integer4 not null not default);
    select count(1) from normal;
    insert into normal values(1);
    drop table if exists base;
    create table base(...) with structure =3D x100;

    This doesn't look right to me. Any ideas?

    Martin Bowes


    --_000_3d80aac9cb7e47b3ab7938d663951fa0ndphoxacuk_
    Content-Type: text/html; charset="us-ascii"
    Content-Transfer-Encoding: quoted-printable
    X-WatchGuard-AntiVirus: part scanned. clean action=allow

    <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40">
    <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=

    <meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)"> <style><!--
    /* Font Definitions */
    @font-face
    {font-family:"Cambria Math";
    panose-1:2 4 5 3 5 4 6 3 2 4;}
    @font-face
    {font-family:Calibri;
    panose-1:2 15 5 2 2 2 4 3 2 4;}
    @font-face
    {font-family:"Lucida Console";
    panose-1:2 11 6 9 4 5 4 2 2 4;}
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {margin:0cm;
    margin-bottom:.0001pt;
    font-size:11.0pt;
    font-family:"Calibri",sans-serif;
    mso-fareast-language:EN-US;}
    a:link, span.MsoHyperlink
    {mso-style-priority:99;
    color:#0563C1;
    text-decoration:underline;}
    a:visited, span.MsoHyperlinkFollowed
    {mso-style-priority:99;
    color:#954F72;
    text-decoration:underline;}
    span.EmailStyle17
    {mso-style-type:personal-compose;
    font-family:"Calibri",sans-serif;
    color:windowtext;}
    .MsoChpDefault
    {mso-style-type:export-only;
    font-family:"Calibri",sans-serif;
    mso-fareast-language:EN-US;}
    @page WordSection1
    {size:612.0pt 792.0pt;
    margin:72.0pt 72.0pt 72.0pt 72.0pt;}
    div.WordSection1
    {page:WordSection1;}
    </style><!--[if gte mso 9]><xml>
    <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <o:shapelayout v:ext=3D"edit">
    <o:idmap v:ext=3D"edit" data=3D"1" />
    </o:shapelayout></xml><![endif]-->
    </head>
    <body lang=3D"EN-GB" link=3D"#0563C1" vlink=3D"#954F72">
    <div class=3D"WordSection1">
    <p class=3D"MsoNormal">Hi All,<o:p></o:p></p>
    <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class=3D"MsoNormal">On an x100 enabled database I did:<o:p></o:p></p>
    <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class=3D"MsoNormal">drop table if exists base;<o:p></o:p></p>
    <p class=3D"MsoNormal">create table base(&#8230;) with structure =3D x100;<= o:p></o:p></p>
    <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class=3D"MsoNormal">The base table does not exist, I only added the drop=
    command in case I need to rerun this creation script.
    <o:p></o:p></p>
    <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class=3D"MsoNormal">So I was somewhat surprised to be confronted with er= ror:<o:p></o:p></p>
    <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:&quot;Lucida Console&quot;">E_US250E X100 statements = are not allowed in this transaction.<o:p></o:p></span></p>
    <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:&quot;Lucida Console&quot;">&nbsp;&nbsp;&nbsp; Create=
    or access an X100 table at the start of a new transaction<o:p></o:p></span= ></p>
    <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:&quot;Lucida Console&quot;">&nbsp;&nbsp;&nbsp; to ena= ble X100 statement processing.<o:p></o:p></span></p>
    <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class=3D"MsoNormal">But I can do this with no error:<o:p></o:p></p>
    <p class=3D"MsoNormal">drop table if exists normal;<o:p></o:p></p>
    <p class=3D"MsoNormal">create table normal(a integer4 not null not default)= ;<o:p></o:p></p>
    <p class=3D"MsoNormal">select count(1) from normal;<o:p></o:p></p>
    <p class=3D"MsoNormal">insert into normal values(1);<o:p></o:p></p>
    <p class=3D"MsoNormal">drop table if exists base;<o:p></o:p></p>
    <p class=3D"MsoNormal">create table base(&#8230;) with structure =3D x100;<= o:p></o:p></p>
    <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class=3D"MsoNormal">This doesn&#8217;t look right to me. Any ideas?<o:p>= </o:p></p>
    <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class=3D"MsoNormal">Martin Bowes<o:p></o:p></p>
    <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
    </div>
    </body>
    </html>

    --_000_3d80aac9cb7e47b3ab7938d663951fa0ndphoxacuk_--
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Karl Schendel@schendel@kbcomputer.com to Martin Bowes on Fri May 7 10:25:38 2021
    From Newsgroup: comp.databases.ingres


    On May 7, 2021, at 6:43 AM, Martin Bowes <martin.bowes@ndph.ox.ac.uk> wrote:

    Hi All,

    On an x100 enabled database I did:

    drop table if exists base;
    create table base(rCa) with structure = x100;

    The base table does not exist, I only added the drop command in case I need to rerun this creation script.

    So I was somewhat surprised to be confronted with error:
    E_US250E X100 statements are not allowed in this transaction.
    Create or access an X100 table at the start of a new transaction
    to enable X100 statement processing.

    You can put a commit after the drop if exists.
    What's going on is that the delay_txn_start config parameter is probably set to ON.
    That tells the DBMS server to not bother starting an X100 transaction when an Ingres transaction starts, unless something x100-y is being done. The initial drop
    table doesn't force an x100 transaction start because there's no x100 work to do.
    The create table does an explicit check to see if it's in an Ingres transaction but
    no x100 transaction and throws that error. Once X100 tables exist, the check is
    a little different and you don't get the error.
    Karl
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Martin Bowes@martin.bowes@ndph.ox.ac.uk to Karl Schendel on Tue May 11 10:09:43 2021
    From Newsgroup: comp.databases.ingres

    Hi Karl,

    What's going on is that the delay_txn_start config parameter is probably set to ON.
    Yes.

    That tells the DBMS server to not bother starting an X100 transaction when an Ingres transaction starts, unless something x100-y is being done. The initial drop table doesn't force an x100 transaction start because there's no x100 work to do. The create table does an explicit check to see if it's in an Ingres transaction but no x100 transaction and throws that error.

    Seems fair.

    Once X100 tables exist, the check is a little different and you don't get the error.

    Whoa! An initialisation condition.

    So starting with an empty database...

    The drop table if exists / create table with structure = x100 fails as before.

    However, if we ensure we have at least one existing x100 table first...:

    create table dummy(id integer4 not null not default) with structure = x100; commit;

    drop table if exists base;
    create table base(id integer4 not null not default) with structure = x100; commit;

    That now works as expected.

    Marty
    _______________________________________________
    Info-ingres mailing list
    Info-ingres@lists.planetingres.org https://lists.planetingres.org/mailman/listinfo/info-ingres
    --- Synchronet 3.21b-Linux NewsLink 1.2