| 38 | |
| 39 | #ifdef DSQL_DEBUG |
| 40 | void DsqlCompilerScratch::dumpContextStack(const DsqlContextStack* stack) |
| 41 | { |
| 42 | printf("Context dump\n"); |
| 43 | printf("------------\n"); |
| 44 | |
| 45 | for (DsqlContextStack::const_iterator i(*stack); i.hasData(); ++i) |
| 46 | { |
| 47 | const dsql_ctx* context = i.object(); |
| 48 | |
| 49 | printf("scope: %2d; number: %2d; system: %d; returning: %d; alias: %-*.*s; " |
| 50 | "internal alias: %-*.*s\n", |
| 51 | context->ctx_scope_level, |
| 52 | context->ctx_context, |
| 53 | (context->ctx_flags & CTX_system) != 0, |
| 54 | (context->ctx_flags & CTX_returning) != 0, |
| 55 | MAX_SQL_IDENTIFIER_SIZE, MAX_SQL_IDENTIFIER_SIZE, context->ctx_alias.c_str(), |
| 56 | MAX_SQL_IDENTIFIER_SIZE, MAX_SQL_IDENTIFIER_SIZE, context->ctx_internal_alias.c_str()); |
| 57 | } |
| 58 | } |
| 59 | #endif |
| 60 | |
| 61 | |