taurusdb-core 0.5.0-rc.10 → 0.5.0-rc.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,11 +88,15 @@ function hasTaurusSpecificVariables(variables) {
88
88
  return TAURUS_VARIABLE_NAMES.some((name) => Object.prototype.hasOwnProperty.call(variables, name));
89
89
  }
90
90
  async function detectKernelInfo(session, variables) {
91
- const rawVersion = (await executeSingleValueQuery(session, "SELECT VERSION() AS version")) ?? "unknown";
91
+ const [rawVersionValue, taurusVersion] = await Promise.all([
92
+ executeSingleValueQuery(session, "SELECT VERSION() AS version"),
93
+ executeSingleValueQuery(session, "SELECT taurus_version() AS version"),
94
+ ]);
95
+ const rawVersion = rawVersionValue ?? "unknown";
92
96
  const versionComment = variables.version_comment;
93
- const combined = [rawVersion, versionComment].filter(Boolean).join(" ");
94
- const kernelVersion = extractKernelVersion(combined);
95
- const taurusSignals = [combined, variables.force_parallel_execute, variables.innodb_rds_backquery_enable]
97
+ const combined = [taurusVersion, rawVersion, versionComment].filter(Boolean).join(" ");
98
+ const kernelVersion = extractKernelVersion(taurusVersion) ?? extractKernelVersion(combined);
99
+ const taurusSignals = [taurusVersion, combined, variables.force_parallel_execute, variables.innodb_rds_backquery_enable]
96
100
  .filter((value) => typeof value === "string")
97
101
  .join(" ");
98
102
  const hasTaurusSignals = /taurus|huawei|gaussdb/i.test(taurusSignals) ||
@@ -38,10 +38,8 @@ export function extractKernelVersion(input) {
38
38
  if (!input) {
39
39
  return undefined;
40
40
  }
41
- const exact = input.match(/\b\d+\.\d+\.\d+\.\d+\b/);
42
- if (exact) {
43
- return exact[0];
44
- }
45
- const fallback = input.match(/\b\d+\.\d+\.\d+\b/);
46
- return fallback?.[0];
41
+ // TaurusDB kernel releases use a four-component 2.x.x.x version. Do not
42
+ // fall back to VERSION()'s MySQL compatibility value (for example 8.0.22),
43
+ // because feature gates are defined against the TaurusDB kernel version.
44
+ return input.match(/\b2\.\d+\.\d+\.\d+\b/)?.[0];
47
45
  }
@@ -19,6 +19,7 @@ export declare const ErrorCode: {
19
19
  readonly AUDIT_FAILED: "AUDIT_FAILED";
20
20
  readonly SERVER_BUSY: "SERVER_BUSY";
21
21
  readonly UNSUPPORTED_FEATURE: "UNSUPPORTED_FEATURE";
22
+ readonly FLASHBACK_VIEW_UNAVAILABLE: "FLASHBACK_VIEW_UNAVAILABLE";
22
23
  };
23
24
  export type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
24
25
  export type ToolError = {
@@ -18,6 +18,7 @@ export const ErrorCode = {
18
18
  AUDIT_FAILED: "AUDIT_FAILED",
19
19
  SERVER_BUSY: "SERVER_BUSY",
20
20
  UNSUPPORTED_FEATURE: "UNSUPPORTED_FEATURE",
21
+ FLASHBACK_VIEW_UNAVAILABLE: "FLASHBACK_VIEW_UNAVAILABLE",
21
22
  };
22
23
  export function formatSuccess(data, options) {
23
24
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taurusdb-core",
3
- "version": "0.5.0-rc.10",
3
+ "version": "0.5.0-rc.11",
4
4
  "description": "Shared TaurusDB data-plane engine for schema, SQL execution, guardrails, and diagnostics.",
5
5
  "license": "MIT",
6
6
  "repository": {