Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
SEQUENCE jumping 19 values after database restart...

SEQUENCE jumping 19 values after database restart...

2006-07-04       - By Martin Cordova

 Back
Reply:     1     2     3     4  

Hello:

I have a sequence that jumps 19 values when used the first time after
a database restart.

Normally it works fine, until a Db restart, then jumps 19 values.

Basically there is a transaction that executes:

1.- select seq_corresp.nextval corresp_id from dual
2.- insert into TABLE (....) values (seq_corresp.CURRVAL,.....)

I am using latest MAXDB (KERNEL    7.6.00   BUILD 027-123-124-939)
with correspoding JDBC driver. This instance was updated from
7.6.0.16.

After the first jump it works normal again.

jdbc trace below:

---- Thread 5d50e1d9 tcpConnection-80 (See http://ion-80.ora-code.com)-3 Timestamp: 2006-07-04 01:34:53.562
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) (false)
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
=> com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected)
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> SAP DB
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> KERNEL    7.6.00   BUILD 027-123-124-939
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> SAP DB
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> package com.sap.dbtech.jdbc, MaxDB JDBC Driver, MySQL MaxDB, 7.6.0
 Build 024-000-005-241
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
=> com.sap.dbtech.jdbc.StatementSapDB@(protected)
com.sap.dbtech.jdbc.StatementSapDB@(protected) (select
seq_corresp.nextval corresp_id from dual
)
=> com.sap.dbtech.jdbc.ResultSetSapDB@(protected)
com.sap.dbtech.jdbc.ResultSetSapDB@(protected) ()
=> com.sap.dbtech.jdbc.ResultSetMetaDataSapDB@(protected)
com.sap.dbtech.jdbc.ResultSetMetaDataSapDB@(protected) ()
=> 1
com.sap.dbtech.jdbc.ResultSetMetaDataSapDB@(protected) (1)
=> CORRESP_ID
com.sap.dbtech.jdbc.ResultSetMetaDataSapDB@(protected) (1)
=> FIXED
com.sap.dbtech.jdbc.ResultSetMetaDataSapDB@(protected) (1)
=> 3
com.sap.dbtech.jdbc.ResultSetSapDB@(protected) ()
=> true
com.sap.dbtech.jdbc.ResultSetMetaDataSapDB@(protected) (1)
=> CORRESP_ID
com.sap.dbtech.jdbc.ResultSetSapDB@(protected) (1)
=> 1201
com.sap.dbtech.jdbc.ResultSetSapDB@(protected) ()
=> false
com.sap.dbtech.jdbc.ResultSetSapDB@(protected) ()
com.sap.dbtech.jdbc.StatementSapDB@(protected) ()
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
=> com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected)
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> SAP DB
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> KERNEL    7.6.00   BUILD 027-123-124-939
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> SAP DB
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> package com.sap.dbtech.jdbc, MaxDB JDBC Driver, MySQL MaxDB, 7.6.0
 Build 024-000-005-241
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
=> com.sap.dbtech.jdbc.StatementSapDB@(protected)
com.sap.dbtech.jdbc.StatementSapDB@(protected) (insert into CORRESP
(
  corresp_id,
  nro_doc,
  fec_doc,
  remitente,
  asunto,
  destino,
  fec_creacion,
  fec_actualiza,
  user_creacion,
  user_actualiza,
  hora_creacion,
  hora_actualiza,
  fec_recep,
  instruccion,
  status
)
values
(
  seq_corresp.CURRVAL,
  '65445',
  {d '2006-07-04'},
  'Mart?n C?rdova',
  'sdasd',
  'asdasd',
  {d '2006-07-04'},
  {d '2006-07-04'},
  'mcordova',
  'mcordova',
  '01:34:53',
  '01:34:53',
  {d '2006-07-04'},
  NULL,
  NULL
)

)
=> 1
com.sap.dbtech.jdbc.StatementSapDB@(protected) ()
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
=> com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected)
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> SAP DB
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> KERNEL    7.6.00   BUILD 027-123-124-939
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> SAP DB
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> package com.sap.dbtech.jdbc, MaxDB JDBC Driver, MySQL MaxDB, 7.6.0
 Build 024-000-005-241
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
=> com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected)
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> SAP DB
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> KERNEL    7.6.00   BUILD 027-123-124-939
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> SAP DB
com.sap.dbtech.jdbc.DatabaseMetaDataMaxDB@(protected) ()
=> package com.sap.dbtech.jdbc, MaxDB JDBC Driver, MySQL MaxDB, 7.6.0
 Build 024-000-005-241
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
=> false
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
com.sap.dbtech.jdbc.StatementSapDB@(protected) ()
com.sap.dbtech.jdbc.StatementSapDB@(protected) ()
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) (true)
com.sap.dbtech.jdbc.ConnectionSapDB@(protected) ()

Any help will be appreciated.

Regards,
Martin
--
Dinamica - RADical J2EE framework
open source, easy and powerful
http://www.martincordova.com

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)