From: Reindl Harald Date: February 23 2011 10:43pm Subject: Re: auto_increment by more than 1 List-Archive: http://lists.mysql.com/mysql/224486 Message-Id: <4D658D7B.8050006@thelounge.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCB9334FA155D783A664DCA94" --------------enigCB9334FA155D783A664DCA94 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am 23.02.2011 22:55, schrieb Singer X.J. Wang: > Yes, you can set it up so that it increases it by X only for that state= ment.. eg. >=20 > [other stuff] > set auto_increment_increment =3D X; > insert into that table you want > set auto_increment_increment =3D 1; > [other stuff] >=20 > Now you have to remmeber doing that everywhere.. and everytime.. this was not the question, but hopefully your app does not inline-query i= n every second line, if so you should think about the apllication design it is generally senseless to change this value if you are not using master/master-replications where you do this globally > On Wed, Feb 23, 2011 at 16:42, Reindl Harald > wrote: > =20 > Am 23.02.2011 22:29, schrieb Jim McNeely: > > I have read the manual, and you're right, the auto-increment_incr= ement is a system wide setting >=20 > No, scope session means "set VAR=3Dvalue" >=20 > Command-Line Format --auto_increment_increment[=3D#] > Option-File Format auto_increment_increment > Option Sets Variable Yes, auto_increment_increment > Variable Name auto_increment_increment > Variable Scope Global, Session >=20 >=20 > -- > The best compliment you could give Pythian for our service is a referra= l. >=20 --=20 Mit besten Gr=C3=BC=C3=9Fen, Reindl Harald the lounge interactive design GmbH A-1060 Vienna, Hofm=C3=BChlgasse 17 CTO / software-development / cms-solutions p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40 icq: 154546673, http://www.thelounge.net/ --------------enigCB9334FA155D783A664DCA94 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk1ljXsACgkQhmBjz394AnluJACfW3kVCXEJzv1T5Sx84nqZ0lGt HisAnRmh9RR0auiTUmVdF1fmcG+dCEWy =aId4 -----END PGP SIGNATURE----- --------------enigCB9334FA155D783A664DCA94--