[MDEV-9071] Getting error ORA-12899: value too large for column inserting from MariaDB to Oracle Created: 2015-11-02 Updated: 2023-12-05 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.0 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andy Ferretti | Assignee: | Olivier Bertrand |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Environment: |
10.0.20-MariaDB-log |
||
| Description |
|
From MariaDB inserting into Oracle table using linked table.
MariaDB:
Fixed by redefining table simple in Oracle to length of 6: Able to insert from MariaDB to Oracle.
|
| Comments |
| Comment by Olivier Bertrand [ 2015-11-05 ] | ||||||||||||||||||||||||||||||||||||||
|
I don't understand how a one letter value ("B") can be regarded by unixODBC as having a length of 6. On Windows 7 I cannot reproduce this error.
The above creates and inserts one line into the table simple in Oracle.
The CONNECT simple_table is created with varchar(5):
This command is executed successfully.
This last one replies:
| ||||||||||||||||||||||||||||||||||||||
| Comment by Andy Ferretti [ 2015-11-05 ] | ||||||||||||||||||||||||||||||||||||||
|
When I first had this problem, COL1 was char(1). I tried a few solutions, first using varchar2(1), and then increasing it to 5. Each time, it lists the actual as one greater than the the value that I use when I create the table. However, if I redefine the Oracle table to have one extra character, it works. OK. -------------- COL1 COL2 -------------- -------------- -------------- -------------- COL1 COL2 -------------- -------------- COL1 COL2 | ||||||||||||||||||||||||||||||||||||||
| Comment by Andy Ferretti [ 2015-11-05 ] | ||||||||||||||||||||||||||||||||||||||
|
Would you mind running this command against your Oracle database? | ||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2015-11-05 ] | ||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||
| Comment by Andy Ferretti [ 2015-11-05 ] | ||||||||||||||||||||||||||||||||||||||
|
Thanks, this matches the values that I have. I'll have to keep digging. | ||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2015-11-06 ] | ||||||||||||||||||||||||||||||||||||||
|
I could not reproduce the problem. Oracle:
MariaDB:
returns
MariaDB:
returns
| ||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2015-11-06 ] | ||||||||||||||||||||||||||||||||||||||
|
Andy, can you please post the entire simple.sql ? Thanks. | ||||||||||||||||||||||||||||||||||||||
| Comment by Andy Ferretti [ 2015-11-06 ] | ||||||||||||||||||||||||||||||||||||||
|
Here is the script with the create. I added the " DEFAULT CHARSET=latin1 " from your example and tried again (same results).
And here is an additional script:
Here is my script on Oracle:
| ||||||||||||||||||||||||||||||||||||||
| Comment by Julien Fritsch [ 2018-03-22 ] | ||||||||||||||||||||||||||||||||||||||
|
bertrandop may I ask if this is really in Progress still? I guess, no. And if not, is that planned or should we close it, maybe? | ||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2020-07-28 ] | ||||||||||||||||||||||||||||||||||||||
|
By the way, as there are many problems with ODBC, especially on Linux, could you try the same using JDBC instead? So we can be sure it is not an ODBC issue. |