-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
98 additions
and
19 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
add_subdirectory( src ) | ||
add_subdirectory( tests ) | ||
|
22 changes: 22 additions & 0 deletions
22
storage/innobase/libs/que_types/include/innodb/que_types/que_common_t.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
#include <innodb/univ/univ.h> | ||
|
||
#include <innodb/data_types/dfield_t.h> | ||
#include <innodb/que_types/que_node_t.h> | ||
|
||
/* Common struct at the beginning of each query graph node; the name of this | ||
substruct must be 'common' */ | ||
struct que_common_t { | ||
ulint type; /*!< query node type */ | ||
que_node_t *parent; /*!< back pointer to parent node, or NULL */ | ||
que_node_t *brother; /* pointer to a possible brother node */ | ||
dfield_t val; /*!< evaluated value for an expression */ | ||
ulint val_buf_size; | ||
/* buffer size for the evaluated value data, | ||
if the buffer has been allocated dynamically: | ||
if this field is != 0, and the node is a | ||
symbol node or a function node, then we | ||
have to free the data field in val | ||
explicitly */ | ||
}; |
6 changes: 6 additions & 0 deletions
6
storage/innobase/libs/que_types/include/innodb/que_types/que_node_t.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#pragma once | ||
|
||
#include <innodb/univ/univ.h> | ||
|
||
/* Pseudotype for all graph nodes */ | ||
typedef void que_node_t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
set( LIB_NAME que_types ) | ||
|
||
add_library( ${LIB_NAME} STATIC | ||
que_common_t.cpp | ||
que_node_t.cpp | ||
) | ||
|
||
target_compile_options( ${LIB_NAME} PRIVATE ) | ||
|
||
target_include_directories( | ||
${LIB_NAME} | ||
PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/../include | ||
) | ||
|
||
target_link_libraries( | ||
${LIB_NAME} | ||
PUBLIC | ||
data_types | ||
PRIVATE | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <innodb/que_types/que_common_t.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <innodb/que_types/que_node_t.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
set( TEST_NAME que_types-utests ) | ||
|
||
add_executable( ${TEST_NAME} | ||
base.cpp | ||
main.cpp | ||
) | ||
|
||
add_test( NAME ${TEST_NAME} COMMAND ${TEST_NAME} ) | ||
|
||
target_compile_options( ${TEST_NAME} PRIVATE ) | ||
|
||
target_include_directories( ${TEST_NAME} PRIVATE ) | ||
|
||
target_link_libraries( ${TEST_NAME} PRIVATE gtest que_types ) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <gtest/gtest.h> | ||
// #include <innodb/que_types/que_types.h> | ||
|
||
|
||
// | ||
// | ||
TEST( que_types, constructor ) | ||
{ | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <gtest/gtest.h> | ||
|
||
int main( int argc, char **argv ) | ||
{ | ||
::testing::InitGoogleTest(&argc, argv); | ||
return RUN_ALL_TESTS(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,7 @@ target_link_libraries( | |
io | ||
lock_types | ||
log_sn | ||
que_types | ||
read | ||
string | ||
trx_sys | ||
|