siara-cc / esp32_arduino_sqlite3_lib

Sqlite3 Arduino library for ESP32
Apache License 2.0
350 stars 66 forks source link

SQL error: SQL logic error when try to rename table name #10

Closed pornpol closed 5 years ago

pornpol commented 5 years ago

SQL error: SQL logic error when I try to rename a table.

ALTER TABLE aa RENAME TO bb; SQL error: SQL logic error

siara-cc commented 5 years ago

I am unable to immediately ascertain whether this feature enabled or not. Is it really needed on a embedded device?

pornpol commented 5 years ago

Because of I cannot insert more data in one table due to memory limit. Then I try to rename old table and create new table to insert new data.

siara-cc commented 5 years ago

I see.. is it possible to keep the original name and give new name for the new table? It may take me sometime to get RENAME working. It was recently introduced and I am even thinking to rollback to older version SQLite because of memory limitations, if people are not using the new features.

tobozo commented 5 years ago

@pornpol you'll have less problems if you don't rename after creating the table and instead generate a unique name (timestamp?) before creating any table + file

pornpol commented 5 years ago

I create new table with timestamp and no nned to rename anymore. Thank you.

ANSB commented 2 years ago

If you want to really rename a table here is a way to do that: https://arduino.stackexchange.com/questions/85280/esp32-and-sqlite-alter-table-problem/85297#85297