/ Check-in [9564d700]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix harmless compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | alter-table-rename-column
Files: files | file ages | folders
SHA3-256: 9564d7008c3fd804401a5da6ea342c6f4261db14e9f994d1a38883358a7c6f8c
User & Date: drh 2018-08-10 19:33:09
Context
2018-08-10
20:19
Ensure the schema cookie is changed when a column is renamed. check-in: 2dec9ea4 user: dan tags: alter-table-rename-column
19:33
Fix harmless compiler warnings. check-in: 9564d700 user: drh tags: alter-table-rename-column
19:19
When a column is renamed, update any references to it in REFERENCES clauses that belong to other tables. check-in: 191079bd user: dan tags: alter-table-rename-column
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/alter.c.

   929    929   static void renameColumnFunc(
   930    930     sqlite3_context *context,
   931    931     int NotUsed,
   932    932     sqlite3_value **argv
   933    933   ){
   934    934     sqlite3 *db = sqlite3_context_db_handle(context);
   935    935     struct RenameCtx sCtx;
   936         -  const char *zSql = sqlite3_value_text(argv[0]);
          936  +  const char *zSql = (const char*)sqlite3_value_text(argv[0]);
   937    937     int nSql = sqlite3_value_bytes(argv[0]);
   938         -  const char *zNew = sqlite3_value_text(argv[2]);
          938  +  const char *zNew = (const char*)sqlite3_value_text(argv[2]);
   939    939     int nNew = sqlite3_value_bytes(argv[2]);
   940         -  const char *zTable = sqlite3_value_text(argv[3]);
   941         -  int nTable = sqlite3_value_bytes(argv[3]);
   942         -  const char *zOld = sqlite3_value_text(argv[4]);
   943         -  int nOld = sqlite3_value_bytes(argv[4]);
          940  +  const char *zTable = (const char*)sqlite3_value_text(argv[3]);
          941  +  const char *zOld = (const char*)sqlite3_value_text(argv[4]);
   944    942   
   945    943     int rc;
   946    944     char *zErr = 0;
   947    945     Parse sParse;
   948    946     Walker sWalker;
   949         -  Table *pTab;
   950    947     Index *pIdx;
   951    948     char *zOut = 0;
   952    949   
   953    950     char *zQuot = 0;                /* Quoted version of zNew */
   954    951     int nQuot = 0;                  /* Length of zQuot in bytes */
   955    952     int i;
   956    953