Changing rowid in the FREE database
Open
Beginner friendly
Nobody has claimed this yet.
question
- Dominant language
- JavaScript
- Stars
- 2.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites:
docker run -d -p 1521:1521 -e ORACLE_PWD=admin container-registry.oracle.com/database/free:latest
CREATE USER nodejs_oracledb_tests IDENTIFIED BY nodejs_oracledb_tests;
GRANT ALL PRIVILEGES TO nodejs_oracledb_tests;
ALTER USER nodejs_oracledb_tests QUOTA UNLIMITED ON USERS;
export NODE_PATH=./lib/
export NODE_ORACLEDB_CONNECTIONSTRING=tcp://localhost/FREEPDB1
export NODE_ORACLEDB_USER=nodejs_oracledb_tests
export NODE_ORACLEDB_PASSWORD=nodejs_oracledb_tests
npx mocha ./test/lastRowid.js
Output:
Thin mode selected
228. lastRowid.js
1) 228.1 examples
? 228.2 MERGE statement
? 228.3 Negative - not applicable to executeMany() (39ms)
? 228.4 INSERT ALL statement
3 passing (390ms)
1 failing
1) 228. lastRowid.js
228.1 examples:
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
actual expected
'AAAlZDAQAAAAAAYDAAB'
+ expected - actual
-AAAlZDAAAAAAAYDAAB
+AAAlZDAQAAAAAYDAAB
at Context.<anonymous> (test\lastRowid.js:83:12)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
For some reason, this database (free) performs row shifting within files. Is there a way to harden the test against this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test/lastRowid.js, especially the assertion at line 83, and run the provided Docker, Oracle FREE, and npx mocha command to reproduce the rowid mismatch. Check how the example derives or compares the expected rowid across database versions; done means the test handles the FREE database's row shifting while still validating lastRowid behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- databases, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100