| 2951 | // |
| 2952 | |
| 2953 | static act* par_start_transaction() |
| 2954 | { |
| 2955 | act* action = MSC_action(0, ACT_start); |
| 2956 | |
| 2957 | if (terminator()) |
| 2958 | { |
| 2959 | PAR_end(); |
| 2960 | return action; |
| 2961 | } |
| 2962 | |
| 2963 | gpre_tra* trans = (gpre_tra*) MSC_alloc(TRA_LEN); |
| 2964 | |
| 2965 | // get the transaction handle |
| 2966 | |
| 2967 | if (!gpreGlob.token_global.tok_symbol) |
| 2968 | trans->tra_handle = PAR_native_value(false, true); |
| 2969 | |
| 2970 | // loop reading the various transaction options |
| 2971 | |
| 2972 | while (gpreGlob.token_global.tok_keyword != KW_RESERVING && |
| 2973 | gpreGlob.token_global.tok_keyword != KW_USING && !terminator()) |
| 2974 | { |
| 2975 | if (MSC_match(KW_READ_ONLY)) |
| 2976 | { |
| 2977 | trans->tra_flags |= TRA_ro; |
| 2978 | continue; |
| 2979 | } |
| 2980 | if (MSC_match(KW_READ_WRITE)) |
| 2981 | continue; |
| 2982 | |
| 2983 | if (MSC_match(KW_CONSISTENCY)) |
| 2984 | { |
| 2985 | trans->tra_flags |= TRA_con; |
| 2986 | continue; |
| 2987 | } |
| 2988 | |
| 2989 | //if (MSC_match (KW_READ_COMMITTED)) |
| 2990 | //{ |
| 2991 | // trans->tra_flags |= TRA_read_committed; |
| 2992 | // continue; |
| 2993 | //} |
| 2994 | |
| 2995 | if (MSC_match(KW_CONCURRENCY)) |
| 2996 | continue; |
| 2997 | |
| 2998 | if (MSC_match(KW_NO_WAIT)) |
| 2999 | { |
| 3000 | trans->tra_flags |= TRA_nw; |
| 3001 | continue; |
| 3002 | } |
| 3003 | |
| 3004 | if (MSC_match(KW_WAIT)) |
| 3005 | continue; |
| 3006 | |
| 3007 | if (MSC_match(KW_AUTOCOMMIT)) |
| 3008 | { |
| 3009 | trans->tra_flags |= TRA_autocommit; |
| 3010 | continue; |
no test coverage detected